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. Signed-off-by: Gaetan Nadon <[email protected]> --- configure.ac | 22 ++++++++++++---------- 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 -- 1.6.0.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
