From b9c8ce2bdd4045782c243605a1b999098bedcffc Mon Sep 17 00:00:00 2001 From: Noam Meltzer Date: Fri, 27 Jun 2014 05:44:37 +0000 Subject: NFSv4 client: add to build system Reviewed-by: Jakub Hrozek Reviewed-by: Roland Mainz --- src/conf_macros.m4 | 30 ++++++++++++++++++++++++++++++ src/external/libnfsidmap.m4 | 17 +++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/external/libnfsidmap.m4 (limited to 'src') diff --git a/src/conf_macros.m4 b/src/conf_macros.m4 index 3c9827b4d..8f8479459 100644 --- a/src/conf_macros.m4 +++ b/src/conf_macros.m4 @@ -691,3 +691,33 @@ AC_ARG_ENABLE([dbus-tests], [build_dbus_tests=$enableval], [build_dbus_tests=yes]) AM_CONDITIONAL([BUILD_DBUS_TESTS], [test x$build_dbus_tests = xyes]) + +AC_DEFUN([WITH_NFS], + [ AC_ARG_WITH([nfs_idmap], + [AC_HELP_STRING([--with-nfsv4-idmapd-plugin], + [Whether to build with NFSv4 IDMAP support [yes]] + ) + ], + [with_nfs_idmap=$withval], + with_nfs_idmap=yes + ) + + if test x"$with_nfs_idmap" = xyes; then + AC_DEFINE(BUILD_NFS_IDMAP, 1, [whether to build with NFSv4 IDMAP support]) + fi + AM_CONDITIONAL([BUILD_NFS_IDMAP], [test x"$with_nfs_idmap" = xyes]) + ]) + +AC_DEFUN([WITH_NFS_LIB_PATH], + [ AC_ARG_WITH([nfs-lib-path], + [AC_HELP_STRING([--with-nfs-lib-path=], + [Path to the nfs library [${libdir}]] + ) + ] + ) + nfslibpath="${libdir}" + if test x"$with_nfs_lib_path" != x; then + nfslibpath=$with_nfs_lib_path + fi + AC_SUBST(nfslibpath) + ]) diff --git a/src/external/libnfsidmap.m4 b/src/external/libnfsidmap.m4 new file mode 100644 index 000000000..5bb6d8684 --- /dev/null +++ b/src/external/libnfsidmap.m4 @@ -0,0 +1,17 @@ +AC_SUBST(NFSIDMAP_OBJ) +AC_SUBST(NFSIDMAP_CFLAGS) +AC_SUBST(NFSIDMAP_LIBS) + +PKG_CHECK_MODULES([NFSIDMAP], [libnfsidmap], [found_nfsidmap=yes], + [found_nfsidmap=no]) + +SSS_AC_EXPAND_LIB_DIR() +AS_IF([test x"$with_nfs" = xyes -a x"$found_nfsidmap" != xyes], + [AC_CHECK_HEADER([nfsidmap.h], + [AC_CHECK_LIB([nfsidmap], + [nfs4_init_name_mapping], + [NFSIDMAP_LIBS="-L$sss_extra_libdir -lnfsidmap"], + [AC_MSG_ERROR([libnfsidmap missing nfs4_init_name_mapping])], + [-L$sss_extra_libdir])], + [AC_MSG_ERROR([libnfsidmap header files are not installed])])] +) -- cgit