diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2013-03-10 22:11:43 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2013-03-10 23:30:27 +0100 |
commit | 0b5b4d1b13910cfcfd2efd3afc6bfad306a8d183 (patch) | |
tree | 6bcf8fc5195756df49d1381e111a816f476b745f /configure.ac | |
parent | 24c565cf053c0149e3b0a5098284314fed248c55 (diff) |
guess the value for --with-pam-seclib-dir if it is not specified
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 31d17e8..47fafd9 100644 --- a/configure.ac +++ b/configure.ac @@ -225,11 +225,21 @@ AC_DEFINE_UNQUOTED(NSLCD_SOCKET, "$NSLCD_SOCKET", [The location of the socket us AC_SUBST(NSLCD_SOCKET) # the directory PAM librabries are expected to be placed into +AC_MSG_CHECKING([location for PAM module]) AC_ARG_WITH(pam-seclib-dir, AS_HELP_STRING([--with-pam-seclib-dir=PAM_SECLIB_DIR], - [path to PAM security library @<:@/lib/security@:>@]), + [path to PAM security library @<:@auto@:>@]), [ PAM_SECLIB_DIR="$with_pam_seclib_dir" ], - [ PAM_SECLIB_DIR="/lib/security" ]) + [ PAM_SECLIB_DIR="auto" ]) +if test "x$PAM_SECLIB_DIR" = "xauto" +then + case "$target_os" in + solaris*) PAM_SECLIB_DIR="/usr/lib/security" ;; + freebsd*) PAM_SECLIB_DIR="/usr/lib" ;; + *) PAM_SECLIB_DIR="/lib/security" ;; + esac +fi +AC_MSG_RESULT($PAM_SECLIB_DIR) AC_DEFINE_UNQUOTED(PAM_SECLIB_DIR, "$PAM_SECLIB_DIR", [path to PAM security library]) AC_SUBST(PAM_SECLIB_DIR) |