~clint-fewbar/+junk/cyrus-sasl2-builddeb

« back to all changes in this revision

Viewing changes to .pc/0028-autotools_fixes.patch/saslauthd/configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý, Roberto C. Sanchez, Ondřej Surý
  • Date: 2011-05-25 21:57:11 UTC
  • mfrom: (2.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110525215711-rxf1c8j46ljimdj4
Tags: 2.1.24~rc1.dfsg1-1
[ Roberto C. Sanchez ]
* libsasl2-2.README.Debian: document that SASL logs debug messages by
  default, and how change/stop it (Closes: #590598)
* Bump Standards-Version to 3.9.2 (no changes)
* Remove Build-Depends on libopie-dev, which was removed
  (Closes: #622221)

[ Ondřej Surý ]
* Patch to support newer Berkeley DB (Closes: #621437)
* Remove /etc/sasldb2 in prerm remove if empty (Closes: #618885)
* Improve Berkeley DB upgrade code to note the used version in
  berkeley_db.active file and compare it with current version
* Convert debian/rules to debhelper7
* Update Vcs-* and Homepage fields
* Fix autoreconf by adding some recommended options to configure.in
  and Makefile.am
* Imported Upstream version 2.1.24~rc1.dfsg1
* Update patches to new release
* Update repack.sh
* Build against sqlite3 since upstream has a support for it
  (Closes: #444799)
* Fix FTBFS in LDAP plugin
* Don't use .la files to open plugins, just scan .so
* Set configdir to /etc/sasl2:/etc/sasl:/usr/lib/sasl2
  (Closes: #465569)
* Stop shipping .la and .a files for all modules (Closes: #516833)
* sasl2-bin can depend on generic db-util package now
* Add myself to uploaders
* Removed hardcoded -R option when searching for sqlite libraries
* Fix Sqlite3 FTBFS due missing link libraries in plugins/

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_INIT(mechanisms.h)
 
2
AC_PREREQ([2.54])
 
3
 
 
4
AC_CONFIG_AUX_DIR(config)
 
5
AC_CANONICAL_HOST
 
6
 
 
7
dnl Should we enable SASLAUTHd at all?
 
8
AC_ARG_WITH(saslauthd, [  --with-saslauthd=DIR    enable use of the saslauth daemon using state dir DIR ],
 
9
                with_saslauthd=$withval,
 
10
                with_saslauthd=yes)
 
11
  if test "$with_saslauthd" = yes; then
 
12
    with_saslauthd="/var/state/saslauthd"
 
13
  fi
 
14
  AC_DEFINE(HAVE_SASLAUTHD,[],[Include support for saslauthd?])
 
15
  AC_DEFINE_UNQUOTED(PATH_SASLAUTHD_RUNDIR, "$with_saslauthd",[Location of saslauthd socket])
 
16
AM_CONDITIONAL(SASLAUTHD, test "$with_saslauthd" != no)
 
17
 
 
18
AM_INIT_AUTOMAKE(saslauthd,2.1.24)
 
19
CMU_INIT_AUTOMAKE
 
20
 
 
21
dnl Checks for programs.
 
22
AC_PROG_CC
 
23
AC_PROG_CPP
 
24
AC_PROG_AWK
 
25
AC_PROG_MAKE_SET
 
26
AC_PROG_LN_S
 
27
AC_PROG_INSTALL
 
28
AC_PROG_LIBTOOL
 
29
 
 
30
dnl Checks for build foo
 
31
CMU_C___ATTRIBUTE__
 
32
CMU_GUESS_RUNPATH_SWITCH
 
33
 
 
34
dnl Checks for libraries.
 
35
CMU_SOCKETS
 
36
 
 
37
CMU_HAVE_OPENSSL
 
38
AC_MSG_CHECKING(for OpenSSL)
 
39
AC_MSG_RESULT($with_openssl)
 
40
 
 
41
SASL_DES_CHK
 
42
 
 
43
dnl mechanism-related checking
 
44
SASL_KERBEROS_V4_CHK
 
45
SASL_GSSAPI_CHK
 
46
 
 
47
if test "$gssapi" != no; then
 
48
        if test "$gss_impl" = "heimdal"; then
 
49
            AC_DEFINE(KRB5_HEIMDAL,[],[Using Heimdal])
 
50
        fi
 
51
        AC_DEFINE(HAVE_GSSAPI,[],[Include GSSAPI/Kerberos 5 Support])
 
52
fi
 
53
 
 
54
SASL2_CRYPT_CHK
 
55
 
 
56
AC_ARG_ENABLE(sia, [  --enable-sia            enable SIA authentication [no] ],
 
57
  sia=$enableval,
 
58
  sia=no)
 
59
LIB_SIA=""
 
60
if test "$sia" != no; then
 
61
  if test -f /etc/sia/matrix.conf; then
 
62
    AC_DEFINE(HAVE_SIA,[],[Include SIA Support])
 
63
    LIB_SIA="-lsecurity -ldb -lm -laud"
 
64
  else
 
65
    AC_ERROR([No support for SIA found])
 
66
  fi
 
67
fi
 
68
AC_SUBST(LIB_SIA)
 
69
 
 
70
AC_ARG_ENABLE(auth-sasldb, [  --enable-auth-sasldb    enable experimental SASLdb authentication module [no] ],
 
71
  authsasldb=$enableval,
 
72
  authsasldb=no)
 
73
if test "$authsasldb" != no; then
 
74
  if test ! -d "../sasldb"; then
 
75
     echo "ERROR: Cannot build sasldb module outside of the full SASL source tree."
 
76
     exit 0;
 
77
  fi
 
78
  AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
 
79
  SASL_DB_PATH_CHECK()
 
80
  SASL_DB_CHECK()
 
81
  SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.a"
 
82
fi
 
83
 
 
84
AC_ARG_ENABLE(httpform, [  --enable-httpform       enable HTTP form authentication [[no]] ],
 
85
  httpform=$enableval,
 
86
  httpform=no)
 
87
if test "$httpform" != no; then
 
88
  AC_DEFINE(HAVE_HTTPFORM,[],[Include HTTP form Support])
 
89
fi
 
90
 
 
91
AC_ARG_WITH(pam, [  --with-pam=DIR          use PAM (rooted in DIR) [yes] ],
 
92
        with_pam=$withval,
 
93
        with_pam=yes)
 
94
if test "$with_pam" != no; then
 
95
  if test -d $with_pam; then
 
96
    CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
 
97
    LDFLAGS="$LDFLAGS -L${with_pam}/lib"
 
98
  fi
 
99
  cmu_save_LIBS="$LIBS"
 
100
  AC_CHECK_LIB(pam, pam_start, [
 
101
          AC_CHECK_HEADER(security/pam_appl.h,,
 
102
                          with_pam=no)],
 
103
                with_pam=no, $SASL_DL_LIB)
 
104
  LIBS="$cmu_save_LIBS"
 
105
fi
 
106
 
 
107
AC_ARG_WITH(ipctype, [  --with-ipctype={unix,doors}    use ipctype [unix] ],
 
108
        with_ipctype=$withval,
 
109
        with_ipctype="unix")
 
110
MAIN_COMPAT_OBJ="saslauthd-${with_ipctype}.o"
 
111
AC_SUBST(MAIN_COMPAT_OBJ)
 
112
if test "$with_ipctype" = "doors"; then
 
113
  AC_DEFINE(USE_DOORS,[],[Use the doors IPC API])
 
114
  AC_DEFINE(SASLAUTHD_THREADED,[],[Saslauthd runs threaded?])
 
115
  LIBS="$LIBS -ldoor -lpthread"
 
116
fi
 
117
 
 
118
AC_MSG_CHECKING(for PAM support)
 
119
AC_MSG_RESULT($with_pam)
 
120
LIB_PAM=""
 
121
if test "$with_pam" != no; then
 
122
  AC_DEFINE(HAVE_PAM,[],[Support for PAM?])
 
123
  LIB_PAM="-lpam"
 
124
fi
 
125
AC_SUBST(LIB_PAM)
 
126
 
 
127
AC_CHECK_LIB(resolv, inet_aton)
 
128
 
 
129
AC_MSG_CHECKING(to include LDAP support)
 
130
AC_ARG_WITH(ldap, [  --with-ldap=DIR         use LDAP (in DIR) [no] ],
 
131
        with_ldap=$withval,
 
132
        with_ldap=no)
 
133
AC_MSG_RESULT($with_ldap)
 
134
 
 
135
if test -d $with_ldap; then
 
136
    CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
 
137
    CMU_ADD_LIBPATH(${with_ldap}/lib)
 
138
fi
 
139
 
 
140
LDAP_LIBS=""
 
141
if test "$with_ldap" != no; then
 
142
  AC_CHECK_LIB(ldap, ldap_initialize, [ AC_DEFINE(HAVE_LDAP,[],[Support for LDAP?])
 
143
                                        LDAP_LIBS="-lldap -llber"
 
144
                                        if test "$with_openssl" != "no"; then
 
145
                                            LDAP_LIBS="$LDAP_LIBS -lcrypto $LIB_RSAREF"
 
146
                                        fi],,-llber)
 
147
  
 
148
fi
 
149
AC_SUBST(LDAP_LIBS)
 
150
 
 
151
 
 
152
dnl Checks for header files.
 
153
AC_HEADER_STDC
 
154
AC_HEADER_SYS_WAIT
 
155
AC_HEADER_TIME
 
156
AC_CHECK_HEADERS(crypt.h fcntl.h krb5.h strings.h syslog.h unistd.h sys/time.h sys/uio.h)
 
157
 
 
158
dnl Checks for typedefs, structures, and compiler characteristics.
 
159
AC_C_CONST  
 
160
AC_TYPE_PID_T
 
161
 
 
162
LTLIBOBJS=`echo "$LIB@&t@OBJS" | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
 
163
AC_SUBST(LTLIBOBJS)
 
164
 
 
165
dnl Checks for which function macros exist
 
166
AC_MSG_CHECKING(whether $CC implements __func__)
 
167
AC_CACHE_VAL(have_func,
 
168
[AC_TRY_LINK([#include <stdio.h>],[printf("%s", __func__);],
 
169
have_func=yes,
 
170
have_func=no)])
 
171
AC_MSG_RESULT($have_func)
 
172
if test "$have_func" = yes; then
 
173
       AC_DEFINE(HAVE_FUNC,[],[Does the compiler understand __func__])
 
174
else
 
175
       AC_MSG_CHECKING(whether $CC implements __PRETTY_FUNCTION__)
 
176
       AC_CACHE_VAL(have_pretty_function,
 
177
       [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __PRETTY_FUNCTION__);],
 
178
       have_pretty_function=yes,
 
179
       have_pretty_function=no)])
 
180
       AC_MSG_RESULT($have_pretty_function)
 
181
       if test "$have_pretty_function" = yes; then
 
182
               AC_DEFINE(HAVE_PRETTY_FUNCTION,[],[Does compiler understand __PRETTY_FUNCTION__])
 
183
       else
 
184
               AC_MSG_CHECKING(whether $CC implements __FUNCTION__)
 
185
               AC_CACHE_VAL(have_function,
 
186
               [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __FUNCTION__);],
 
187
               have_function=yes,
 
188
               have_function=no)])
 
189
               AC_MSG_RESULT($have_function)
 
190
               if test "$have_function" = yes; then
 
191
                       AC_DEFINE(HAVE_FUNCTION,[],[Does compiler understand __FUNCTION__])
 
192
               fi
 
193
       fi
 
194
fi
 
195
 
 
196
dnl Checks for library functions.
 
197
AC_TYPE_SIGNAL
 
198
AC_CHECK_FUNCS(gethostname mkdir socket strdup)
 
199
AC_CHECK_FUNCS(getspnam getuserpw, break)
 
200
AC_CHECK_FUNCS(strlcat strlcpy)
 
201
 
 
202
if test $ac_cv_func_getspnam = yes; then
 
203
        AC_MSG_CHECKING(if getpwnam_r/getspnam_r take 5 arguments)
 
204
        AC_TRY_COMPILE(
 
205
                [
 
206
#include <sys/types.h>
 
207
#include <pwd.h>
 
208
#include <shadow.h>
 
209
                ],
 
210
                [
 
211
struct passwd *pw;
 
212
struct passwd pwbuf;
 
213
char pwdata[512];
 
214
(void) getpwnam_r("bin", &pwbuf, pwdata, sizeof(pwdata), &pw);
 
215
                ],
 
216
                [AC_MSG_RESULT(yes)
 
217
                 AC_DEFINE(GETXXNAM_R_5ARG, 1,
 
218
                        [Define if your getpwnam_r()/getspnam_r()
 
219
                        functions take 5 arguments])],
 
220
                [AC_MSG_RESULT(no)]
 
221
        )
 
222
fi
 
223
 
 
224
dnl Check for getaddrinfo
 
225
GETADDRINFOOBJS=""
 
226
sasl_cv_getaddrinfo=no
 
227
IPv6_CHECK_FUNC(getaddrinfo,
 
228
                [AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo() function?])], [sasl_cv_getaddrinfo=yes])
 
229
if test $sasl_cv_getaddrinfo = yes; then
 
230
        AC_LIBOBJ(getaddrinfo)
 
231
fi
 
232
 
 
233
dnl Check for getnameinfo
 
234
GETNAMEINFOOBJS=""
 
235
sasl_cv_getnameinfo=no
 
236
IPv6_CHECK_FUNC(getnameinfo,
 
237
                [AC_DEFINE(HAVE_GETNAMEINFO,[],[Do we have a getnameinfo() function?])], [sasl_cv_getnameinfo=yes])
 
238
if test $sasl_cv_getnameinfo = yes; then
 
239
        AC_LIBOBJ(getnameinfo)
 
240
fi
 
241
 
 
242
IPv6_CHECK_SS_FAMILY()
 
243
IPv6_CHECK_SA_LEN()
 
244
IPv6_CHECK_SOCKLEN_T()
 
245
 
 
246
AC_EGREP_HEADER(sockaddr_storage, sys/socket.h,
 
247
                AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE,[],[Do we have a sockaddr_storage struct?]))
 
248
 
 
249
AH_TOP([
 
250
#ifndef _SASLAUTHD_H
 
251
#define _SASLAUTHD_H
 
252
 
 
253
#include <stdio.h>
 
254
])
 
255
 
 
256
AH_BOTTOM([
 
257
 
 
258
#ifndef HAVE___ATTRIBUTE__
 
259
/* Can't use attributes... */
 
260
#define __attribute__(foo)
 
261
#endif
 
262
 
 
263
#include <stdlib.h>
 
264
#include <sys/types.h>
 
265
#include <sys/socket.h>
 
266
#ifndef WIN32
 
267
# include <netdb.h>   
 
268
# include <sys/param.h>
 
269
#else /* WIN32 */
 
270
# include <winsock2.h>
 
271
#endif /* WIN32 */ 
 
272
#include <string.h>
 
273
 
 
274
#include <netinet/in.h>
 
275
 
 
276
#ifndef HAVE_SOCKLEN_T
 
277
typedef unsigned int socklen_t;
 
278
#endif /* HAVE_SOCKLEN_T */
 
279
 
 
280
#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
 
281
#define _SS_MAXSIZE     128     /* Implementation specific max size */
 
282
#define _SS_PADSIZE     (_SS_MAXSIZE - sizeof (struct sockaddr))
 
283
 
 
284
struct sockaddr_storage {
 
285
        struct  sockaddr ss_sa;
 
286
        char            __ss_pad2[_SS_PADSIZE];
 
287
};
 
288
# define ss_family ss_sa.sa_family
 
289
#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
 
290
 
 
291
#ifndef AF_INET6
 
292
/* Define it to something that should never appear */
 
293
#define AF_INET6        AF_MAX
 
294
#endif
 
295
 
 
296
/* Create a struct iovec if we need one */
 
297
#if !defined(HAVE_SYS_UIO_H)
 
298
struct iovec {
 
299
    long iov_len;
 
300
    char *iov_base;
 
301
};
 
302
#else
 
303
#include <sys/types.h>
 
304
#include <sys/uio.h>
 
305
#endif
 
306
 
 
307
#ifndef HAVE_GETADDRINFO
 
308
#define getaddrinfo     sasl_getaddrinfo
 
309
#define freeaddrinfo    sasl_freeaddrinfo
 
310
#define getnameinfo     sasl_getnameinfo
 
311
#define gai_strerror    sasl_gai_strerror
 
312
#include "gai.h"
 
313
#endif
 
314
 
 
315
#ifndef AI_NUMERICHOST   /* support glibc 2.0.x */
 
316
#define AI_NUMERICHOST  4
 
317
#define NI_NUMERICHOST  2
 
318
#define NI_NAMEREQD     4
 
319
#define NI_NUMERICSERV  8
 
320
#endif
 
321
 
 
322
/* handy string manipulation functions */
 
323
#ifndef HAVE_STRLCPY
 
324
extern size_t saslauthd_strlcpy(char *dst, const char *src, size_t len);
 
325
#define strlcpy(x,y,z) saslauthd_strlcpy((x),(y),(z))
 
326
#endif
 
327
#ifndef HAVE_STRLCAT
 
328
extern size_t saslauthd_strlcat(char *dst, const char *src, size_t len);
 
329
#define strlcat(x,y,z) saslauthd_strlcat((x),(y),(z))
 
330
#endif
 
331
 
 
332
#endif
 
333
])
 
334
 
 
335
AC_CONFIG_HEADERS(saslauthd.h)
 
336
 
 
337
AC_OUTPUT(Makefile)