summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-09-02 15:54:13 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-09-02 17:29:36 +0200
commitfe008197e415e10994e1fd96a9ff060be77ac6c4 (patch)
tree4e2de57f0f7f0da90f6ad4c2899b5ba7799fec1a /src
parentf929e9e5a6daa71a22176b08eb7983fb4b708180 (diff)
downloadsssd-fe008197e415e10994e1fd96a9ff060be77ac6c4.tar.gz
sssd-fe008197e415e10994e1fd96a9ff060be77ac6c4.tar.xz
sssd-fe008197e415e10994e1fd96a9ff060be77ac6c4.zip
AUTOCONF: Update detection of libnfsidmap
Reviewed-by: Michal Židek <mzidek@redhat.com> Reviewed-by: Roland Mainz <rmainz@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/conf_macros.m410
-rw-r--r--src/external/libnfsidmap.m427
2 files changed, 20 insertions, 17 deletions
diff --git a/src/conf_macros.m4 b/src/conf_macros.m4
index c8fadd2ed..4aa58138c 100644
--- a/src/conf_macros.m4
+++ b/src/conf_macros.m4
@@ -709,19 +709,19 @@ AC_ARG_ENABLE([dbus-tests],
AM_CONDITIONAL([BUILD_DBUS_TESTS], [test x$build_dbus_tests = xyes])
AC_DEFUN([WITH_NFS],
- [ AC_ARG_WITH([nfs_idmap],
+ [ AC_ARG_WITH([nfsv4-idmapd-plugin],
[AC_HELP_STRING([--with-nfsv4-idmapd-plugin],
[Whether to build with NFSv4 IDMAP support [yes]]
)
],
- [with_nfs_idmap=$withval],
- with_nfs_idmap=yes
+ [with_nfsv4_idmap=$withval],
+ [with_nfsv4_idmap=yes]
)
- if test x"$with_nfs_idmap" = xyes; then
+ if test x"$with_nfsv4_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])
+ AM_CONDITIONAL([BUILD_NFS_IDMAP], [test x"$with_nfsv4_idmap" = xyes])
])
AC_DEFUN([WITH_NFS_LIB_PATH],
diff --git a/src/external/libnfsidmap.m4 b/src/external/libnfsidmap.m4
index 5bb6d8684..56c7b55bc 100644
--- a/src/external/libnfsidmap.m4
+++ b/src/external/libnfsidmap.m4
@@ -2,16 +2,19 @@ AC_SUBST(NFSIDMAP_OBJ)
AC_SUBST(NFSIDMAP_CFLAGS)
AC_SUBST(NFSIDMAP_LIBS)
-PKG_CHECK_MODULES([NFSIDMAP], [libnfsidmap], [found_nfsidmap=yes],
- [found_nfsidmap=no])
+AS_IF([test x"$with_nfsv4_idmap" = xyes], [
+ 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])])]
-)
+ SSS_AC_EXPAND_LIB_DIR()
+ AS_IF([test 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]
+If you want to build sssd without nfs idmap pluging then specify
+--without-nfsv4-idmapd-plugin when running configure.)])])
+])