/* Define to 1 if you use PAM authentication. */
#undef HAVE_PAM
+/* Define to 1 if you have the `pam_getenvlist' function. */
+#undef HAVE_PAM_GETENVLIST
+
/* Define to 1 if you use a specific PAM session for sudo -i. */
#undef HAVE_PAM_LOGIN
fi
if test "$with_pam" = "yes"; then
+ # Older PAM implementations lack pam_getenvlist
+ OLIBS="$LIBS"
+ LIBS="$LIBS -lpam $lt_cv_dlopen_libs"
+ for ac_func in pam_getenvlist
+do :
+ ac_fn_c_check_func "$LINENO" "pam_getenvlist" "ac_cv_func_pam_getenvlist"
+if test "x$ac_cv_func_pam_getenvlist" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PAM_GETENVLIST 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$OLIBS"
SUDO_LIBS="${SUDO_LIBS} -lpam $lt_cv_dlopen_libs"
$as_echo "#define HAVE_PAM 1" >>confdefs.h
fi
if test "$with_pam" = "yes"; then
+ # Older PAM implementations lack pam_getenvlist
+ OLIBS="$LIBS"
+ LIBS="$LIBS -lpam $lt_cv_dlopen_libs"
+ AC_CHECK_FUNCS(pam_getenvlist)
+ LIBS="$OLIBS"
dnl
dnl Some platforms need libdl for dlopen
dnl