source: trunk/third/cyrus-sasl/saslauthd/configure.in @ 18842

Revision 18842, 4.5 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18841, which included commits to RCS files with non-trunk default branches.
Line 
1AC_INIT(mechanisms.h)
2AC_CONFIG_AUX_DIR(config)
3AM_CONFIG_HEADER(saslauthd.h)
4AC_CANONICAL_HOST
5
6dnl Should we enable SASLAUTHd at all?
7AC_ARG_WITH(saslauthd, [  --with-saslauthd=DIR    enable use of the saslauth daemon using state dir DIR ],
8                with_saslauthd=$withval,
9                with_saslauthd=yes)
10  if test "$with_saslauthd" = yes; then
11    with_saslauthd="/var/state/saslauthd"
12  fi
13  AC_DEFINE(HAVE_SASLAUTHD)
14  AC_DEFINE_UNQUOTED(PATH_SASLAUTHD_RUNDIR, "$with_saslauthd")
15AM_CONDITIONAL(SASLAUTHD, test "$with_saslauthd" != no)
16
17AM_INIT_AUTOMAKE(saslauthd,2.1.12)
18CMU_INIT_AUTOMAKE
19
20dnl Checks for programs.
21AC_PROG_CC
22AC_PROG_CPP
23AC_PROG_AWK
24AC_PROG_MAKE_SET
25AC_PROG_LN_S
26AC_PROG_INSTALL
27
28dnl Checks for build foo
29CMU_C___ATTRIBUTE__
30CMU_GUESS_RUNPATH_SWITCH
31
32dnl Checks for libraries.
33CMU_SOCKETS
34
35CMU_HAVE_OPENSSL
36AC_MSG_CHECKING(for OpenSSL)
37AC_MSG_RESULT($with_openssl)
38
39dnl mechanism-related checking
40SASL_KERBEROS_V4_CHK
41SASL_GSSAPI_CHK
42
43if test "$gssapi" != no; then
44        AC_DEFINE(AUTH_KRB5)
45        if test "$gss_impl" = "heimdal"; then
46            AC_DEFINE(KRB5_HEIMDAL)
47        fi
48fi
49
50SASL_CRYPT_CHK
51
52AC_ARG_ENABLE(sia, [  --enable-sia            enable SIA authentication [no] ],
53  sia=$enableval,
54  sia=no)
55LIB_SIA=""
56if test "$sia" != no; then
57  if test -f /etc/sia/matrix.conf; then
58    AC_DEFINE(HAVE_SIA)
59    LIB_SIA="-lsecurity -ldb -lm -laud"
60  else
61    AC_ERROR([No support for SIA found])
62  fi
63fi
64AC_SUBST(LIB_SIA)
65
66AC_ARG_ENABLE(auth-sasldb, [  --enable-auth-sasldb    enable experimental SASLdb authentication module [no] ],
67  authsasldb=$enableval,
68  authsasldb=no)
69if test "$authsasldb" != no; then
70  if test ! -d "../sasldb"; then
71     echo "ERROR: Cannot build sasldb module outside of the full SASL source tree."
72     exit 0;
73  fi
74  AC_DEFINE(AUTH_SASLDB)
75  SASL_DB_PATH_CHECK()
76  SASL_DB_CHECK()
77  SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
78fi
79
80AC_ARG_WITH(pam, [  --with-pam=DIR          use PAM (rooted in DIR) [yes] ],
81        with_pam=$withval,
82        with_pam=yes)
83if test "$with_pam" != no; then
84  if test -d $with_pam; then
85    CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
86    LDFLAGS="$LDFLAGS -L${with_pam}/lib"
87  fi
88  cmu_save_LIBS="$LIBS"
89  AC_CHECK_LIB(pam, pam_start, [
90          AC_CHECK_HEADER(security/pam_appl.h,,
91                          with_pam=no)],
92                with_pam=no, $SASL_DL_LIB)
93  LIBS="$cmu_save_LIBS"
94fi
95
96AC_ARG_WITH(ipctype, [  --with-ipctype={unix,doors}    use ipctype [unix] ],
97        with_ipctype=$withval,
98        with_ipctype="unix")
99MAIN_COMPAT_OBJ="saslauthd-${with_ipctype}.o"
100AC_SUBST(MAIN_COMPAT_OBJ)
101if test "$with_ipctype" = "doors"; then
102  AC_DEFINE(USE_DOORS)
103  AC_DEFINE(SASLAUTHD_THREADED)
104  LIBS="$LIBS -ldoor -lpthread"
105fi
106
107AC_MSG_CHECKING(for PAM support)
108AC_MSG_RESULT($with_pam)
109LIB_PAM=""
110if test "$with_pam" != no; then
111  AC_DEFINE(HAVE_PAM)
112  LIB_PAM="-lpam"
113fi
114AC_SUBST(LIB_PAM)
115
116AC_CHECK_LIB(resolv, inet_aton)
117
118AC_MSG_CHECKING(to include experimental LDAP support)
119AC_ARG_WITH(ldap, [  --with-ldap=DIR         use LDAP (in DIR) (experimental) [no] ],
120        with_ldap=$withval,
121        with_ldap=no)
122AC_MSG_RESULT($with_ldap)
123
124if test -d $with_ldap; then
125    CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
126    CMU_ADD_LIBPATH(${with_ldap}/lib)
127fi
128
129LDAP_LIBS=""
130if test "$with_ldap" != no; then
131  AC_CHECK_LIB(ldap, ldap_initialize, [ AC_DEFINE(HAVE_LDAP)
132                                        LDAP_LIBS="-lldap -llber"
133                                        if test "$with_openssl" != "no"; then
134                                            LDAP_LIBS="$LDAP_LIBS -lcrypto $LIB_RSAREF"
135                                        fi],,-llber)
136 
137fi
138AC_SUBST(LDAP_LIBS)
139
140
141dnl Checks for header files.
142AC_HEADER_STDC
143AC_HEADER_SYS_WAIT
144AC_HEADER_TIME
145AC_CHECK_HEADERS(crypt.h fcntl.h strings.h syslog.h unistd.h sys/time.h sys/uio.h)
146
147dnl Checks for typedefs, structures, and compiler characteristics.
148AC_C_CONST 
149AC_TYPE_PID_T
150
151dnl Checks for library functions.
152AC_TYPE_SIGNAL
153AC_CHECK_FUNCS(gethostname mkdir socket strdup)
154AC_CHECK_FUNCS(getspnam getuserpw, break)
155
156dnl Check for getaddrinfo
157GETADDRINFOOBJS=""
158sasl_cv_getaddrinfo=no
159IPv6_CHECK_FUNC(getaddrinfo,
160                [AC_DEFINE(HAVE_GETADDRINFO)], [sasl_cv_getaddrinfo=yes])
161if test $sasl_cv_getaddrinfo = yes; then
162    COMPAT_OBJ="$COMPAT_OBJ getaddrinfo.o"
163fi
164
165dnl Check for getnameinfo
166GETNAMEINFOOBJS=""
167sasl_cv_getnameinfo=no
168IPv6_CHECK_FUNC(getnameinfo,
169                [AC_DEFINE(HAVE_GETNAMEINFO)], [sasl_cv_getnameinfo=yes])
170if test $sasl_cv_getnameinfo = yes; then
171        COMPAT_OBJ="$COMPAT_OBJ getnameinfo.o"
172fi
173
174AC_SUBST(COMPAT_OBJ)
175
176IPv6_CHECK_SS_FAMILY()
177IPv6_CHECK_SA_LEN()
178IPv6_CHECK_SOCKLEN_T()
179
180AC_EGREP_HEADER(sockaddr_storage, sys/socket.h,
181                AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE))
182
183AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.