Mercurial > dovecot > original-hg > dovecot-1.2
annotate configure.in @ 5035:80f0ee36e905 HEAD
Allow --with-vpopmail=path specify the vpopmail_home path.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 18 Jan 2007 21:51:18 +0200 |
parents | 1b28e0434d85 |
children | 050549cfaa25 |
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]) |
4258
bd93316b078b
Note about this being unstable CVS branch
Timo Sirainen <tss@iki.fi>
parents:
4166
diff
changeset
|
2 AC_INIT([dovecot],[1.1.UNSTABLE],[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 | 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 | 6 |
7 AM_MAINTAINER_MODE | |
8 | |
9 AC_ISC_POSIX | |
10 AC_PROG_CC | |
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 | 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 | 16 AM_ICONV |
0 | 17 |
3720
fd0986477809
Initial implementation of Dovecot's own high performance file format, named
Timo Sirainen <tss@iki.fi>
parents:
3705
diff
changeset
|
18 AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.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 \ |
4050
41cb3921d869
configure was actually checking always only sys/quota.h. Also added
Timo Sirainen <tss@iki.fi>
parents:
4049
diff
changeset
|
20 sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.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 \ |
4840
a0a38a306c17
Since getting core dumps can be sometimes difficult, if we now do abort()
Timo Sirainen <tss@iki.fi>
parents:
4826
diff
changeset
|
22 xfs/xqm.h sasl.h sasl/sasl.h execinfo.h ucontext.h) |
0 | 23 |
24 AC_ARG_ENABLE(ipv6, | |
426 | 25 [ --enable-ipv6 Enable IPv6 support (default)], |
0 | 26 if test x$enableval = xno; then |
27 want_ipv6=no | |
28 else | |
29 want_ipv6=yes | |
30 fi, | |
426 | 31 want_ipv6=yes) |
0 | 32 |
544
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
33 AC_ARG_ENABLE(debug, |
4571
79dd8a12fa05
Changed --enable-debug's description.
Timo Sirainen <tss@iki.fi>
parents:
4567
diff
changeset
|
34 [ --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
|
35 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
|
36 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
|
37 fi) |
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
38 |
546
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
39 AC_ARG_ENABLE(asserts, |
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
40 [ --enable-asserts Enable asserts (default)], |
4057
f4807accc1d5
Unbreak last accidental change..
Timo Sirainen <tss@iki.fi>
parents:
4055
diff
changeset
|
41 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
|
42 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
|
43 fi) |
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
44 |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
45 AC_ARG_WITH(file-offset-size, |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
46 [ --with-file-offset-size=BITS Set size of file offsets. Usually 32 or 64. |
439
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
47 (default: 64 if available)], |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
48 preferred_off_t_bits=$withval, |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
49 preferred_off_t_bits=64) |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
50 |
439
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
51 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
|
52 [ --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
|
53 mem_align=$withval, |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
54 mem_align=8) |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
55 |
2569
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
56 AC_ARG_WITH(ioloop, |
3784
beeae4f17615
Cleanups and some more kqueue stuff
Timo Sirainen <tss@iki.fi>
parents:
3783
diff
changeset
|
57 [ --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
|
58 (epoll, kqueue, poll; best for the fastest available; |
f60b07bd5fa7
--with-ioloop=auto changed to --with-ioloop=best
Timo Sirainen <tss@iki.fi>
parents:
4478
diff
changeset
|
59 default is poll)], |
2569
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
60 ioloop=$withval, |
4478
4b01707d6cbe
Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents:
4443
diff
changeset
|
61 ioloop=poll) |
2569
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
62 |
3482
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
63 AC_ARG_WITH(notify, |
4551
2643a46322a6
Updated --with-notify description.
Timo Sirainen <tss@iki.fi>
parents:
4530
diff
changeset
|
64 [ --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
|
65 (inotify, kqueue, dnotify, none; |
2643a46322a6
Updated --with-notify description.
Timo Sirainen <tss@iki.fi>
parents:
4530
diff
changeset
|
66 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
|
67 notify=$withval, |
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
68 notify=) |
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
69 |
4530
f598896bb40a
Added --with-linux-quota configure option to specify which Linux quota
Timo Sirainen <tss@iki.fi>
parents:
4523
diff
changeset
|
70 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
|
71 [ --with-linux-quota=n Linux quota version to use (default: system's)], |
f598896bb40a
Added --with-linux-quota configure option to specify which Linux quota
Timo Sirainen <tss@iki.fi>
parents:
4523
diff
changeset
|
72 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
|
73 [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
|
74 ) |
f598896bb40a
Added --with-linux-quota configure option to specify which Linux quota
Timo Sirainen <tss@iki.fi>
parents:
4523
diff
changeset
|
75 |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
76 AC_ARG_WITH(passwd, |
426 | 77 [ --with-passwd Build with /etc/passwd support (default)], |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
78 if test x$withval = xno; then |
0 | 79 want_passwd=no |
80 else | |
81 want_passwd=yes | |
82 fi, | |
83 want_passwd=yes) | |
84 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
85 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
|
86 [ --with-passwd-file Build with passwd-like file support (default)], |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
87 if test x$withval = xno; then |
0 | 88 want_passwd_file=no |
89 else | |
90 want_passwd_file=yes | |
91 fi, | |
92 want_passwd_file=yes) | |
93 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
94 AC_ARG_WITH(shadow, |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
95 [ --with-shadow Build with shadow password support (default)], |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
96 if test x$withval = xno; then |
0 | 97 want_shadow=no |
98 else | |
99 want_shadow=yes | |
100 fi, | |
101 want_shadow=yes) | |
102 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
103 AC_ARG_WITH(pam, |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
104 [ --with-pam Build with PAM support (default)], |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
105 if test x$withval = xno; then |
0 | 106 want_pam=no |
107 else | |
108 want_pam=yes | |
109 fi, | |
110 want_pam=yes) | |
111 | |
2162
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
112 AC_ARG_WITH(checkpassword, |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
113 [ --with-checkpassword Build with checkpassword support (default)], |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
114 if test x$withval = xno; then |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
115 want_checkpassword=no |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
116 else |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
117 want_checkpassword=yes |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
118 fi, |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
119 want_checkpassword=yes) |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
120 |
1851
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
121 AC_ARG_WITH(bsdauth, |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
122 [ --with-bsdauth Build with BSD authentication support (default)], |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
123 if test x$withval = xno; then |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
124 want_bsdauth=no |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
125 else |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
126 want_bsdauth=yes |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
127 fi, |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
128 want_bsdauth=yes) |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
129 |
3683
28cca6317829
Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents:
3671
diff
changeset
|
130 AC_ARG_WITH(gssapi, |
4348
2dc5f48ff4ee
Whitespace cleanup for --help. Don't enable GSSAPI support by default.
Timo Sirainen <tss@iki.fi>
parents:
4343
diff
changeset
|
131 [ --with-gssapi Build with GSSAPI authentication support], |
3683
28cca6317829
Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents:
3671
diff
changeset
|
132 if test x$withval = xno; then |
28cca6317829
Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents:
3671
diff
changeset
|
133 want_gssapi=no |
28cca6317829
Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents:
3671
diff
changeset
|
134 else |
3686 | 135 want_gssapi=yes |
3683
28cca6317829
Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents:
3671
diff
changeset
|
136 fi, |
4348
2dc5f48ff4ee
Whitespace cleanup for --help. Don't enable GSSAPI support by default.
Timo Sirainen <tss@iki.fi>
parents:
4343
diff
changeset
|
137 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
|
138 |
4638
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
139 AC_ARG_WITH(sia, |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
140 [ --with-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
|
141 if test x$withval = xno; then |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
142 want_sia=no |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
143 else |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
144 want_sia=yes |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
145 fi, |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
146 want_sia=no) |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
147 |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
148 AC_ARG_WITH(ldap, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
149 [ --with-ldap Build with LDAP support], |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
150 if test x$withval = xno; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
151 want_ldap=no |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
152 else |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
153 want_ldap=yes |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
154 fi, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
155 want_ldap=no) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
156 |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
157 AC_ARG_WITH(vpopmail, |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
158 [ --with-vpopmail Build with vpopmail support (default)], |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
159 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
|
160 want_vpopmail=no |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
161 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
162 want_vpopmail=yes |
5035
80f0ee36e905
Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents:
5034
diff
changeset
|
163 if test x$withval = xyes; then |
80f0ee36e905
Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents:
5034
diff
changeset
|
164 vpopmail_home="`echo ~vpopmail`" |
80f0ee36e905
Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents:
5034
diff
changeset
|
165 else |
80f0ee36e905
Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents:
5034
diff
changeset
|
166 vpopmail_home="$withval" |
80f0ee36e905
Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents:
5034
diff
changeset
|
167 fi |
80f0ee36e905
Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents:
5034
diff
changeset
|
168 fi, [ |
80f0ee36e905
Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents:
5034
diff
changeset
|
169 want_vpopmail=yes |
80f0ee36e905
Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents:
5034
diff
changeset
|
170 vpopmail_home="`echo ~vpopmail`" |
80f0ee36e905
Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents:
5034
diff
changeset
|
171 ]) |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
172 |
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
|
173 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
|
174 [ --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
|
175 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
|
176 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
|
177 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
|
178 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
|
179 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
|
180 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
|
181 |
3667
b7569a6a4ada
Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents:
3600
diff
changeset
|
182 AC_ARG_WITH(prefetch-userdb, |
b7569a6a4ada
Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents:
3600
diff
changeset
|
183 [ --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
|
184 if test x$withval = xno; then |
3667
b7569a6a4ada
Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents:
3600
diff
changeset
|
185 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
|
186 else |
3667
b7569a6a4ada
Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents:
3600
diff
changeset
|
187 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
|
188 fi, |
3667
b7569a6a4ada
Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents:
3600
diff
changeset
|
189 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
|
190 |
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
|
191 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
|
192 [ --with-db Build with Berkeley DB support], |
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
|
193 if test x$withval = xno; then |
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
|
194 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
|
195 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
|
196 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
|
197 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
|
198 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
|
199 |
4013
bf0357107349
Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents:
4012
diff
changeset
|
200 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
|
201 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
|
202 AC_ARG_WITH(sql, |
bf0357107349
Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents:
4012
diff
changeset
|
203 [ --with-sql Build with generic SQL support], |
bf0357107349
Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents:
4012
diff
changeset
|
204 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
|
205 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
|
206 else |
bf0357107349
Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents:
4012
diff
changeset
|
207 want_sql=yes |
bf0357107349
Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents:
4012
diff
changeset
|
208 fi, |
bf0357107349
Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents:
4012
diff
changeset
|
209 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
|
210 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
211 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
|
212 [ --with-pgsql Build with PostgreSQL driver support], |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
213 if test x$withval = xno; then |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
214 want_pgsql=no |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
215 else |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
216 want_pgsql=yes |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
217 fi, |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
218 want_pgsql=no) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
219 |
1995
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
220 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
|
221 [ --with-mysql Build with MySQL driver support], |
1995
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
222 if test x$withval = xno; then |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
223 want_mysql=no |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
224 else |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
225 want_mysql=yes |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
226 fi, |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
227 want_mysql=no) |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
228 |
3919
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
229 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
|
230 [ --with-sqlite Build with SQLite3 driver support], |
3919
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
231 if test x$withval = xno; then |
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
232 want_sqlite=no |
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
233 else |
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
234 want_sqlite=yes |
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
235 fi, |
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
236 want_sqlite=no) |
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
237 |
4621
446646de0c4a
--with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents:
4609
diff
changeset
|
238 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
|
239 [ --with-lucene Build with CLucene full text search support], |
446646de0c4a
--with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents:
4609
diff
changeset
|
240 if test x$withval = xno; then |
446646de0c4a
--with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents:
4609
diff
changeset
|
241 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
|
242 else |
446646de0c4a
--with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents:
4609
diff
changeset
|
243 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
|
244 fi, |
446646de0c4a
--with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents:
4609
diff
changeset
|
245 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
|
246 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
|
247 |
622 | 248 AC_ARG_WITH(ssl, |
3881
ea56e9296b5b
Default SSL is OpenSSL, not GNUTLS.
Timo Sirainen <tss@iki.fi>
parents:
3863
diff
changeset
|
249 [ --with-ssl=[gnutls|openssl] Build with GNUTLS or OpenSSL (default)], |
245 | 250 if test x$withval = xno; then |
244 | 251 want_gnutls=no |
622 | 252 want_openssl=no |
253 elif test x$withval = xgnutls; then | |
254 want_gnutls=yes | |
255 want_openssl=no | |
256 elif test x$withval = xopenssl; then | |
257 want_gnutls=no | |
258 want_openssl=yes | |
244 | 259 else |
3004
60a172e62d11
Don't use GNUTLS unless explicitly specified. It's not working currently
Timo Sirainen <tss@iki.fi>
parents:
3002
diff
changeset
|
260 want_gnutls=no |
622 | 261 want_openssl=yes |
262 fi, [ | |
3004
60a172e62d11
Don't use GNUTLS unless explicitly specified. It's not working currently
Timo Sirainen <tss@iki.fi>
parents:
3002
diff
changeset
|
263 want_gnutls=no |
622 | 264 want_openssl=yes |
265 ]) | |
244 | 266 |
657
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
267 AC_ARG_WITH(ssldir, |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
268 [ --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
|
269 ssldir="$withval", |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
270 ssldir=/etc/ssl |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
271 ) |
712
385f862a4005
--with-ssldir actually didn't do anything, and the default directory for
Timo Sirainen <tss@iki.fi>
parents:
711
diff
changeset
|
272 AC_SUBST(ssldir) |
657
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
273 |
3327
ce0733b39311
Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents:
3284
diff
changeset
|
274 AC_ARG_WITH(rundir, |
ce0733b39311
Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents:
3284
diff
changeset
|
275 [ --with-rundir=DIR Runtime data directory (LOCALSTATEDIR/run/dovecot)], |
ce0733b39311
Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents:
3284
diff
changeset
|
276 rundir="$withval", |
ce0733b39311
Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents:
3284
diff
changeset
|
277 rundir=$localstatedir/run/$PACKAGE_NAME |
ce0733b39311
Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents:
3284
diff
changeset
|
278 ) |
ce0733b39311
Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents:
3284
diff
changeset
|
279 AC_SUBST(rundir) |
ce0733b39311
Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents:
3284
diff
changeset
|
280 |
4407
2e4857a2b858
Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents:
4387
diff
changeset
|
281 AC_ARG_WITH(statedir, |
2e4857a2b858
Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents:
4387
diff
changeset
|
282 [ --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
|
283 statedir="$withval", |
2e4857a2b858
Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents:
4387
diff
changeset
|
284 statedir=$localstatedir/lib/$PACKAGE_NAME |
2e4857a2b858
Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents:
4387
diff
changeset
|
285 ) |
2e4857a2b858
Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents:
4387
diff
changeset
|
286 AC_SUBST(statedir) |
2e4857a2b858
Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents:
4387
diff
changeset
|
287 |
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
|
288 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
|
289 [ --with-gc Use Boehm garbage collector], |
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
|
290 if test x$withval = xyes; then |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
291 want_gc=yes |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
292 else |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
293 if test "x$withval" = xno; then |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
294 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
|
295 else |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
296 want_gc=yes |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
297 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
|
298 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
|
299 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
|
300 |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
301 AC_ARG_WITH(pop3d, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
302 [ --with-pop3d Build POP3 server (default)], |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
303 if test x$withval = xno; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
304 want_pop3d=no |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
305 else |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
306 want_pop3d=yes |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
307 fi, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
308 want_pop3d=yes) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
309 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
|
310 |
3328 | 311 AC_ARG_WITH(deliver, |
312 [ --with-deliver Build mail delivery agent (default)], | |
313 if test x$withval = xno; then | |
314 want_deliver=no | |
315 else | |
316 want_deliver=yes | |
317 fi, | |
318 want_deliver=yes) | |
319 AM_CONDITIONAL(BUILD_DELIVER, test "$want_deliver" = "yes") | |
320 | |
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
|
321 AC_ARG_WITH(storages, |
3943
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
322 [ --with-storages Build with specified mail storage formats (maildir,mbox)], [ |
4005
450ee12c2e26
Give error if --with-storages or --without-storages is used without
Timo Sirainen <tss@iki.fi>
parents:
3997
diff
changeset
|
323 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
|
324 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
|
325 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
|
326 mail_storages=`echo "$withval"|sed 's/,/ /g'` ], |
3720
fd0986477809
Initial implementation of Dovecot's own high performance file format, named
Timo Sirainen <tss@iki.fi>
parents:
3705
diff
changeset
|
327 mail_storages="maildir mbox dbox") |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
328 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
|
329 |
3943
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
330 AC_ARG_WITH(sql-drivers, |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
331 [ --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
|
332 sql_drivers=`echo "$withval"|sed 's/,/ /g'` ], |
3948
795cc9739eb3
Make --without-sql-drivers work properly
Timo Sirainen <tss@iki.fi>
parents:
3944
diff
changeset
|
333 sql_drivers="all") |
3943
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
334 |
4005
450ee12c2e26
Give error if --with-storages or --without-storages is used without
Timo Sirainen <tss@iki.fi>
parents:
3997
diff
changeset
|
335 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
|
336 all_sql_drivers=yes |
3948
795cc9739eb3
Make --without-sql-drivers work properly
Timo Sirainen <tss@iki.fi>
parents:
3944
diff
changeset
|
337 sql_drivers= |
795cc9739eb3
Make --without-sql-drivers work properly
Timo Sirainen <tss@iki.fi>
parents:
3944
diff
changeset
|
338 elif test "$sql_drivers" = "no"; then |
3944 | 339 # --without-sql-drivers given |
3948
795cc9739eb3
Make --without-sql-drivers work properly
Timo Sirainen <tss@iki.fi>
parents:
3944
diff
changeset
|
340 sql_drivers= |
3943
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
341 fi |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
342 |
2070
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
343 AC_ARG_WITH(moduledir, |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
344 [ --with-moduledir=DIR Base directory for dynamically loadable modules], |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
345 moduledir="$withval", |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
346 moduledir=$libdir/dovecot |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
347 ) |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
348 AC_SUBST(moduledir) |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
349 |
3779
e87a8db60d25
Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents:
3762
diff
changeset
|
350 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
|
351 [ --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
|
352 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
|
353 want_docs=no |
e87a8db60d25
Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents:
3762
diff
changeset
|
354 else |
e87a8db60d25
Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents:
3762
diff
changeset
|
355 want_docs=yes |
e87a8db60d25
Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents:
3762
diff
changeset
|
356 fi, |
e87a8db60d25
Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents:
3762
diff
changeset
|
357 want_docs=yes) |
e87a8db60d25
Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents:
3762
diff
changeset
|
358 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
|
359 |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
360 dnl * gcc specific options |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
361 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
|
362 # -Wcast-qual -Wcast-align -Wconversion -Wunreachable-code # too many warnings |
850 | 363 # -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
|
364 # -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
|
365 CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast" |
3091 | 366 |
4826
53ff1a59cdd5
Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents:
4808
diff
changeset
|
367 AC_TRY_COMPILE([ |
53ff1a59cdd5
Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents:
4808
diff
changeset
|
368 #if __GNUC__ < 4 |
53ff1a59cdd5
Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents:
4808
diff
changeset
|
369 # error old gcc |
53ff1a59cdd5
Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents:
4808
diff
changeset
|
370 #endif |
53ff1a59cdd5
Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents:
4808
diff
changeset
|
371 ],,[ |
53ff1a59cdd5
Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents:
4808
diff
changeset
|
372 # gcc4 |
53ff1a59cdd5
Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents:
4808
diff
changeset
|
373 CFLAGS="$CFLAGS -Wstrict-aliasing=2" |
53ff1a59cdd5
Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents:
4808
diff
changeset
|
374 ]) |
53ff1a59cdd5
Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents:
4808
diff
changeset
|
375 |
3097
3ba362513202
Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents:
3091
diff
changeset
|
376 # 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
|
377 old_cflags=$CFLAGS |
3ba362513202
Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents:
3091
diff
changeset
|
378 CFLAGS="-std=gnu99" |
3ba362513202
Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents:
3091
diff
changeset
|
379 AC_TRY_COMPILE([ |
3ba362513202
Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents:
3091
diff
changeset
|
380 ],, [ |
3ba362513202
Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents:
3091
diff
changeset
|
381 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
|
382 ], [ |
3ba362513202
Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents:
3091
diff
changeset
|
383 CFLAGS="$old_cflags" |
3ba362513202
Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents:
3091
diff
changeset
|
384 ]) |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
385 fi |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
386 |
0 | 387 dnl ** |
388 dnl ** just some generic stuff... | |
389 dnl ** | |
390 | |
391 AC_CHECK_FUNC(socket, [], [ | |
392 AC_CHECK_LIB(socket, socket, [ | |
393 LIBS="$LIBS -lsocket" | |
394 ]) | |
395 ]) | |
396 | |
397 AC_CHECK_FUNC(inet_addr, [], [ | |
398 AC_CHECK_LIB(nsl, inet_addr, [ | |
399 LIBS="$LIBS -lnsl" | |
400 ]) | |
401 ]) | |
402 | |
494
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
403 AC_CHECK_FUNC(fdatasync, [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
404 have_fdatasync=yes |
494
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
405 ], [ |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
406 AC_CHECK_LIB(rt, fdatasync, [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
407 have_fdatasync=yes |
494
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
408 LIBS="$LIBS -lrt" |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
409 ]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
410 ]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
411 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
412 if test "$have_fdatasync" = "yes"; then |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
413 AC_DEFINE(HAVE_FDATASYNC,, Define if you have fdatasync()) |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
414 fi |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
415 |
0 | 416 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
|
417 AC_CHECK_FUNCS(fcntl flock lockf inet_aton sigaction getpagesize madvise \ |
1849 | 418 strcasecmp stricmp vsnprintf vsyslog writev pread \ |
3237
2f57438d9542
Added setegid() emulation for HP-UX.
Timo Sirainen <tss@iki.fi>
parents:
3236
diff
changeset
|
419 setrlimit setproctitle seteuid setreuid setegid setresgid \ |
4101
321469dcb8fb
If /dev/urandom didn't exist and we used OpenSSL's random number generator,
Timo Sirainen <tss@iki.fi>
parents:
4082
diff
changeset
|
420 strtoull strtouq setpriority quotactl getmntent kqueue kevent \ |
5009
06b281c1f543
When opening maildir, check if tmp/'s atime is over 8h old. If it is, delete
Timo Sirainen <tss@iki.fi>
parents:
4923
diff
changeset
|
421 getrusage backtrace_symbols walkcontext dirfd) |
0 | 422 |
2569
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
423 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
|
424 have_ioloop=no |
0 | 425 |
4482
f60b07bd5fa7
--with-ioloop=auto changed to --with-ioloop=best
Timo Sirainen <tss@iki.fi>
parents:
4478
diff
changeset
|
426 if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then |
4386
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
427 AC_TRY_RUN([ |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
428 #include <sys/epoll.h> |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
429 |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
430 int main() |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
431 { |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
432 return epoll_create(5) < 1; |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
433 } |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
434 ], [ |
2569
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
435 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
|
436 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
|
437 ioloop=epoll |
2569
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
438 ], [ |
4478
4b01707d6cbe
Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents:
4443
diff
changeset
|
439 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
|
440 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
|
441 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
|
442 ]) |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
443 fi |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
444 |
4482
f60b07bd5fa7
--with-ioloop=auto changed to --with-ioloop=best
Timo Sirainen <tss@iki.fi>
parents:
4478
diff
changeset
|
445 if test "$ioloop" = "best" || test "$ioloop" = "kqueue"; then |
4433 | 446 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
|
447 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
|
448 ioloop=kqueue |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
449 have_ioloop=yes |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
450 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
|
451 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
|
452 fi |
3749
194295062e5e
Added kqueue support. Patch by Vaclav Haisman.
Timo Sirainen <tss@iki.fi>
parents:
3745
diff
changeset
|
453 fi |
194295062e5e
Added kqueue support. Patch by Vaclav Haisman.
Timo Sirainen <tss@iki.fi>
parents:
3745
diff
changeset
|
454 |
4482
f60b07bd5fa7
--with-ioloop=auto changed to --with-ioloop=best
Timo Sirainen <tss@iki.fi>
parents:
4478
diff
changeset
|
455 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
|
456 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
|
457 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
|
458 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
|
459 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
|
460 ]) |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
461 fi |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
462 |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
463 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
|
464 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
|
465 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
|
466 fi |
0 | 467 |
3745
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
468 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
|
469 |
4386
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
470 if test "$notify" = "" || test "$notify" = "inotify" ; then |
4423
26d18749f718
Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents:
4422
diff
changeset
|
471 AC_MSG_CHECKING([if we can use inotify]) |
4386
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
472 dnl * inotify? |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
473 AC_TRY_RUN([ |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
474 #define _GNU_SOURCE |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
475 #include <sys/ioctl.h> |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
476 #include <fcntl.h> |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
477 #include <sys/inotify.h> |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
478 #include <stdio.h> |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
479 |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
480 int main() |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
481 { |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
482 int wd, fd; |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
483 char * fn = "/tmp"; |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
484 |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
485 fd = inotify_init (); |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
486 if (fd < 0) |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
487 { |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
488 perror ("inotify_init"); |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
489 return (-1); |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
490 } |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
491 |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
492 wd = inotify_add_watch (fd, fn, IN_ALL_EVENTS); |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
493 |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
494 if (wd < 0) |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
495 { |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
496 perror ("inotify_add_watch"); |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
497 return (-2); |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
498 } |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
499 |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
500 inotify_rm_watch (fd, wd); |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
501 |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
502 close (fd); |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
503 } |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
504 ], [ |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
505 have_notify=inotify |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
506 notify=inotify |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
507 AC_DEFINE(IOLOOP_NOTIFY_INOTIFY,, Use Linux inotify) |
4423
26d18749f718
Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents:
4422
diff
changeset
|
508 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
|
509 ], [ |
4423
26d18749f718
Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents:
4422
diff
changeset
|
510 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
|
511 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
|
512 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
|
513 notify="" |
4386
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
514 fi |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
515 ]) |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
516 fi |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
517 |
4572
046b985ed767
Use notify=kqueue automatically only if ioloop=kqueue.
Timo Sirainen <tss@iki.fi>
parents:
4571
diff
changeset
|
518 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
|
519 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
|
520 dnl * BSD kqueue() notify |
4442 | 521 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
|
522 have_notify=kqueue |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
523 notify=kqueue |
4423
26d18749f718
Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents:
4422
diff
changeset
|
524 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
|
525 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
|
526 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
|
527 else |
4423
26d18749f718
Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents:
4422
diff
changeset
|
528 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
|
529 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
|
530 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
|
531 notify="" |
4386
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
532 fi |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
533 fi |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
534 fi |
e23469650c85
Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents:
4349
diff
changeset
|
535 |
3482
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
536 if test "$notify" = "" || test "$notify" = "dnotify"; then |
4423
26d18749f718
Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents:
4422
diff
changeset
|
537 AC_MSG_CHECKING([if 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
|
538 dnl * dnotify? |
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
539 AC_TRY_COMPILE([ |
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
540 #define _GNU_SOURCE |
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
541 #include <fcntl.h> |
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
542 #include <signal.h> |
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
543 #include <unistd.h> |
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
544 ], [ |
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
545 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
|
546 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
|
547 ], [ |
4423
26d18749f718
Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents:
4422
diff
changeset
|
548 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
|
549 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
|
550 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
|
551 notify=dnotify |
3482
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
552 ], [ |
4423
26d18749f718
Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents:
4422
diff
changeset
|
553 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
|
554 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
|
555 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
|
556 fi |
465c465c66be
Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents:
3452
diff
changeset
|
557 ]) |
3745
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
558 fi |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
559 |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
560 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
|
561 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
|
562 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
|
563 |
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
|
564 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
|
565 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
|
566 #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
|
567 #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
|
568 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
|
569 #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
|
570 ],,, [ |
a2b009c65e02
Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents:
1978
diff
changeset
|
571 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
|
572 ]) |
a2b009c65e02
Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents:
1978
diff
changeset
|
573 |
0 | 574 dnl * OS specific options |
575 case "$host_os" in | |
576 hpux*) | |
577 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" | |
578 ;; | |
579 *) | |
580 ;; | |
581 esac | |
582 | |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
583 AC_CHECK_SIZEOF(int) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
584 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
|
585 AC_CHECK_SIZEOF(void *) |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
586 AC_CHECK_SIZEOF(long long) |
185 | 587 |
2036
b3a56463c812
AC_DEFUN warning fixes for aclocal 1.8..
Timo Sirainen <tss@iki.fi>
parents:
2035
diff
changeset
|
588 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
|
589 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
|
590 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
591 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
|
592 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
|
593 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
|
594 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
595 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
596 result="" |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
597 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
|
598 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
|
599 |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
600 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
|
601 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
|
602 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
|
603 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
|
604 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
605 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
|
606 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
|
607 int) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
608 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
|
609 ;; |
1630 | 610 unsigned-int) |
611 fmt="%u" | |
612 ;; | |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
613 long) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
614 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
|
615 ;; |
1630 | 616 unsigned-long) |
617 fmt="%lu" | |
618 ;; | |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
619 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
|
620 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
|
621 ;; |
1630 | 622 unsigned-long-long) |
623 fmt="%llu" | |
624 ;; | |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
625 *) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
626 fmt="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
627 ;; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
628 esac |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
629 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
630 if test "$fmt" != ""; then |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
631 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
|
632 #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
|
633 #include <stdio.h> |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
634 ]], [[ |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
635 printf("$fmt", ($1)0); |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
636 ]])],[ |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
637 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
|
638 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
|
639 result="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
640 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
|
641 break |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
642 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
643 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
|
644 visible="$result" |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
645 ],[]) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
646 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
|
647 done |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
648 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
|
649 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
650 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
651 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
|
652 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
|
653 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
|
654 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
|
655 #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
|
656 typedef $type $1; |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
657 ]], [[]])],[ |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
658 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
|
659 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
|
660 result="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
661 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
|
662 break |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
663 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
664 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
|
665 visible="$type" |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
666 ],[]) |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
667 done |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
668 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
|
669 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
670 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
|
671 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
|
672 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
673 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
|
674 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
|
675 #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
|
676 #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
|
677 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
|
678 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
|
679 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
|
680 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
|
681 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
|
682 } |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
683 ]])],[ |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
684 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
|
685 rm -f conftestval |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
686 |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
687 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
|
688 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
|
689 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
|
690 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
|
691 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
|
692 break |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
693 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
694 done |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
695 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
|
696 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
|
697 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
|
698 fi |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
699 ],[],[]) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
700 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
701 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
702 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
|
703 AC_MSG_RESULT($visible) |
185 | 704 ]) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
705 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
706 dnl * off_t checks, try to make it 64bit |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
707 AC_DEFINE_UNQUOTED(_FILE_OFFSET_BITS, $preferred_off_t_bits, |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
708 [If set to 64, enables 64bit off_t for some systems (eg. Linux, Solaris)]) |
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
|
709 |
3929
49a1a979959e
If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents:
3919
diff
changeset
|
710 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
|
711 |
49a1a979959e
If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents:
3919
diff
changeset
|
712 AC_CHECK_TYPE(uoff_t, [ |
3931 | 713 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
|
714 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
|
715 ], [ |
3931 | 716 have_uoff_t=no |
717 ]) | |
718 | |
719 AC_TYPEOF(off_t, long int long-long) | |
720 case "$typeof_off_t" in | |
721 int) | |
722 offt_max=INT_MAX | |
723 uofft_fmt="u" | |
724 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
|
725 AC_DEFINE(UOFF_T_INT,, Define if off_t is int) |
3931 | 726 fi |
727 offt_bits=`expr 8 \* $ac_cv_sizeof_int` | |
728 ;; | |
729 long) | |
730 offt_max=LONG_MAX | |
731 uofft_fmt="lu" | |
732 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
|
733 AC_DEFINE(UOFF_T_LONG,, Define if off_t is long) |
3931 | 734 fi |
735 offt_bits=`expr 8 \* $ac_cv_sizeof_long` | |
736 ;; | |
737 "long long") | |
738 offt_max=LLONG_MAX | |
739 uofft_fmt="llu" | |
740 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
|
741 AC_DEFINE(UOFF_T_LONG_LONG,, Define if off_t is long long) |
3931 | 742 fi |
743 offt_bits=`expr 8 \* $ac_cv_sizeof_long_long` | |
744 ;; | |
745 *) | |
746 AC_MSG_ERROR([Unsupported off_t type]) | |
747 ;; | |
748 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
|
749 |
2078
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
750 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
|
751 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
2078
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
752 #include <dirent.h> |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
753 ]], [[ |
2078
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
754 struct dirent d; |
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
755 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
|
756 ]])],[ |
2078
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
757 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
|
758 ],[]) |
2078
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
759 |
1382
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
760 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
|
761 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
|
762 #include <limits.h> |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
763 #include <sys/types.h> |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
764 ]], [[ |
1382
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
765 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
|
766 ]])],[ |
1403 | 767 : |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
768 ],[ |
1382
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
769 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
|
770 ]) |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
771 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
772 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
|
773 |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
774 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
|
775 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
|
776 dnl * that it's unsigned and only some old systems define it as signed. |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
777 AC_MSG_CHECKING([whether size_t is signed]) |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
778 AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
779 #include <sys/types.h> |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
780 int main() { |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
781 /* return 0 if we're signed */ |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
782 exit((size_t)(int)-1 <= 0 ? 0 : 1); |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
783 } |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
784 ]])],[ |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
785 AC_MSG_RESULT(yes) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
786 |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
787 echo |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
788 echo "Your system's size_t is a signed integer, Dovecot isn't designed to" |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
789 echo "support it. It probably works just fine, but it's less resistant to" |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
790 echo "buffer overflows. If you're not worried about this and still want to" |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
791 echo "compile Dovecot, set ignore_signed_size=1 environment." |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
792 |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
793 if test "$ignore_signed_size" = ""; then |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
794 AC_MSG_ERROR([aborting]) |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
795 fi |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
796 echo "..ignoring as requested.." |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
797 ],[ |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
798 AC_MSG_RESULT(no) |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
799 ],[]) |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
800 |
1626
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
801 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
|
802 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
|
803 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
|
804 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
|
805 case "$typeof_size_t" in |
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
806 "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
|
807 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
|
808 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
|
809 ;; |
1626
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
810 "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
|
811 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
|
812 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
|
813 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
814 *) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
815 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
|
816 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
|
817 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
|
818 |
1626
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
819 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
|
820 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
|
821 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
|
822 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
|
823 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
824 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
|
825 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
826 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
|
827 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
|
828 |
2036
b3a56463c812
AC_DEFUN warning fixes for aclocal 1.8..
Timo Sirainen <tss@iki.fi>
parents:
2035
diff
changeset
|
829 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
|
830 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
|
831 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
|
832 [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
|
833 #include <sys/types.h> |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
834 $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
|
835 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
|
836 ]) |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
837 |
1660
4076387f7ccb
We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents:
1658
diff
changeset
|
838 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
|
839 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
|
840 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
|
841 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
|
842 ]) |
4076387f7ccb
We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents:
1658
diff
changeset
|
843 |
4076387f7ccb
We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents:
1658
diff
changeset
|
844 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
|
845 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
|
846 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
|
847 fi |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
848 |
908
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
849 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
|
850 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
|
851 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
|
852 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
|
853 fi |
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
854 |
678
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
855 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
|
856 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
|
857 AC_DEFINE(HAVE_SOCKLEN_T,, Define to 'int' if you don't have socklen_t) |
0 | 858 fi |
859 | |
1394
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
860 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
|
861 |
1335
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
862 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
|
863 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
|
864 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
|
865 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
|
866 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
|
867 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
|
868 else |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
869 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
|
870 |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
871 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
|
872 AC_DEFINE(HAVE_OPENSSL_RAND_H,, Define if you have 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
|
873 RAND_LIBS=-lcrypto |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
874 ]) |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
875 fi |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
876 AC_SUBST(RAND_LIBS) |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
877 |
0 | 878 dnl * do we have tm_gmtoff |
879 AC_MSG_CHECKING([for tm_gmtoff]) | |
880 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
|
881 [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
|
882 #include <time.h>]], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
883 [[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
|
884 [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
|
885 [i_cv_field_tm_gmtoff=no])]) |
0 | 886 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
|
887 AC_DEFINE(HAVE_TM_GMTOFF,, Define if you have struct tm->tm_gmtoff) |
0 | 888 fi |
889 AC_MSG_RESULT($i_cv_field_tm_gmtoff) | |
890 | |
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
|
891 dnl * how large time_t values does gmtime() accept? |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
892 AC_MSG_CHECKING([how large time_t values gmtime() accepts]) |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
893 AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
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
|
894 #include <stdio.h> |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
895 #include <time.h> |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
896 int main() { |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
897 FILE *f; |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
898 int bits; |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
899 time_t t; |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
900 |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
901 for (bits = 1, t = 1; t > 0; ++bits, t <<= 1) { |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
902 if (gmtime(&t) == NULL) { |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
903 bits--; |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
904 break; |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
905 } |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
906 } |
3206 | 907 if (bits > 40) { |
908 /* Solaris 9 breaks after 55 bits. Perhaps other systems break earlier. | |
909 Let's just do the same as Cyrus folks and limit it to 40 bits. */ | |
910 bits = 40; | |
911 } | |
912 | |
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
|
913 f = fopen("conftest.temp", "w"); |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
914 if (f == NULL) { |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
915 perror("fopen()"); |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
916 return 1; |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
917 } |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
918 fprintf(f, "%d", bits); |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
919 fclose(f); |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
920 return 0; |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
921 } |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
922 ]])],[ |
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
|
923 max_bits=`cat conftest.temp` |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
924 rm -f conftest.temp |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
925 AC_MSG_RESULT($max_bits) |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
926 ], [ |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
927 AC_MSG_RESULT([check failed, assuming 31]) |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
928 max_bits=31 |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
929 ],[]) |
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
|
930 AC_DEFINE_UNQUOTED(TIME_T_MAX_BITS, $max_bits, max. time_t bits gmtime() can handle) |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
931 |
411 | 932 dnl * do we have struct iovec |
933 AC_MSG_CHECKING([for struct iovec]) | |
934 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
|
935 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
411 | 936 #include <sys/types.h> |
937 #include <sys/uio.h> | |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
938 #include <unistd.h>]], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
939 [[struct iovec *iovec;]])], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
940 [i_cv_struct_iovec=yes], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
941 [i_cv_struct_iovec=no])]) |
411 | 942 |
943 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
|
944 AC_DEFINE(HAVE_STRUCT_IOVEC,, Define if you have struct iovec) |
411 | 945 fi |
946 AC_MSG_RESULT($i_cv_struct_iovec) | |
947 | |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
948 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
|
949 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
|
950 #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
|
951 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
|
952 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
|
953 ]], [[]])],[],[ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
954 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
|
955 |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
956 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
|
957 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
|
958 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
|
959 fi |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
960 ]) |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
961 |
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
|
962 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
|
963 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
|
964 #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
|
965 #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
|
966 #include <sys/resource.h> |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
967 ]], [[ |
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
|
968 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
|
969 getrlimit(RLIMIT_AS, &r); |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
970 ]])],[ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
971 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
|
972 ],[]) |
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
|
973 |
1065 | 974 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
|
975 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1065 | 976 #include <sys/types.h> |
977 #include <sys/time.h> | |
978 #include <sys/resource.h> | |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
979 ]], [[ |
1065 | 980 struct rlimit r; |
981 getrlimit(RLIMIT_NPROC, &r); | |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
982 ]])],[ |
1065 | 983 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
|
984 ],[]) |
1065 | 985 |
528
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
986 dnl * Linux compatible mremap() |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
987 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
|
988 AC_TRY_LINK([ |
224 | 989 #include <unistd.h> |
990 #define __USE_GNU | |
991 #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
|
992 ], [ |
3a1be480d16a
buggy checks. we were supposed to compile them, not run. plus fixes for
Timo Sirainen <tss@iki.fi>
parents:
528
diff
changeset
|
993 mremap(0, 0, 0, MREMAP_MAYMOVE); |
224 | 994 ], [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
995 AC_DEFINE(HAVE_LINUX_MREMAP,, Define if you have Linux-compatible mremap()) |
224 | 996 AC_MSG_RESULT(yes) |
997 ], [ | |
998 AC_MSG_RESULT(no) | |
999 ]) | |
1000 | |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1001 dnl * If mmap() plays nicely with write() |
1924
4dbe61f1aea6
Put -lcrypt to first in AUTH_LIBS to fix some linking problems with Solaris
Timo Sirainen <tss@iki.fi>
parents:
1915
diff
changeset
|
1002 AC_MSG_CHECKING([whether shared mmaps get updated by write()s]) |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1003 AC_TRY_RUN([ |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1004 #include <stdio.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1005 #include <sys/types.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1006 #include <sys/stat.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1007 #include <unistd.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1008 #include <fcntl.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1009 #include <sys/mman.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1010 int main() { |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1011 /* return 0 if we're signed */ |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1012 int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1013 void *mem; |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1014 if (f == -1) { |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1015 perror("open()"); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1016 return 1; |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1017 } |
1623 | 1018 unlink("conftest.mmap"); |
1019 | |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1020 write(f, "1", 2); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1021 mem = mmap(NULL, 2, PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1022 if (mem == MAP_FAILED) { |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1023 perror("mmap()"); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1024 return 1; |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1025 } |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1026 strcpy(mem, "2"); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1027 msync(mem, 2, MS_SYNC); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1028 lseek(f, 0, SEEK_SET); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1029 write(f, "3", 2); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1030 |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1031 return strcmp(mem, "3") == 0 ? 0 : 1; |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1032 } |
1625 | 1033 ], [ |
1924
4dbe61f1aea6
Put -lcrypt to first in AUTH_LIBS to fix some linking problems with Solaris
Timo Sirainen <tss@iki.fi>
parents:
1915
diff
changeset
|
1034 AC_MSG_RESULT(yes) |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1035 ], [ |
1924
4dbe61f1aea6
Put -lcrypt to first in AUTH_LIBS to fix some linking problems with Solaris
Timo Sirainen <tss@iki.fi>
parents:
1915
diff
changeset
|
1036 AC_MSG_RESULT(no) |
4dbe61f1aea6
Put -lcrypt to first in AUTH_LIBS to fix some linking problems with Solaris
Timo Sirainen <tss@iki.fi>
parents:
1915
diff
changeset
|
1037 AC_DEFINE(MMAP_CONFLICTS_WRITE,, [Define if shared mmaps don't get updated by write()s]) |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1038 ]) |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1039 |
2349
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1040 dnl * see if fd passing works |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1041 AC_MSG_CHECKING([whether fd passing works]) |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1042 for i in 1 2; do |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1043 old_cflags="$CFLAGS" |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1044 CFLAGS="$CFLAGS -I$srcdir/src/lib $srcdir/src/lib/fdpass.c" |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1045 if test $i = 2; then |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1046 CFLAGS="$CFLAGS -DBUGGY_CMSG_MACROS" |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1047 fi |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1048 |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1049 AC_TRY_RUN([ |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1050 #include <sys/types.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1051 #include <sys/socket.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1052 #include <sys/wait.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1053 #include <sys/stat.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1054 #include <unistd.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1055 #include <fcntl.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1056 #include "fdpass.h" |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1057 |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1058 int main(void) |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1059 { |
3236
f6eb50f0d2c0
oops, broke fd pass check completely
Timo Sirainen <tss@iki.fi>
parents:
3235
diff
changeset
|
1060 int fd[2], send_fd, recv_fd, status; |
2349
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1061 struct stat st, st2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1062 char data; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1063 |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1064 send_fd = open("conftest.fdpass", O_CREAT|O_WRONLY); |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1065 if (send_fd == -1) return 2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1066 unlink("conftest.fdpass"); |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1067 if (fstat(send_fd, &st) < 0) return 2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1068 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) return 2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1069 |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1070 switch (fork()) { |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1071 case -1: |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1072 return 2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1073 case 0: |
3235
d20aee22af6a
Make sure "whether fd passing works" check doesn't get stuck (HP-UX fix).
Timo Sirainen <tss@iki.fi>
parents:
3206
diff
changeset
|
1074 alarm(1); |
2349
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1075 if (fd_send(fd[0], send_fd, &data, 1) != 1) return 2; |
3235
d20aee22af6a
Make sure "whether fd passing works" check doesn't get stuck (HP-UX fix).
Timo Sirainen <tss@iki.fi>
parents:
3206
diff
changeset
|
1076 return 0; |
2349
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1077 default: |
3235
d20aee22af6a
Make sure "whether fd passing works" check doesn't get stuck (HP-UX fix).
Timo Sirainen <tss@iki.fi>
parents:
3206
diff
changeset
|
1078 alarm(2); |
d20aee22af6a
Make sure "whether fd passing works" check doesn't get stuck (HP-UX fix).
Timo Sirainen <tss@iki.fi>
parents:
3206
diff
changeset
|
1079 if (wait(&status) == -1) |
d20aee22af6a
Make sure "whether fd passing works" check doesn't get stuck (HP-UX fix).
Timo Sirainen <tss@iki.fi>
parents:
3206
diff
changeset
|
1080 return 2; |
d20aee22af6a
Make sure "whether fd passing works" check doesn't get stuck (HP-UX fix).
Timo Sirainen <tss@iki.fi>
parents:
3206
diff
changeset
|
1081 if (status != 0) |
d20aee22af6a
Make sure "whether fd passing works" check doesn't get stuck (HP-UX fix).
Timo Sirainen <tss@iki.fi>
parents:
3206
diff
changeset
|
1082 return status; |
2349
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1083 if (fd_read(fd[1], &data, 1, &recv_fd) != 1) return 1; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1084 if (fstat(recv_fd, &st2) < 0) return 2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1085 return st.st_ino == st2.st_ino ? 0 : 1; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1086 } |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1087 } |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1088 ], [ |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1089 CFLAGS=$old_cflags |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1090 if test $i = 2; then |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1091 AC_DEFINE(BUGGY_CMSG_MACROS,, Define if you have buggy CMSG macros) |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1092 fi |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1093 AC_MSG_RESULT(yes) |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1094 break |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1095 ], [ |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1096 dnl no, try with BUGGY_CMSG_MACROS |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1097 CFLAGS=$old_cflags |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1098 if test $i = 2; then |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1099 AC_MSG_RESULT(no) |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1100 fi |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1101 ]) |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
1102 done |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
1103 |
2035
0e65efd14eda
Solaris: Move from sendfilev() to sendfile() (was it always there?). Make
Timo Sirainen <tss@iki.fi>
parents:
2028
diff
changeset
|
1104 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
|
1105 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
|
1106 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
|
1107 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
|
1108 ], [ |
981
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
1109 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
|
1110 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
|
1111 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
|
1112 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
|
1113 #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
|
1114 #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
|
1115 #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
|
1116 #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
|
1117 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
1118 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
|
1119 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
1120 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
|
1121 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
|
1122 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
1123 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
|
1124 ]) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
1125 |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
1126 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
|
1127 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
|
1128 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
|
1129 #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
|
1130 #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
|
1131 #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
|
1132 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
1133 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
|
1134 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
|
1135 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
1136 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
|
1137 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
|
1138 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
1139 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
|
1140 ]) |
976
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
1141 ]) |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
1142 |
3590
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1143 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
|
1144 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
|
1145 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
|
1146 AC_TRY_COMPILE([ |
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1147 #define _XOPEN_SOURCE 4 |
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1148 #define _XOPEN_SOURCE_EXTENDED 1 |
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1149 #define _XOPEN_VERSION 4 |
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1150 #define _XPG4_2 |
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1151 #define _XPG6 |
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1152 #include <unistd.h> |
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1153 ], [ |
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1154 crypt("a", "b"); |
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1155 ], [ |
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1156 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
|
1157 AC_MSG_RESULT(yes) |
f1b407e8debb
And more changes to get _XPG6 stuff working right
Timo Sirainen <tss@iki.fi>
parents:
3590
diff
changeset
|
1158 ], [ |
f1b407e8debb
And more changes to get _XPG6 stuff working right
Timo Sirainen <tss@iki.fi>
parents:
3590
diff
changeset
|
1159 AC_MSG_RESULT(no) |
3590
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1160 ]) |
340e1b87c27b
Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents:
3575
diff
changeset
|
1161 |
4736
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1162 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
|
1163 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
|
1164 AC_TRY_COMPILE([ |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1165 #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
|
1166 #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
|
1167 ], [ |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1168 struct statvfs buf; |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1169 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
|
1170 |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1171 statvfs(".", &buf); |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1172 ], [ |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1173 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
|
1174 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
|
1175 ], [ |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1176 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
|
1177 ]) |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1178 |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1179 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
|
1180 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
|
1181 AC_TRY_COMPILE([ |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1182 #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
|
1183 #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
|
1184 ], [ |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1185 struct statvfs buf; |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1186 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
|
1187 |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1188 statvfs(".", &buf); |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1189 ], [ |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1190 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
|
1191 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
|
1192 ], [ |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1193 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
|
1194 ]) |
6789961fe02e
Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents:
4645
diff
changeset
|
1195 |
3745
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1196 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
|
1197 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
|
1198 AC_TRY_COMPILE([ |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1199 #include <sys/param.h> |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1200 #include <sys/mount.h> |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1201 ], [ |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1202 struct statfs buf; |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1203 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
|
1204 |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1205 statfs(".", &buf); |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1206 ], [ |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1207 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
|
1208 AC_MSG_RESULT(yes) |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1209 ], [ |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1210 AC_MSG_RESULT(no) |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1211 ]) |
840cc63e439b
Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents:
3744
diff
changeset
|
1212 |
4552
ef71b2fdd433
Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents:
4551
diff
changeset
|
1213 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
|
1214 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
|
1215 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
|
1216 #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
|
1217 #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
|
1218 ], [ |
ef71b2fdd433
Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents:
4551
diff
changeset
|
1219 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
|
1220 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
|
1221 ], [ |
ef71b2fdd433
Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents:
4551
diff
changeset
|
1222 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
|
1223 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
|
1224 ], [ |
ef71b2fdd433
Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents:
4551
diff
changeset
|
1225 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
|
1226 ]) |
ef71b2fdd433
Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents:
4551
diff
changeset
|
1227 |
ef71b2fdd433
Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents:
4551
diff
changeset
|
1228 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
|
1229 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
|
1230 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
|
1231 #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
|
1232 #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
|
1233 ], [ |
ef71b2fdd433
Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents:
4551
diff
changeset
|
1234 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
|
1235 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
|
1236 ], [ |
ef71b2fdd433
Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents:
4551
diff
changeset
|
1237 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
|
1238 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
|
1239 ], [ |
ef71b2fdd433
Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents:
4551
diff
changeset
|
1240 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
|
1241 ]) |
ef71b2fdd433
Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents:
4551
diff
changeset
|
1242 |
4063
f60237ad2edd
Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents:
4057
diff
changeset
|
1243 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
|
1244 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
|
1245 AC_TRY_COMPILE([ |
4065
a3090ba7429c
One more Q_QUOTACTL check fix..
Timo Sirainen <tss@iki.fi>
parents:
4064
diff
changeset
|
1246 #include <sys/types.h> |
4063
f60237ad2edd
Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents:
4057
diff
changeset
|
1247 #include <sys/fs/ufs_quota.h> |
f60237ad2edd
Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents:
4057
diff
changeset
|
1248 ], [ |
4064 | 1249 struct quotctl ctl; |
4063
f60237ad2edd
Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents:
4057
diff
changeset
|
1250 ioctl(0, Q_QUOTACTL, &ctl); |
f60237ad2edd
Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents:
4057
diff
changeset
|
1251 ], [ |
f60237ad2edd
Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents:
4057
diff
changeset
|
1252 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
|
1253 AC_MSG_RESULT(yes) |
f60237ad2edd
Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents:
4057
diff
changeset
|
1254 ], [ |
f60237ad2edd
Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents:
4057
diff
changeset
|
1255 AC_MSG_RESULT(no) |
f60237ad2edd
Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents:
4057
diff
changeset
|
1256 ]) |
f60237ad2edd
Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents:
4057
diff
changeset
|
1257 |
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
|
1258 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
|
1259 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
|
1260 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
|
1261 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
1262 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
|
1263 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
|
1264 #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
|
1265 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
|
1266 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
|
1267 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
|
1268 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
|
1269 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
|
1270 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
|
1271 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
|
1272 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
1273 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
|
1274 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
|
1275 return 0; |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1276 }]])], |
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
|
1277 [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
|
1278 [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
|
1279 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
1280 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
|
1281 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
|
1282 #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
|
1283 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
|
1284 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
|
1285 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
|
1286 __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
|
1287 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
|
1288 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
|
1289 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
|
1290 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
1291 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
|
1292 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
|
1293 return 0; |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1294 }]])], |
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
|
1295 [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
|
1296 [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
|
1297 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
1298 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
1299 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
|
1300 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
|
1301 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
|
1302 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
|
1303 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
|
1304 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
|
1305 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
1306 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
|
1307 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
|
1308 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
|
1309 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
1310 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
|
1311 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
|
1312 #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
|
1313 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
|
1314 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
|
1315 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
|
1316 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
|
1317 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
|
1318 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
|
1319 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
|
1320 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
1321 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
|
1322 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
|
1323 return 0; |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1324 }]])], |
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
|
1325 [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
|
1326 [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
|
1327 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
1328 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
1329 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
|
1330 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
|
1331 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
|
1332 |
0 | 1333 dnl ** |
622 | 1334 dnl ** SSL |
0 | 1335 dnl ** |
1336 | |
623 | 1337 have_ssl=no |
1338 | |
1611
fcc5d6bb6244
test -o and -a are apparently non-POSIX. not using.
Timo Sirainen <tss@iki.fi>
parents:
1609
diff
changeset
|
1339 if test "$want_openssl" = "yes" && 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
|
1340 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
|
1341 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
|
1342 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
|
1343 have_openssl=yes |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
1344 else |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
1345 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
|
1346 AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h, [ |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
1347 SSL_LIBS="-lssl -lcrypto" |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
1348 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
|
1349 have_openssl=yes |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
1350 ]) |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
1351 ],, -lcrypto) |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
1352 fi |
1566 | 1353 if test "$have_openssl" = "yes"; then |
1354 AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support) | |
1355 have_ssl="yes (OpenSSL)" | |
1356 fi | |
622 | 1357 fi |
1358 | |
1990 | 1359 if test $want_gnutls = yes && test "$have_ssl" = no; then |
1948 | 1360 AC_CHECK_LIB(gnutls, gnutls_global_init, [ |
1361 AC_CHECK_HEADERS(gnutls/gnutls.h, [ | |
1362 AC_DEFINE(HAVE_GNUTLS,, Build with GNUTLS support) | |
1363 SSL_LIBS="-lgnutls -lgcrypt" | |
1364 AC_SUBST(SSL_LIBS) | |
1365 have_ssl="yes (GNUTLS)" | |
1366 have_gnutls=yes | |
1367 ]) | |
1368 ],, -lgcrypt) | |
1369 fi | |
1370 | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
1371 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
|
1372 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
|
1373 fi |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
1374 |
0 | 1375 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
|
1376 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
|
1377 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
|
1378 |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
1379 if test "$want_gc" = "yes"; then |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
1380 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
|
1381 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
|
1382 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
|
1383 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
|
1384 ], [ |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
1385 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
|
1386 ]) |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
1387 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
|
1388 |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
1389 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
|
1390 dnl ** userdb and passdb checks |
0 | 1391 dnl ** |
1392 | |
1393 need_crypt=no | |
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
|
1394 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
|
1395 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
|
1396 |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
1397 if test $want_static_userdb = yes; 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
|
1398 need_crypt=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
|
1399 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
|
1400 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
|
1401 fi |
0 | 1402 |
3667
b7569a6a4ada
Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents:
3600
diff
changeset
|
1403 if test $want_prefetch_userdb = yes; then |
b7569a6a4ada
Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents:
3600
diff
changeset
|
1404 AC_DEFINE(USERDB_PREFETCH,, Build with prefetch userdb support) |
b7569a6a4ada
Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents:
3600
diff
changeset
|
1405 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
|
1406 fi |
5e2e4cdbfe2e
Added "passdb" userdb. It works only if passdb gives all the information
Timo Sirainen <tss@iki.fi>
parents:
3004
diff
changeset
|
1407 |
0 | 1408 if test $want_passwd = yes; then |
1409 need_crypt=yes | |
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
|
1410 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
|
1411 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
|
1412 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
|
1413 passdb="$passdb passwd" |
0 | 1414 fi |
1415 | |
1416 if test $want_passwd_file = yes; then | |
1417 need_crypt=yes | |
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
|
1418 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
|
1419 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
|
1420 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
|
1421 passdb="$passdb passwd-file" |
0 | 1422 fi |
1423 | |
1424 if test $want_shadow = yes; then | |
1425 AC_CHECK_FUNC(getspnam, [ | |
1089
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
1426 AC_CHECK_HEADER(shadow.h, [ |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
1427 need_crypt=yes |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
1428 AC_DEFINE(PASSDB_SHADOW,, Build with shadow support) |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
1429 passdb="$passdb shadow" |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
1430 ]) |
0 | 1431 ]) |
1432 fi | |
1433 | |
1434 if test $want_pam = yes; then | |
1435 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
|
1436 have_pam=no |
0 | 1437 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
|
1438 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
|
1439 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
|
1440 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
|
1441 ]) |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
1442 |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
1443 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
|
1444 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
|
1445 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
|
1446 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
|
1447 ]) |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
1448 |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
1449 if test "$have_pam" = "yes"; then |
1284 | 1450 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
|
1451 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
|
1452 passdb="$passdb pam" |
547
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
1453 |
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
1454 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
|
1455 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
|
1456 Define if you have pam_setcred()) |
547
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
1457 ]) |
706
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
1458 fi |
0 | 1459 ]) |
1460 fi | |
1461 | |
2162
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
1462 if test $want_checkpassword = yes; then |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
1463 AC_DEFINE(USERDB_CHECKPASSWORD,, Build with checkpassword userdb support) |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
1464 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
|
1465 userdb="$userdb checkpassword" |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
1466 passdb="$passdb checkpassword" |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
1467 fi |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
1468 |
1851
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1469 if test $want_bsdauth = yes; then |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1470 AC_CHECK_FUNC(auth_userokay, [ |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1471 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
|
1472 passdb="$passdb bsdauth" |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1473 ]) |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1474 fi |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1475 |
3683
28cca6317829
Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents:
3671
diff
changeset
|
1476 have_gssapi=no |
28cca6317829
Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents:
3671
diff
changeset
|
1477 if test $want_gssapi = yes; then |
28cca6317829
Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents:
3671
diff
changeset
|
1478 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
|
1479 if test $KRB5CONFIG = YES; then |
3705
561e81dfa20b
MIT kerberos v1.2 (and older) doesn't work with us.
Timo Sirainen <tss@iki.fi>
parents:
3686
diff
changeset
|
1480 # we have a kludgy check here to check that we have |
561e81dfa20b
MIT kerberos v1.2 (and older) doesn't work with us.
Timo Sirainen <tss@iki.fi>
parents:
3686
diff
changeset
|
1481 # version >= v1.3. Although this doesn't work right with |
561e81dfa20b
MIT kerberos v1.2 (and older) doesn't work with us.
Timo Sirainen <tss@iki.fi>
parents:
3686
diff
changeset
|
1482 # non-MIT kerberos versioning.. |
561e81dfa20b
MIT kerberos v1.2 (and older) doesn't work with us.
Timo Sirainen <tss@iki.fi>
parents:
3686
diff
changeset
|
1483 if `krb5-config --version|grep -qv '1\.2'`; then |
561e81dfa20b
MIT kerberos v1.2 (and older) doesn't work with us.
Timo Sirainen <tss@iki.fi>
parents:
3686
diff
changeset
|
1484 AUTH_LIBS="$AUTH_LIBS `krb5-config --libs gssapi`" |
561e81dfa20b
MIT kerberos v1.2 (and older) doesn't work with us.
Timo Sirainen <tss@iki.fi>
parents:
3686
diff
changeset
|
1485 AUTH_CFLAGS="$AUTH_CFLAGS `krb5-config --cflags gssapi`" |
3780
0128534525d8
Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents:
3779
diff
changeset
|
1486 |
0128534525d8
Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents:
3779
diff
changeset
|
1487 # 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
|
1488 # have gssapi.h |
0128534525d8
Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents:
3779
diff
changeset
|
1489 old_CFLAGS=$CFLAGS |
0128534525d8
Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents:
3779
diff
changeset
|
1490 CFLAGS="$CFLAGS `krb5-config --cflags gssapi`" |
0128534525d8
Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents:
3779
diff
changeset
|
1491 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
|
1492 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
|
1493 have_gssapi=yes |
0128534525d8
Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents:
3779
diff
changeset
|
1494 ]) |
4862
bddfbc560857
Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents:
4855
diff
changeset
|
1495 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
|
1496 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
|
1497 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
|
1498 ]) |
bddfbc560857
Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents:
4855
diff
changeset
|
1499 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
|
1500 AC_DEFINE(HAVE_GSSAPI,, Build with GSSAPI support) |
bddfbc560857
Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents:
4855
diff
changeset
|
1501 fi |
3780
0128534525d8
Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents:
3779
diff
changeset
|
1502 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
|
1503 fi |
3683
28cca6317829
Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents:
3671
diff
changeset
|
1504 fi |
28cca6317829
Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents:
3671
diff
changeset
|
1505 fi |
28cca6317829
Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents:
3671
diff
changeset
|
1506 |
4638
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
1507 if test $want_sia = yes; then |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
1508 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
|
1509 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
|
1510 passdb="$passdb sia" |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
1511 AUTH_LIBS="$AUTH_LIBS -depth_ring_search" |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
1512 ]) |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
1513 fi |
689a02ca02d3
Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents:
4621
diff
changeset
|
1514 |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1515 if test $want_ldap = yes; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1516 AC_CHECK_LIB(ldap, ldap_init, [ |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1517 AC_CHECK_HEADER(ldap.h, [ |
2325
7613e0f68513
Fixed to compile with Solaris LDAP library
Timo Sirainen <tss@iki.fi>
parents:
2222
diff
changeset
|
1518 AC_CHECK_LIB(ldap, ldap_initialize, [ |
7613e0f68513
Fixed to compile with Solaris LDAP library
Timo Sirainen <tss@iki.fi>
parents:
2222
diff
changeset
|
1519 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
|
1520 ]) |
4415
b91816cd1d16
Added TLS support for LDAP if the library supports it.
Timo Sirainen <tss@iki.fi>
parents:
4411
diff
changeset
|
1521 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
|
1522 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
|
1523 ]) |
1284 | 1524 AUTH_LIBS="$AUTH_LIBS -lldap" |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1525 |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1526 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
|
1527 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
|
1528 userdb="$userdb ldap" |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1529 passdb="$passdb ldap" |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1530 ]) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1531 ]) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1532 fi |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1533 |
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
|
1534 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
|
1535 |
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
|
1536 if test $want_db = yes; then |
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
|
1537 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
|
1538 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
|
1539 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
|
1540 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
|
1541 #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
|
1542 ], [ |
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
|
1543 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
|
1544 ], [ |
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
|
1545 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
|
1546 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
|
1547 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
|
1548 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
|
1549 AC_DEFINE(BUILD_DB,, Build with Berkeley DB support) |
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
|
1550 ]) |
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
|
1551 ], [ |
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
|
1552 AC_MSG_RESULT(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
|
1553 ]) |
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
|
1554 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
|
1555 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
|
1556 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1557 if test $want_pgsql = yes; then |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1558 # based on code from PHP |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1559 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
|
1560 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
|
1561 if test -r "$i/$j/libpq-fe.h"; then |
1286 | 1562 PGSQL_INCLUDE=$i/$j |
1563 fi | |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1564 done |
4142
08aef9a8e22c
Added lib64 directory to mysql/pgsql checks. Removed all special lib/include
Timo Sirainen <tss@iki.fi>
parents:
4141
diff
changeset
|
1565 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
|
1566 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
|
1567 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
|
1568 PGSQL_LIBDIR=$i/$j |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1569 fi |
4142
08aef9a8e22c
Added lib64 directory to mysql/pgsql checks. Removed all special lib/include
Timo Sirainen <tss@iki.fi>
parents:
4141
diff
changeset
|
1570 done |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1571 done |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1572 done |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1573 |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1574 old_LIBS=$LIBS |
1287 | 1575 if test "$PGSQL_LIBDIR" != ""; then |
1576 LIBS="$LIBS -L$PGSQL_LIBDIR" | |
1577 fi | |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1578 |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1579 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
|
1580 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
|
1581 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
|
1582 ]) |
1287 | 1583 old_CPPFLAGS=$CPPFLAGS |
1584 if test "$PGSQL_INCLUDE" != ""; then | |
1585 CPPFLAGS="$CPPFLAGS -I $PGSQL_INCLUDE" | |
1586 fi | |
1587 AC_CHECK_HEADER(libpq-fe.h, [ | |
1588 if test "$PGSQL_INCLUDE" != ""; then | |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1589 SQL_CFLAGS="$SQL_CFLAGS -I$PGSQL_INCLUDE" |
1287 | 1590 fi |
1591 if test "$PGSQL_LIBDIR" != ""; then | |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1592 SQL_LIBS="$SQL_LIBS -L$PGSQL_LIBDIR" |
1287 | 1593 fi |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1594 SQL_LIBS="$SQL_LIBS -lpq" |
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1595 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
|
1596 found_sql_drivers="$found_sql_drivers pgsql" |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1597 |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1598 if test "$all_sql_drivers" = "yes"; then |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1599 sql_drivers="$sql_drivers pgsql" |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1600 fi |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1601 ]) |
1287 | 1602 CPPFLAGS=$old_CPPFLAGS |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1603 ]) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1604 LIBS=$old_LIBS |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1605 fi |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1606 |
1995
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
1607 if test $want_mysql = yes; then |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1608 # based on code from PHP |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1609 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
|
1610 for j in include include/mysql ""; do |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1611 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
|
1612 MYSQL_INCLUDE=$i/$j |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1613 fi |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1614 done |
4142
08aef9a8e22c
Added lib64 directory to mysql/pgsql checks. Removed all special lib/include
Timo Sirainen <tss@iki.fi>
parents:
4141
diff
changeset
|
1615 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
|
1616 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
|
1617 MYSQL_LIBDIR=$i/$j |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1618 fi |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1619 done |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1620 done |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1621 |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1622 old_LIBS=$LIBS |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1623 if test "$MYSQL_LIBDIR" != ""; then |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1624 LIBS="$LIBS -L$MYSQL_LIBDIR" |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1625 fi |
1995
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
1626 |
2416
e6594431ee4f
If -lmysqlclient doesn't automatically link with zlib, do it manually.
Timo Sirainen <tss@iki.fi>
parents:
2403
diff
changeset
|
1627 mysql_lib="" |
4159
22bc42a33b79
And add -lm also to LIBS when checking if -lmysqlclient works..
Timo Sirainen <tss@iki.fi>
parents:
4158
diff
changeset
|
1628 LIBS="$LIBS -lz -lm" |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1629 AC_CHECK_LIB(mysqlclient, mysql_init, [ |
4158 | 1630 mysql_lib="-lmysqlclient -lz -lm" |
2416
e6594431ee4f
If -lmysqlclient doesn't automatically link with zlib, do it manually.
Timo Sirainen <tss@iki.fi>
parents:
2403
diff
changeset
|
1631 ]) |
e6594431ee4f
If -lmysqlclient doesn't automatically link with zlib, do it manually.
Timo Sirainen <tss@iki.fi>
parents:
2403
diff
changeset
|
1632 |
e6594431ee4f
If -lmysqlclient doesn't automatically link with zlib, do it manually.
Timo Sirainen <tss@iki.fi>
parents:
2403
diff
changeset
|
1633 if test "$mysql_lib" != ""; then |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1634 old_CPPFLAGS=$CPPFLAGS |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1635 if test "$MYSQL_INCLUDE" != ""; then |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1636 CPPFLAGS="$CPPFLAGS -I $MYSQL_INCLUDE" |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1637 fi |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1638 AC_CHECK_HEADER(mysql.h, [ |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1639 if test "$MYSQL_INCLUDE" != ""; then |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1640 SQL_CFLAGS="$SQL_CFLAGS -I$MYSQL_INCLUDE" |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1641 fi |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1642 if test "$MYSQL_LIBDIR" != ""; then |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1643 SQL_LIBS="$SQL_LIBS -L$MYSQL_LIBDIR" |
2369 | 1644 fi |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1645 SQL_LIBS="$SQL_LIBS $mysql_lib" |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1646 |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1647 AC_CHECK_LIB(mysqlclient, mysql_ssl_set, [ |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1648 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
|
1649 if test "x$have_openssl" = "yes"; then |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1650 ssl_define="#define HAVE_OPENSSL" |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1651 else |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1652 ssl_define="" |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1653 fi |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1654 AC_TRY_COMPILE([ |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1655 $ssl_define |
2403 | 1656 #include <mysql.h> |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1657 ], [ |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1658 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
|
1659 ], [ |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1660 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
|
1661 ]) |
2369 | 1662 ]) |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1663 |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1664 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
|
1665 found_sql_drivers="$found_sql_drivers mysql" |
2369 | 1666 ]) |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1667 CPPFLAGS=$old_CPPFLAGS |
2416
e6594431ee4f
If -lmysqlclient doesn't automatically link with zlib, do it manually.
Timo Sirainen <tss@iki.fi>
parents:
2403
diff
changeset
|
1668 fi |
1995
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
1669 |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1670 LIBS=$old_LIBS |
1995
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
1671 fi |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
1672 |
3919
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
1673 if test $want_sqlite = yes; then |
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
1674 AC_CHECK_LIB(sqlite3, sqlite3_open, [ |
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
1675 AC_CHECK_HEADER(sqlite3.h, [ |
4142
08aef9a8e22c
Added lib64 directory to mysql/pgsql checks. Removed all special lib/include
Timo Sirainen <tss@iki.fi>
parents:
4141
diff
changeset
|
1676 SQL_LIBS="$SQL_LIBS -lsqlite3 -lz" |
3919
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
1677 |
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
1678 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
|
1679 found_sql_drivers="$found_sql_drivers sqlite" |
3919
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
1680 ]) |
4144 | 1681 ]) |
3919
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
1682 fi |
b967ffb7e3a6
SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents:
3904
diff
changeset
|
1683 |
4013
bf0357107349
Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents:
4012
diff
changeset
|
1684 if test "$found_sql_drivers" != "" -o "$want_sql" = "yes"; then |
3943
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1685 if test "$all_sql_drivers" = "yes"; then |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1686 sql_drivers="$found_sql_drivers" |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1687 fi |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1688 |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1689 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
|
1690 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
|
1691 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
|
1692 passdb="$passdb sql" |
3943
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1693 userdb="$userdb sql" |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1694 fi |
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1695 |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1696 if test $want_vpopmail = yes; then |
281 | 1697 vpop_libdeps="$vpopmail_home/etc/lib_deps" |
1698 | |
1699 AC_MSG_CHECKING([for vpopmail configuration at $vpop_libdeps]) | |
1700 if test -f $vpop_libdeps; then | |
283 | 1701 need_crypt=yes |
1284 | 1702 AUTH_CFLAGS="$AUTH_CFLAGS `cat $vpopmail_home/etc/inc_deps` $CFLAGS" |
1703 AUTH_LIBS="$AUTH_LIBS `cat $vpop_libdeps`" | |
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
|
1704 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
|
1705 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
|
1706 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
|
1707 passdb="$passdb vpopmail" |
281 | 1708 AC_MSG_RESULT(found) |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1709 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1710 want_vpopmail=no |
281 | 1711 AC_MSG_RESULT(not found) |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1712 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1713 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1714 |
0 | 1715 if test $need_crypt = yes; then |
1716 AC_CHECK_LIB(crypt, crypt, [ | |
1924
4dbe61f1aea6
Put -lcrypt to first in AUTH_LIBS to fix some linking problems with Solaris
Timo Sirainen <tss@iki.fi>
parents:
1915
diff
changeset
|
1717 AUTH_LIBS="-lcrypt $AUTH_LIBS" |
0 | 1718 ], [ |
1719 AC_CHECK_FUNC(crypt,, [ | |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1720 AC_MSG_ERROR([crypt() wasn't found]) |
0 | 1721 ]) |
1722 ]) | |
1723 fi | |
1724 | |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1725 dnl * dynamic modules? |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1726 have_modules=no |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
1727 AC_CHECK_FUNC(dlopen, [ |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1728 have_modules=yes |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
1729 MODULE_LIBS="-export-dynamic" |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1730 ], [ |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
1731 AC_CHECK_LIB(dl, dlopen, [ |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1732 have_modules=yes |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
1733 MODULE_LIBS="-export-dynamic -ldl" |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1734 ]) |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1735 ]) |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1736 |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1737 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
|
1738 AC_DEFINE(HAVE_MODULES,, Define if you have dynamic module support) |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1739 userdb="$userdb (modules)" |
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1740 passdb="$passdb (modules)" |
1465
03dd87873a81
Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents:
1462
diff
changeset
|
1741 |
03dd87873a81
Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents:
1462
diff
changeset
|
1742 AC_SUBST(MODULE_LIBS) |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1743 fi |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1744 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1745 AC_SUBST(AUTH_CFLAGS) |
1284 | 1746 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
|
1747 AC_SUBST(SQL_CFLAGS) |
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1748 AC_SUBST(SQL_LIBS) |
0 | 1749 |
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
|
1750 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
|
1751 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
|
1752 |
0 | 1753 dnl ** |
1754 dnl ** Index file compatibility flags | |
1755 dnl ** | |
1756 | |
1757 dnl * currently just checking for endianess | |
1758 | |
1759 AC_C_BIGENDIAN | |
1760 | |
1761 if test $ac_cv_c_bigendian = yes; then | |
1762 flags=0 | |
1763 else | |
1764 flags=1 | |
1765 fi | |
1766 | |
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_UNQUOTED(MAIL_INDEX_COMPAT_FLAGS, $flags, Index file compatibility flags) |
0 | 1768 |
1769 dnl ** | |
1770 dnl ** IPv6 support | |
1771 dnl ** | |
1772 | |
1773 if test "x$want_ipv6" = "xyes"; then | |
1774 AC_MSG_CHECKING([for IPv6]) | |
1775 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
|
1776 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
0 | 1777 #include <sys/types.h> |
1778 #include <sys/socket.h> | |
1779 #include <netinet/in.h> | |
1780 #include <netdb.h> | |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1781 #include <arpa/inet.h>]], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1782 [[struct in6_addr i;]])], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1783 [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
|
1784 [i_cv_type_in6_addr=no])]) |
0 | 1785 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
|
1786 AC_DEFINE(HAVE_IPV6,, Build with IPv6 support) |
0 | 1787 fi |
1788 AC_MSG_RESULT($i_cv_type_in6_addr) | |
1789 fi | |
1790 | |
1791 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
|
1792 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
|
1793 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
|
1794 |
3997 | 1795 maildir_libs='$(top_builddir)/src/lib-storage/index/maildir/libstorage_maildir.a' |
1796 mbox_libs='$(top_builddir)/src/lib-storage/index/mbox/libstorage_mbox.a' | |
1797 dbox_libs='$(top_builddir)/src/lib-storage/index/dbox/libstorage_dbox.a' | |
1798 index_libs='$(top_builddir)/src/lib-storage/index/libstorage_index.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
|
1799 |
4422
c46c02c7e602
Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents:
4415
diff
changeset
|
1800 deliver_storage="mbox" |
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
|
1801 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
|
1802 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
|
1803 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
|
1804 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
|
1805 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
|
1806 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
|
1807 done |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
1808 STORAGE_LIBS="$STORAGE_LIBS $index_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
|
1809 AC_SUBST(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
|
1810 |
4422
c46c02c7e602
Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents:
4415
diff
changeset
|
1811 if test -n "$deliver_storage" && test "$want_deliver" = yes; then |
c46c02c7e602
Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents:
4415
diff
changeset
|
1812 AC_ERROR([If you remove mbox from storages, you need to build --without-deliver]) |
c46c02c7e602
Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents:
4415
diff
changeset
|
1813 fi |
c46c02c7e602
Include linux/unistd.h instead of asm/unistd.h when checking for epoll.
Timo Sirainen <tss@iki.fi>
parents:
4415
diff
changeset
|
1814 |
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
|
1815 dnl ** |
3943
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1816 dnl ** SQL drivers |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1817 dnl ** |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1818 |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1819 for driver in $sql_drivers; do |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1820 if test "$driver" = "pgsql"; then |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1821 AC_DEFINE(BUILD_PGSQL,, Built-in PostgreSQL support) |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1822 elif test "$driver" = "mysql"; then |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1823 AC_DEFINE(BUILD_MYSQL,, Built-in MySQL support) |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1824 elif test "$driver" = "sqlite"; then |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1825 AC_DEFINE(BUILD_SQLITE,, Built-in SQLite support) |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1826 fi |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1827 done |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1828 |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1829 AC_SUBST(sql_drivers) |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1830 |
cbe5c6772e0d
Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents:
3934
diff
changeset
|
1831 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
|
1832 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
|
1833 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
|
1834 |
884da753caba
If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents:
3948
diff
changeset
|
1835 have_zlib=no |
884da753caba
If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents:
3948
diff
changeset
|
1836 AC_CHECK_HEADER(zlib.h, [ |
884da753caba
If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents:
3948
diff
changeset
|
1837 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
|
1838 ]) |
884da753caba
If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents:
3948
diff
changeset
|
1839 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
|
1840 |
884da753caba
If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents:
3948
diff
changeset
|
1841 dnl ** |
0 | 1842 dnl ** capabilities |
1843 dnl ** | |
1844 | |
4923
c1965cbf5c87
Added THREAD=X-REFERENCES2 capability.
Timo Sirainen <tss@iki.fi>
parents:
4913
diff
changeset
|
1845 capability="IMAP4rev1 SASL-IR SORT THREAD=REFERENCES THREAD=X-REFERENCES2 MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS" |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
1846 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability", IMAP capabilities) |
0 | 1847 |
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
|
1848 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
|
1849 |
3782
c67f77647a6e
Added kqueue notification support. Patch by Vaclav Haisman
Timo Sirainen <tss@iki.fi>
parents:
3780
diff
changeset
|
1850 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
|
1851 AC_CONFIG_FILES([ |
0 | 1852 Makefile |
1853 doc/Makefile | |
1854 src/Makefile | |
1855 src/lib/Makefile | |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1856 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
|
1857 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
|
1858 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
|
1859 src/lib-dict/Makefile |
0 | 1860 src/lib-imap/Makefile |
1861 src/lib-index/Makefile | |
1862 src/lib-mail/Makefile | |
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
2369
diff
changeset
|
1863 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
|
1864 src/lib-otp/Makefile |
1058
3b8fb7bf7ecc
Moved settings parsing to lib-settings.
Timo Sirainen <tss@iki.fi>
parents:
1057
diff
changeset
|
1865 src/lib-settings/Makefile |
0 | 1866 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
|
1867 src/lib-storage/list/Makefile |
0 | 1868 src/lib-storage/index/Makefile |
1869 src/lib-storage/index/maildir/Makefile | |
1870 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
|
1871 src/lib-storage/index/dbox/Makefile |
761
d3bd41a56309
First implementation of SORT extension. String comparing still not up to
Timo Sirainen <tss@iki.fi>
parents:
755
diff
changeset
|
1872 src/lib-storage/register/Makefile |
0 | 1873 src/auth/Makefile |
4349 | 1874 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
|
1875 src/dict/Makefile |
0 | 1876 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
|
1877 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
|
1878 src/login-common/Makefile |
0 | 1879 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
|
1880 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
|
1881 src/pop3-login/Makefile |
1694
0fae24674a9a
Separated rawlog into it's own binary.
Timo Sirainen <tss@iki.fi>
parents:
1669
diff
changeset
|
1882 src/util/Makefile |
3738
732b62dc1976
Added beginnings of plugin infrastructure. TODO: These could be optionally
Timo Sirainen <tss@iki.fi>
parents:
3737
diff
changeset
|
1883 src/plugins/Makefile |
4082 | 1884 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
|
1885 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
|
1886 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
|
1887 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
|
1888 src/plugins/fts-lucene/Makefile |
4855
5bc593f1a8f6
Added "squat" full text search indexer backend. Its name and basic ideas
Timo Sirainen <tss@iki.fi>
parents:
4840
diff
changeset
|
1889 src/plugins/fts-squat/Makefile |
4913
dea1c8fa53f4
Added lazy expunge plugin.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4862
diff
changeset
|
1890 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
|
1891 src/plugins/mail-log/Makefile |
3738
732b62dc1976
Added beginnings of plugin infrastructure. TODO: These could be optionally
Timo Sirainen <tss@iki.fi>
parents:
3737
diff
changeset
|
1892 src/plugins/quota/Makefile |
732b62dc1976
Added beginnings of plugin infrastructure. TODO: These could be optionally
Timo Sirainen <tss@iki.fi>
parents:
3737
diff
changeset
|
1893 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
|
1894 src/plugins/trash/Makefile |
3800 | 1895 src/plugins/zlib/Makefile |
1418
c36d18766a35
0.99.9.1 released. Added redhat spec file.
Timo Sirainen <tss@iki.fi>
parents:
1410
diff
changeset
|
1896 stamp.h |
4343
407e6c620d70
dovecot-config now contains module_dir
Timo Sirainen <tss@iki.fi>
parents:
4300
diff
changeset
|
1897 dovecot-config.in]) |
1096
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1898 |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1899 AC_OUTPUT |
1096
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1900 |
0 | 1901 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
|
1902 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
|
1903 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
|
1904 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
|
1905 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
|
1906 echo "Building with SSL support ........... : $have_ssl" |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
1907 echo "Building with IPv6 support .......... : $want_ipv6" |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1908 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
|
1909 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
|
1910 echo "Building with GSSAPI support ........ : $have_gssapi" |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1911 echo "Building with user database modules . :$userdb" |
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1912 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
|
1913 echo "Building with SQL drivers ............:$sql_drivers" |
4258
bd93316b078b
Note about this being unstable CVS branch
Timo Sirainen <tss@iki.fi>
parents:
4166
diff
changeset
|
1914 |
bd93316b078b
Note about this being unstable CVS branch
Timo Sirainen <tss@iki.fi>
parents:
4166
diff
changeset
|
1915 echo |
bd93316b078b
Note about this being unstable CVS branch
Timo Sirainen <tss@iki.fi>
parents:
4166
diff
changeset
|
1916 echo "NOTE: This is the UNSTABLE development branch of Dovecot." |
bd93316b078b
Note about this being unstable CVS branch
Timo Sirainen <tss@iki.fi>
parents:
4166
diff
changeset
|
1917 echo "You may want to change into the stabilizing branch:" |
bd93316b078b
Note about this being unstable CVS branch
Timo Sirainen <tss@iki.fi>
parents:
4166
diff
changeset
|
1918 echo " cvs up -r branch_1_0" |