]> git.ipfire.org Git - thirdparty/cups.git/blame - 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
CommitLineData
ef416fc2 1dnl
c07d5b2d 2dnl "$Id: cups-pam.m4 177 2006-06-21 00:20:03Z jlovell $"
ef416fc2 3dnl
4dnl PAM stuff for the Common UNIX Printing System (CUPS).
5dnl
6dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
7dnl
8dnl These coded instructions, statements, and computer programs are the
9dnl property of Easy Software Products and are protected by Federal
10dnl copyright law. Distribution and use rights are outlined in the file
11dnl "LICENSE.txt" which should have been included with this file. If this
12dnl file is missing or damaged please contact Easy Software Products
13dnl at:
14dnl
15dnl Attn: CUPS Licensing Information
16dnl Easy Software Products
17dnl 44141 Airport View Drive, Suite 204
18dnl Hollywood, Maryland 20636 USA
19dnl
20dnl Voice: (301) 373-9600
21dnl EMail: cups-info@cups.org
22dnl WWW: http://www.cups.org
23dnl
24
25AC_ARG_ENABLE(pam, [ --enable-pam turn on PAM support, default=yes])
26
27dnl Don't use PAM with AIX...
28if test $uname = AIX; then
29 enable_pam=no
30fi
31
32PAMDIR=""
33PAMFILE=""
34PAMLIBS=""
35PAMMOD="pam_unknown.so"
36
37if 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
89fi
90
91AC_SUBST(PAMDIR)
92AC_SUBST(PAMFILE)
93AC_SUBST(PAMLIBS)
94AC_SUBST(PAMMOD)
95
96dnl
c07d5b2d 97dnl End of "$Id: cups-pam.m4 177 2006-06-21 00:20:03Z jlovell $".
ef416fc2 98dnl