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