annotate configure.in @ 8378:fe0e6550585c HEAD tip

*-login: SSL connections didn't get closed when the client got destroyed.
author Timo Sirainen <tss@iki.fi>
date Thu, 08 May 2014 16:52:29 +0300
parents e0e454c34979
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3784
beeae4f17615 Cleanups and some more kqueue stuff
Timo Sirainen <tss@iki.fi>
parents: 3783
diff changeset
1 AC_PREREQ([2.59])
8363
e0e454c34979 Released v1.1.20.
Timo Sirainen <tss@iki.fi>
parents: 8352
diff changeset
2 AC_INIT([dovecot],[1.1.20],[dovecot@dovecot.org])
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
3 AC_CONFIG_SRCDIR([src])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
5 AM_INIT_AUTOMAKE
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
7 AM_MAINTAINER_MODE
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
8
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
9 AC_ISC_POSIX
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
10 AC_PROG_CC
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
11 AC_PROG_CPP
4645
613983147a3c Detect C++ compiler because fts-lucene has C++ code.
Timo Sirainen <tss@iki.fi>
parents: 4638
diff changeset
12 AC_PROG_CXX # lucene plugin needs this
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
13 AC_HEADER_STDC
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
14 AC_C_INLINE
3784
beeae4f17615 Cleanups and some more kqueue stuff
Timo Sirainen <tss@iki.fi>
parents: 3783
diff changeset
15 AC_PROG_LIBTOOL
1300
952bf533c2ea Better iconv() checking.
Timo Sirainen <tss@iki.fi>
parents: 1287
diff changeset
16 AM_ICONV
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
17
7647
f7989d01fa3c Added more fallbacks if strtoll() or strtoull() isn't implemented
Timo Sirainen <tss@iki.fi>
parents: 7644
diff changeset
18 AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h malloc.h inttypes.h \
3751
768770a01733 quotactl() quota checking support
Timo Sirainen <tss@iki.fi>
parents: 3749
diff changeset
19 sys/uio.h sys/sysmacros.h sys/resource.h sys/select.h libgen.h \
7690
2b0432ec7c7c AIX FS quota: Include sys/fs/quota_common.h
Timo Sirainen <tss@iki.fi>
parents: 7685
diff changeset
20 sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.h sys/fs/quota_common.h \
4426
b8089cf41c96 Check for sasl.h and sasl/sasl.h existence and use the one that's found. If
Timo Sirainen <tss@iki.fi>
parents: 4423
diff changeset
21 mntent.h sys/mnttab.h sys/event.h sys/time.h sys/mkdev.h linux/dqblk_xfs.h \
7767
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
22 xfs/xqm.h sasl.h sasl/sasl.h execinfo.h ucontext.h malloc_np.h \
7980
7948b25f3790 dovecot -n/-a: Print some information about the system.
Timo Sirainen <tss@iki.fi>
parents: 7962
diff changeset
23 sys/vmount.h sys/utsname.h)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
24
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
25 AC_ARG_ENABLE(ipv6,
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
26 [ --enable-ipv6 Enable IPv6 support (auto)],
7264
91cf91f0a0a8 Fixed --enable-ipv6
Timo Sirainen <tss@iki.fi>
parents: 7261
diff changeset
27 if test x$enableval = xno || test x$enableval = xauto; then
91cf91f0a0a8 Fixed --enable-ipv6
Timo Sirainen <tss@iki.fi>
parents: 7261
diff changeset
28 want_ipv6=$enableval
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
29 else
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
30 want_ipv6=yes
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
31 fi,
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
32 want_ipv6=auto)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
33
544
42e65c2ba49d Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents: 530
diff changeset
34 AC_ARG_ENABLE(debug,
4571
79dd8a12fa05 Changed --enable-debug's description.
Timo Sirainen <tss@iki.fi>
parents: 4567
diff changeset
35 [ --enable-debug Enable some extra expensive checks for developers],
544
42e65c2ba49d Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents: 530
diff changeset
36 if test x$enableval = xyes; then
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
37 AC_DEFINE(DEBUG,, Build with extra debugging checks)
544
42e65c2ba49d Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents: 530
diff changeset
38 fi)
42e65c2ba49d Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents: 530
diff changeset
39
546
e1254b838e0b Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents: 544
diff changeset
40 AC_ARG_ENABLE(asserts,
e1254b838e0b Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents: 544
diff changeset
41 [ --enable-asserts Enable asserts (default)],
4057
f4807accc1d5 Unbreak last accidental change..
Timo Sirainen <tss@iki.fi>
parents: 4055
diff changeset
42 if test x$enableval = xno; then
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
43 AC_DEFINE(DISABLE_ASSERTS,, Disable asserts)
546
e1254b838e0b Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents: 544
diff changeset
44 fi)
e1254b838e0b Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents: 544
diff changeset
45
439
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
46 AC_ARG_WITH(mem-align,
1394
059f13d577bb Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents: 1389
diff changeset
47 [ --with-mem-align=BYTES Set the memory alignment (default: 8)],
439
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
48 mem_align=$withval,
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
49 mem_align=8)
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
50
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
51 AC_ARG_WITH(ioloop,
3784
beeae4f17615 Cleanups and some more kqueue stuff
Timo Sirainen <tss@iki.fi>
parents: 3783
diff changeset
52 [ --with-ioloop=IOLOOP Specify the I/O loop method to use
4482
f60b07bd5fa7 --with-ioloop=auto changed to --with-ioloop=best
Timo Sirainen <tss@iki.fi>
parents: 4478
diff changeset
53 (epoll, kqueue, poll; best for the fastest available;
7268
80cd999d5623 Changed the default ioloop to "best".
Timo Sirainen <tss@iki.fi>
parents: 7264
diff changeset
54 default is best)],
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
55 ioloop=$withval,
7268
80cd999d5623 Changed the default ioloop to "best".
Timo Sirainen <tss@iki.fi>
parents: 7264
diff changeset
56 ioloop=best)
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
57
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
58 AC_ARG_WITH(notify,
4551
2643a46322a6 Updated --with-notify description.
Timo Sirainen <tss@iki.fi>
parents: 4530
diff changeset
59 [ --with-notify=NOTIFY Specify the file system notification method to use
2643a46322a6 Updated --with-notify description.
Timo Sirainen <tss@iki.fi>
parents: 4530
diff changeset
60 (inotify, kqueue, dnotify, none;
2643a46322a6 Updated --with-notify description.
Timo Sirainen <tss@iki.fi>
parents: 4530
diff changeset
61 default is detected in the above order)],
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
62 notify=$withval,
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
63 notify=)
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
64
4530
f598896bb40a Added --with-linux-quota configure option to specify which Linux quota
Timo Sirainen <tss@iki.fi>
parents: 4523
diff changeset
65 AC_ARG_WITH(linux-quota,
f598896bb40a Added --with-linux-quota configure option to specify which Linux quota
Timo Sirainen <tss@iki.fi>
parents: 4523
diff changeset
66 [ --with-linux-quota=n Linux quota version to use (default: system's)],
8341
f1affd2d0251 configure: Allow --with-linux-quota=n to be only 1 or 2.
Timo Sirainen <tss@iki.fi>
parents: 8333
diff changeset
67 if test "$withval" != "1" && test "$withval" != "2"; then
f1affd2d0251 configure: Allow --with-linux-quota=n to be only 1 or 2.
Timo Sirainen <tss@iki.fi>
parents: 8333
diff changeset
68 AC_ERROR([--with-linux-quota can be only 1 or 2])
f1affd2d0251 configure: Allow --with-linux-quota=n to be only 1 or 2.
Timo Sirainen <tss@iki.fi>
parents: 8333
diff changeset
69 fi
4530
f598896bb40a Added --with-linux-quota configure option to specify which Linux quota
Timo Sirainen <tss@iki.fi>
parents: 4523
diff changeset
70 AC_DEFINE_UNQUOTED(_LINUX_QUOTA_VERSION, $withval,
f598896bb40a Added --with-linux-quota configure option to specify which Linux quota
Timo Sirainen <tss@iki.fi>
parents: 4523
diff changeset
71 [Linux quota version to use])
f598896bb40a Added --with-linux-quota configure option to specify which Linux quota
Timo Sirainen <tss@iki.fi>
parents: 4523
diff changeset
72 )
f598896bb40a Added --with-linux-quota configure option to specify which Linux quota
Timo Sirainen <tss@iki.fi>
parents: 4523
diff changeset
73
328
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
74 AC_ARG_WITH(passwd,
426
951cb252e577 help update
Timo Sirainen <tss@iki.fi>
parents: 412
diff changeset
75 [ --with-passwd Build with /etc/passwd support (default)],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
76 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
77 want_passwd=$withval
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
78 else
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
79 want_passwd=yes
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
80 fi,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
81 want_passwd=yes)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
82
6111
c83546491bad --with-passwd was used also for --with-nss
Timo Sirainen <tss@iki.fi>
parents: 6106
diff changeset
83 AC_ARG_WITH(nss,
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
84 [ --with-nss Build with NSS module support (auto)],
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
85 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
86 want_nss=$withval
5870
c9b49ed99d28 Added userdb nss which currently supports glibc-compatible NSS modules.
Timo Sirainen <tss@iki.fi>
parents: 5859
diff changeset
87 else
c9b49ed99d28 Added userdb nss which currently supports glibc-compatible NSS modules.
Timo Sirainen <tss@iki.fi>
parents: 5859
diff changeset
88 want_nss=yes
c9b49ed99d28 Added userdb nss which currently supports glibc-compatible NSS modules.
Timo Sirainen <tss@iki.fi>
parents: 5859
diff changeset
89 fi,
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
90 want_nss=auto)
5870
c9b49ed99d28 Added userdb nss which currently supports glibc-compatible NSS modules.
Timo Sirainen <tss@iki.fi>
parents: 5859
diff changeset
91
328
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
92 AC_ARG_WITH(passwd-file,
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
93 [ --with-passwd-file Build with passwd-like file support (default)],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
94 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
95 want_passwd_file=$withval
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
96 else
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
97 want_passwd_file=yes
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
98 fi,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
99 want_passwd_file=yes)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
100
328
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
101 AC_ARG_WITH(shadow,
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
102 [ --with-shadow Build with shadow password support (auto)],
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
103 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
104 want_shadow=$withval
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
105 else
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
106 want_shadow=yes
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
107 fi,
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
108 want_shadow=auto)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
109
328
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
110 AC_ARG_WITH(pam,
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
111 [ --with-pam Build with PAM support (auto)],
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
112 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
113 want_pam=$withval
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
114 else
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
115 want_pam=yes
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
116 fi,
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
117 want_pam=auto)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
118
2162
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
119 AC_ARG_WITH(checkpassword,
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
120 [ --with-checkpassword Build with checkpassword support (default)],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
121 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
122 want_checkpassword=$withval
2162
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
123 else
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
124 want_checkpassword=yes
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
125 fi,
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
126 want_checkpassword=yes)
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
127
1851
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
128 AC_ARG_WITH(bsdauth,
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
129 [ --with-bsdauth Build with BSD authentication support (auto)],
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
130 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
131 want_bsdauth=$withval
1851
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
132 else
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
133 want_bsdauth=yes
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
134 fi,
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
135 want_bsdauth=auto)
1851
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
136
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
137 AC_ARG_WITH(gssapi,
6259
f2b00d3996df Updated --with-gssapi help string to include yes|plugin.
Timo Sirainen <tss@iki.fi>
parents: 6232
diff changeset
138 [ --with-gssapi=yes|plugin Build with GSSAPI authentication support],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
139 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
140 want_gssapi=$withval
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
141 want_gssapi_plugin=no
6199
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
142 elif test x$withval = xplugin; then
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
143 want_gssapi=yes
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
144 want_gssapi_plugin=yes
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
145 else
3686
1b86be09b41e typofix
Timo Sirainen <tss@iki.fi>
parents: 3683
diff changeset
146 want_gssapi=yes
6199
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
147 want_gssapi_plugin=no
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
148 fi,
4348
2dc5f48ff4ee Whitespace cleanup for --help. Don't enable GSSAPI support by default.
Timo Sirainen <tss@iki.fi>
parents: 4343
diff changeset
149 want_gssapi=no)
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
150
4638
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
151 AC_ARG_WITH(sia,
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
152 [ --with-sia Build with Tru64 SIA support],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
153 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
154 want_sia=$withval
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
155 else
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
156 want_sia=yes
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
157 fi,
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
158 want_sia=no)
4638
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
159
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
160 AC_ARG_WITH(ldap,
6198
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
161 [ --with-ldap=yes|plugin Build with LDAP support],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
162 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
163 want_ldap=$withval
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
164 want_ldap_plugin=no
6198
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
165 elif test x$withval = xplugin; then
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
166 want_ldap=yes
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
167 want_ldap_plugin=yes
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
168 else
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
169 want_ldap=yes
6198
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
170 want_ldap_plugin=no
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
171 fi,
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
172 want_ldap=no)
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
173
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
174 AC_ARG_WITH(vpopmail,
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
175 [ --with-vpopmail Build with vpopmail support (auto)],
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
176 if test x$withval = xno; then
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
177 want_vpopmail=no
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
178 else
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
179 if test x$withval = xyes || test x$withval = xauto; then
5035
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
180 vpopmail_home="`echo ~vpopmail`"
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
181 want_vpopmail=$withval
5035
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
182 else
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
183 vpopmail_home="$withval"
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
184 want_vpopmail=yes
5035
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
185 fi
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
186 fi, [
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
187 want_vpopmail=auto
5035
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
188 vpopmail_home="`echo ~vpopmail`"
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
189 ])
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
190
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
191 AC_ARG_WITH(static-userdb,
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
192 [ --with-static-userdb Build with static userdb support (default)],
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
193 if test x$withval = xno; then
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
194 want_static_userdb=no
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
195 else
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
196 want_static_userdb=yes
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
197 fi,
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
198 want_static_userdb=yes)
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
199
3667
b7569a6a4ada Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents: 3600
diff changeset
200 AC_ARG_WITH(prefetch-userdb,
b7569a6a4ada Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents: 3600
diff changeset
201 [ --with-prefetch-userdb Build with prefetch userdb support (default)],
3062
5e2e4cdbfe2e Added "passdb" userdb. It works only if passdb gives all the information
Timo Sirainen <tss@iki.fi>
parents: 3004
diff changeset
202 if test x$withval = xno; then
3667
b7569a6a4ada Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents: 3600
diff changeset
203 want_prefetch_userdb=no
3062
5e2e4cdbfe2e Added "passdb" userdb. It works only if passdb gives all the information
Timo Sirainen <tss@iki.fi>
parents: 3004
diff changeset
204 else
3667
b7569a6a4ada Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents: 3600
diff changeset
205 want_prefetch_userdb=yes
3062
5e2e4cdbfe2e Added "passdb" userdb. It works only if passdb gives all the information
Timo Sirainen <tss@iki.fi>
parents: 3004
diff changeset
206 fi,
3667
b7569a6a4ada Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents: 3600
diff changeset
207 want_prefetch_userdb=yes)
3062
5e2e4cdbfe2e Added "passdb" userdb. It works only if passdb gives all the information
Timo Sirainen <tss@iki.fi>
parents: 3004
diff changeset
208
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
209 AC_ARG_WITH(db,
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
210 [ --with-db Build with Berkeley DB support],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
211 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
212 want_db=$withval
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
213 else
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
214 want_db=yes
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
215 fi,
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
216 want_db=no)
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
217
4013
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
218 dnl The --with-sql is useful only if Dovecot is being built with all the SQL
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
219 dnl drivers as modules. If any SQL driver is built-in, this option is ignored.
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
220 AC_ARG_WITH(sql,
6196
17fdcb09159b Updated --with-sql help string.
Timo Sirainen <tss@iki.fi>
parents: 6195
diff changeset
221 [ --with-sql=yes|plugin Build with generic SQL support],
4013
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
222 if test x$withval = xno; then
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
223 want_sql=no
6195
068df1748a57 Renamed --enable-sql-plugins to --with-sql=plugin
Timo Sirainen <tss@iki.fi>
parents: 6194
diff changeset
224 elif test x$withval = xplugin; then
068df1748a57 Renamed --enable-sql-plugins to --with-sql=plugin
Timo Sirainen <tss@iki.fi>
parents: 6194
diff changeset
225 want_sql=yes
068df1748a57 Renamed --enable-sql-plugins to --with-sql=plugin
Timo Sirainen <tss@iki.fi>
parents: 6194
diff changeset
226 want_sql_plugins=yes
4013
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
227 else
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
228 want_sql=yes
6195
068df1748a57 Renamed --enable-sql-plugins to --with-sql=plugin
Timo Sirainen <tss@iki.fi>
parents: 6194
diff changeset
229 want_sql_plugins=no
4013
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
230 fi,
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
231 want_sql=no)
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
232
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
233 AC_ARG_WITH(pgsql,
4013
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
234 [ --with-pgsql Build with PostgreSQL driver support],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
235 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
236 want_pgsql=$withval
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
237 else
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
238 want_pgsql=yes
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
239 fi,
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
240 want_pgsql=no)
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
241
1995
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
242 AC_ARG_WITH(mysql,
4013
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
243 [ --with-mysql Build with MySQL driver support],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
244 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
245 want_mysql=$withval
1995
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
246 else
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
247 want_mysql=yes
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
248 fi,
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
249 want_mysql=no)
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
250
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
251 AC_ARG_WITH(sqlite,
4348
2dc5f48ff4ee Whitespace cleanup for --help. Don't enable GSSAPI support by default.
Timo Sirainen <tss@iki.fi>
parents: 4343
diff changeset
252 [ --with-sqlite Build with SQLite3 driver support],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
253 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
254 want_sqlite=$withval
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
255 else
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
256 want_sqlite=yes
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
257 fi,
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
258 want_sqlite=no)
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
259
4621
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
260 AC_ARG_WITH(lucene,
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
261 [ --with-lucene Build with CLucene full text search support],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
262 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
263 want_lucene=$withval
4621
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
264 else
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
265 want_lucene=yes
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
266 fi,
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
267 want_lucene=no)
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
268 AM_CONDITIONAL(BUILD_LUCENE, test "$want_lucene" = "yes")
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
269
7746
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
270 AC_ARG_WITH(solr,
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
271 [ --with-solr Build with Solr full text search support],
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
272 if test x$withval = xno || test x$withval = xauto; then
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
273 want_solr=$withval
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
274 else
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
275 want_solr=yes
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
276 fi,
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
277 want_solr=no)
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
278
7820
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
279 AC_ARG_WITH(zlib,
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
280 [ --with-zlib Build with zlib compression support],
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
281 if test x$withval = xno || test x$withval = xauto; then
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
282 want_zlib=$withval
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
283 else
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
284 want_zlib=yes
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
285 fi,
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
286 want_zlib=auto)
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
287
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
288 AC_ARG_WITH(bzlib,
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
289 [ --with-bzlib Build with bzlib compression support],
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
290 if test x$withval = xno || test x$withval = xauto; then
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
291 want_bzlib=$withval
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
292 else
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
293 want_bzlib=yes
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
294 fi,
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
295 want_bzlib=auto)
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
296
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
297 AC_ARG_WITH(ssl,
6196
17fdcb09159b Updated --with-sql help string.
Timo Sirainen <tss@iki.fi>
parents: 6195
diff changeset
298 [ --with-ssl=gnutls|openssl Build with GNUTLS or OpenSSL (default)],
245
Timo Sirainen <tss@iki.fi>
parents: 244
diff changeset
299 if test x$withval = xno; then
244
bf1e284fece2 added --without-gnutls option
Timo Sirainen <tss@iki.fi>
parents: 224
diff changeset
300 want_gnutls=no
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
301 want_openssl=no
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
302 elif test x$withval = xgnutls; then
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
303 want_gnutls=yes
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
304 want_openssl=no
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
305 elif test x$withval = xopenssl; then
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
306 want_gnutls=no
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
307 want_openssl=yes
244
bf1e284fece2 added --without-gnutls option
Timo Sirainen <tss@iki.fi>
parents: 224
diff changeset
308 else
3004
60a172e62d11 Don't use GNUTLS unless explicitly specified. It's not working currently
Timo Sirainen <tss@iki.fi>
parents: 3002
diff changeset
309 want_gnutls=no
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
310 want_openssl=yes
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
311 fi, [
3004
60a172e62d11 Don't use GNUTLS unless explicitly specified. It's not working currently
Timo Sirainen <tss@iki.fi>
parents: 3002
diff changeset
312 want_gnutls=no
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
313 want_openssl=auto
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
314 ])
244
bf1e284fece2 added --without-gnutls option
Timo Sirainen <tss@iki.fi>
parents: 224
diff changeset
315
657
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
316 AC_ARG_WITH(ssldir,
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
317 [ --with-ssldir=DIR SSL base directory for certificates (/etc/ssl)],
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
318 ssldir="$withval",
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
319 ssldir=/etc/ssl
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
320 )
712
385f862a4005 --with-ssldir actually didn't do anything, and the default directory for
Timo Sirainen <tss@iki.fi>
parents: 711
diff changeset
321 AC_SUBST(ssldir)
657
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
322
3327
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
323 AC_ARG_WITH(rundir,
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
324 [ --with-rundir=DIR Runtime data directory (LOCALSTATEDIR/run/dovecot)],
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
325 rundir="$withval",
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
326 rundir=$localstatedir/run/$PACKAGE_NAME
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
327 )
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
328 AC_SUBST(rundir)
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
329
4407
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
330 AC_ARG_WITH(statedir,
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
331 [ --with-statedir=DIR Permanent data directory (LOCALSTATEDIR/lib/dovecot)],
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
332 statedir="$withval",
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
333 statedir=$localstatedir/lib/$PACKAGE_NAME
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
334 )
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
335 AC_SUBST(statedir)
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
336
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
337 AC_ARG_WITH(gc,
4599
ab77182ddf94 Boehm GC seems to be working now. Removed the broken-warning.
Timo Sirainen <tss@iki.fi>
parents: 4572
diff changeset
338 [ --with-gc Use Boehm garbage collector],
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
339 if test x$withval = xno || test x$withval = xauto; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
340 want_gc=$withval
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
341 else
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
342 want_gc=yes
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
343 fi,
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
344 want_gc=no)
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
345
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
346 AC_ARG_WITH(pop3d,
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
347 [ --with-pop3d Build POP3 server (default)],
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
348 if test x$withval = xno; then
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
349 want_pop3d=no
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
350 else
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
351 want_pop3d=yes
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
352 fi,
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
353 want_pop3d=yes)
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
354 AM_CONDITIONAL(BUILD_POP3D, test "$want_pop3d" = "yes")
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
355
3328
fdac6810fe64 Added --with-deliver option.
Timo Sirainen <tss@iki.fi>
parents: 3327
diff changeset
356 AC_ARG_WITH(deliver,
fdac6810fe64 Added --with-deliver option.
Timo Sirainen <tss@iki.fi>
parents: 3327
diff changeset
357 [ --with-deliver Build mail delivery agent (default)],
fdac6810fe64 Added --with-deliver option.
Timo Sirainen <tss@iki.fi>
parents: 3327
diff changeset
358 if test x$withval = xno; then
fdac6810fe64 Added --with-deliver option.
Timo Sirainen <tss@iki.fi>
parents: 3327
diff changeset
359 want_deliver=no
fdac6810fe64 Added --with-deliver option.
Timo Sirainen <tss@iki.fi>
parents: 3327
diff changeset
360 else
fdac6810fe64 Added --with-deliver option.
Timo Sirainen <tss@iki.fi>
parents: 3327
diff changeset
361 want_deliver=yes
fdac6810fe64 Added --with-deliver option.
Timo Sirainen <tss@iki.fi>
parents: 3327
diff changeset
362 fi,
fdac6810fe64 Added --with-deliver option.
Timo Sirainen <tss@iki.fi>
parents: 3327
diff changeset
363 want_deliver=yes)
fdac6810fe64 Added --with-deliver option.
Timo Sirainen <tss@iki.fi>
parents: 3327
diff changeset
364 AM_CONDITIONAL(BUILD_DELIVER, test "$want_deliver" = "yes")
fdac6810fe64 Added --with-deliver option.
Timo Sirainen <tss@iki.fi>
parents: 3327
diff changeset
365
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
366 AC_ARG_WITH(storages,
6894
84bcf1c8b07a Updated list of available mail storage formats. Changed deliver's internal
Timo Sirainen <tss@iki.fi>
parents: 6860
diff changeset
367 [ --with-storages Build with specified mail storage formats
84bcf1c8b07a Updated list of available mail storage formats. Changed deliver's internal
Timo Sirainen <tss@iki.fi>
parents: 6860
diff changeset
368 (maildir mbox dbox cydir raw)], [
4005
450ee12c2e26 Give error if --with-storages or --without-storages is used without
Timo Sirainen <tss@iki.fi>
parents: 3997
diff changeset
369 if test "$withval" = "yes" -o "$withval" = "no"; then
450ee12c2e26 Give error if --with-storages or --without-storages is used without
Timo Sirainen <tss@iki.fi>
parents: 3997
diff changeset
370 AC_MSG_ERROR([--with-storages needs storage list as parameter])
450ee12c2e26 Give error if --with-storages or --without-storages is used without
Timo Sirainen <tss@iki.fi>
parents: 3997
diff changeset
371 fi
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
372 mail_storages=`echo "$withval"|sed 's/,/ /g'` ],
6748
d712370dfd14 Added raw storage for opening single-mail files/streams as mailboxes.
Timo Sirainen <tss@iki.fi>
parents: 6734
diff changeset
373 mail_storages="maildir mbox dbox cydir raw")
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
374 AC_SUBST(mail_storages)
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
375
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
376 AC_ARG_WITH(sql-drivers,
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
377 [ --with-sql-drivers Build with specified SQL drivers (all)], [
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
378 sql_drivers=`echo "$withval"|sed 's/,/ /g'` ],
3948
795cc9739eb3 Make --without-sql-drivers work properly
Timo Sirainen <tss@iki.fi>
parents: 3944
diff changeset
379 sql_drivers="all")
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
380
4005
450ee12c2e26 Give error if --with-storages or --without-storages is used without
Timo Sirainen <tss@iki.fi>
parents: 3997
diff changeset
381 if test "$sql_drivers" = "all" -o "$sql_drivers" = "yes"; then
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
382 all_sql_drivers=yes
3948
795cc9739eb3 Make --without-sql-drivers work properly
Timo Sirainen <tss@iki.fi>
parents: 3944
diff changeset
383 sql_drivers=
795cc9739eb3 Make --without-sql-drivers work properly
Timo Sirainen <tss@iki.fi>
parents: 3944
diff changeset
384 elif test "$sql_drivers" = "no"; then
3944
e7aff159a0d3 Handle --without-sql-drivers
Timo Sirainen <tss@iki.fi>
parents: 3943
diff changeset
385 # --without-sql-drivers given
3948
795cc9739eb3 Make --without-sql-drivers work properly
Timo Sirainen <tss@iki.fi>
parents: 3944
diff changeset
386 sql_drivers=
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
387 fi
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
388
2070
0c8f884d1648 Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents: 2036
diff changeset
389 AC_ARG_WITH(moduledir,
0c8f884d1648 Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents: 2036
diff changeset
390 [ --with-moduledir=DIR Base directory for dynamically loadable modules],
0c8f884d1648 Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents: 2036
diff changeset
391 moduledir="$withval",
0c8f884d1648 Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents: 2036
diff changeset
392 moduledir=$libdir/dovecot
0c8f884d1648 Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents: 2036
diff changeset
393 )
0c8f884d1648 Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents: 2036
diff changeset
394 AC_SUBST(moduledir)
0c8f884d1648 Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents: 2036
diff changeset
395
3779
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
396 AC_ARG_WITH(docs,
4348
2dc5f48ff4ee Whitespace cleanup for --help. Don't enable GSSAPI support by default.
Timo Sirainen <tss@iki.fi>
parents: 4343
diff changeset
397 [ --with-docs Install documentation (default)],
3779
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
398 if test x$withval = xno; then
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
399 want_docs=no
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
400 else
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
401 want_docs=yes
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
402 fi,
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
403 want_docs=yes)
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
404 AM_CONDITIONAL(BUILD_DOCS, test "$want_docs" = "yes")
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
405
5217
3a915bf1b390 Changed --with-headers to --enable-header-install
Timo Sirainen <tss@iki.fi>
parents: 5201
diff changeset
406 AC_ARG_ENABLE(header-install,
3a915bf1b390 Changed --with-headers to --enable-header-install
Timo Sirainen <tss@iki.fi>
parents: 5201
diff changeset
407 [ --enable-header-install Install development headers],
3a915bf1b390 Changed --with-headers to --enable-header-install
Timo Sirainen <tss@iki.fi>
parents: 5201
diff changeset
408 if test x$enableval = xno; then
5197
e77e4457d95c Added --with-headers configure option to install .h files.
Timo Sirainen <tss@iki.fi>
parents: 5165
diff changeset
409 want_headers=no
e77e4457d95c Added --with-headers configure option to install .h files.
Timo Sirainen <tss@iki.fi>
parents: 5165
diff changeset
410 else
e77e4457d95c Added --with-headers configure option to install .h files.
Timo Sirainen <tss@iki.fi>
parents: 5165
diff changeset
411 want_headers=yes
e77e4457d95c Added --with-headers configure option to install .h files.
Timo Sirainen <tss@iki.fi>
parents: 5165
diff changeset
412 fi,
e77e4457d95c Added --with-headers configure option to install .h files.
Timo Sirainen <tss@iki.fi>
parents: 5165
diff changeset
413 want_headers=no)
e77e4457d95c Added --with-headers configure option to install .h files.
Timo Sirainen <tss@iki.fi>
parents: 5165
diff changeset
414 AM_CONDITIONAL(INSTALL_HEADERS, test "$want_headers" = "yes")
e77e4457d95c Added --with-headers configure option to install .h files.
Timo Sirainen <tss@iki.fi>
parents: 5165
diff changeset
415
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
416 dnl * gcc specific options
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
417 if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
4826
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
418 # -Wcast-qual -Wcast-align -Wconversion -Wunreachable-code # too many warnings
850
a6f53dbe803f Enable more warnings with gcc
Timo Sirainen <tss@iki.fi>
parents: 843
diff changeset
419 # -Wstrict-prototypes -Wredundant-decls # may give warnings in some systems
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
420 # -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings
4022
2f26567685ff Removed -Wstrict-aliasing=2 since it gives errors with older gccs
Timo Sirainen <tss@iki.fi>
parents: 4018
diff changeset
421 CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast"
3091
0704b595c873 Give -std=gnu99 option to gcc.
Timo Sirainen <tss@iki.fi>
parents: 3062
diff changeset
422
4826
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
423 AC_TRY_COMPILE([
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
424 #if __GNUC__ < 4
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
425 # error old gcc
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
426 #endif
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
427 ],,[
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
428 # gcc4
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
429 CFLAGS="$CFLAGS -Wstrict-aliasing=2"
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
430 ])
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
431
3097
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
432 # Use std=gnu99 if we have new enough gcc
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
433 old_cflags=$CFLAGS
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
434 CFLAGS="-std=gnu99"
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
435 AC_TRY_COMPILE([
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
436 ],, [
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
437 CFLAGS="$CFLAGS $old_cflags"
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
438 ], [
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
439 CFLAGS="$old_cflags"
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
440 ])
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
441 fi
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
442
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
443 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
444 dnl ** just some generic stuff...
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
445 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
446
5690
c1f51c3510ca Simplify some checks with AC_SEARCH_LIBS()
Timo Sirainen <tss@iki.fi>
parents: 5681
diff changeset
447 AC_SEARCH_LIBS(socket, socket)
c1f51c3510ca Simplify some checks with AC_SEARCH_LIBS()
Timo Sirainen <tss@iki.fi>
parents: 5681
diff changeset
448 AC_SEARCH_LIBS(inet_addr, nsl)
c1f51c3510ca Simplify some checks with AC_SEARCH_LIBS()
Timo Sirainen <tss@iki.fi>
parents: 5681
diff changeset
449 AC_SEARCH_LIBS(fdatasync, rt, [
c1f51c3510ca Simplify some checks with AC_SEARCH_LIBS()
Timo Sirainen <tss@iki.fi>
parents: 5681
diff changeset
450 AC_DEFINE(HAVE_FDATASYNC,, Define if you have fdatasync())
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
451 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
452
5691
a28ab423949a Don't bother checking if cap_init() is in libc, it's always in libcap.
Timo Sirainen <tss@iki.fi>
parents: 5690
diff changeset
453 AC_CHECK_LIB(cap, cap_init, [
a28ab423949a Don't bother checking if cap_init() is in libc, it's always in libcap.
Timo Sirainen <tss@iki.fi>
parents: 5690
diff changeset
454 AC_DEFINE(HAVE_LIBCAP,, libcap is installed for cap_init())
a28ab423949a Don't bother checking if cap_init() is in libc, it's always in libcap.
Timo Sirainen <tss@iki.fi>
parents: 5690
diff changeset
455 LIBCAP="-lcap"
5201
8920e744dac4 Drop privileges if libcap is found. Patch by David (lists edeca.net).
Timo Sirainen <tss@iki.fi>
parents: 5197
diff changeset
456 ])
8920e744dac4 Drop privileges if libcap is found. Patch by David (lists edeca.net).
Timo Sirainen <tss@iki.fi>
parents: 5197
diff changeset
457 AC_SUBST(LIBCAP)
8920e744dac4 Drop privileges if libcap is found. Patch by David (lists edeca.net).
Timo Sirainen <tss@iki.fi>
parents: 5197
diff changeset
458
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
459 dnl * after -lsocket and -lnsl tests, inet_aton() may be in them
2103
879b0b9ed5d4 Separate mbox_locks/mbox_read_dotlock to mbox_read_locks and
Timo Sirainen <tss@iki.fi>
parents: 2080
diff changeset
460 AC_CHECK_FUNCS(fcntl flock lockf inet_aton sigaction getpagesize madvise \
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
461 strcasecmp stricmp vsyslog writev pread \
3237
2f57438d9542 Added setegid() emulation for HP-UX.
Timo Sirainen <tss@iki.fi>
parents: 3236
diff changeset
462 setrlimit setproctitle seteuid setreuid setegid setresgid \
7678
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
463 strtoull strtoll strtouq strtoq \
7647
f7989d01fa3c Added more fallbacks if strtoll() or strtoull() isn't implemented
Timo Sirainen <tss@iki.fi>
parents: 7644
diff changeset
464 setpriority quotactl getmntent kqueue kevent backtrace_symbols \
8076
fec8412dc1c5 env_remove(): Implement a fallback method if unsetenv() doesn't exist.
Timo Sirainen <tss@iki.fi>
parents: 8071
diff changeset
465 walkcontext dirfd clearenv malloc_usable_size unsetenv)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
466
7678
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
467 dnl strtoimax and strtoumax are macros in HP-UX, so inttypes.h must be included
8077
0041d055acac configure: Test strtoumax() and strtoimax() by linking instead of just compiling (Tru64 fix).
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
468 dnl Link instead of just compiling since there's something wrong with Tru64
7678
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
469 AC_MSG_CHECKING([for strtoimax])
8077
0041d055acac configure: Test strtoumax() and strtoimax() by linking instead of just compiling (Tru64 fix).
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
470 AC_TRY_LINK([
7678
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
471 #include <inttypes.h>
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
472 ], [
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
473 strtoimax(0, 0, 0);
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
474 ], [
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
475 AC_DEFINE(HAVE_STRTOIMAX,, Define if you have strtoimax function)
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
476 AC_MSG_RESULT(yes)
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
477 ], [
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
478 AC_MSG_RESULT(no)
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
479 ])
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
480
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
481 AC_MSG_CHECKING([for strtoumax])
8077
0041d055acac configure: Test strtoumax() and strtoimax() by linking instead of just compiling (Tru64 fix).
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
482 AC_TRY_LINK([
7678
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
483 #include <inttypes.h>
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
484 ], [
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
485 strtoumax(0, 0, 0);
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
486 ], [
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
487 AC_DEFINE(HAVE_STRTOUMAX,, Define if you have strtoumax function)
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
488 AC_MSG_RESULT(yes)
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
489 ], [
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
490 AC_MSG_RESULT(no)
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
491 ])
2e400a79c8b6 Check strtoimax() and strtoumax() with inttypes.h included. They won't be
Timo Sirainen <tss@iki.fi>
parents: 7670
diff changeset
492
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
493 dnl * I/O loop function
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
494 have_ioloop=no
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
495
4482
f60b07bd5fa7 --with-ioloop=auto changed to --with-ioloop=best
Timo Sirainen <tss@iki.fi>
parents: 4478
diff changeset
496 if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
497 AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
498 AC_TRY_RUN([
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
499 #include <sys/epoll.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
500
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
501 int main()
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
502 {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
503 return epoll_create(5) < 1;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
504 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
505 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
506 i_cv_epoll_works=yes
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
507 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
508 i_cv_epoll_works=no
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
509 ])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
510 ])
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
511 if test $i_cv_epoll_works = yes; then
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
512 AC_DEFINE(IOLOOP_EPOLL,, Implement I/O loop with Linux 2.6 epoll())
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
513 have_ioloop=yes
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
514 ioloop=epoll
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
515 else
4478
4b01707d6cbe Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents: 4443
diff changeset
516 if test "$ioloop" = "epoll" ; then
4b01707d6cbe Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents: 4443
diff changeset
517 AC_MSG_ERROR([epoll ioloop requested but epoll_create() is not available])
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
518 fi
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
519 fi
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
520 fi
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
521
4482
f60b07bd5fa7 --with-ioloop=auto changed to --with-ioloop=best
Timo Sirainen <tss@iki.fi>
parents: 4478
diff changeset
522 if test "$ioloop" = "best" || test "$ioloop" = "kqueue"; then
4433
Timo Sirainen <tss@iki.fi>
parents: 4426
diff changeset
523 if test "$ac_cv_func_kqueue" = yes && test "$ac_cv_func_kevent" = yes; then
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
524 AC_DEFINE(IOLOOP_KQUEUE,, [Implement I/O loop with BSD kqueue()])
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
525 ioloop=kqueue
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
526 have_ioloop=yes
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
527 elif test "$ioloop" = "kqueue"; then
4478
4b01707d6cbe Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents: 4443
diff changeset
528 AC_MSG_ERROR([kqueue ioloop requested but kqueue() is not available])
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
529 fi
3749
194295062e5e Added kqueue support. Patch by Vaclav Haisman.
Timo Sirainen <tss@iki.fi>
parents: 3745
diff changeset
530 fi
194295062e5e Added kqueue support. Patch by Vaclav Haisman.
Timo Sirainen <tss@iki.fi>
parents: 3745
diff changeset
531
4482
f60b07bd5fa7 --with-ioloop=auto changed to --with-ioloop=best
Timo Sirainen <tss@iki.fi>
parents: 4478
diff changeset
532 if test "$ioloop" = "best" || test "$ioloop" = "poll"; then
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
533 AC_CHECK_FUNC(poll, [
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
534 AC_DEFINE(IOLOOP_POLL,, Implement I/O loop with poll())
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
535 ioloop=poll
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
536 have_ioloop=yes
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
537 ])
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
538 fi
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
539
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
540 if test "$have_ioloop" = "no"; then
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
541 AC_DEFINE(IOLOOP_SELECT,, Implement I/O loop with select())
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
542 ioloop="select"
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
543 fi
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
544
3745
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
545 have_notify=none
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
546
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
547 if test "$notify" = "" || test "$notify" = "inotify" ; then
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
548 dnl * inotify?
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
549 AC_CACHE_CHECK([whether we can use inotify],i_cv_inotify_works,[
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
550 AC_TRY_RUN([
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
551 #define _GNU_SOURCE
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
552 #include <sys/ioctl.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
553 #include <fcntl.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
554 #include <sys/inotify.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
555 #include <stdio.h>
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
556
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
557 int main()
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
558 {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
559 int wd, fd;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
560 char * fn = "/tmp";
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
561
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
562 fd = inotify_init ();
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
563 if (fd < 0)
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
564 {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
565 perror ("inotify_init");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
566 return 1;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
567 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
568
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
569 wd = inotify_add_watch (fd, fn, IN_ALL_EVENTS);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
570
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
571 if (wd < 0)
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
572 {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
573 perror ("inotify_add_watch");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
574 return 2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
575 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
576
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
577 inotify_rm_watch (fd, wd);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
578
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
579 close (fd);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
580 return 0;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
581 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
582 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
583 i_cv_inotify_works=yes
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
584 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
585 i_cv_inotify_works=no
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
586 ])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
587 ])
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
588 if test $i_cv_inotify_works = yes; then
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
589 have_notify=inotify
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
590 notify=inotify
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
591 AC_DEFINE(IOLOOP_NOTIFY_INOTIFY,, Use Linux inotify)
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
592 else
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
593 if test "$notify" = "inotify"; then
4478
4b01707d6cbe Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents: 4443
diff changeset
594 AC_MSG_ERROR([inotify requested but not available])
4423
26d18749f718 Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents: 4422
diff changeset
595 notify=""
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
596 fi
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
597 fi
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
598 fi
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
599
4572
046b985ed767 Use notify=kqueue automatically only if ioloop=kqueue.
Timo Sirainen <tss@iki.fi>
parents: 4571
diff changeset
600 if (test "$notify" = "" && test "$ioloop" = kqueue) || test "$notify" = "kqueue"; then
4423
26d18749f718 Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents: 4422
diff changeset
601 AC_MSG_CHECKING([if we can use BSD kqueue() notify])
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
602 dnl * BSD kqueue() notify
4442
9eee24bf2960 Fix kqueue notify checking.
Timo Sirainen <tss@iki.fi>
parents: 4433
diff changeset
603 if test "$ac_cv_func_kqueue" = yes && test "$ac_cv_func_kevent" = yes ; then
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
604 have_notify=kqueue
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
605 notify=kqueue
4423
26d18749f718 Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents: 4422
diff changeset
606 AC_MSG_RESULT("yes")
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
607 AC_DEFINE(IOLOOP_NOTIFY_KQUEUE,,
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
608 Use BSD kqueue directory changes notificaton)
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
609 else
4423
26d18749f718 Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents: 4422
diff changeset
610 AC_MSG_RESULT("no")
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
611 if test "$notfify" = "kqueue" ; then
4478
4b01707d6cbe Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents: 4443
diff changeset
612 AC_MSG_ERROR([kqueue notify requested but kqueue() is not available])
4423
26d18749f718 Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents: 4422
diff changeset
613 notify=""
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
614 fi
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
615 fi
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
616 fi
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
617
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
618 if test "$notify" = "" || test "$notify" = "dnotify"; then
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
619 AC_MSG_CHECKING([whether we can use dnotify])
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
620 dnl * dnotify?
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
621 AC_TRY_COMPILE([
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
622 #define _GNU_SOURCE
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
623 #include <fcntl.h>
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
624 #include <signal.h>
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
625 #include <unistd.h>
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
626 ], [
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
627 fcntl(0, F_SETSIG, SIGRTMIN);
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
628 fcntl(0, F_NOTIFY, DN_CREATE | DN_DELETE | DN_RENAME | DN_MULTISHOT);
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
629 ], [
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
630 AC_MSG_RESULT(yes)
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
631 AC_DEFINE(IOLOOP_NOTIFY_DNOTIFY,, Use Linux dnotify)
3745
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
632 have_notify=dnotify
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
633 notify=dnotify
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
634 ], [
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
635 AC_MSG_RESULT(no)
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
636 if test "$notify" = "dnotify"; then
4478
4b01707d6cbe Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents: 4443
diff changeset
637 AC_MSG_ERROR([dnotify requested but not available])
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
638 fi
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
639 ])
3745
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
640 fi
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
641
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
642 if test "$have_notify" = "none"; then
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
643 AC_DEFINE(IOLOOP_NOTIFY_NONE,, No special notify support)
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
644 fi
1729
5bf22d6bb65e Added IO_DIR_NOTIFY and IO_FILE_NOTIFY conditions to io_add(). IO_DIR_NOTIFY
Timo Sirainen <tss@iki.fi>
parents: 1720
diff changeset
645
1989
a2b009c65e02 Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents: 1978
diff changeset
646 dnl * GLIBC?
a2b009c65e02 Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents: 1978
diff changeset
647 AC_TRY_COMPILE([
a2b009c65e02 Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents: 1978
diff changeset
648 #include <stdlib.h>
a2b009c65e02 Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents: 1978
diff changeset
649 #ifdef __GLIBC__
a2b009c65e02 Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents: 1978
diff changeset
650 we have glibc
a2b009c65e02 Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents: 1978
diff changeset
651 #endif
a2b009c65e02 Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents: 1978
diff changeset
652 ],,, [
a2b009c65e02 Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents: 1978
diff changeset
653 AC_DEFINE(PREAD_WRAPPERS,, Define if pread/pwrite needs _XOPEN_SOURCE 500)
a2b009c65e02 Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents: 1978
diff changeset
654 ])
a2b009c65e02 Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents: 1978
diff changeset
655
7164
d349cdeddc7d Don't use posix_fallocate() with GLIBC versions older than 2.7. It probably
Timo Sirainen <tss@iki.fi>
parents: 7094
diff changeset
656 dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
7903
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
657 dnl * It may also be broken in AIX.
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
658 AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
659 AC_TRY_RUN([
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
660 #define _XOPEN_SOURCE 600
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
661 #include <stdio.h>
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
662 #include <stdlib.h>
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
663 #include <fcntl.h>
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
664 #include <unistd.h>
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
665 #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
666 possibly broken posix_fallocate
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
667 #endif
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
668 int main() {
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
669 int fd = creat("conftest.temp", 0600);
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
670 int ret;
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
671 if (fd == -1) {
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
672 perror("creat()");
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
673 return 2;
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
674 }
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
675 ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0;
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
676 unlink("conftest.temp");
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
677 return ret;
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
678 }
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
679 ], [
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
680 i_cv_posix_fallocate_works=yes
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
681 ], [
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
682 i_cv_posix_fallocate_works=no
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
683 ])
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
684 ])
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
685 if test $i_cv_posix_fallocate_works = yes; then
7164
d349cdeddc7d Don't use posix_fallocate() with GLIBC versions older than 2.7. It probably
Timo Sirainen <tss@iki.fi>
parents: 7094
diff changeset
686 AC_DEFINE(HAVE_POSIX_FALLOCATE,, Define if you have a working posix_fallocate())
7903
12565ef10d1c Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
687 fi
7164
d349cdeddc7d Don't use posix_fallocate() with GLIBC versions older than 2.7. It probably
Timo Sirainen <tss@iki.fi>
parents: 7094
diff changeset
688
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
689 dnl * OS specific options
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
690 case "$host_os" in
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
691 hpux*)
7633
1c17998da315 HP-UX: Fixed fd passing.
Timo Sirainen <tss@iki.fi>
parents: 7632
diff changeset
692 CFLAGS="$CFLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED"
1c17998da315 HP-UX: Fixed fd passing.
Timo Sirainen <tss@iki.fi>
parents: 7632
diff changeset
693 # for getting fd_send/fd_recv working:
1c17998da315 HP-UX: Fixed fd passing.
Timo Sirainen <tss@iki.fi>
parents: 7632
diff changeset
694 LDFLAGS="$LDFLAGS -Wl,+b,:"
1c17998da315 HP-UX: Fixed fd passing.
Timo Sirainen <tss@iki.fi>
parents: 7632
diff changeset
695 LIBS="-lxnet $LIBS"
7632
f3667be6ec9e HP-UX: pread() and pwrite() are broken, use our own implementation.
Timo Sirainen <tss@iki.fi>
parents: 7623
diff changeset
696 AC_DEFINE(PREAD_BROKEN,, Defint if pread/pwrite implementation is broken)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
697 ;;
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
698 *)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
699 ;;
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
700 esac
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
701
55
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
702 AC_CHECK_SIZEOF(int)
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
703 AC_CHECK_SIZEOF(long)
464
c634b705f24b Removed several useless handers of printf_string_upper_bound(), and added a
Timo Sirainen <tss@iki.fi>
parents: 439
diff changeset
704 AC_CHECK_SIZEOF(void *)
55
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
705 AC_CHECK_SIZEOF(long long)
185
60925d3e2c4d fixed ssize_t and off_t checks.
Timo Sirainen <tss@iki.fi>
parents: 183
diff changeset
706
2036
b3a56463c812 AC_DEFUN warning fixes for aclocal 1.8..
Timo Sirainen <tss@iki.fi>
parents: 2035
diff changeset
707 AC_DEFUN([AC_TYPEOF], [
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
708 dnl * first check if we can get the size with redefining typedefs
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
709
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
710 order="$2"
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
711 if test "$2" = ""; then
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
712 order="int long long-long"
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
713 fi
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
714
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
715 result=""
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
716 visible="unknown"
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
717 AC_MSG_CHECKING([type of $1])
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
718
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
719 if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
720 dnl * try with printf() + -Werror
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
721 old_CFLAGS="$CFLAGS"
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
722 CFLAGS="$CFLAGS -Werror"
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
723
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
724 for type in $order; do
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
725 case "$type" in
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
726 int)
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
727 fmt="%d"
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
728 ;;
1630
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
729 unsigned-int)
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
730 fmt="%u"
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
731 ;;
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
732 long)
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
733 fmt="%ld"
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
734 ;;
1630
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
735 unsigned-long)
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
736 fmt="%lu"
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
737 ;;
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
738 long-long)
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
739 fmt="%lld"
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
740 ;;
1630
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
741 unsigned-long-long)
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
742 fmt="%llu"
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
743 ;;
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
744 *)
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
745 fmt=""
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
746 ;;
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
747 esac
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
748
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
749 if test "$fmt" != ""; then
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
750 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
751 #include <sys/types.h>
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
752 #include <stdio.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
753 ]], [[
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
754 printf("$fmt", ($1)0);
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
755 ]])],[
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
756 if test "$result" != ""; then
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
757 dnl * warning check isn't working
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
758 result=""
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
759 visible="unknown"
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
760 break
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
761 fi
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
762 result="`echo $type|sed 's/-/ /g'`"
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
763 visible="$result"
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
764 ],[])
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
765 fi
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
766 done
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
767 CFLAGS="$old_CFLAGS"
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
768 fi
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
769
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
770 if test "$result" = ""; then
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
771 for type in $order; do
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
772 type="`echo $type|sed 's/-/ /g'`"
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
773 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
774 #include <sys/types.h>
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
775 typedef $type $1;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
776 ]], [[]])],[
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
777 if test "$result" != ""; then
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
778 dnl * compiler allows redefining to anything
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
779 result=""
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
780 visible="unknown"
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
781 break
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
782 fi
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
783 result="$type"
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
784 visible="$type"
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
785 ],[])
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
786 done
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
787 fi
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
788
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
789 if test "$result" = ""; then
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
790 dnl * check with sizes
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
791
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
792 dnl * older autoconfs don't include sys/types.h, so do it manually
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
793 AC_RUN_IFELSE([AC_LANG_SOURCE([[
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
794 #include <stdio.h>
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
795 #include <sys/types.h>
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
796 int main() {
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
797 FILE *f=fopen("conftestval", "w");
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
798 if (!f) exit(1);
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
799 fprintf(f, "%d\n", sizeof($1));
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
800 exit(0);
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
801 }
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
802 ]])],[
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
803 size=`cat conftestval`
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
804 rm -f conftestval
55
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
805
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
806 for type in $order; do
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
807 actype="ac_cv_sizeof_`echo $type|sed 's/-/_/g'`"
4567
32f5df3de2d1 eval doesn't need to have its parameters quoted. The previous \" quoting was
Timo Sirainen <tss@iki.fi>
parents: 4565
diff changeset
808 if test "$size" = "`eval echo \\$$actype`"; then
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
809 result="`echo $type|sed 's/-/ /g'`"
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
810 visible="`expr $size \* 8`bit (using $result)"
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
811 break
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
812 fi
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
813 done
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
814 if test "$result" = ""; then
4055
f7ff79c3189b If size_t and ssize_t exist but we can't figure out their type, don't
Timo Sirainen <tss@iki.fi>
parents: 4050
diff changeset
815 result=unknown
f7ff79c3189b If size_t and ssize_t exist but we can't figure out their type, don't
Timo Sirainen <tss@iki.fi>
parents: 4050
diff changeset
816 visible="`expr $size \* 8`bit (unknown type)"
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
817 fi
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
818 ],[],[])
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
819 fi
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
820
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
821 typeof_$1=$result
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
822 AC_MSG_RESULT($visible)
185
60925d3e2c4d fixed ssize_t and off_t checks.
Timo Sirainen <tss@iki.fi>
parents: 183
diff changeset
823 ])
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
824
6616
be366eda336e Use AC_SYS_LARGEFILE instead of our own checks. Also removes
Timo Sirainen <tss@iki.fi>
parents: 6610
diff changeset
825 AC_SYS_LARGEFILE
3929
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
826 AC_CHECK_TYPES(_Bool)
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
827
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
828 AC_CHECK_TYPE(uoff_t, [
3931
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
829 have_uoff_t=yes
3929
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
830 AC_DEFINE(HAVE_UOFF_T,, Define if you have a native uoff_t type)
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
831 ], [
3931
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
832 have_uoff_t=no
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
833 ])
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
834
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
835 AC_TYPEOF(off_t, long int long-long)
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
836 case "$typeof_off_t" in
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
837 int)
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
838 offt_max=INT_MAX
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
839 uofft_fmt="u"
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
840 if test "$have_uoff_t" != "yes"; then
3929
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
841 AC_DEFINE(UOFF_T_INT,, Define if off_t is int)
3931
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
842 fi
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
843 offt_bits=`expr 8 \* $ac_cv_sizeof_int`
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
844 ;;
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
845 long)
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
846 offt_max=LONG_MAX
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
847 uofft_fmt="lu"
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
848 if test "$have_uoff_t" != "yes"; then
3929
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
849 AC_DEFINE(UOFF_T_LONG,, Define if off_t is long)
3931
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
850 fi
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
851 offt_bits=`expr 8 \* $ac_cv_sizeof_long`
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
852 ;;
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
853 "long long")
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
854 offt_max=LLONG_MAX
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
855 uofft_fmt="llu"
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
856 if test "$have_uoff_t" != "yes"; then
3929
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
857 AC_DEFINE(UOFF_T_LONG_LONG,, Define if off_t is long long)
3931
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
858 fi
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
859 offt_bits=`expr 8 \* $ac_cv_sizeof_long_long`
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
860 ;;
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
861 *)
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
862 AC_MSG_ERROR([Unsupported off_t type])
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
863 ;;
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
864 esac
50
d493b9cc265e Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents: 5
diff changeset
865
2078
b3daf55df932 Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents: 2070
diff changeset
866 dnl * Do we have struct dirent->d_type
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
867 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2078
b3daf55df932 Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents: 2070
diff changeset
868 #include <dirent.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
869 ]], [[
2078
b3daf55df932 Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents: 2070
diff changeset
870 struct dirent d;
b3daf55df932 Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents: 2070
diff changeset
871 d.d_type = DT_DIR;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
872 ]])],[
2078
b3daf55df932 Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents: 2070
diff changeset
873 AC_DEFINE(HAVE_DIRENT_D_TYPE,, Define if you have struct dirent->d_type)
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
874 ],[])
2078
b3daf55df932 Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents: 2070
diff changeset
875
1382
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
876 dnl * Do we have OFF_T_MAX?
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
877 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1382
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
878 #include <limits.h>
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
879 #include <sys/types.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
880 ]], [[
1382
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
881 off_t i = OFF_T_MAX;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
882 ]])],[
1403
Timo Sirainen <tss@iki.fi>
parents: 1394
diff changeset
883 :
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
884 ],[
1382
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
885 AC_DEFINE_UNQUOTED(OFF_T_MAX, $offt_max, Maximum value of off_t)
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
886 ])
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
887
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
888 AC_DEFINE_UNQUOTED(PRIuUOFF_T, "$uofft_fmt", printf() format for uoff_t)
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
889
750
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
890 dnl * make sure size_t isn't signed. we'd probably work fine with it, but
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
891 dnl * it's more likely vulnerable to buffer overflows. Anyway, C99 specifies
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
892 dnl * that it's unsigned and only some old systems define it as signed.
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
893 AC_CACHE_CHECK([whether size_t is signed],i_cv_signed_size_t,[
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
894 AC_RUN_IFELSE([AC_LANG_SOURCE([[
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
895 #include <sys/types.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
896 int main() {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
897 /* return 0 if we're signed */
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
898 exit((size_t)(int)-1 <= 0 ? 0 : 1);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
899 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
900 ]])],[
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
901 i_cv_signed_size_t=yes
750
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
902
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
903 echo
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
904 echo "Your system's size_t is a signed integer, Dovecot isn't designed to"
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
905 echo "support it. It probably works just fine, but it's less resistant to"
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
906 echo "buffer overflows. If you're not worried about this and still want to"
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
907 echo "compile Dovecot, set ignore_signed_size=1 environment."
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
908
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
909 if test "$ignore_signed_size" = ""; then
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
910 AC_MSG_ERROR([aborting])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
911 fi
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
912 echo "..ignoring as requested.."
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
913 ],[
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
914 i_cv_signed_size_t=no
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
915 ],[])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
916 ])
1626
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
917 dnl Note: we check size_t rather than ssize_t here, because on OSX 10.2
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
918 dnl ssize_t = int and size_t = unsigned long. We're mostly concerned about
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
919 dnl printf format here, so check the size_t one.
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
920 AC_TYPEOF(size_t, unsigned-int unsigned-long unsigned-long-long)
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
921 case "$typeof_size_t" in
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
922 "unsigned long")
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
923 ssizet_max=LONG_MAX
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
924 sizet_fmt="lu"
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
925 ;;
1626
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
926 "unsigned long long")
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
927 ssizet_max=LLONG_MAX
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
928 sizet_fmt="llu"
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
929 ;;
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
930 *)
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
931 dnl older systems didn't have ssize_t, default to int
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
932 ssizet_max=INT_MAX
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
933 sizet_fmt="u"
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
934
1626
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
935 if test "$typeof_size_t" = ""; then
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
936 AC_DEFINE(size_t, unsigned int, Define to 'unsigned int' if you don't have it)
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
937 AC_DEFINE(ssize_t, int, Define to 'int' if you don't have it)
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
938 fi
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
939 ;;
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
940 esac
183
4a7ab9e94f25 size_t fixes for lib/. Changed OFF_T_FORMAT to PRIuOFF_T which is more
Timo Sirainen <tss@iki.fi>
parents: 179
diff changeset
941
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
942 AC_DEFINE_UNQUOTED(SSIZE_T_MAX, $ssizet_max, Maximum value of ssize_t)
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
943 AC_DEFINE_UNQUOTED(PRIuSIZE_T, "$sizet_fmt", printf() format for size_t)
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
944
2036
b3a56463c812 AC_DEFUN warning fixes for aclocal 1.8..
Timo Sirainen <tss@iki.fi>
parents: 2035
diff changeset
945 AC_DEFUN([AC_CHECKTYPE2], [
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
946 AC_MSG_CHECKING([for $1])
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
947 AC_CACHE_VAL(i_cv_type_$1,
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
948 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
949 #include <sys/types.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
950 $2]], [[$1 t;]])],[i_cv_type_$1=yes],[i_cv_type_$1=no])])
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
951 AC_MSG_RESULT($i_cv_type_$1)
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
952 ])
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
953
1660
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
954 dnl some systems don't have stdint.h, but still have some of the types
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
955 dnl defined elsewhere
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
956 AC_CHECK_HEADER(stdint.h, [
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
957 stdint_include="#include <stdint.h>"
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
958 ])
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
959
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
960 AC_CHECKTYPE2(uintmax_t, [$stdint_include])
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
961 if test $i_cv_type_uintmax_t = yes; then
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
962 AC_DEFINE(HAVE_UINTMAX_T,, Define if you have uintmax_t (C99 type))
179
0ffecd4e7e1a added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents: 175
diff changeset
963 fi
0ffecd4e7e1a added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents: 175
diff changeset
964
908
bc55266563cd Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents: 907
diff changeset
965 dnl use separate check, eg. Solaris 8 has uintmax_t but not uint_fast32_t
1660
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
966 AC_CHECKTYPE2(uint_fast32_t, [$stdint_include])
908
bc55266563cd Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents: 907
diff changeset
967 if test $i_cv_type_uint_fast32_t = yes; then
bc55266563cd Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents: 907
diff changeset
968 AC_DEFINE(HAVE_UINT_FAST32_T,, Define if you have uint_fast32_t (C99 type))
bc55266563cd Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents: 907
diff changeset
969 fi
bc55266563cd Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents: 907
diff changeset
970
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
971 AC_CHECKTYPE2(socklen_t, [#include <sys/socket.h>])
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
972 if test $i_cv_type_socklen_t = yes; then
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
973 AC_DEFINE(HAVE_SOCKLEN_T,, Define to 'int' if you don't have socklen_t)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
974 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
975
1394
059f13d577bb Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents: 1389
diff changeset
976 AC_DEFINE_UNQUOTED(MEM_ALIGN_SIZE, $mem_align, Required memory alignment)
059f13d577bb Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents: 1389
diff changeset
977
1335
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
978 dnl * find random source
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
979 AC_MSG_CHECKING([for /dev/urandom])
1611
fcc5d6bb6244 test -o and -a are apparently non-POSIX. not using.
Timo Sirainen <tss@iki.fi>
parents: 1609
diff changeset
980 if test -c /dev/urandom || test -s /dev/urandom; then
1335
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
981 AC_MSG_RESULT(yes)
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
982 AC_DEFINE(HAVE_DEV_URANDOM,, Define if you have /dev/urandom)
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
983 have_random_source=yes
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
984 else
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
985 AC_MSG_RESULT(no)
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
986
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
987 AC_CHECK_HEADER(openssl/rand.h, [
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
988 AC_DEFINE(HAVE_OPENSSL_RAND_H,, Define if you have openssl/rand.h)
7644
0d606019f58c If we need -lcrypto for randomness, put it to $LIBS instead of $RAND_LIBS
Timo Sirainen <tss@iki.fi>
parents: 7636
diff changeset
989 LIBS="$LIBS -lcrypto"
1335
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
990 ])
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
991 fi
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
992
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
993 dnl * do we have tm_gmtoff
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
994 AC_MSG_CHECKING([for tm_gmtoff])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
995 AC_CACHE_VAL(i_cv_field_tm_gmtoff,
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
996 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
997 #include <time.h>]],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
998 [[struct tm *tm; return tm->tm_gmtoff;]])],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
999 [i_cv_field_tm_gmtoff=yes],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1000 [i_cv_field_tm_gmtoff=no])])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1001 if test $i_cv_field_tm_gmtoff = yes; then
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1002 AC_DEFINE(HAVE_TM_GMTOFF,, Define if you have struct tm->tm_gmtoff)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1003 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1004 AC_MSG_RESULT($i_cv_field_tm_gmtoff)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1005
1658
20519e4bca48 utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents: 1656
diff changeset
1006 dnl * how large time_t values does gmtime() accept?
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1007 AC_CACHE_CHECK([how large time_t values gmtime() accepts],i_cv_gmtime_max_time_t,[
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1008 AC_RUN_IFELSE([AC_LANG_SOURCE([[
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1009 #include <stdio.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1010 #include <time.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1011 int main() {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1012 FILE *f;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1013 int bits;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1014
6522
6c46542a5ce5 With 32bit time_t we were checking it up to 64 bits, which overflowed the
Timo Sirainen <tss@iki.fi>
parents: 6501
diff changeset
1015 for (bits = 1; bits < sizeof(time_t)*8; bits++) {
6483
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1016 time_t t = ((time_t)1 << bits) - 1;
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1017 if (gmtime(&t) == NULL) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1018 bits--;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1019 break;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1020 }
1658
20519e4bca48 utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents: 1656
diff changeset
1021 }
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1022 if (bits > 40) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1023 /* Solaris 9 breaks after 55 bits. Perhaps other systems break earlier.
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1024 Let's just do the same as Cyrus folks and limit it to 40 bits. */
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1025 bits = 40;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1026 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1027
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1028 f = fopen("conftest.temp", "w");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1029 if (f == NULL) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1030 perror("fopen()");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1031 return 1;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1032 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1033 fprintf(f, "%d", bits);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1034 fclose(f);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1035 return 0;
3206
6400a517f087 Limit TIME_T_MAX_BITS to 40.
Timo Sirainen <tss@iki.fi>
parents: 3199
diff changeset
1036 }
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1037 ]])],[
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1038 i_cv_gmtime_max_time_t=`cat conftest.temp`
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1039 rm -f conftest.temp
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1040 ], [
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1041 printf "check failed, assuming "
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1042 i_cv_gmtime_max_time_t=31
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1043 ],[])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1044 ])
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1045 AC_DEFINE_UNQUOTED(TIME_T_MAX_BITS, $i_cv_gmtime_max_time_t, max. time_t bits gmtime() can handle)
1658
20519e4bca48 utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents: 1656
diff changeset
1046
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1047 AC_CACHE_CHECK([whether time_t is signed],i_cv_signed_time_t,[
6483
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1048 AC_RUN_IFELSE([AC_LANG_SOURCE([[
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1049 #include <sys/types.h>
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1050 int main() {
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1051 /* return 0 if we're signed */
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1052 exit((time_t)(int)-1 <= 0 ? 0 : 1);
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1053 }
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1054 ]])],[
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1055 i_cv_signed_time_t=yes
6483
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1056 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1057 i_cv_signed_time_t=no
6483
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1058 ])
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1059 ])
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1060 if test $i_cv_signed_time_t = yes; then
6483
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1061 AC_DEFINE(TIME_T_SIGNED,, Define if your time_t is signed)
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1062 fi
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1063
7745
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1064 dnl Our implementation of AC_C_FLEXIBLE_ARRAY_MEMBER.
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1065 dnl Use it until autoconf 2.61+ becomes more widely used
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1066 AC_MSG_CHECKING([if we can use C99-like flexible array members])
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1067 AC_TRY_COMPILE([
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1068 struct foo {
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1069 int x;
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1070 char y[];
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1071 };
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1072 ], [
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1073 struct foo foo;
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1074 ], [
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1075 flexible_value=""
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1076 AC_MSG_RESULT(yes)
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1077 ], [
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1078 flexible_value=1
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1079 AC_MSG_RESULT(no)
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1080 ])
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1081 AC_DEFINE_UNQUOTED(FLEXIBLE_ARRAY_MEMBER, $flexible_value, How to define flexible array members in structs)
97245d54efee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7736
diff changeset
1082
411
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1083 dnl * do we have struct iovec
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1084 AC_MSG_CHECKING([for struct iovec])
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1085 AC_CACHE_VAL(i_cv_struct_iovec,
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1086 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
411
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1087 #include <sys/types.h>
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1088 #include <sys/uio.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1089 #include <unistd.h>]],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1090 [[struct iovec *iovec;]])],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1091 [i_cv_struct_iovec=yes],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1092 [i_cv_struct_iovec=no])])
411
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1093
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1094 if test $i_cv_struct_iovec = yes; then
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1095 AC_DEFINE(HAVE_STRUCT_IOVEC,, Define if you have struct iovec)
411
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1096 fi
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1097 AC_MSG_RESULT($i_cv_struct_iovec)
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1098
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1099 dnl * is dev_t an integer or something else?
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1100 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1101 #include <sys/types.h>
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1102 struct test { dev_t a; };
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1103 static struct test t = { 0 };
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1104 ]], [[]])],[],[
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1105 AC_DEFINE(DEV_T_STRUCT,, Define if your dev_t is a structure instead of integer type)
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1106
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1107 dnl we can't initialize structures, so don't warn about them either
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1108 if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1109 CFLAGS=`echo $CFLAGS|sed 's/ -W\b//'`
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1110 fi
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1111 ])
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1112
739
f50714973d0b RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents: 733
diff changeset
1113 dnl * Do we have RLIMIT_AS?
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1114 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
739
f50714973d0b RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents: 733
diff changeset
1115 #include <sys/types.h>
f50714973d0b RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents: 733
diff changeset
1116 #include <sys/time.h>
f50714973d0b RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents: 733
diff changeset
1117 #include <sys/resource.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1118 ]], [[
739
f50714973d0b RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents: 733
diff changeset
1119 struct rlimit r;
f50714973d0b RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents: 733
diff changeset
1120 getrlimit(RLIMIT_AS, &r);
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1121 ]])],[
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1122 AC_DEFINE(HAVE_RLIMIT_AS,, Define if you have RLIMIT_AS for setrlimit())
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1123 ],[])
739
f50714973d0b RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents: 733
diff changeset
1124
1065
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
1125 dnl * Do we have RLIMIT_NPROC?
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1126 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1065
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
1127 #include <sys/types.h>
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
1128 #include <sys/time.h>
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
1129 #include <sys/resource.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1130 ]], [[
1065
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
1131 struct rlimit r;
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
1132 getrlimit(RLIMIT_NPROC, &r);
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1133 ]])],[
1065
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
1134 AC_DEFINE(HAVE_RLIMIT_NPROC,, Define if you have RLIMIT_NPROC for setrlimit())
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1135 ],[])
1065
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
1136
8099
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1137 dnl * Do we have RLIMIT_CORE?
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1138 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1139 #include <sys/types.h>
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1140 #include <sys/time.h>
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1141 #include <sys/resource.h>
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1142 ]], [[
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1143 struct rlimit r;
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1144 getrlimit(RLIMIT_CORE, &r);
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1145 ]])],[
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1146 AC_DEFINE(HAVE_RLIMIT_CORE,, Define if you have RLIMIT_CORE for getrlimit())
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1147 ],[])
8b7fad6494b6 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 8077
diff changeset
1148
8181
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1149 AC_MSG_CHECKING([PR_SET_DUMPABLE])
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1150 AC_TRY_LINK([
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1151 #include <sys/prctl.h>
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1152 ], [
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1153 prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1154 ], [
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1155 AC_DEFINE(HAVE_PR_SET_DUMPABLE,, Define if you have prctl(PR_SET_DUMPABLE))
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1156 AC_MSG_RESULT(yes)
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1157 ], [
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1158 AC_MSG_RESULT(no)
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1159 ])
6e9ca7f7e2a1 Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8149
diff changeset
1160
528
a95b1ccff82e Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents: 494
diff changeset
1161 dnl * Linux compatible mremap()
a95b1ccff82e Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents: 494
diff changeset
1162 AC_MSG_CHECKING([Linux compatible mremap()])
2181
7d4e10c5bd93 Use AC_TRY_LINK() for sendfile() checks so it works right with Solaris. Did
Timo Sirainen <tss@iki.fi>
parents: 2177
diff changeset
1163 AC_TRY_LINK([
224
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
1164 #include <unistd.h>
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
1165 #define __USE_GNU
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
1166 #include <sys/mman.h>
529
3a1be480d16a buggy checks. we were supposed to compile them, not run. plus fixes for
Timo Sirainen <tss@iki.fi>
parents: 528
diff changeset
1167 ], [
3a1be480d16a buggy checks. we were supposed to compile them, not run. plus fixes for
Timo Sirainen <tss@iki.fi>
parents: 528
diff changeset
1168 mremap(0, 0, 0, MREMAP_MAYMOVE);
224
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
1169 ], [
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1170 AC_DEFINE(HAVE_LINUX_MREMAP,, Define if you have Linux-compatible mremap())
224
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
1171 AC_MSG_RESULT(yes)
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
1172 ], [
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
1173 AC_MSG_RESULT(no)
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
1174 ])
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
1175
1622
d22e03714d36 index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents: 1611
diff changeset
1176 dnl * If mmap() plays nicely with write()
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1177 AC_CACHE_CHECK([whether shared mmaps get updated by write()s],i_cv_mmap_plays_with_write,[
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1178 AC_TRY_RUN([
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1179 #include <stdio.h>
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1180 #include <sys/types.h>
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1181 #include <sys/stat.h>
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1182 #include <unistd.h>
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1183 #include <fcntl.h>
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1184 #include <sys/mman.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1185 int main() {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1186 /* return 0 if we're signed */
7902
0fa3d8c5247d configure: create test files with mode 0600.
Timo Sirainen <tss@iki.fi>
parents: 7854
diff changeset
1187 int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC, 0600);
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1188 void *mem;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1189 if (f == -1) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1190 perror("open()");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1191 return 1;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1192 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1193 unlink("conftest.mmap");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1194
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1195 write(f, "1", 2);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1196 mem = mmap(NULL, 2, PROT_READ|PROT_WRITE, MAP_SHARED, f, 0);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1197 if (mem == MAP_FAILED) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1198 perror("mmap()");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1199 return 1;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1200 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1201 strcpy(mem, "2");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1202 msync(mem, 2, MS_SYNC);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1203 lseek(f, 0, SEEK_SET);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1204 write(f, "3", 2);
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1205
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1206 return strcmp(mem, "3") == 0 ? 0 : 1;
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1207 }
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1208 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1209 i_cv_mmap_plays_with_write=yes
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1210 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1211 i_cv_mmap_plays_with_write=no
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1212 ])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1213 ])
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1214 if test $i_cv_mmap_plays_with_write = no; then
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1215 AC_DEFINE(MMAP_CONFLICTS_WRITE,, [Define if shared mmaps don't get updated by write()s])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1216 fi
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1217
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1218 dnl * see if fd passing works
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1219 AC_CACHE_CHECK([whether fd passing works],i_cv_fd_passing,[
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1220 for i in 1 2; do
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1221 old_cflags="$CFLAGS"
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1222 CFLAGS="$CFLAGS -I$srcdir/src/lib $srcdir/src/lib/fdpass.c"
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1223 if test $i = 2; then
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1224 CFLAGS="$CFLAGS -DBUGGY_CMSG_MACROS"
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1225 fi
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1226
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1227 AC_TRY_RUN([
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1228 #include <sys/types.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1229 #include <sys/socket.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1230 #include <sys/wait.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1231 #include <sys/stat.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1232 #include <unistd.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1233 #include <fcntl.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1234 #include "fdpass.h"
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1235
8059
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1236 int nopen(void)
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1237 {
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1238 int i, n;
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1239 struct stat sb;
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1240 for (i = n = 0; i < 256; i++)
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1241 if (fstat(i, &sb) == 0) n++;
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1242 return n;
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1243 }
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1244 int main(void)
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1245 {
8059
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1246 int fd[2], send_fd, recv_fd, status, n1, n2;
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1247 struct stat st, st2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1248 char data;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1249
7902
0fa3d8c5247d configure: create test files with mode 0600.
Timo Sirainen <tss@iki.fi>
parents: 7854
diff changeset
1250 send_fd = creat("conftest.fdpass", 0600);
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1251 if (send_fd == -1) return 2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1252 unlink("conftest.fdpass");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1253 if (fstat(send_fd, &st) < 0) return 2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1254 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) return 2;
8059
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1255 n1 = nopen();
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1256
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1257 switch (fork()) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1258 case -1:
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1259 return 2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1260 case 0:
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1261 alarm(1);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1262 if (fd_send(fd[0], send_fd, &data, 1) != 1) return 2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1263 return 0;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1264 default:
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1265 alarm(2);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1266 if (wait(&status) == -1)
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1267 return 2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1268 if (status != 0)
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1269 return status;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1270 if (fd_read(fd[1], &data, 1, &recv_fd) != 1) return 1;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1271 if (fstat(recv_fd, &st2) < 0) return 2;
8059
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1272 /* nopen check is for making sure that only a single fd
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1273 was received */
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1274 n2 = nopen();
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1275 return st.st_ino == st2.st_ino && n2 == n1 + 1 ? 0 : 1;
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1276 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1277 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1278 ], [
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1279 CFLAGS=$old_cflags
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1280 if test $i = 2; then
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1281 i_cv_fd_passing=buggy_cmsg_macros
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1282 else
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1283 i_cv_fd_passing=yes
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1284 fi
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1285 break
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1286 ], [
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1287 dnl no, try with BUGGY_CMSG_MACROS
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1288 CFLAGS=$old_cflags
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1289 i_cv_fd_passing=no
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1290 ])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1291 done
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1292 ]);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1293
8059
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1294 case "$host_os" in
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1295 darwin[[1-9]].*)
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1296 if test "$i_cv_fd_passing" = "yes"; then
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1297 i_cv_fd_passing=buggy_cmsg_macros
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1298 fi
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1299 ;;
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1300 esac
a217d9ae130b Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8057
diff changeset
1301
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1302 if test $i_cv_fd_passing = buggy_cmsg_macros; then
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1303 AC_DEFINE(BUGGY_CMSG_MACROS,, Define if you have buggy CMSG macros)
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1304 fi
1622
d22e03714d36 index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents: 1611
diff changeset
1305
2035
0e65efd14eda Solaris: Move from sendfilev() to sendfile() (was it always there?). Make
Timo Sirainen <tss@iki.fi>
parents: 2028
diff changeset
1306 dnl * Solaris compatible sendfile()
0e65efd14eda Solaris: Move from sendfilev() to sendfile() (was it always there?). Make
Timo Sirainen <tss@iki.fi>
parents: 2028
diff changeset
1307 AC_CHECK_LIB(sendfile, sendfile, [
976
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
1308 LIBS="$LIBS -lsendfile"
2035
0e65efd14eda Solaris: Move from sendfilev() to sendfile() (was it always there?). Make
Timo Sirainen <tss@iki.fi>
parents: 2028
diff changeset
1309 AC_DEFINE(HAVE_SOLARIS_SENDFILE,, Define if you have Solaris-compatible sendfile())
976
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
1310 ], [
981
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1311 dnl * Linux compatible sendfile() - don't check if Solaris one was found.
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1312 dnl * This seems to pass with Solaris for some reason..
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1313 AC_MSG_CHECKING([Linux compatible sendfile()])
2181
7d4e10c5bd93 Use AC_TRY_LINK() for sendfile() checks so it works right with Solaris. Did
Timo Sirainen <tss@iki.fi>
parents: 2177
diff changeset
1314 AC_TRY_LINK([
981
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1315 #undef _FILE_OFFSET_BITS
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1316 #include <sys/types.h>
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1317 #include <sys/socket.h>
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1318 #include <sys/sendfile.h>
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1319 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1320 sendfile(0, 0, (void *) 0, 0);
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1321 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1322 AC_DEFINE(HAVE_LINUX_SENDFILE,, Define if you have Linux-compatible sendfile())
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1323 AC_MSG_RESULT(yes)
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1324 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1325 AC_MSG_RESULT(no)
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1326 ])
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1327
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1328 dnl * FreeBSD compatible sendfile()
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1329 AC_MSG_CHECKING([FreeBSD compatible sendfile()])
2181
7d4e10c5bd93 Use AC_TRY_LINK() for sendfile() checks so it works right with Solaris. Did
Timo Sirainen <tss@iki.fi>
parents: 2177
diff changeset
1330 AC_TRY_LINK([
981
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1331 #include <sys/types.h>
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1332 #include <sys/socket.h>
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1333 #include <sys/uio.h>
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1334 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1335 struct sf_hdtr hdtr;
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1336 sendfile(0, 0, 0, 0, &hdtr, (void *) 0, 0);
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1337 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1338 AC_DEFINE(HAVE_FREEBSD_SENDFILE,, Define if you have FreeBSD-compatible sendfile())
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1339 AC_MSG_RESULT(yes)
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1340 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1341 AC_MSG_RESULT(no)
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1342 ])
976
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
1343 ])
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
1344
3590
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1345 dnl * Check for crypt() if unistd.h compiles with _XOPEN_SOURCE + _XPG6
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1346 dnl * Add other macros there too "just in case".
3594
f1b407e8debb And more changes to get _XPG6 stuff working right
Timo Sirainen <tss@iki.fi>
parents: 3590
diff changeset
1347 AC_MSG_CHECKING([if we should use _XPG6 macro for crypt()])
3590
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1348 AC_TRY_COMPILE([
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1349 #define _XOPEN_SOURCE 4
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1350 #define _XOPEN_SOURCE_EXTENDED 1
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1351 #define _XOPEN_VERSION 4
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1352 #define _XPG4_2
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1353 #define _XPG6
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1354 #include <unistd.h>
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1355 ], [
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1356 crypt("a", "b");
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1357 ], [
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1358 AC_DEFINE(CRYPT_USE_XPG6,, Define if _XPG6 macro is needed for crypt())
3594
f1b407e8debb And more changes to get _XPG6 stuff working right
Timo Sirainen <tss@iki.fi>
parents: 3590
diff changeset
1359 AC_MSG_RESULT(yes)
f1b407e8debb And more changes to get _XPG6 stuff working right
Timo Sirainen <tss@iki.fi>
parents: 3590
diff changeset
1360 ], [
f1b407e8debb And more changes to get _XPG6 stuff working right
Timo Sirainen <tss@iki.fi>
parents: 3590
diff changeset
1361 AC_MSG_RESULT(no)
3590
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1362 ])
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1363
7526
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1364 AC_MSG_CHECKING([if struct stat has st_?tim timespec fields])
5375
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1365 AC_TRY_COMPILE([
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1366 #include <sys/types.h>
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1367 #include <sys/stat.h>
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1368 #include <unistd.h>
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1369 ], [
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1370 struct stat st;
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1371 unsigned long x = st.st_mtim.tv_nsec;
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1372
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1373 return 0;
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1374 ], [
7526
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1375 AC_DEFINE(HAVE_STAT_XTIM,, Define if you have st_?tim timespec fields in struct stat)
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1376 AC_MSG_RESULT(yes)
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1377 ], [
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1378 AC_MSG_RESULT(no)
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1379 ])
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1380
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1381 AC_MSG_CHECKING([if struct stat has st_?timespec fields])
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1382 AC_TRY_COMPILE([
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1383 #include <sys/types.h>
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1384 #include <sys/stat.h>
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1385 #include <unistd.h>
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1386 ], [
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1387 struct stat st;
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1388 unsigned long x = st.st_mtimespec.tv_nsec;
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1389
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1390 return 0;
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1391 ], [
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1392 AC_DEFINE(HAVE_STAT_XTIMESPEC,, Define if you have st_?timespec fields in struct stat)
5375
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1393 AC_MSG_RESULT(yes)
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1394 ], [
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1395 AC_MSG_RESULT(no)
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1396 ])
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1397
4736
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1398 dnl * Check if statvfs() can be used to find out block device for files
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1399 AC_MSG_CHECKING([if statvfs.f_mntfromname exists])
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1400 AC_TRY_COMPILE([
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1401 #include <sys/types.h>
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1402 #include <sys/statvfs.h>
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1403 ], [
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1404 struct statvfs buf;
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1405 char *p = buf.f_mntfromname;
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1406
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1407 statvfs(".", &buf);
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1408 ], [
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1409 AC_DEFINE(HAVE_STATVFS_MNTFROMNAME,, Define if you have statvfs.f_mntfromname)
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1410 AC_MSG_RESULT(yes)
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1411 ], [
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1412 AC_MSG_RESULT(no)
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1413 ])
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1414
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1415 dnl * Check if statvfs() can be used to find out block device for files
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1416 AC_MSG_CHECKING([if statvfs.f_mntfromname exists])
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1417 AC_TRY_COMPILE([
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1418 #include <sys/types.h>
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1419 #include <sys/statvfs.h>
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1420 ], [
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1421 struct statvfs buf;
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1422 char *p = buf.f_mntfromname;
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1423
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1424 statvfs(".", &buf);
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1425 ], [
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1426 AC_DEFINE(HAVE_STATVFS_MNTFROMNAME,, Define if you have statvfs.f_mntfromname)
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1427 AC_MSG_RESULT(yes)
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1428 ], [
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1429 AC_MSG_RESULT(no)
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1430 ])
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1431
3745
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1432 dnl * Check if statfs() can be used to find out block device for files
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1433 AC_MSG_CHECKING([if statfs.f_mntfromname exists])
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1434 AC_TRY_COMPILE([
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1435 #include <sys/param.h>
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1436 #include <sys/mount.h>
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1437 ], [
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1438 struct statfs buf;
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1439 char *p = buf.f_mntfromname;
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1440
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1441 statfs(".", &buf);
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1442 ], [
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1443 AC_DEFINE(HAVE_STATFS_MNTFROMNAME,, Define if you have statfs.f_mntfromname)
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1444 AC_MSG_RESULT(yes)
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1445 ], [
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1446 AC_MSG_RESULT(no)
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1447 ])
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1448
4552
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1449 dnl * Check if we have struct dqblk.dqb_curblocks
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1450 AC_MSG_CHECKING([if struct dqblk.dqb_curblocks exists])
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1451 AC_TRY_COMPILE([
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1452 #include <sys/types.h>
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1453 #include "$srcdir/src/plugins/quota/quota-fs.h"
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1454 ], [
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1455 struct dqblk dqblk;
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1456 unsigned int x = dqblk.dqb_curblocks;
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1457 ], [
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1458 AC_DEFINE(HAVE_STRUCT_DQBLK_CURBLOCKS,, Define if struct sqblk.dqb_curblocks exists)
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1459 AC_MSG_RESULT(yes)
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1460 ], [
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1461 AC_MSG_RESULT(no)
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1462 ])
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1463
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1464 dnl * Check if we have struct dqblk.dqb_curspace
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1465 AC_MSG_CHECKING([if struct dqblk.dqb_curspace exists])
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1466 AC_TRY_COMPILE([
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1467 #include <sys/types.h>
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1468 #include "$srcdir/src/plugins/quota/quota-fs.h"
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1469 ], [
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1470 struct dqblk dqblk;
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1471 unsigned int x = dqblk.dqb_curspace;
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1472 ], [
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1473 AC_DEFINE(HAVE_STRUCT_DQBLK_CURSPACE,, Define if struct sqblk.dqb_curspace exists)
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1474 AC_MSG_RESULT(yes)
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1475 ], [
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1476 AC_MSG_RESULT(no)
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1477 ])
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1478
4063
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1479 dnl * Check if we have Q_QUOTACTL ioctl (Solaris)
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1480 AC_MSG_CHECKING([if struct Q_QUOTACTL ioctl exists])
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1481 AC_TRY_COMPILE([
4065
a3090ba7429c One more Q_QUOTACTL check fix..
Timo Sirainen <tss@iki.fi>
parents: 4064
diff changeset
1482 #include <sys/types.h>
4063
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1483 #include <sys/fs/ufs_quota.h>
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1484 ], [
4064
f3e7ee9630d0 And fix for Q_QUOTACTL check..
Timo Sirainen <tss@iki.fi>
parents: 4063
diff changeset
1485 struct quotctl ctl;
4063
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1486 ioctl(0, Q_QUOTACTL, &ctl);
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1487 ], [
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1488 AC_DEFINE(HAVE_Q_QUOTACTL,, Define if Q_QUOTACTL exists)
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1489 AC_MSG_RESULT(yes)
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1490 ], [
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1491 AC_MSG_RESULT(no)
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1492 ])
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1493
859
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1494 dnl ***
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1495 dnl *** C99 vsnprintf()?
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1496 dnl ***
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1497
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1498 AC_CACHE_CHECK([for C99 vsnprintf()],i_cv_c99_vsnprintf,[
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1499 AC_RUN_IFELSE([AC_LANG_SOURCE([[
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1500 #include <stdio.h>
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1501 #include <stdarg.h>
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1502 static int f(const char *fmt, ...) {
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1503 va_list args;
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1504 char buf[13];
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1505 int ret;
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1506
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1507 va_start(args, fmt);
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1508 ret = vsnprintf(buf, 11, fmt, args) != 12 || buf[11-1] != '\0';
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1509 va_end(args);
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1510 return ret;
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1511 }
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1512 int main() {
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1513 return f("hello %s%d", "world", 1);
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1514 }]])],
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1515 [i_cv_c99_vsnprintf=yes],
7650
2adf8302551e Support systems with non-C99 vsnprintf().
Timo Sirainen <tss@iki.fi>
parents: 7647
diff changeset
1516 [i_cv_c99_vsnprintf=no])
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1517 ])
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1518 if test $i_cv_c99_vsnprintf = no; then
7650
2adf8302551e Support systems with non-C99 vsnprintf().
Timo Sirainen <tss@iki.fi>
parents: 7647
diff changeset
1519 AC_DEFINE(HAVE_OLD_VSNPRINTF,, Define if you don't have C99 compatible vsnprintf() call)
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1520 fi
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1521
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1522 dnl ***
859
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1523 dnl *** va_copy checks (from GLIB)
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1524 dnl ***
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1525
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1526 AC_CACHE_CHECK([for an implementation of va_copy()],lib_cv_va_copy,[
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1527 AC_RUN_IFELSE([AC_LANG_SOURCE([[
859
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1528 #include <stdarg.h>
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1529 void f (int i, ...) {
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1530 va_list args1, args2;
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1531 va_start (args1, i);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1532 va_copy (args2, args1);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1533 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1534 exit (1);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1535 va_end (args1); va_end (args2);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1536 }
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1537 int main() {
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1538 f (0, 42);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1539 return 0;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1540 }]])],
859
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1541 [lib_cv_va_copy=yes],
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1542 [lib_cv_va_copy=no],[])
859
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1543 ])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1544 AC_CACHE_CHECK([for an implementation of __va_copy()],lib_cv___va_copy,[
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1545 AC_RUN_IFELSE([AC_LANG_SOURCE([[
859
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1546 #include <stdarg.h>
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1547 void f (int i, ...) {
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1548 va_list args1, args2;
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1549 va_start (args1, i);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1550 __va_copy (args2, args1);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1551 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1552 exit (1);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1553 va_end (args1); va_end (args2);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1554 }
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1555 int main() {
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1556 f (0, 42);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1557 return 0;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1558 }]])],
859
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1559 [lib_cv___va_copy=yes],
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1560 [lib_cv___va_copy=no],[])
859
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1561 ])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1562
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1563 if test "x$lib_cv_va_copy" = "xyes"; then
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1564 va_copy_func=va_copy
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1565 else if test "x$lib_cv___va_copy" = "xyes"; then
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1566 va_copy_func=__va_copy
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1567 fi
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1568 fi
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1569
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1570 if test -n "$va_copy_func"; then
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1571 AC_DEFINE_UNQUOTED(VA_COPY,$va_copy_func,[A 'va_copy' style function])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1572 fi
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1573
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1574 AC_CACHE_CHECK([whether va_lists can be copied by value],lib_cv_va_val_copy,[
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1575 AC_RUN_IFELSE([AC_LANG_SOURCE([[
859
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1576 #include <stdarg.h>
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1577 void f (int i, ...) {
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1578 va_list args1, args2;
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1579 va_start (args1, i);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1580 args2 = args1;
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1581 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1582 exit (1);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1583 va_end (args1); va_end (args2);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1584 }
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1585 int main() {
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1586 f (0, 42);
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1587 return 0;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1588 }]])],
859
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1589 [lib_cv_va_val_copy=yes],
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1590 [lib_cv_va_val_copy=no],[])
859
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1591 ])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1592
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1593 if test "x$lib_cv_va_val_copy" = "xno"; then
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1594 AC_DEFINE(VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1595 fi
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1596
7718
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1597 dnl * dynamic modules?
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1598 have_modules=no
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1599 AC_CHECK_FUNC(dlopen, [
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1600 have_modules=yes
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1601 MODULE_LIBS="-export-dynamic"
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1602 ], [
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1603 AC_CHECK_LIB(dl, dlopen, [
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1604 have_modules=yes
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1605 MODULE_LIBS="-export-dynamic -ldl"
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1606 DLLIB=-ldl
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1607 ])
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1608 ])
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1609
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1610 dnl **
7767
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1611 dnl ** AIX mntctl
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1612 dnl **
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1613
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1614 if test $ac_cv_header_sys_vmount_h = yes; then
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1615 AC_MSG_CHECKING([for reasonable mntctl buffer size])
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1616 AC_RUN_IFELSE([AC_LANG_SOURCE([[
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1617 #include <stdio.h>
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1618 #include <stdlib.h>
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1619 #include <sys/vmount.h>
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1620 int main() {
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1621 int size,count; char *m;
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1622 FILE *f=fopen("conftestval", "w");
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1623 if (!f) exit(1);
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1624 if ((count=mntctl(MCTL_QUERY,sizeof(size),&size))!=0 || !(m=malloc(size)) ||
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1625 (count=mntctl(MCTL_QUERY,size,m))<=0) exit(1);
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1626 fprintf(f, "%d\n",(size * (count + 5))/count & ~1); /* 5 mounts more */
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1627 exit(0);
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1628 }
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1629 ]])],[
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1630 size=`cat conftestval`
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1631 rm -f conftestval
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1632 AC_DEFINE_UNQUOTED(STATIC_MTAB_SIZE,$size, reasonable mntctl buffer size)
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1633 AC_MSG_RESULT($size)
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1634 ],[
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1635 AC_MSG_RESULT(default)
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1636 ])
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1637 fi
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1638
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1639
ecc57955b99d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 7756
diff changeset
1640 dnl **
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
1641 dnl ** SSL
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1642 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1643
623
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
1644 have_ssl=no
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
1645
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1646 if test $want_openssl != no && test $have_ssl = no; then
4049
2fa6dc0e0e27 Don't print error if pkg-config isn't found.
Timo Sirainen <tss@iki.fi>
parents: 4022
diff changeset
1647 if pkg-config --exists openssl 2>/dev/null; then
1565
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1648 PKG_CHECK_MODULES(SSL, openssl)
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1649 CFLAGS="$CFLAGS $SSL_CFLAGS"
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1650 have_openssl=yes
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1651 else
7718
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1652 # openssl 0.9.8 wants -ldl and it's required if there's only .a lib
1565
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1653 AC_CHECK_LIB(ssl, SSL_read, [
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1654 AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h, [
7718
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1655 SSL_LIBS="-lssl -lcrypto $DLLIB"
1565
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1656 AC_SUBST(SSL_LIBS)
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1657 have_openssl=yes
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1658 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1659 if test $want_openssl = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1660 AC_ERROR([Can't build with OpenSSL: openssl/ssl.h or openssl/err.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1661 fi
1565
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1662 ])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1663 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1664 if test $want_openssl = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1665 AC_ERROR([Can't build with OpenSSL: libssl not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1666 fi
7718
ab9b68b5426c When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7707
diff changeset
1667 ], -lcrypto $DLLIB)
1565
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1668 fi
1566
919f5aafbc6c fix for openssl detection
Timo Sirainen <tss@iki.fi>
parents: 1565
diff changeset
1669 if test "$have_openssl" = "yes"; then
919f5aafbc6c fix for openssl detection
Timo Sirainen <tss@iki.fi>
parents: 1565
diff changeset
1670 AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support)
919f5aafbc6c fix for openssl detection
Timo Sirainen <tss@iki.fi>
parents: 1565
diff changeset
1671 have_ssl="yes (OpenSSL)"
919f5aafbc6c fix for openssl detection
Timo Sirainen <tss@iki.fi>
parents: 1565
diff changeset
1672 fi
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
1673 fi
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
1674
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1675 if test $want_gnutls != no && test $have_ssl = no; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1676 AC_CHECK_LIB(gnutls, gnutls_global_init, [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1677 AC_CHECK_HEADER(gnutls/gnutls.h, [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1678 AC_DEFINE(HAVE_GNUTLS,, Build with GNUTLS support)
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1679 SSL_LIBS="-lgnutls -lgcrypt"
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1680 AC_SUBST(SSL_LIBS)
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1681 have_ssl="yes (GNUTLS)"
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1682 have_gnutls=yes
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1683 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1684 if test $want_gnutls = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1685 AC_ERROR([Can't build with GNUTLS: gnutls/gnutls.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1686 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1687 ])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1688 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1689 if test $want_gnutls = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1690 AC_ERROR([Can't build with GNUTLS: libgnutls not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1691 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1692 ], -lgcrypt)
1948
7fa8697bc2a9 Default to OpenSSL
Timo Sirainen <tss@iki.fi>
parents: 1924
diff changeset
1693 fi
7fa8697bc2a9 Default to OpenSSL
Timo Sirainen <tss@iki.fi>
parents: 1924
diff changeset
1694
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1695 if test "$have_ssl" != "no"; then
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1696 AC_DEFINE(HAVE_SSL,, Build with SSL/TLS support)
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1697 fi
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1698
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1699 dnl **
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1700 dnl ** Garbage Collector
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1701 dnl **
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1702
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1703 if test $want_gc != no; then
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1704 AC_CHECK_LIB(gc, GC_malloc, [
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1705 AC_CHECK_HEADERS(gc/gc.h gc.h)
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1706 AC_DEFINE(USE_GC,, Define if you want to use Boehm GC)
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1707 LIBS="$LIBS -lgc"
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1708 ], [
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1709 if test $want_gc = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1710 AC_ERROR([Can't build with GC: libgc not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1711 fi
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1712 ])
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1713 fi
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1714
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1715 dnl **
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1716 dnl ** userdb and passdb checks
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1717 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1718
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1719 userdb=""
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1720 passdb=""
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1721
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1722 if test $want_static_userdb != no; then
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1723 AC_DEFINE(USERDB_STATIC,, Build with static userdb support)
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1724 userdb="$userdb static"
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1725 fi
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1726
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1727 if test $want_prefetch_userdb != no; then
3667
b7569a6a4ada Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents: 3600
diff changeset
1728 AC_DEFINE(USERDB_PREFETCH,, Build with prefetch userdb support)
b7569a6a4ada Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents: 3600
diff changeset
1729 userdb="$userdb prefetch"
3062
5e2e4cdbfe2e Added "passdb" userdb. It works only if passdb gives all the information
Timo Sirainen <tss@iki.fi>
parents: 3004
diff changeset
1730 fi
5e2e4cdbfe2e Added "passdb" userdb. It works only if passdb gives all the information
Timo Sirainen <tss@iki.fi>
parents: 3004
diff changeset
1731
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1732 if test $want_passwd != no; then
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1733 AC_DEFINE(USERDB_PASSWD,, Build with passwd support)
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1734 AC_DEFINE(PASSDB_PASSWD,, Build with passwd support)
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1735 userdb="$userdb passwd"
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1736 passdb="$passdb passwd"
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1737 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1738
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1739 if test $want_passwd_file != no; then
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1740 AC_DEFINE(USERDB_PASSWD_FILE,, Build with passwd-file support)
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1741 AC_DEFINE(PASSDB_PASSWD_FILE,, Build with passwd-file support)
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1742 userdb="$userdb passwd-file"
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1743 passdb="$passdb passwd-file"
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1744 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1745
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1746 if test $want_shadow != no; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1747 AC_CHECK_FUNC(getspnam, [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1748 AC_CHECK_HEADER(shadow.h, [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1749 AC_DEFINE(PASSDB_SHADOW,, Build with shadow support)
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1750 passdb="$passdb shadow"
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1751 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1752 if test $want_shadow = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1753 AC_ERROR([Can't build with shadow support: shadow.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1754 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1755 ])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1756 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1757 if test $want_shadow = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1758 AC_ERROR([Can't build with shadow support: getspnam() not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1759 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1760 ])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1761 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1762
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1763 if test $want_pam != no; then
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1764 AC_CHECK_LIB(pam, pam_start, [
706
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1765 have_pam=no
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1766 AC_CHECK_HEADER(security/pam_appl.h, [
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1767 AC_DEFINE(HAVE_SECURITY_PAM_APPL_H,,
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1768 Define if you have security/pam_appl.h)
706
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1769 have_pam=yes
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1770 ])
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1771
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1772 AC_CHECK_HEADER(pam/pam_appl.h, [
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1773 AC_DEFINE(HAVE_PAM_PAM_APPL_H,,
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1774 Define if you have pam/pam_appl.h)
706
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1775 have_pam=yes
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1776 ])
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1777
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1778 if test "$have_pam" = "yes"; then
1284
71f61b6a0f02 cleanups
Timo Sirainen <tss@iki.fi>
parents: 1283
diff changeset
1779 AUTH_LIBS="$AUTH_LIBS -lpam"
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1780 AC_DEFINE(PASSDB_PAM,, Build with PAM support)
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
1781 passdb="$passdb pam"
547
39a24074abf4 Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents: 546
diff changeset
1782
39a24074abf4 Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents: 546
diff changeset
1783 AC_CHECK_LIB(pam, pam_setcred, [
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1784 AC_DEFINE(HAVE_PAM_SETCRED,,
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1785 Define if you have pam_setcred())
547
39a24074abf4 Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents: 546
diff changeset
1786 ])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1787 elif test $want_pam = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1788 AC_ERROR([Can't build with PAM support: pam_appl.h not found])
706
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1789 fi
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1790 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1791 if test $want_pam = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1792 AC_ERROR([Can't build with PAM support: libpam not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1793 fi
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1794 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1795 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1796
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1797 if test $want_checkpassword != no; then
2162
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
1798 AC_DEFINE(PASSDB_CHECKPASSWORD,, Build with checkpassword passdb support)
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
1799 passdb="$passdb checkpassword"
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
1800 fi
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
1801
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1802 if test $want_bsdauth != no; then
1851
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
1803 AC_CHECK_FUNC(auth_userokay, [
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
1804 AC_DEFINE(PASSDB_BSDAUTH,, Build with BSD authentication support)
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
1805 passdb="$passdb bsdauth"
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1806 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1807 if test $want_bsdauth = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1808 AC_ERROR([Can't build with BSD authentication support: auth_userokay() not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1809 fi
1851
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
1810 ])
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
1811 fi
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
1812
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
1813 have_gssapi=no
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1814 if test $want_gssapi != no; then
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
1815 AC_CHECK_PROG(KRB5CONFIG, krb5-config, YES, NO)
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
1816 if test $KRB5CONFIG = YES; then
7548
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1817 if ! krb5-config --version gssapi 2>/dev/null > /dev/null; then
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1818 # krb5-config doesn't support gssapi.
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1819 KRB5_LIBS="`krb5-config --libs`"
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1820 KRB5_CFLAGS=`krb5-config --cflags`
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1821 AC_CHECK_LIB(gss, gss_acquire_cred, [
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1822 # Solaris
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1823 KRB5_LIBS="$KRB5_LIBS -lgss"
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1824 ], [
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1825 # failed
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1826 KRB5_LIBS=
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1827 ], $KRB5_LIBS)
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1828 else
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1829 KRB5_LIBS=`krb5-config --libs gssapi`
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1830 KRB5_CFLAGS=`krb5-config --cflags gssapi`
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1831 fi
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1832 if test "$KRB5_LIBS" != ""; then
6199
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
1833 AC_SUBST(KRB5_LIBS)
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
1834 AC_SUBST(KRB5_CFLAGS)
3780
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
1835
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
1836 # Although krb5-config exists, all systems still don't
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
1837 # have gssapi.h
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
1838 old_CFLAGS=$CFLAGS
7548
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1839 CFLAGS="$CFLAGS $KRB5_CFLAGS"
3780
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
1840 AC_CHECK_HEADER([gssapi/gssapi.h], [
4862
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
1841 AC_DEFINE(HAVE_GSSAPI_GSSAPI_H,, GSSAPI headers in gssapi/gssapi.h)
3780
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
1842 have_gssapi=yes
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
1843 ])
4862
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
1844 AC_CHECK_HEADER([gssapi.h], [
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
1845 AC_DEFINE(HAVE_GSSAPI_H,, GSSAPI headers in gssapi.h)
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
1846 have_gssapi=yes
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
1847 ])
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
1848 if test $have_gssapi = yes; then
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
1849 AC_DEFINE(HAVE_GSSAPI,, Build with GSSAPI support)
7610
280e570a5ced gssapi: Check for gssapi_krb5.h existence before trying to use it.
Timo Sirainen <tss@iki.fi>
parents: 7603
diff changeset
1850 AC_CHECK_HEADERS(gssapi/gssapi_ext.h gssapi_krb5.h gssapi/gssapi_krb5.h)
5859
dfdedb187b26 If __gss_userok() exists, use it to verify username. Patch by Peter Eriksson.
Timo Sirainen <tss@iki.fi>
parents: 5692
diff changeset
1851 AC_CHECK_LIB(gss, __gss_userok, [
dfdedb187b26 If __gss_userok() exists, use it to verify username. Patch by Peter Eriksson.
Timo Sirainen <tss@iki.fi>
parents: 5692
diff changeset
1852 AC_DEFINE(HAVE___GSS_USEROK,,
dfdedb187b26 If __gss_userok() exists, use it to verify username. Patch by Peter Eriksson.
Timo Sirainen <tss@iki.fi>
parents: 5692
diff changeset
1853 Define if you have __gss_userok())
7261
e665ef583668 If __gss_userok() is found from -lgss, make sure we link with -lgss.
Timo Sirainen <tss@iki.fi>
parents: 7259
diff changeset
1854 KRB5_LIBS="$KRB5_LIBS -lgss"
6199
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
1855 ],, $KRB5_LIBS)
6501
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
1856
7810
818a638fa9a3 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 7799
diff changeset
1857 # MIT has a #define for Heimdal acceptor_identity, but it's way too
818a638fa9a3 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 7799
diff changeset
1858 # difficult to test for it..
818a638fa9a3 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 7799
diff changeset
1859 old_LIBS=$LIBS
818a638fa9a3 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 7799
diff changeset
1860 LIBS="$LIBS $KRB5_LIBS"
818a638fa9a3 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 7799
diff changeset
1861 AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity krb5_gss_register_acceptor_identity)
818a638fa9a3 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 7799
diff changeset
1862 LIBS=$old_LIBS
818a638fa9a3 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 7799
diff changeset
1863
6501
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
1864 if test x$want_gssapi_plugin != xyes; then
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
1865 AUTH_LIBS="$AUTH_LIBS $KRB5_LIBS"
7554
419b7cfc954c Once $KRB5_CFLAGS is set, use it instead of calling krb5-config again.
Timo Sirainen <tss@iki.fi>
parents: 7548
diff changeset
1866 AUTH_CFLAGS="$AUTH_CFLAGS $KRB5_CFLAGS"
6501
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
1867 AC_DEFINE(BUILTIN_GSSAPI,, GSSAPI support is built in)
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
1868 else
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
1869 have_gssapi_plugin=yes
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
1870 fi
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1871 else
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1872 if test $want_gssapi = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1873 AC_ERROR([Can't build with GSSAPI support: gssapi.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1874 fi
4862
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
1875 fi
3780
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
1876 CFLAGS=$old_CFLAGS
3705
561e81dfa20b MIT kerberos v1.2 (and older) doesn't work with us.
Timo Sirainen <tss@iki.fi>
parents: 3686
diff changeset
1877 fi
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1878 else
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1879 if test $want_gssapi = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1880 AC_ERROR([Can't build with GSSAPI support: krb5-config not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1881 fi
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
1882 fi
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
1883 fi
6199
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
1884 AM_CONDITIONAL(GSSAPI_PLUGIN, test "$have_gssapi_plugin" = "yes")
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
1885
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1886 if test $want_sia != no; then
4638
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
1887 AC_CHECK_FUNC(sia_validate_user, [
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
1888 AC_DEFINE(PASSDB_SIA,, Build with Tru64 SIA support)
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
1889 passdb="$passdb sia"
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
1890 AUTH_LIBS="$AUTH_LIBS -depth_ring_search"
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1891 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1892 if test $want_sia = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1893 AC_ERROR([Can't build with SIA support: sia_validate_user() not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1894 fi
4638
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
1895 ])
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
1896 fi
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
1897
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1898 if test $want_ldap != no; then
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
1899 AC_CHECK_LIB(ldap, ldap_init, [
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
1900 AC_CHECK_HEADER(ldap.h, [
2325
7613e0f68513 Fixed to compile with Solaris LDAP library
Timo Sirainen <tss@iki.fi>
parents: 2222
diff changeset
1901 AC_CHECK_LIB(ldap, ldap_initialize, [
7613e0f68513 Fixed to compile with Solaris LDAP library
Timo Sirainen <tss@iki.fi>
parents: 2222
diff changeset
1902 AC_DEFINE(LDAP_HAVE_INITIALIZE,, Define if you have ldap_initialize)
7613e0f68513 Fixed to compile with Solaris LDAP library
Timo Sirainen <tss@iki.fi>
parents: 2222
diff changeset
1903 ])
4415
b91816cd1d16 Added TLS support for LDAP if the library supports it.
Timo Sirainen <tss@iki.fi>
parents: 4411
diff changeset
1904 AC_CHECK_LIB(ldap, ldap_start_tls_s, [
b91816cd1d16 Added TLS support for LDAP if the library supports it.
Timo Sirainen <tss@iki.fi>
parents: 4411
diff changeset
1905 AC_DEFINE(LDAP_HAVE_START_TLS_S,, Define if you have ldap_start_tls_s)
b91816cd1d16 Added TLS support for LDAP if the library supports it.
Timo Sirainen <tss@iki.fi>
parents: 4411
diff changeset
1906 ])
6198
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1907 LDAP_LIBS=-lldap
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1908 AC_SUBST(LDAP_LIBS)
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1909 if test $want_ldap_plugin != yes; then
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1910 AUTH_LIBS="$AUTH_LIBS $LDAP_LIBS"
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1911 AC_DEFINE(BUILTIN_LDAP,, LDAP support is built in)
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1912 fi
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
1913
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
1914 AC_DEFINE(USERDB_LDAP,, Build with LDAP support)
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
1915 AC_DEFINE(PASSDB_LDAP,, Build with LDAP support)
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
1916 userdb="$userdb ldap"
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
1917 passdb="$passdb ldap"
6198
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1918 if test $want_ldap_plugin = yes; then
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1919 have_ldap_plugin=yes
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1920 userdb="$userdb (plugin)"
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1921 passdb="$passdb (plugin)"
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1922 fi
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1923 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1924 if test $want_ldap = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1925 AC_ERROR([Can't build with LDAP support: ldap.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1926 fi
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
1927 ])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1928 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1929 if test $want_ldap = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1930 AC_ERROR([Can't build with LDAP support: libldap not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1931 fi
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
1932 ])
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
1933 fi
6198
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
1934 AM_CONDITIONAL(LDAP_PLUGIN, test "$have_ldap_plugin" = "yes")
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
1935
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1936 dict_drivers=client
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1937
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1938 if test $want_db != no; then
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1939 AC_MSG_CHECKING([db_env_create in -ldb])
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1940 old_LIBS=$LIBS
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1941 LIBS="$LIBS -ldb"
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1942 AC_TRY_LINK([
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1943 #include <db.h>
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1944 ], [
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1945 db_env_create(0, 0);
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1946 ], [
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1947 AC_MSG_RESULT(yes)
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1948 AC_CHECK_HEADER(db.h, [
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1949 DICT_LIBS="$DICT_LIBS -ldb"
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1950 dict_drivers="$dict_drivers db"
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1951 AC_DEFINE(BUILD_DB,, Build with Berkeley DB support)
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1952 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1953 if test $want_db = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1954 AC_ERROR([Can't build with db support: db.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1955 fi
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1956 ])
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1957 ], [
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1958 AC_MSG_RESULT(no)
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1959 if test $want_db = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1960 AC_ERROR([Can't build with db support: libdb not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1961 fi
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1962 ])
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1963 LIBS=$old_LIBS
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1964 fi
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
1965
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1966 if test $want_pgsql != no; then
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1967 # based on code from PHP
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1968 for i in /usr /usr/local /usr/local/pgsql; do
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1969 for j in include include/pgsql include/postgres include/postgresql ""; do
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1970 if test -r "$i/$j/libpq-fe.h"; then
1286
b8ecb067141a cleanup
Timo Sirainen <tss@iki.fi>
parents: 1284
diff changeset
1971 PGSQL_INCLUDE=$i/$j
b8ecb067141a cleanup
Timo Sirainen <tss@iki.fi>
parents: 1284
diff changeset
1972 fi
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1973 done
4142
08aef9a8e22c Added lib64 directory to mysql/pgsql checks. Removed all special lib/include
Timo Sirainen <tss@iki.fi>
parents: 4141
diff changeset
1974 for lib in lib lib64; do
08aef9a8e22c Added lib64 directory to mysql/pgsql checks. Removed all special lib/include
Timo Sirainen <tss@iki.fi>
parents: 4141
diff changeset
1975 for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1976 if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1977 PGSQL_LIBDIR=$i/$j
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1978 fi
4142
08aef9a8e22c Added lib64 directory to mysql/pgsql checks. Removed all special lib/include
Timo Sirainen <tss@iki.fi>
parents: 4141
diff changeset
1979 done
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1980 done
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1981 done
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1982
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1983 old_LIBS=$LIBS
1287
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
1984 if test "$PGSQL_LIBDIR" != ""; then
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
1985 LIBS="$LIBS -L$PGSQL_LIBDIR"
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
1986 fi
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1987
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
1988 AC_CHECK_LIB(pq, PQconnectdb, [
4300
3eeceb1156ad Check for existence of PQescapeStringConn() in PostgreSQL library. Forgot to
Timo Sirainen <tss@iki.fi>
parents: 4258
diff changeset
1989 AC_CHECK_LIB(pq, PQescapeStringConn, [
3eeceb1156ad Check for existence of PQescapeStringConn() in PostgreSQL library. Forgot to
Timo Sirainen <tss@iki.fi>
parents: 4258
diff changeset
1990 AC_DEFINE(HAVE_PQESCAPE_STRING_CONN,, Define if libpq has PQescapeStringConn function)
3eeceb1156ad Check for existence of PQescapeStringConn() in PostgreSQL library. Forgot to
Timo Sirainen <tss@iki.fi>
parents: 4258
diff changeset
1991 ])
1287
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
1992 old_CPPFLAGS=$CPPFLAGS
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
1993 if test "$PGSQL_INCLUDE" != ""; then
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
1994 CPPFLAGS="$CPPFLAGS -I $PGSQL_INCLUDE"
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
1995 fi
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
1996 AC_CHECK_HEADER(libpq-fe.h, [
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
1997 if test "$PGSQL_INCLUDE" != ""; then
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
1998 PGSQL_CFLAGS="$PGSQL_CFLAGS -I$PGSQL_INCLUDE"
1287
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
1999 fi
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
2000 if test "$PGSQL_LIBDIR" != ""; then
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2001 PGSQL_LIBS="$PGSQL_LIBS -L$PGSQL_LIBDIR"
1287
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
2002 fi
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2003 PGSQL_LIBS="$PGSQL_LIBS -lpq"
2754
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2004 AC_DEFINE(HAVE_PGSQL,, Build with PostgreSQL support)
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2005 found_sql_drivers="$found_sql_drivers pgsql"
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2006
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2007 if test "$all_sql_drivers" = "yes"; then
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2008 sql_drivers="$sql_drivers pgsql"
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2009 fi
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2010 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2011 if test $want_pgsql = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2012 AC_ERROR([Can't build with PostgreSQL support: libpq-fe.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2013 fi
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
2014 ])
1287
38b7fe3a596e pgsql check fixes
Timo Sirainen <tss@iki.fi>
parents: 1286
diff changeset
2015 CPPFLAGS=$old_CPPFLAGS
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2016 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2017 if test $want_pgsql = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2018 AC_ERROR([Can't build with PostgreSQL support: libpq not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2019 fi
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
2020 ])
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
2021 LIBS=$old_LIBS
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
2022 fi
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
2023
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2024 if test $want_mysql != no; then
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2025 # based on code from PHP
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2026 for i in /usr /usr/local /usr/local/mysql; do
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2027 for j in include include/mysql ""; do
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2028 if test -r "$i/$j/mysql.h"; then
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2029 MYSQL_INCLUDE=$i/$j
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2030 fi
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2031 done
4142
08aef9a8e22c Added lib64 directory to mysql/pgsql checks. Removed all special lib/include
Timo Sirainen <tss@iki.fi>
parents: 4141
diff changeset
2032 for j in lib lib/mysql lib64 lib64/mysql ""; do
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2033 if test -f "$i/$j/libmysqlclient.so" || test -f "$i/$j/libmysqlclient.a"; then
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2034 MYSQL_LIBDIR=$i/$j
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2035 fi
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2036 done
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2037 done
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2038
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2039 old_LIBS=$LIBS
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2040 if test "$MYSQL_LIBDIR" != ""; then
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2041 LIBS="$LIBS -L$MYSQL_LIBDIR"
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2042 fi
1995
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
2043
2416
e6594431ee4f If -lmysqlclient doesn't automatically link with zlib, do it manually.
Timo Sirainen <tss@iki.fi>
parents: 2403
diff changeset
2044 mysql_lib=""
4159
22bc42a33b79 And add -lm also to LIBS when checking if -lmysqlclient works..
Timo Sirainen <tss@iki.fi>
parents: 4158
diff changeset
2045 LIBS="$LIBS -lz -lm"
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2046 AC_CHECK_LIB(mysqlclient, mysql_init, [
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2047 old_CPPFLAGS=$CPPFLAGS
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2048 if test "$MYSQL_INCLUDE" != ""; then
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2049 CPPFLAGS="$CPPFLAGS -I $MYSQL_INCLUDE"
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2050 fi
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2051 AC_CHECK_HEADER(mysql.h, [
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2052 if test "$MYSQL_INCLUDE" != ""; then
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2053 MYSQL_CFLAGS="$MYSQL_CFLAGS -I$MYSQL_INCLUDE"
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2054 fi
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2055 if test "$MYSQL_LIBDIR" != ""; then
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2056 MYSQL_LIBS="$MYSQL_LIBS -L$MYSQL_LIBDIR"
2369
189a6de6b166 Added MySQL SSL support.
Timo Sirainen <tss@iki.fi>
parents: 2367
diff changeset
2057 fi
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2058 MYSQL_LIBS="$MYSQL_LIBS -lmysqlclient -lz -lm"
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2059
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2060 AC_CHECK_LIB(mysqlclient, mysql_ssl_set, [
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2061 AC_DEFINE(HAVE_MYSQL_SSL,, Define if your MySQL library has SSL functions)
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2062 if test "x$have_openssl" = "yes"; then
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2063 ssl_define="#define HAVE_OPENSSL"
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2064 else
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2065 ssl_define=""
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2066 fi
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2067 AC_TRY_COMPILE([
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2068 $ssl_define
2403
3af28e102a39 Mysql check fix
Timo Sirainen <tss@iki.fi>
parents: 2384
diff changeset
2069 #include <mysql.h>
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2070 ], [
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2071 mysql_set_ssl(0, 0, 0, 0, 0, 0);
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2072 ], [
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2073 AC_DEFINE(HAVE_MYSQL_SSL_CIPHER,, Define if your MySQL library supports setting cipher)
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2074 ])
2369
189a6de6b166 Added MySQL SSL support.
Timo Sirainen <tss@iki.fi>
parents: 2367
diff changeset
2075 ])
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2076
2754
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2077 AC_DEFINE(HAVE_MYSQL,, Build with MySQL support)
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2078 found_sql_drivers="$found_sql_drivers mysql"
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2079 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2080 if test $want_mysql = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2081 AC_ERROR([Can't build with MySQL support: mysql.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2082 fi
2369
189a6de6b166 Added MySQL SSL support.
Timo Sirainen <tss@iki.fi>
parents: 2367
diff changeset
2083 ])
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2084 CPPFLAGS=$old_CPPFLAGS
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2085 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2086 if test $want_mysql = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2087 AC_ERROR([Can't build with MySQL support: libmysqlclient not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2088 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2089 ])
1995
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
2090
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2091 LIBS=$old_LIBS
1995
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
2092 fi
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
2093
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2094 if test $want_sqlite != no; then
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2095 AC_CHECK_LIB(sqlite3, sqlite3_open, [
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2096 AC_CHECK_HEADER(sqlite3.h, [
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2097 SQLITE_LIBS="$SQLITE_LIBS -lsqlite3 -lz"
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2098
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2099 AC_DEFINE(HAVE_SQLITE,, Build with SQLite3 support)
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2100 found_sql_drivers="$found_sql_drivers sqlite"
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2101 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2102 if test $want_sqlite = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2103 AC_ERROR([Can't build with SQLite support: sqlite3.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2104 fi
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2105 ])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2106 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2107 if test $want_sqlite = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2108 AC_ERROR([Can't build with SQLite support: libsqlite3 not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2109 fi
4144
13665379afa8 Unbreak last sqlite change
Timo Sirainen <tss@iki.fi>
parents: 4143
diff changeset
2110 ])
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2111 fi
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2112
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2113 SQL_CFLAGS="$MYSQL_CFLAGS $PGSQL_CFLAGS $SQLITE_CFLAGS"
6195
068df1748a57 Renamed --enable-sql-plugins to --with-sql=plugin
Timo Sirainen <tss@iki.fi>
parents: 6194
diff changeset
2114 if test "$want_sql_plugins" != "yes"; then
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2115 SQL_LIBS="$MYSQL_LIBS $PGSQL_LIBS $SQLITE_LIBS"
8282
9ae9e07b31ea dovecot --build-options: If SQL or LDAP was built as plugins, say it.
Timo Sirainen <tss@iki.fi>
parents: 8276
diff changeset
2116 else
9ae9e07b31ea dovecot --build-options: If SQL or LDAP was built as plugins, say it.
Timo Sirainen <tss@iki.fi>
parents: 8276
diff changeset
2117 AC_DEFINE(SQL_DRIVER_PLUGINS,, Build SQL drivers as plugins)
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2118 fi
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2119
6195
068df1748a57 Renamed --enable-sql-plugins to --with-sql=plugin
Timo Sirainen <tss@iki.fi>
parents: 6194
diff changeset
2120 if test "$found_sql_drivers" != "" -o "$want_sql" != "no"; then
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2121 if test "$all_sql_drivers" = "yes"; then
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2122 sql_drivers="$found_sql_drivers"
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2123 fi
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2124
2754
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2125 AC_DEFINE(PASSDB_SQL,, Build with SQL support)
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2126 AC_DEFINE(USERDB_SQL,, Build with SQL support)
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2127 AUTH_LIBS="$AUTH_LIBS $SQL_LIBS"
4012
d8c1e641b435 Building with SQL support replaced passdb list with userdbs.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4005
diff changeset
2128 passdb="$passdb sql"
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2129 userdb="$userdb sql"
2754
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2130 fi
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2131
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2132 if test $want_vpopmail != no; then
8200
34b6694adfcd --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8181
diff changeset
2133 vpop_etc="$vpopmail_home/etc"
34b6694adfcd --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8181
diff changeset
2134 AC_MSG_CHECKING([for vpopmail configuration at $vpop_etc/lib_deps])
34b6694adfcd --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8181
diff changeset
2135 if ! test -f $vpop_etc/lib_deps; then
34b6694adfcd --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8181
diff changeset
2136 AC_MSG_RESULT(not found)
34b6694adfcd --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8181
diff changeset
2137 vpop_etc="$vpopmail_home"
34b6694adfcd --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8181
diff changeset
2138 AC_MSG_CHECKING([for vpopmail configuration at $vpop_etc/lib_deps])
34b6694adfcd --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8181
diff changeset
2139 fi
34b6694adfcd --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8181
diff changeset
2140 if test -f $vpop_etc/lib_deps; then
34b6694adfcd --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8181
diff changeset
2141 AUTH_CFLAGS="$AUTH_CFLAGS `cat $vpop_etc/inc_deps` $CFLAGS"
34b6694adfcd --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8181
diff changeset
2142 AUTH_LIBS="$AUTH_LIBS `cat $vpop_etc/lib_deps`"
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
2143 AC_DEFINE(USERDB_VPOPMAIL,, Build with vpopmail support)
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
2144 AC_DEFINE(PASSDB_VPOPMAIL,, Build with vpopmail support)
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
2145 userdb="$userdb vpopmail"
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
2146 passdb="$passdb vpopmail"
281
b7fe6867e549 print "checking vpopmail"
Timo Sirainen <tss@iki.fi>
parents: 280
diff changeset
2147 AC_MSG_RESULT(found)
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
2148 else
281
b7fe6867e549 print "checking vpopmail"
Timo Sirainen <tss@iki.fi>
parents: 280
diff changeset
2149 AC_MSG_RESULT(not found)
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2150 if test $want_vpopmail = yes; then
8200
34b6694adfcd --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8181
diff changeset
2151 AC_ERROR([Can't build with vpopmail support: $vpop_etc/lib_deps not found])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2152 fi
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
2153 fi
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
2154 fi
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
2155
5692
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2156 AC_CHECK_FUNC(crypt,, [
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2157 AC_CHECK_LIB(crypt, crypt, [
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2158 AUTH_LIBS="-lcrypt $AUTH_LIBS"
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2159 ], [
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2160 AC_MSG_ERROR([crypt() wasn't found])
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2161 ])
5346
e39ce58a463b Link dovecot-auth always with -lcrypto if it's needed for crypt(). It could
Timo Sirainen <tss@iki.fi>
parents: 5217
diff changeset
2162 ])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2163
1511
a4ad03c210af Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents: 1467
diff changeset
2164 if test $have_modules = yes; then
1465
03dd87873a81 Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents: 1462
diff changeset
2165 AC_DEFINE(HAVE_MODULES,, Define if you have dynamic module support)
03dd87873a81 Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents: 1462
diff changeset
2166 AC_SUBST(MODULE_LIBS)
7636
c8baf7b3f079 Use dynamic module suffix provided by libtool rather than hardcoded ".so".
Timo Sirainen <tss@iki.fi>
parents: 7633
diff changeset
2167
c8baf7b3f079 Use dynamic module suffix provided by libtool rather than hardcoded ".so".
Timo Sirainen <tss@iki.fi>
parents: 7633
diff changeset
2168 # shrext_cmds comes from libtool.m4
7667
27e2725b5ff3 Fixed looking up plugin suffix.
Timo Sirainen <tss@iki.fi>
parents: 7665
diff changeset
2169 module=yes eval MODULE_SUFFIX=$shrext_cmds
7669
adf8f5c2c278 If $shrext_cmds isn't set for some reason, fallback to ".so" suffix.
Timo Sirainen <tss@iki.fi>
parents: 7667
diff changeset
2170 if test "$MODULE_SUFFIX" = ""; then
adf8f5c2c278 If $shrext_cmds isn't set for some reason, fallback to ".so" suffix.
Timo Sirainen <tss@iki.fi>
parents: 7667
diff changeset
2171 # too old libtool?
adf8f5c2c278 If $shrext_cmds isn't set for some reason, fallback to ".so" suffix.
Timo Sirainen <tss@iki.fi>
parents: 7667
diff changeset
2172 MODULE_SUFFIX=.so
adf8f5c2c278 If $shrext_cmds isn't set for some reason, fallback to ".so" suffix.
Timo Sirainen <tss@iki.fi>
parents: 7667
diff changeset
2173 fi
7636
c8baf7b3f079 Use dynamic module suffix provided by libtool rather than hardcoded ".so".
Timo Sirainen <tss@iki.fi>
parents: 7633
diff changeset
2174 AC_DEFINE_UNQUOTED(MODULE_SUFFIX,"$MODULE_SUFFIX",Dynamic module suffix)
c8baf7b3f079 Use dynamic module suffix provided by libtool rather than hardcoded ".so".
Timo Sirainen <tss@iki.fi>
parents: 7633
diff changeset
2175 AC_SUBST(MODULE_SUFFIX)
1511
a4ad03c210af Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents: 1467
diff changeset
2176 fi
1150
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
2177
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2178 have_nss=no
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2179 if test $want_nss != no; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2180 if test $have_modules != yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2181 if test $want_nss = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2182 AC_ERROR([Can't build with NSS support: Dynamic modules not supported])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2183 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2184 else
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2185 AC_TRY_COMPILE([
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2186 #include <nss.h>
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2187 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2188 enum nss_status status = NSS_STATUS_TRYAGAIN;
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2189 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2190 AC_DEFINE(USERDB_NSS,, Build with NSS module support)
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2191 userdb="$userdb nss"
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2192 have_nss=yes
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2193 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2194 if test $want_nss = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2195 AC_ERROR([Can't build with NSS support: nss.h not found or not usable])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2196 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2197 ])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2198 fi
5870
c9b49ed99d28 Added userdb nss which currently supports glibc-compatible NSS modules.
Timo Sirainen <tss@iki.fi>
parents: 5859
diff changeset
2199 fi
c9b49ed99d28 Added userdb nss which currently supports glibc-compatible NSS modules.
Timo Sirainen <tss@iki.fi>
parents: 5859
diff changeset
2200
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
2201 AC_SUBST(AUTH_CFLAGS)
1284
71f61b6a0f02 cleanups
Timo Sirainen <tss@iki.fi>
parents: 1283
diff changeset
2202 AC_SUBST(AUTH_LIBS)
2754
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2203 AC_SUBST(SQL_CFLAGS)
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2204 AC_SUBST(SQL_LIBS)
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2205 AC_SUBST(MYSQL_CFLAGS)
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2206 AC_SUBST(MYSQL_LIBS)
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2207 AC_SUBST(PGSQL_CFLAGS)
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2208 AC_SUBST(PGSQL_LIBS)
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2209 AC_SUBST(SQLITE_CFLAGS)
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2210 AC_SUBST(SQLITE_LIBS)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2211
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
2212 AC_SUBST(DICT_LIBS)
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
2213 AC_SUBST(dict_drivers)
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
2214
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2215 dnl **
8057
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2216 dnl ** Endianess
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2217 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2218
8057
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2219 dnl At least Apple's gcc supports __BIG_ENDIAN__ and __LITTLE_ENDIAN__
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2220 dnl defines. Use them if possible to allow cross-compiling.
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2221 AC_MSG_CHECKING([if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined])
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2222 AC_TRY_COMPILE([
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2223 #if !(__BIG_ENDIAN__ || __LITTLE_ENDIAN__)
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2224 #error nope
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2225 #endif
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2226 ], [
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2227 ], [
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2228 AC_DEFINE(WORDS_BIGENDIAN, __BIG_ENDIAN__, Define if your CPU is big endian)
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2229 AC_MSG_RESULT(yes)
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2230 ], [
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2231 AC_MSG_RESULT(no)
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2232 AC_C_BIGENDIAN
fdcb5fc6f2d9 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8024
diff changeset
2233 ])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2234
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2235 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2236 dnl ** IPv6 support
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2237 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2238
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2239 have_ipv6=no
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2240 if test "$want_ipv6" != no; then
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2241 AC_MSG_CHECKING([for IPv6])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2242 AC_CACHE_VAL(i_cv_type_in6_addr,
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
2243 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2244 #include <sys/types.h>
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2245 #include <sys/socket.h>
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2246 #include <netinet/in.h>
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2247 #include <netdb.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
2248 #include <arpa/inet.h>]],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
2249 [[struct in6_addr i;]])],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
2250 [i_cv_type_in6_addr=yes],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
2251 [i_cv_type_in6_addr=no])])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2252 if test $i_cv_type_in6_addr = yes; then
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
2253 AC_DEFINE(HAVE_IPV6,, Build with IPv6 support)
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2254 have_ipv6=yes
7264
91cf91f0a0a8 Fixed --enable-ipv6
Timo Sirainen <tss@iki.fi>
parents: 7261
diff changeset
2255 elif test $want_ipv6 = yes; then
91cf91f0a0a8 Fixed --enable-ipv6
Timo Sirainen <tss@iki.fi>
parents: 7261
diff changeset
2256 AC_ERROR([IPv6 support not found])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2257 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2258 AC_MSG_RESULT($i_cv_type_in6_addr)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2259 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2260
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2261 dnl **
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2262 dnl ** storage classes
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2263 dnl **
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2264
3997
e7df415a97f1 Build fixes
Timo Sirainen <tss@iki.fi>
parents: 3995
diff changeset
2265 maildir_libs='$(top_builddir)/src/lib-storage/index/maildir/libstorage_maildir.a'
e7df415a97f1 Build fixes
Timo Sirainen <tss@iki.fi>
parents: 3995
diff changeset
2266 mbox_libs='$(top_builddir)/src/lib-storage/index/mbox/libstorage_mbox.a'
e7df415a97f1 Build fixes
Timo Sirainen <tss@iki.fi>
parents: 3995
diff changeset
2267 dbox_libs='$(top_builddir)/src/lib-storage/index/dbox/libstorage_dbox.a'
5458
daca7ed634c0 Added a simple cydir mail storage backend. It trusts index files completely:
Timo Sirainen <tss@iki.fi>
parents: 5456
diff changeset
2268 cydir_libs='$(top_builddir)/src/lib-storage/index/cydir/libstorage_cydir.a'
6748
d712370dfd14 Added raw storage for opening single-mail files/streams as mailboxes.
Timo Sirainen <tss@iki.fi>
parents: 6734
diff changeset
2269 raw_libs='$(top_builddir)/src/lib-storage/index/raw/libstorage_raw.a'
7094
145f721b6412 Changed library linking order.
Timo Sirainen <tss@iki.fi>
parents: 7078
diff changeset
2270 CORE_LIBS='$(top_builddir)/src/lib-storage/index/libstorage_index.a $(top_builddir)/src/lib-storage/libstorage.a $(top_builddir)/src/lib-index/libindex.a'
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2271
6894
84bcf1c8b07a Updated list of available mail storage formats. Changed deliver's internal
Timo Sirainen <tss@iki.fi>
parents: 6860
diff changeset
2272 deliver_storage="raw"
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2273 STORAGE_LIBS=
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2274 for storage in $mail_storages; do
4422
c46c02c7e602 Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents: 4415
diff changeset
2275 if test "$storage" = "$deliver_storage"; then
c46c02c7e602 Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents: 4415
diff changeset
2276 deliver_storage=""
c46c02c7e602 Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents: 4415
diff changeset
2277 fi
4567
32f5df3de2d1 eval doesn't need to have its parameters quoted. The previous \" quoting was
Timo Sirainen <tss@iki.fi>
parents: 4565
diff changeset
2278 STORAGE_LIBS="$STORAGE_LIBS `eval echo \\$${storage}_libs`"
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2279 done
7094
145f721b6412 Changed library linking order.
Timo Sirainen <tss@iki.fi>
parents: 7078
diff changeset
2280 STORAGE_LIBS="$STORAGE_LIBS $CORE_LIBS"
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2281 AC_SUBST(STORAGE_LIBS)
6635
e4f9e2b94a90 Show mail storages in dovecot --build-options.
Timo Sirainen <tss@iki.fi>
parents: 6616
diff changeset
2282 AC_DEFINE_UNQUOTED(MAIL_STORAGES, "$mail_storages", List of compiled in mail storages)
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2283
4422
c46c02c7e602 Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents: 4415
diff changeset
2284 if test -n "$deliver_storage" && test "$want_deliver" = yes; then
6894
84bcf1c8b07a Updated list of available mail storage formats. Changed deliver's internal
Timo Sirainen <tss@iki.fi>
parents: 6860
diff changeset
2285 AC_ERROR([If you remove raw from storages, you need to build --without-deliver])
4422
c46c02c7e602 Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents: 4415
diff changeset
2286 fi
c46c02c7e602 Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents: 4415
diff changeset
2287
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2288 dnl **
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2289 dnl ** SQL drivers
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2290 dnl **
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2291
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2292 build_pgsql=no
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2293 build_mysql=no
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2294 build_sqlite=no
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2295 for driver in $sql_drivers; do
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2296 if test "$driver" = "pgsql"; then
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2297 AC_DEFINE(BUILD_PGSQL,, Built-in PostgreSQL support)
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2298 build_pgsql=yes
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2299 elif test "$driver" = "mysql"; then
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2300 AC_DEFINE(BUILD_MYSQL,, Built-in MySQL support)
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2301 build_mysql=yes
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2302 elif test "$driver" = "sqlite"; then
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2303 AC_DEFINE(BUILD_SQLITE,, Built-in SQLite support)
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2304 build_sqlite=yes
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2305 fi
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2306 done
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2307
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2308 AC_SUBST(sql_drivers)
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2309 AM_CONDITIONAL(BUILD_PGSQL, test "$build_pgsql" = "yes")
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2310 AM_CONDITIONAL(BUILD_MYSQL, test "$build_mysql" = "yes")
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2311 AM_CONDITIONAL(BUILD_SQLITE, test "$build_sqlite" = "yes")
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2312 AM_CONDITIONAL(SQL_PLUGINS, test "$want_sql_plugins" = "yes")
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2313
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2314 dnl **
3969
884da753caba If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents: 3948
diff changeset
2315 dnl ** Plugins
884da753caba If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents: 3948
diff changeset
2316 dnl **
884da753caba If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents: 3948
diff changeset
2317
7820
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2318 if test "$want_zlib" != "no"; then
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2319 AC_CHECK_HEADER(zlib.h, [
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2320 have_zlib=yes
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2321 have_zlib_plugin=yes
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2322 AC_DEFINE(HAVE_ZLIB,, Define if you have zlib library)
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2323 ], [
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2324 if test "$want_zlib" = "yes"; then
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2325 AC_ERROR([Can't build with zlib support: zlib.h not found])
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2326 fi
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2327 ])
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2328 fi
3969
884da753caba If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents: 3948
diff changeset
2329 AM_CONDITIONAL(BUILD_ZLIB, test "$have_zlib" = "yes")
884da753caba If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents: 3948
diff changeset
2330
7820
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2331 if test "$want_bzlib" != "no"; then
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2332 AC_CHECK_HEADER(bzlib.h, [
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2333 AC_CHECK_LIB(bz2, BZ2_bzdopen, [
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2334 have_bzlib=yes
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2335 have_zlib_plugin=yes
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2336 AC_DEFINE(HAVE_BZLIB,, Define if you have bzlib library)
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2337 ], [
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2338 if test "$want_bzlib" = "yes"; then
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2339 AC_ERROR([Can't build with bzlib support: libbz2 not found])
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2340 fi
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2341 ])
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2342 ], [
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2343 if test "$want_bzlib" = "yes"; then
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2344 AC_ERROR([Can't build with bzlib support: bzlib.h not found])
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2345 fi
7786
d46b9e8dcf13 Check that libbz2 has correct functions. Old versions had different names.
Timo Sirainen <tss@iki.fi>
parents: 7767
diff changeset
2346 ])
7820
0dd6386cbc93 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 7810
diff changeset
2347 fi
7734
61543ac00ea1 zlib plugin supports now bzip2 also.
Timo Sirainen <tss@iki.fi>
parents: 7718
diff changeset
2348 AM_CONDITIONAL(BUILD_BZLIB, test "$have_bzlib" = "yes")
61543ac00ea1 zlib plugin supports now bzip2 also.
Timo Sirainen <tss@iki.fi>
parents: 7718
diff changeset
2349 AM_CONDITIONAL(BUILD_ZLIB_PLUGIN, test "$have_zlib_plugin" = "yes")
61543ac00ea1 zlib plugin supports now bzip2 also.
Timo Sirainen <tss@iki.fi>
parents: 7718
diff changeset
2350
6177
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2351 RPCGEN=${RPCGEN-rpcgen}
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2352 if ! $RPCGEN -c /dev/null > /dev/null; then
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2353 RPCGEN=
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2354 fi
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2355 AC_SUBST(RPCGEN)
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2356
6159
078d9dde99c8 Support for rquota with NFS mounts. Patch by HTK NetCommunication Oy.
Timo Sirainen <tss@iki.fi>
parents: 6111
diff changeset
2357 have_rquota=no
6177
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2358 if test -f /usr/include/rpcsvc/rquota.x && test -n "$RPCGEN"; then
6159
078d9dde99c8 Support for rquota with NFS mounts. Patch by HTK NetCommunication Oy.
Timo Sirainen <tss@iki.fi>
parents: 6111
diff changeset
2359 AC_DEFINE(HAVE_RQUOTA,, Define if you wish to retrieve quota of NFS mounted mailboxes)
078d9dde99c8 Support for rquota with NFS mounts. Patch by HTK NetCommunication Oy.
Timo Sirainen <tss@iki.fi>
parents: 6111
diff changeset
2360 have_rquota=yes
6177
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2361 fi
6159
078d9dde99c8 Support for rquota with NFS mounts. Patch by HTK NetCommunication Oy.
Timo Sirainen <tss@iki.fi>
parents: 6111
diff changeset
2362 AM_CONDITIONAL(HAVE_RQUOTA, test "$have_rquota" = "yes")
078d9dde99c8 Support for rquota with NFS mounts. Patch by HTK NetCommunication Oy.
Timo Sirainen <tss@iki.fi>
parents: 6111
diff changeset
2363
7746
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2364 if test "$want_solr" != "no"; then
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2365 AC_CHECK_PROG(CURLCONFIG, curl-config, YES, NO)
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2366 if test $CURLCONFIG = YES; then
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2367 CURL_CFLAGS=`curl-config --cflags`
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2368 CURL_LIBS=`curl-config --libs`
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2369
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2370 dnl libcurl found, also need libexpat
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2371 AC_CHECK_LIB(expat, XML_Parse, [
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2372 AC_CHECK_HEADER(expat.h, [
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2373 AC_SUBST(CURL_CFLAGS)
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2374 AC_SUBST(CURL_LIBS)
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2375 have_solr=yes
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2376 ], [
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2377 if test $want_solr = yes; then
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2378 AC_ERROR([Can't build with Solr support: expat.h not found])
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2379 fi
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2380 ])
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2381 ], [
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2382 if test $want_solr = yes; then
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2383 AC_ERROR([Can't build with Solr support: libexpat not found])
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2384 fi
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2385 ])
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2386 else
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2387 if test $want_solr = yes; then
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2388 AC_ERROR([Can't build with Solr support: curl-config not found])
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2389 fi
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2390 fi
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2391 fi
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2392 AM_CONDITIONAL(BUILD_SOLR, test "$have_solr" = "yes")
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2393
3969
884da753caba If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents: 3948
diff changeset
2394 dnl **
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2395 dnl ** capabilities
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2396 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2397
6990
e43c4db35e94 Add I18NLEVEL=1 capability.
Timo Sirainen <tss@iki.fi>
parents: 6988
diff changeset
2398 capability="IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS UIDPLUS LIST-EXTENDED I18NLEVEL=1"
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
2399 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability", IMAP capabilities)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2400
843
e9a5ce16f0f3 EXTRA_CFLAGS environment is now added to CFLAGS after all tests. Useful for adding -Werror there.
Timo Sirainen <tss@iki.fi>
parents: 835
diff changeset
2401 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
e9a5ce16f0f3 EXTRA_CFLAGS environment is now added to CFLAGS after all tests. Useful for adding -Werror there.
Timo Sirainen <tss@iki.fi>
parents: 835
diff changeset
2402
7297
2cda05620383 Added support for autoconf versions older than 2.59c.
Timo Sirainen <tss@iki.fi>
parents: 7285
diff changeset
2403 if test "$docdir" = ""; then
2cda05620383 Added support for autoconf versions older than 2.59c.
Timo Sirainen <tss@iki.fi>
parents: 7285
diff changeset
2404 dnl docdir supported only by autoconf v2.59c and later
7298
86af79a203d7 Base docdir to datadir instead of datarootdir which doesn't exist in old
Timo Sirainen <tss@iki.fi>
parents: 7297
diff changeset
2405 docdir='${datadir}/doc/${PACKAGE_TARNAME}'
7297
2cda05620383 Added support for autoconf versions older than 2.59c.
Timo Sirainen <tss@iki.fi>
parents: 7285
diff changeset
2406 fi
2cda05620383 Added support for autoconf versions older than 2.59c.
Timo Sirainen <tss@iki.fi>
parents: 7285
diff changeset
2407 AC_SUBST(docdir)
2cda05620383 Added support for autoconf versions older than 2.59c.
Timo Sirainen <tss@iki.fi>
parents: 7285
diff changeset
2408
3782
c67f77647a6e Added kqueue notification support. Patch by Vaclav Haisman
Timo Sirainen <tss@iki.fi>
parents: 3780
diff changeset
2409 AC_CONFIG_HEADERS([config.h])
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
2410 AC_CONFIG_FILES([
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2411 Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2412 doc/Makefile
5441
9d36800df1ae Added documentation to doc/wiki/. autogen.sh downloads them from dovecot.org
Timo Sirainen <tss@iki.fi>
parents: 5375
diff changeset
2413 doc/wiki/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2414 src/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2415 src/lib/Makefile
2754
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2416 src/lib-sql/Makefile
1702
43815588dd6b Moved client side code for auth process handling to lib-auth. Some other login process cleanups.
Timo Sirainen <tss@iki.fi>
parents: 1694
diff changeset
2417 src/lib-auth/Makefile
568
f2aa58c2afd0 SEARCH CHARSET support. Currently we do it through iconv() and only ASCII
Timo Sirainen <tss@iki.fi>
parents: 550
diff changeset
2418 src/lib-charset/Makefile
3737
d67092398377 Added dictionary API and implementation for SQL. It's meant for looking and
Timo Sirainen <tss@iki.fi>
parents: 3720
diff changeset
2419 src/lib-dict/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2420 src/lib-imap/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2421 src/lib-index/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2422 src/lib-mail/Makefile
2377
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents: 2369
diff changeset
2423 src/lib-ntlm/Makefile
4798
c04189d77a59 Added OTP and S/KEY authentication mechanisms. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 4736
diff changeset
2424 src/lib-otp/Makefile
1058
3b8fb7bf7ecc Moved settings parsing to lib-settings.
Timo Sirainen <tss@iki.fi>
parents: 1057
diff changeset
2425 src/lib-settings/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2426 src/lib-storage/Makefile
4808
93bc9770f938 Initial code for separation of mailbox accessing and directory layout
Timo Sirainen <tss@iki.fi>
parents: 4798
diff changeset
2427 src/lib-storage/list/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2428 src/lib-storage/index/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2429 src/lib-storage/index/maildir/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2430 src/lib-storage/index/mbox/Makefile
3720
fd0986477809 Initial implementation of Dovecot's own high performance file format, named
Timo Sirainen <tss@iki.fi>
parents: 3705
diff changeset
2431 src/lib-storage/index/dbox/Makefile
5458
daca7ed634c0 Added a simple cydir mail storage backend. It trusts index files completely:
Timo Sirainen <tss@iki.fi>
parents: 5456
diff changeset
2432 src/lib-storage/index/cydir/Makefile
6748
d712370dfd14 Added raw storage for opening single-mail files/streams as mailboxes.
Timo Sirainen <tss@iki.fi>
parents: 6734
diff changeset
2433 src/lib-storage/index/raw/Makefile
761
d3bd41a56309 First implementation of SORT extension. String comparing still not up to
Timo Sirainen <tss@iki.fi>
parents: 755
diff changeset
2434 src/lib-storage/register/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2435 src/auth/Makefile
4349
4d4c649ac106 Enabled building deliver
Timo Sirainen <tss@iki.fi>
parents: 4348
diff changeset
2436 src/deliver/Makefile
3779
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
2437 src/dict/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2438 src/imap/Makefile
1049
c41787e8c3f4 Moved common login process code to login-common, created pop3-login.
Timo Sirainen <tss@iki.fi>
parents: 1043
diff changeset
2439 src/imap-login/Makefile
c41787e8c3f4 Moved common login process code to login-common, created pop3-login.
Timo Sirainen <tss@iki.fi>
parents: 1043
diff changeset
2440 src/login-common/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2441 src/master/Makefile
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
2442 src/pop3/Makefile
1049
c41787e8c3f4 Moved common login process code to login-common, created pop3-login.
Timo Sirainen <tss@iki.fi>
parents: 1043
diff changeset
2443 src/pop3-login/Makefile
6718
4e4a5d6bb2cb Added beginnings of unit tests.
Timo Sirainen <tss@iki.fi>
parents: 6664
diff changeset
2444 src/tests/Makefile
1694
0fae24674a9a Separated rawlog into it's own binary.
Timo Sirainen <tss@iki.fi>
parents: 1669
diff changeset
2445 src/util/Makefile
3738
732b62dc1976 Added beginnings of plugin infrastructure. TODO: These could be optionally
Timo Sirainen <tss@iki.fi>
parents: 3737
diff changeset
2446 src/plugins/Makefile
4082
dcee3dadef51 Added acl.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4068
diff changeset
2447 src/plugins/acl/Makefile
3972
a506ee4ec31e Added "mail storage conversion" plugin. It can be used with IMAP, POP3
Timo Sirainen <tss@iki.fi>
parents: 3969
diff changeset
2448 src/plugins/convert/Makefile
4523
99699cf9df43 Initial import of expire plugin code. Seems to work with at least one user. :)
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4517
diff changeset
2449 src/plugins/expire/Makefile
4609
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents: 4599
diff changeset
2450 src/plugins/fts/Makefile
4621
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
2451 src/plugins/fts-lucene/Makefile
7746
08daafe3ffb0 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7745
diff changeset
2452 src/plugins/fts-solr/Makefile
4855
5bc593f1a8f6 Added "squat" full text search indexer backend. Its name and basic ideas
Timo Sirainen <tss@iki.fi>
parents: 4840
diff changeset
2453 src/plugins/fts-squat/Makefile
4913
dea1c8fa53f4 Added lazy expunge plugin.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4862
diff changeset
2454 src/plugins/lazy-expunge/Makefile
5034
1b28e0434d85 Added mail_log plugin to log various mail operations. Currently it logs mail
Timo Sirainen <tss@iki.fi>
parents: 5009
diff changeset
2455 src/plugins/mail-log/Makefile
5633
fbb4bdbbf374 Added mbox snarf plugin to move mails from /var/spool/mail to ~/mbox if it
Timo Sirainen <tss@iki.fi>
parents: 5578
diff changeset
2456 src/plugins/mbox-snarf/Makefile
3738
732b62dc1976 Added beginnings of plugin infrastructure. TODO: These could be optionally
Timo Sirainen <tss@iki.fi>
parents: 3737
diff changeset
2457 src/plugins/quota/Makefile
732b62dc1976 Added beginnings of plugin infrastructure. TODO: These could be optionally
Timo Sirainen <tss@iki.fi>
parents: 3737
diff changeset
2458 src/plugins/imap-quota/Makefile
732b62dc1976 Added beginnings of plugin infrastructure. TODO: These could be optionally
Timo Sirainen <tss@iki.fi>
parents: 3737
diff changeset
2459 src/plugins/trash/Makefile
3800
68e7519ebd90 Added zlib plugin
Timo Sirainen <tss@iki.fi>
parents: 3786
diff changeset
2460 src/plugins/zlib/Makefile
1418
c36d18766a35 0.99.9.1 released. Added redhat spec file.
Timo Sirainen <tss@iki.fi>
parents: 1410
diff changeset
2461 stamp.h
4343
407e6c620d70 dovecot-config now contains module_dir
Timo Sirainen <tss@iki.fi>
parents: 4300
diff changeset
2462 dovecot-config.in])
1096
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
2463
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
2464 AC_OUTPUT
1096
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
2465
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2466 if test "$want_sql_plugins" = "yes"; then
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2467 sql_drivers="$sql_drivers (plugins)"
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2468 fi
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2469
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2470 echo
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
2471 echo "Install prefix ...................... : $prefix"
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
2472 echo "File offsets ........................ : ${offt_bits}bit"
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
2473 echo "I/O loop method ..................... : $ioloop"
3745
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
2474 echo "File change notification method ..... : $have_notify"
1043
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
2475 echo "Building with SSL support ........... : $have_ssl"
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2476 echo "Building with IPv6 support .......... : $have_ipv6"
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
2477 echo "Building with pop3 server ........... : $want_pop3d"
4422
c46c02c7e602 Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents: 4415
diff changeset
2478 echo "Building with mail delivery agent .. : $want_deliver"
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
2479 echo "Building with GSSAPI support ........ : $have_gssapi"
1150
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
2480 echo "Building with user database modules . :$userdb"
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
2481 echo "Building with password lookup modules :$passdb"
4143
c2ae6dc37a19 Print the SQL drivers we're building.
Timo Sirainen <tss@iki.fi>
parents: 4142
diff changeset
2482 echo "Building with SQL drivers ............:$sql_drivers"