-dnl $Id: pam-check.m4,v 1.5 2009-11-23 20:09:50 franklahm Exp $
dnl PAM finding macro
-AC_DEFUN([AC_PATH_PAM], [
+AC_DEFUN([AC_NETATALK_PATH_PAM], [
+ netatalk_cv_use_pam=no
AC_ARG_WITH(pam, [ --with-pam[[=PATH]] specify path to PAM installation [[auto]]],
[
require_pam="yes"
PAM_ACCOUNT=system
PAM_PASSWORD=system
PAM_SESSION=system
+ dnl Solaris 11+
+ elif test -f "$pampath/other" ; then
+ PAM_DIRECTIVE=include
+ PAM_AUTH=${PAMDIR}etc/pam.d/other
+ PAM_ACCOUNT=${PAMDIR}etc/pam.d/other
+ PAM_PASSWORD=${PAMDIR}etc/pam.d/other
+ PAM_SESSION=${PAMDIR}etc/pam.d/other
dnl Fallback
else
PAM_DIRECTIVE=required
AC_MSG_CHECKING([whether to enable PAM support])
if test "x$pam_found" = "xno"; then
+ netatalk_cv_install_pam=no
if test "x$require_pam" = "xyes"; then
AC_MSG_ERROR([PAM support missing])
else
else
AC_MSG_RESULT([yes])
ifelse([$1], , :, [$1])
+ use_pam_so=yes
+ compile_pam=yes
+ netatalk_cv_use_pam=yes
+ AC_DEFINE(USE_PAM, 1, [Define to enable PAM support])
fi
- LIB_REMOVE_USR_LIB(PAM_LIBS)
- CFLAGS_REMOVE_USR_INCLUDE(PAM_CFLAGS)
+ AC_ARG_WITH(
+ pam-confdir,
+ [AS_HELP_STRING([--with-pam-confdir=PATH],[Path to PAM config dir (default: ${sysconfdir}/pam.d)])],
+ ac_cv_pamdir=$withval,
+ ac_cv_pamdir='${sysconfdir}/pam.d'
+ )
+
+ PAMDIR="$ac_cv_pamdir"
+
+ LIB_REMOVE_USR_LIB(PAM_LIBS)
+ CFLAGS_REMOVE_USR_INCLUDE(PAM_CFLAGS)
AC_SUBST(PAMDIR)
AC_SUBST(PAM_CFLAGS)
AC_SUBST(PAM_LIBS)