]> git.ipfire.org Git - thirdparty/cups.git/blame - config-scripts/cups-pam.m4
Load cups into easysw/current.
[thirdparty/cups.git] / config-scripts / cups-pam.m4
CommitLineData
ef416fc2 1dnl
bc44d920 2dnl "$Id: cups-pam.m4 6649 2007-07-11 21:46:42Z mike $"
ef416fc2 3dnl
4dnl PAM stuff for the Common UNIX Printing System (CUPS).
5dnl
bc44d920 6dnl Copyright 2007 by Apple Inc.
ef416fc2 7dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
8dnl
9dnl These coded instructions, statements, and computer programs are the
bc44d920 10dnl property of Apple Inc. and are protected by Federal copyright
11dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
12dnl which should have been included with this file. If this file is
13dnl file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 14dnl
15
16AC_ARG_ENABLE(pam, [ --enable-pam turn on PAM support, default=yes])
17
18dnl Don't use PAM with AIX...
19if test $uname = AIX; then
20 enable_pam=no
21fi
22
23PAMDIR=""
24PAMFILE=""
25PAMLIBS=""
26PAMMOD="pam_unknown.so"
27
28if test x$enable_pam != xno; then
29 SAVELIBS="$LIBS"
30
31 AC_CHECK_LIB(dl,dlopen)
32 AC_CHECK_LIB(pam,pam_start)
33 AC_CHECK_HEADER(security/pam_appl.h)
34 if test x$ac_cv_header_security_pam_appl_h != xyes; then
35 AC_CHECK_HEADER(pam/pam_appl.h,
36 AC_DEFINE(HAVE_PAM_PAM_APPL_H))
37 fi
38
39 if test x$ac_cv_lib_pam_pam_start != xno; then
40 # Set the necessary libraries for PAM...
41 if test x$ac_cv_lib_dl_dlopen != xno; then
42 PAMLIBS="-lpam -ldl"
43 else
44 PAMLIBS="-lpam"
45 fi
46
47 # Find the PAM configuration directory, if any...
48 for dir in /private/etc/pam.d /etc/pam.d; do
49 if test -d $dir; then
50 PAMDIR=$dir
51 break;
52 fi
53 done
54 fi
55
56 LIBS="$SAVELIBS"
57
58 case "$uname" in
59 Darwin*)
60 # Darwin, MacOS X
61 PAMFILE="pam.darwin"
62 ;;
63 IRIX)
64 # SGI IRIX
65 PAMFILE="pam.irix"
66 ;;
67 *)
68 # All others; this test might need to be updated
69 # as Linux distributors move things around...
70 for mod in pam_unix2.so pam_unix.so pam_pwdb.so; do
71 if test -f /lib/security/$mod; then
72 PAMMOD="$mod"
73 break;
74 fi
75 done
76
77 PAMFILE="pam.std"
78 ;;
79 esac
80fi
81
82AC_SUBST(PAMDIR)
83AC_SUBST(PAMFILE)
84AC_SUBST(PAMLIBS)
85AC_SUBST(PAMMOD)
86
87dnl
bc44d920 88dnl End of "$Id: cups-pam.m4 6649 2007-07-11 21:46:42Z mike $".
ef416fc2 89dnl