[SSSD] [PATCH] AUTOCONF: Update detection of libnfsidmap
Lukas Slebodnik
lslebodn at redhat.com
Tue Sep 2 14:29:29 UTC 2014
ehlo,
There were used two variables with_nfs_idmap and with_nfs,
it cuased problems with detection of nfsidmap.h and thus some parts were
ignored in configure time.
patch is attached.
LS
-------------- next part --------------
>From f9829b0340cf7cdba209b553b0e00bfb95df60f6 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Tue, 2 Sep 2014 15:54:13 +0200
Subject: [PATCH] AUTOCONF: Update detection of libnfsidmap
---
src/conf_macros.m4 | 10 +++++-----
src/external/libnfsidmap.m4 | 27 +++++++++++++++------------
2 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/src/conf_macros.m4 b/src/conf_macros.m4
index 8f8479459594283696f09c3ea9d79be3229ef3e8..7b2546bf0bf7a8a38534f9a42f43d012cbaf263e 100644
--- a/src/conf_macros.m4
+++ b/src/conf_macros.m4
@@ -693,19 +693,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 5bb6d8684732e1d38e1c802dfaedf0ebba281285..56c7b55bce6db62208f26749aa089e6decaddb39 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.)])])
+])
--
2.1.0
More information about the sssd-devel
mailing list