summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNoam Meltzer <tsnoam@gmail.com>2014-06-27 05:44:37 +0000
committerJakub Hrozek <jhrozek@redhat.com>2014-09-02 10:56:43 +0200
commitb9c8ce2bdd4045782c243605a1b999098bedcffc (patch)
treea4b405348e38e6e071ea68443f471ebafab9cfac /src
parent4466604d78e5ffd017e69e6861f7d78242b351fb (diff)
downloadsssd-b9c8ce2bdd4045782c243605a1b999098bedcffc.tar.gz
sssd-b9c8ce2bdd4045782c243605a1b999098bedcffc.tar.xz
sssd-b9c8ce2bdd4045782c243605a1b999098bedcffc.zip
NFSv4 client: add to build system
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Roland Mainz <rmainz@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/conf_macros.m430
-rw-r--r--src/external/libnfsidmap.m417
2 files changed, 47 insertions, 0 deletions
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>],
+ [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])])]
+)