]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
Check for PAM headers and libraries
authorJan Safranek <jsafrane@redhat.com>
Mon, 25 May 2009 07:48:58 +0000 (09:48 +0200)
committerJan Safranek <jsafrane@redhat.com>
Mon, 25 May 2009 07:48:58 +0000 (09:48 +0200)
When PAM module is enabled, configure script should check if
necessary headers and libraries are available.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
configure.in

index b1bd2b56579bb65a8d3be32fa29943e8e6aae85b..d6b28d39f09aa2b28c1310ac3a7513242c9ea09f 100644 (file)
@@ -113,6 +113,20 @@ AC_FUNC_REALLOC
 AC_FUNC_STAT
 AC_CHECK_FUNCS([getmntent hasmntopt memset mkdir rmdir strdup])
 
+if test x$with_pam = xtrue; then
+       AC_CHECK_LIB(
+               [pam],
+               [pam_syslog],
+               [],
+               [AC_MSG_ERROR([Cannot compile PAM module without libpam!])])
+
+       AC_CHECK_HEADERS(
+               [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
+               [],
+               [AC_MSG_ERROR([Cannot compile PAM module without necessary
+               header files!])])
+fi
+
 AC_CONFIG_FILES([Makefile
        tests/Makefile
        src/Makefile