pam: configure.in - --with-pwdb configure option added

baggins baggins at pld-linux.org
Thu Jul 14 17:32:32 CEST 2005


Author: baggins                      Date: Thu Jul 14 15:32:30 2005 GMT
Module: pam                           Tag: HEAD
---- Log message:
- --with-pwdb configure option added

---- Files affected:
pam:
   configure.in (1.63 -> 1.64) 

---- Diffs:

================================================================
Index: pam/configure.in
diff -u pam/configure.in:1.63 pam/configure.in:1.64
--- pam/configure.in:1.63	Thu Jul 14 14:34:37 2005
+++ pam/configure.in	Thu Jul 14 17:32:25 2005
@@ -227,16 +227,43 @@
 	AC_MSG_WARN(pam_userdb module will not be built!))
 AM_CONDITIONAL(DBLIB_PRESENT, test x$dblib_present = xtrue)
 
-AC_CHECK_LIB(pwdb, pwdb_posix_getlogin, pwdblib_present=true,
-	AC_MSG_WARN(pam_pwdb and pam_radius modules will not be built!))
+AC_MSG_CHECKING([whether to build pam_pwdb and pam_radius modules (requires libpwdb)])
+AC_ARG_ENABLE(pwdb, [  --enable-pwdb    Build pam_pwdb and pam_radius modules (requires libskey) [default=yes]],
+  if test "$enableval" = "yes" -o "$pwdb" = "yes"; then
+	AC_MSG_RESULT([yes])
+	enable_pwdb=true
+  else
+	AC_MSG_RESULT([no])
+	enable_pwdb=false
+  fi,
+  AC_MSG_RESULT([yes])
+  enable_pwdb=maybe
+)
+if test "$enable_pwdb" = "false"; then
+	AC_MSG_WARN(pam_pwdb and pam_radius modules will not be built!)
+else
+	AC_CHECK_LIB(pwdb, pwdb_posix_getlogin,
+		pwdblib_present=true,
+		if test "$enable_pwdb" = "maybe"; then
+			enable_pwdb=false
+			AC_MSG_WARN(pam_pwdb and pam_radius modules will not be built!)
+		else
+			AC_MSG_ERROR(Cannot find libpwdb)
+		fi)
+fi
 AM_CONDITIONAL(PWDBLIB_PRESENT, test x$pwdblib_present = xtrue)
 
 AC_MSG_CHECKING([whether to use pwdb lib for group, lastlog and mail modules])
 AC_ARG_ENABLE(want_pwdb, [  --enable-want-pwdb      Use pwdb lib for group, lastlog and mail modules [default=no]],
-  if test "$enableval" = "yes" -a "$pwdblib_present" = "true" ; then
+  if test "$enableval" = "yes"; then
+    if test "$pwdblib_present" = "true" ; then
   	want_pwdb=true
 	AC_DEFINE(WANT_PWDB)
 	AC_MSG_RESULT([yes])
+    else
+	AC_MSG_RESULT([no])
+	AC_MSG_ERROR(--enable-want-pwdb specified but libpwdb not found!)
+    fi
   else
 	AC_MSG_RESULT([no])
   fi,
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/pam/configure.in?r1=1.63&r2=1.64&f=u




More information about the pld-cvs-commit mailing list