When PAM module is enabled, configure script should check if
necessary headers and libraries are available.

Signed-off-by: Jan Safranek <[email protected]>
---

 configure.in |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

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


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to