From 052073bbb6b90eba8822e8105ed4250fa1e2d72b Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Mon, 25 May 2009 09:48:58 +0200 Subject: Check for PAM headers and libraries When PAM module is enabled, configure script should check if necessary headers and libraries are available. Signed-off-by: Jan Safranek --- configure.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configure.in b/configure.in index b1bd2b5..d6b28d3 100644 --- a/configure.in +++ b/configure.in @@ -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 -- cgit