summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-05-27 22:44:17 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-06-03 10:01:03 +0200
commitd2d21d45a88d0869f860e215c2cf946f032818ca (patch)
treedea93f8dbd01e9c4cedb6fe2e6982f395727abb0
parent5385172799f6dea59fe1c0ef8f482db59bfc9c5c (diff)
downloadsssd-d2d21d45a88d0869f860e215c2cf946f032818ca.tar.gz
sssd-d2d21d45a88d0869f860e215c2cf946f032818ca.tar.xz
sssd-d2d21d45a88d0869f860e215c2cf946f032818ca.zip
CONFIGURE: Enhance detection of pam
Reviewed-by: Sumit Bose <sbose@redhat.com>
-rw-r--r--Makefile.am4
-rw-r--r--src/external/pam.m418
2 files changed, 18 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 0d2472920..0fa613505 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1879,7 +1879,7 @@ noinst_PROGRAMS += autofs_test_client
endif
pam_test_client_SOURCES = src/sss_client/pam_test_client.c
-pam_test_client_LDADD = -lpam -lpam_misc
+pam_test_client_LDADD = $(PAM_LIBS) $(PAM_MISC_LIBS)
if BUILD_AUTOFS
autofs_test_client_SOURCES = \
@@ -1926,7 +1926,7 @@ pam_sss_la_SOURCES = \
pam_sss_la_LIBADD = \
$(CLIENT_LIBS) \
- -lpam
+ $(PAM_LIBS)
pam_sss_la_LDFLAGS = \
-module \
-avoid-version \
diff --git a/src/external/pam.m4 b/src/external/pam.m4
index 40c8fd0dc..90f89bee3 100644
--- a/src/external/pam.m4
+++ b/src/external/pam.m4
@@ -1,6 +1,20 @@
AC_SUBST(PAM_LIBS)
+AC_SUBST(PAM_MISC_LIBS)
-AC_CHECK_HEADERS([security/pam_appl.h security/pam_misc.h security/pam_modules.h],
- [AC_CHECK_LIB(pam, pam_get_item, [ PAM_LIBS="-lpam" ], [AC_MSG_ERROR([PAM must support pam_get_item])])],
+AC_CHECK_HEADERS([security/pam_appl.h security/pam_modules.h],
+ [AC_CHECK_LIB([pam], [pam_get_item],
+ [PAM_LIBS="-lpam"],
+ [AC_MSG_ERROR([PAM must support pam_get_item])])],
[AC_MSG_ERROR([PAM development libraries not installed])]
)
+
+AC_CHECK_HEADERS([security/pam_ext.h security/pam_modutil.h])
+AC_CHECK_HEADERS([security/pam_misc.h security/_pam_macros.h])
+AC_CHECK_HEADERS([security/openpam.h],,,[
+ #ifdef HAVE_SECURITY_PAM_APPL_H
+ #include <security/pam_appl.h>
+ #endif
+ ])
+
+AC_CHECK_LIB([pam_misc], [misc_conv],
+ [PAM_MISC_LIBS="-lpam_misc"])