2 dnl "$Id: cups-pam.m4 7960 2008-09-17 19:42:02Z mike $"
4 dnl PAM stuff for the Common UNIX Printing System (CUPS).
6 dnl Copyright 2007-2009 by Apple Inc.
7 dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
9 dnl These coded instructions, statements, and computer programs are the
10 dnl property of Apple Inc. and are protected by Federal copyright
11 dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 dnl which should have been included with this file. If this file is
13 dnl file is missing or damaged, see the license at "http://www.cups.org/".
16 AC_ARG_ENABLE(pam, [ --disable-pam disable PAM support])
17 AC_ARG_WITH(pam_module, [ --with-pam-module specify the PAM module to use])
19 dnl Don't use PAM with AIX...
20 if test $uname = AIX; then
27 PAMMOD="pam_unknown.so"
29 if test x$enable_pam != xno; then
32 AC_CHECK_LIB(dl,dlopen)
33 AC_CHECK_LIB(pam,pam_start)
34 AC_CHECK_LIB(pam,pam_set_item,AC_DEFINE(HAVE_PAM_SET_ITEM))
35 AC_CHECK_LIB(pam,pam_setcred,AC_DEFINE(HAVE_PAM_SETCRED))
36 AC_CHECK_HEADER(security/pam_appl.h)
37 if test x$ac_cv_header_security_pam_appl_h != xyes; then
38 AC_CHECK_HEADER(pam/pam_appl.h,
39 AC_DEFINE(HAVE_PAM_PAM_APPL_H))
42 if test x$ac_cv_lib_pam_pam_start != xno; then
43 # Set the necessary libraries for PAM...
44 if test x$ac_cv_lib_dl_dlopen != xno; then
50 # Find the PAM configuration directory, if any...
51 for dir in /private/etc/pam.d /etc/pam.d; do
64 if test "x$with_pam_module" != x; then
65 PAMFILE="pam.$with_pam_module"
66 elif test -f /usr/lib/pam/pam_opendirectory.so.2; then
67 PAMFILE="pam.opendirectory"
69 PAMFILE="pam.securityserver"
79 # All others; this test might need to be updated
80 # as Linux distributors move things around...
81 if test "x$with_pam_module" != x; then
82 PAMMOD="pam_${with_pam_module}.so"
84 for mod in pam_unix2.so pam_unix.so pam_pwdb.so; do
85 if test -f /lib/security/$mod; then
103 dnl End of "$Id: cups-pam.m4 7960 2008-09-17 19:42:02Z mike $".