summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-11-22 16:08:18 -0500
committerGaetan Nadon <memsize@videotron.ca>2010-11-24 19:58:40 -0500
commit5718767b882dc46f9393fd6b42f443227061a807 (patch)
treede6bb1a5b1a1cfd11cfb144b091827379a078381 /configure.ac
parent529a045fa6a25334be469f633531fe1324dcf14a (diff)
config: upgrade the checking for PAM support
Use "auto" rather than "try" for consistency with other modules. Update help string to mention default value. Unchanged: if configured --with-pam and -lpam is misisng, abort the configuration. Continue with USE_PAM rather than HAVE_PAM_OPEN_SESSION as we are checking for a feature rather a function alone. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 12 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index e2e15f6..268b0a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,17 +119,19 @@ AC_CHECK_DECL(key_setnet,
#include <rpc/key_prot.h>
])
-# Check for PAM support
-use_pam_default=try
-AC_ARG_WITH(pam, AC_HELP_STRING([--with-pam],[Use PAM for authentication]),
- [USE_PAM=$withval], [USE_PAM=$use_pam_default])
+# Check for pluggable authentication modules (PAM) support
+AC_ARG_WITH(pam, AS_HELP_STRING([--with-pam],
+ [Use PAM for authentication (default is autodetected)]),
+ [USE_PAM=$withval], [USE_PAM=auto])
if test "x$USE_PAM" != "xno" ; then
- AC_SEARCH_LIBS(pam_open_session,[pam])
- AC_CHECK_FUNC(pam_open_session,
- [AC_DEFINE(USE_PAM,1,[Use PAM for authentication])],
- [if test "x$USE_PAM" != "xtry" ; then
- AC_MSG_ERROR([PAM support requested, but pam_open_session not found.])
- fi])
+ AC_SEARCH_LIBS([pam_open_session], [pam],
+ [AC_CHECK_FUNC([pam_open_session],
+ [AC_DEFINE(USE_PAM,1,[Use PAM for authentication])]
+ )],
+ [AS_IF([test "x$USE_PAM" = "xyes"],
+ [AC_MSG_ERROR([PAM support requested, but pam_open_session not found.])]
+ )]
+ )
fi
use_selinux_default=no