+ fi
+ CFLAGS="$savedCFLAGS"
+ LDFLAGS="$savedLDFLAGS"
+ LIBS="$savedLIBS"
+ fi
+
+ netatalk_cv_install_pam=yes
+ if test x"$pam_found" = "xyes" -a "x$PAMDIR" = "xNONE"; then
+ AC_MSG_WARN([PAM support can be compiled, but the install location for the netatalk.pamd file could not be determined. Either install this file by hand or specify the install path.])
+ netatalk_cv_install_pam=no
+ else
+ dnl Check for some system|common auth file
+ AC_MSG_CHECKING([for includable common PAM config])
+ pampath="${PAMDIR}etc/pam.d"
+ dnl Debian/SuSE
+ if test -f "$pampath/common-auth" ; then
+ PAM_DIRECTIVE=include
+ PAM_AUTH=common-auth
+ PAM_ACCOUNT=common-account
+ PAM_PASSWORD=common-password
+ PAM_SESSION=common-session
+ dnl RHEL/FC
+ elif test -f "$pampath/system-auth" ; then
+ PAM_DIRECTIVE=include
+ PAM_AUTH=system-auth
+ PAM_ACCOUNT=system-auth
+ PAM_PASSWORD=system-auth
+ PAM_SESSION=system-auth
+ dnl FreeBSD
+ elif test -f "$pampath/system" ; then
+ PAM_DIRECTIVE=include
+ PAM_AUTH=system
+ PAM_ACCOUNT=system
+ PAM_PASSWORD=system
+ PAM_SESSION=system
+ dnl Fallback
+ else
+ PAM_DIRECTIVE=required
+ PAM_AUTH=pam_unix.so
+ PAM_ACCOUNT=pam_unix.so
+ PAM_PASSWORD="pam_unix.so use_authtok"
+ PAM_SESSION=pam_unix.so
+ fi
+
+ if test "x$PAM_DIRECTIVE" != "xrequired" ; then
+ AC_MSG_RESULT([yes ($PAM_DIRECTIVE $PAM_AUTH)])
+ else
+ AC_MSG_RESULT([no (using defaut pam_unix.so)])
+ fi