1 dnl $Id: pam-check.m4,v 1.2 2001-11-25 21:48:01 srittau Exp $
4 AC_DEFUN([AC_PATH_PAM], [
5 AC_MSG_CHECKING([for PAM])
6 AC_ARG_WITH(pam, [ --with-pam=PATH specify path to PAM installation],
9 if test "x$withval" = "xno"; then
12 elif test "x$withval" = "xyes"; then
18 [PAMDIR="NONE";require_pam="no"]
21 if test "x$PAMDIR" = "xNONE" -a "x$require_pam" != "xnever"; then
23 pam_paths="/ /usr /usr/local"
24 for path in $pam_paths; do
25 if test -d "$path/etc/pam.d"; then
36 if test "x$PAMDIR" != "xNONE"; then
37 AC_MSG_RESULT([yes (path: $PAMDIR)])
38 AC_CHECK_HEADER([security/pam_appl.h],[
39 AC_CHECK_LIB(pam, pam_set_item, [
40 PAM_CFLAGS="-I$PAMDIR/include"
41 PAM_LIBS="-L$PAMDIR/lib -lpam"
49 if test "x$pam_found" = "xno"; then
50 if test "x$require_pam" = "xyes"; then
51 AC_MSG_ERROR([PAM support missing])
53 ifelse([$2], , :, [$2])
55 ifelse([$1], , :, [$1])