Mercurial > dovecot > original-hg > dovecot-1.2
annotate configure.in @ 3002:9f765960fca6 HEAD
If strtoull() isn't supported, fallback to strtouq(). If that's not found
either, use our own implementation.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 20 Dec 2004 06:39:47 +0200 |
parents | c0e2a38b7647 |
children | 60a172e62d11 |
rev | line source |
---|---|
3002
9f765960fca6
If strtoull() isn't supported, fallback to strtouq(). If that's not found
Timo Sirainen <tss@iki.fi>
parents:
2872
diff
changeset
|
1 AC_INIT(dovecot, 1.0-test59, [dovecot@dovecot.org]) |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
2 AC_CONFIG_SRCDIR([src]) |
0 | 3 |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
4 AC_CONFIG_HEADERS([config.h]) |
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 | |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
12 AC_HEADER_STDC |
0 | 13 AC_C_INLINE |
14 AM_PROG_LIBTOOL | |
1300 | 15 AM_ICONV |
0 | 16 |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
17 AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h \ |
2872
c0e2a38b7647
Check for libgen.h and if it's not found, use my_basename(). Also
Timo Sirainen <tss@iki.fi>
parents:
2796
diff
changeset
|
18 sys/uio.h sys/sysmacros.h sys/resource.h sys/select.h libgen.h) |
0 | 19 |
20 # check posix headers | |
21 AC_CHECK_HEADERS(sys/time.h) | |
22 | |
23 AC_ARG_ENABLE(ipv6, | |
426 | 24 [ --enable-ipv6 Enable IPv6 support (default)], |
0 | 25 if test x$enableval = xno; then |
26 want_ipv6=no | |
27 else | |
28 want_ipv6=yes | |
29 fi, | |
426 | 30 want_ipv6=yes) |
0 | 31 |
544
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
32 AC_ARG_ENABLE(debug, |
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
33 [ --enable-debug Enable some extra checks for debugging], |
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
34 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
|
35 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
|
36 fi) |
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
37 |
546
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
38 AC_ARG_ENABLE(asserts, |
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
39 [ --enable-asserts Enable asserts (default)], |
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
40 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
|
41 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
|
42 fi) |
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
43 |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
44 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
|
45 [ --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
|
46 (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
|
47 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
|
48 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
|
49 |
439
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
50 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
|
51 [ --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
|
52 mem_align=$withval, |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
53 mem_align=8) |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
54 |
2569
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
55 AC_ARG_WITH(ioloop, |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
56 [ --with-ioloop=IOLOOP Specify the I/O loop method to use], |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
57 ioloop=$withval, |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
58 ioloop=) |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
59 |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
60 AC_ARG_WITH(passwd, |
426 | 61 [ --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
|
62 if test x$withval = xno; then |
0 | 63 want_passwd=no |
64 else | |
65 want_passwd=yes | |
66 fi, | |
67 want_passwd=yes) | |
68 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
69 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
|
70 [ --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
|
71 if test x$withval = xno; then |
0 | 72 want_passwd_file=no |
73 else | |
74 want_passwd_file=yes | |
75 fi, | |
76 want_passwd_file=yes) | |
77 | |
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 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
|
79 [ --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
|
80 if test x$withval = xno; then |
0 | 81 want_shadow=no |
82 else | |
83 want_shadow=yes | |
84 fi, | |
85 want_shadow=yes) | |
86 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
87 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
|
88 [ --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
|
89 if test x$withval = xno; then |
0 | 90 want_pam=no |
91 else | |
92 want_pam=yes | |
93 fi, | |
94 want_pam=yes) | |
95 | |
2162
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
96 AC_ARG_WITH(checkpassword, |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
97 [ --with-checkpassword Build with checkpassword support (default)], |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
98 if test x$withval = xno; then |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
99 want_checkpassword=no |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
100 else |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
101 want_checkpassword=yes |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
102 fi, |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
103 want_checkpassword=yes) |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
104 |
1851
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
105 AC_ARG_WITH(bsdauth, |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
106 [ --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
|
107 if test x$withval = xno; then |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
108 want_bsdauth=no |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
109 else |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
110 want_bsdauth=yes |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
111 fi, |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
112 want_bsdauth=yes) |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
113 |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
114 AC_ARG_WITH(ldap, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
115 [ --with-ldap Build with LDAP support], |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
116 if test x$withval = xno; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
117 want_ldap=no |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
118 else |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
119 want_ldap=yes |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
120 fi, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
121 want_ldap=no) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
122 |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
123 AC_ARG_WITH(vpopmail, |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
124 [ --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
|
125 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
|
126 want_vpopmail=no |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
127 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
128 want_vpopmail=yes |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
129 fi, |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
130 want_vpopmail=yes) |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
131 |
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
|
132 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
|
133 [ --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
|
134 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
|
135 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
|
136 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
|
137 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
|
138 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
|
139 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
|
140 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
141 AC_ARG_WITH(pgsql, |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
142 [ --with-pgsql Build with PostgreSQL support], |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
143 if test x$withval = xno; then |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
144 want_pgsql=no |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
145 else |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
146 want_pgsql=yes |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
147 fi, |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
148 want_pgsql=no) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
149 |
1995
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
150 AC_ARG_WITH(mysql, |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
151 [ --with-mysql Build with MySQL support], |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
152 if test x$withval = xno; then |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
153 want_mysql=no |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
154 else |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
155 want_mysql=yes |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
156 fi, |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
157 want_mysql=no) |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
158 |
622 | 159 AC_ARG_WITH(ssl, |
160 [ --with-ssl=[gnutls|openssl] Build with GNUTLS (default) or OpenSSL], | |
245 | 161 if test x$withval = xno; then |
244 | 162 want_gnutls=no |
622 | 163 want_openssl=no |
164 elif test x$withval = xgnutls; then | |
165 want_gnutls=yes | |
166 want_openssl=no | |
167 elif test x$withval = xopenssl; then | |
168 want_gnutls=no | |
169 want_openssl=yes | |
244 | 170 else |
171 want_gnutls=yes | |
622 | 172 want_openssl=yes |
173 fi, [ | |
174 want_gnutls=yes | |
175 want_openssl=yes | |
176 ]) | |
244 | 177 |
657
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
178 AC_ARG_WITH(ssldir, |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
179 [ --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
|
180 ssldir="$withval", |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
181 ssldir=/etc/ssl |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
182 ) |
712
385f862a4005
--with-ssldir actually didn't do anything, and the default directory for
Timo Sirainen <tss@iki.fi>
parents:
711
diff
changeset
|
183 AC_SUBST(ssldir) |
657
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
184 |
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
|
185 AC_ARG_WITH(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
|
186 [ --with-gc Use Boehm garbage collector (currently broken)], |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
187 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
|
188 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
|
189 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
|
190 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
|
191 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
|
192 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
|
193 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
|
194 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
|
195 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
|
196 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
|
197 |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
198 AC_ARG_WITH(pop3d, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
199 [ --with-pop3d Build POP3 server (default)], |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
200 if test x$withval = xno; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
201 want_pop3d=no |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
202 else |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
203 want_pop3d=yes |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
204 fi, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
205 want_pop3d=yes) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
206 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
|
207 |
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
|
208 AC_ARG_WITH(storages, |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
209 [ --with-storages Build specified mail storage formats (maildir,mbox)], [ |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
210 mail_storages=`echo "$withval"|sed 's/,/ /g'` ], |
1978
6303ef092c5b
mbox code compiles again, but syncing is only partially implemented so
Timo Sirainen <tss@iki.fi>
parents:
1959
diff
changeset
|
211 mail_storages="maildir mbox") |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
212 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
|
213 |
2070
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
214 AC_ARG_WITH(moduledir, |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
215 [ --with-moduledir=DIR Base directory for dynamically loadable modules], |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
216 moduledir="$withval", |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
217 moduledir=$libdir/dovecot |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
218 ) |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
219 AC_SUBST(moduledir) |
0c8f884d1648
Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents:
2036
diff
changeset
|
220 |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
221 dnl * gcc specific options |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
222 if test "x$ac_cv_c_compiler_gnu" = "xyes"; then |
850 | 223 # -Wcast-qual -Wcast-align -Wconversion # too many warnings |
224 # -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
|
225 # -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings |
850 | 226 CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast" |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
227 fi |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
228 |
0 | 229 dnl ** |
230 dnl ** just some generic stuff... | |
231 dnl ** | |
232 | |
233 AC_CHECK_FUNC(socket, [], [ | |
234 AC_CHECK_LIB(socket, socket, [ | |
235 LIBS="$LIBS -lsocket" | |
236 ]) | |
237 ]) | |
238 | |
239 AC_CHECK_FUNC(inet_addr, [], [ | |
240 AC_CHECK_LIB(nsl, inet_addr, [ | |
241 LIBS="$LIBS -lnsl" | |
242 ]) | |
243 ]) | |
244 | |
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
|
245 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
|
246 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
|
247 ], [ |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
248 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
|
249 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
|
250 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
|
251 ]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
252 ]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
253 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
254 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
|
255 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
|
256 fi |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
257 |
0 | 258 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
|
259 AC_CHECK_FUNCS(fcntl flock lockf inet_aton sigaction getpagesize madvise \ |
1849 | 260 strcasecmp stricmp vsnprintf vsyslog writev pread \ |
3002
9f765960fca6
If strtoull() isn't supported, fallback to strtouq(). If that's not found
Timo Sirainen <tss@iki.fi>
parents:
2872
diff
changeset
|
261 setrlimit setproctitle seteuid setreuid strtoull strtouq) |
0 | 262 |
2569
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
263 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
|
264 have_ioloop=no |
0 | 265 |
2569
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
266 dnl we currently don't use epoll automatically because it fails at runtime |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
267 dnl if we're not running 2.6 kernel |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
268 if test "$ioloop" = "epoll"; then |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
269 AC_CHECK_FUNC(epoll_create, [ |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
270 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
|
271 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
|
272 ], [ |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
273 ioloop="" |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
274 ]) |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
275 fi |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
276 |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
277 if test "$ioloop" = "" || test "$ioloop" = "poll"; then |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
278 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
|
279 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
|
280 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
|
281 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
|
282 ]) |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
283 fi |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
284 |
554f1324a435
Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2538
diff
changeset
|
285 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
|
286 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
|
287 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
|
288 fi |
0 | 289 |
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
|
290 dnl * dnotify? |
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
|
291 AC_TRY_COMPILE([ |
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
|
292 #define _GNU_SOURCE |
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
|
293 #include <fcntl.h> |
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
|
294 #include <signal.h> |
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
|
295 #include <unistd.h> |
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
|
296 ], [ |
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
|
297 fcntl(0, F_SETSIG, SIGRTMIN); |
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
|
298 fcntl(0, F_NOTIFY, DN_CREATE | DN_DELETE | DN_RENAME | DN_MULTISHOT); |
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
|
299 ], [ |
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
|
300 AC_DEFINE(IOLOOP_NOTIFY_DNOTIFY,, Use Linux dnotify) |
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
|
301 ], [ |
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
|
302 AC_DEFINE(IOLOOP_NOTIFY_NONE,, No special notify support) |
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
|
303 ]) |
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
|
304 |
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
|
305 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
|
306 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
|
307 #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
|
308 #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
|
309 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
|
310 #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
|
311 ],,, [ |
a2b009c65e02
Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents:
1978
diff
changeset
|
312 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
|
313 ]) |
a2b009c65e02
Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents:
1978
diff
changeset
|
314 |
0 | 315 dnl * OS specific options |
316 case "$host_os" in | |
317 hpux*) | |
318 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" | |
319 ;; | |
320 *) | |
321 ;; | |
322 esac | |
323 | |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
324 AC_CHECK_SIZEOF(int) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
325 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
|
326 AC_CHECK_SIZEOF(void *) |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
327 AC_CHECK_SIZEOF(long long) |
185 | 328 |
2036
b3a56463c812
AC_DEFUN warning fixes for aclocal 1.8..
Timo Sirainen <tss@iki.fi>
parents:
2035
diff
changeset
|
329 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
|
330 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
|
331 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
332 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
|
333 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
|
334 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
|
335 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
336 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
337 result="" |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
338 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
|
339 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
|
340 |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
341 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
|
342 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
|
343 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
|
344 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
|
345 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
346 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
|
347 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
|
348 int) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
349 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
|
350 ;; |
1630 | 351 unsigned-int) |
352 fmt="%u" | |
353 ;; | |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
354 long) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
355 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
|
356 ;; |
1630 | 357 unsigned-long) |
358 fmt="%lu" | |
359 ;; | |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
360 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
|
361 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
|
362 ;; |
1630 | 363 unsigned-long-long) |
364 fmt="%llu" | |
365 ;; | |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
366 *) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
367 fmt="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
368 ;; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
369 esac |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
370 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
371 if test "$fmt" != ""; then |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
372 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
|
373 #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
|
374 #include <stdio.h> |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
375 ]], [[ |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
376 printf("$fmt", ($1)0); |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
377 ]])],[ |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
378 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
|
379 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
|
380 result="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
381 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
|
382 break |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
383 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
384 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
|
385 visible="$result" |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
386 ],[]) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
387 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
|
388 done |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
389 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
|
390 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
391 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
392 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
|
393 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
|
394 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
|
395 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
|
396 #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
|
397 typedef $type $1; |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
398 ]], [[]])],[ |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
399 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
|
400 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
|
401 result="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
402 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
|
403 break |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
404 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
405 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
|
406 visible="$type" |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
407 ],[]) |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
408 done |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
409 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
|
410 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
411 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
|
412 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
|
413 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
414 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
|
415 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
|
416 #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
|
417 #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
|
418 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
|
419 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
|
420 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
|
421 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
|
422 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
|
423 } |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
424 ]])],[ |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
425 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
|
426 rm -f conftestval |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
427 |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
428 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
|
429 actype="ac_cv_sizeof_`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
|
430 if test "$size" = "`eval \"echo \\$$actype\"`"; then |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
431 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
|
432 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
|
433 break |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
434 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
435 done |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
436 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
|
437 visible="`expr $size \* 8`bit (unknown type)" |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
438 fi |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
439 ],[],[]) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
440 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
441 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
442 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
|
443 AC_MSG_RESULT($visible) |
185 | 444 ]) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
445 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
446 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
|
447 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
|
448 [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
|
449 |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
450 AC_TYPEOF(off_t, long int 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
|
451 case "$typeof_off_t" in |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
452 int) |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
453 offt_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
|
454 uofft_fmt="u" |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
455 AC_DEFINE(UOFF_T_INT,, Define if off_t is int) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
456 offt_bits=`expr 8 \* $ac_cv_sizeof_int` |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
457 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
458 long) |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
459 offt_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
|
460 uofft_fmt="lu" |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
461 AC_DEFINE(UOFF_T_LONG,, Define if off_t is long) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
462 offt_bits=`expr 8 \* $ac_cv_sizeof_long` |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
463 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
464 "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
|
465 offt_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
|
466 uofft_fmt="llu" |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
467 AC_DEFINE(UOFF_T_LONG_LONG,, Define if off_t is long long) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
468 offt_bits=`expr 8 \* $ac_cv_sizeof_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
|
469 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
470 *) |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
471 AC_MSG_ERROR([Unsupported off_t 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
|
472 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
473 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
|
474 |
2078
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
475 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
|
476 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
2078
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
477 #include <dirent.h> |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
478 ]], [[ |
2078
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
479 struct dirent d; |
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
480 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
|
481 ]])],[ |
2078
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
482 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
|
483 ],[]) |
2078
b3daf55df932
Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents:
2070
diff
changeset
|
484 |
1382
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
485 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
|
486 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
|
487 #include <limits.h> |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
488 #include <sys/types.h> |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
489 ]], [[ |
1382
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
490 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
|
491 ]])],[ |
1403 | 492 : |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
493 ],[ |
1382
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
494 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
|
495 ]) |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
496 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
497 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
|
498 |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
499 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
|
500 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
|
501 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
|
502 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
|
503 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
|
504 #include <sys/types.h> |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
505 int main() { |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
506 /* 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
|
507 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
|
508 } |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
509 ]])],[ |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
510 AC_MSG_RESULT(yes) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
511 |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
512 echo |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
513 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
|
514 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
|
515 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
|
516 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
|
517 |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
518 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
|
519 AC_MSG_ERROR([aborting]) |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
520 fi |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
521 echo "..ignoring as requested.." |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
522 ],[ |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
523 AC_MSG_RESULT(no) |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
524 ],[]) |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
525 |
1626
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
526 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
|
527 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
|
528 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
|
529 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
|
530 case "$typeof_size_t" in |
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
531 "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
|
532 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
|
533 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
|
534 ;; |
1626
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
535 "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
|
536 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
|
537 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
|
538 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
539 *) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
540 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
|
541 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
|
542 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
|
543 |
1626
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
544 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
|
545 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
|
546 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
|
547 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
|
548 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
549 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
|
550 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
551 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
|
552 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
|
553 |
2036
b3a56463c812
AC_DEFUN warning fixes for aclocal 1.8..
Timo Sirainen <tss@iki.fi>
parents:
2035
diff
changeset
|
554 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
|
555 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
|
556 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
|
557 [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
|
558 #include <sys/types.h> |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
559 $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
|
560 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
|
561 ]) |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
562 |
1660
4076387f7ccb
We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents:
1658
diff
changeset
|
563 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
|
564 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
|
565 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
|
566 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
|
567 ]) |
4076387f7ccb
We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents:
1658
diff
changeset
|
568 |
4076387f7ccb
We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents:
1658
diff
changeset
|
569 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
|
570 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
|
571 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
|
572 fi |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
573 |
908
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
574 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
|
575 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
|
576 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
|
577 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
|
578 fi |
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
579 |
678
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
580 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
|
581 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
|
582 AC_DEFINE(HAVE_SOCKLEN_T,, Define to 'int' if you don't have socklen_t) |
0 | 583 fi |
584 | |
1394
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
585 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
|
586 |
1335
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
587 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
|
588 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
|
589 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
|
590 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
|
591 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
|
592 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
|
593 else |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
594 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
|
595 |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
596 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
|
597 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
|
598 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
|
599 ]) |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
600 fi |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
601 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
|
602 |
0 | 603 dnl * do we have tm_gmtoff |
604 AC_MSG_CHECKING([for tm_gmtoff]) | |
605 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
|
606 [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
|
607 #include <time.h>]], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
608 [[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
|
609 [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
|
610 [i_cv_field_tm_gmtoff=no])]) |
0 | 611 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
|
612 AC_DEFINE(HAVE_TM_GMTOFF,, Define if you have struct tm->tm_gmtoff) |
0 | 613 fi |
614 AC_MSG_RESULT($i_cv_field_tm_gmtoff) | |
615 | |
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
|
616 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
|
617 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
|
618 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
|
619 #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
|
620 #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
|
621 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
|
622 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
|
623 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
|
624 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
|
625 |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
626 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
|
627 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
|
628 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
|
629 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
|
630 } |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
631 } |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
632 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
|
633 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
|
634 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
|
635 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
|
636 } |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
637 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
|
638 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
|
639 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
|
640 } |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
641 ]])],[ |
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
|
642 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
|
643 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
|
644 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
|
645 ], [ |
20519e4bca48
utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents:
1656
diff
changeset
|
646 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
|
647 max_bits=31 |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
648 ],[]) |
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
|
649 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
|
650 |
411 | 651 dnl * do we have struct iovec |
652 AC_MSG_CHECKING([for struct iovec]) | |
653 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
|
654 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
411 | 655 #include <sys/types.h> |
656 #include <sys/uio.h> | |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
657 #include <unistd.h>]], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
658 [[struct iovec *iovec;]])], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
659 [i_cv_struct_iovec=yes], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
660 [i_cv_struct_iovec=no])]) |
411 | 661 |
662 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
|
663 AC_DEFINE(HAVE_STRUCT_IOVEC,, Define if you have struct iovec) |
411 | 664 fi |
665 AC_MSG_RESULT($i_cv_struct_iovec) | |
666 | |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
667 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
|
668 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
|
669 #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
|
670 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
|
671 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
|
672 ]], [[]])],[],[ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
673 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
|
674 |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
675 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
|
676 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
|
677 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
|
678 fi |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
679 ]) |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
680 |
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
|
681 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
|
682 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
|
683 #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
|
684 #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
|
685 #include <sys/resource.h> |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
686 ]], [[ |
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
|
687 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
|
688 getrlimit(RLIMIT_AS, &r); |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
689 ]])],[ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
690 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
|
691 ],[]) |
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
|
692 |
1065 | 693 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
|
694 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1065 | 695 #include <sys/types.h> |
696 #include <sys/time.h> | |
697 #include <sys/resource.h> | |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
698 ]], [[ |
1065 | 699 struct rlimit r; |
700 getrlimit(RLIMIT_NPROC, &r); | |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
701 ]])],[ |
1065 | 702 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
|
703 ],[]) |
1065 | 704 |
528
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
705 dnl * Linux compatible mremap() |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
706 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
|
707 AC_TRY_LINK([ |
224 | 708 #include <unistd.h> |
709 #define __USE_GNU | |
710 #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
|
711 ], [ |
3a1be480d16a
buggy checks. we were supposed to compile them, not run. plus fixes for
Timo Sirainen <tss@iki.fi>
parents:
528
diff
changeset
|
712 mremap(0, 0, 0, MREMAP_MAYMOVE); |
224 | 713 ], [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
714 AC_DEFINE(HAVE_LINUX_MREMAP,, Define if you have Linux-compatible mremap()) |
224 | 715 AC_MSG_RESULT(yes) |
716 ], [ | |
717 AC_MSG_RESULT(no) | |
718 ]) | |
719 | |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
720 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
|
721 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
|
722 AC_TRY_RUN([ |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
723 #include <stdio.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
724 #include <sys/types.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
725 #include <sys/stat.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
726 #include <unistd.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
727 #include <fcntl.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
728 #include <sys/mman.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
729 int main() { |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
730 /* 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
|
731 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
|
732 void *mem; |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
733 if (f == -1) { |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
734 perror("open()"); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
735 return 1; |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
736 } |
1623 | 737 unlink("conftest.mmap"); |
738 | |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
739 write(f, "1", 2); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
740 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
|
741 if (mem == MAP_FAILED) { |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
742 perror("mmap()"); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
743 return 1; |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
744 } |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
745 strcpy(mem, "2"); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
746 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
|
747 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
|
748 write(f, "3", 2); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
749 |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
750 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
|
751 } |
1625 | 752 ], [ |
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
|
753 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
|
754 ], [ |
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
|
755 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
|
756 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
|
757 ]) |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
758 |
2349
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
759 dnl * see if fd passing works |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
760 AC_MSG_CHECKING([whether fd passing works]) |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
761 for i in 1 2; do |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
762 old_cflags="$CFLAGS" |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
763 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
|
764 if test $i = 2; then |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
765 CFLAGS="$CFLAGS -DBUGGY_CMSG_MACROS" |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
766 fi |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
767 |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
768 AC_TRY_RUN([ |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
769 #include <sys/types.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
770 #include <sys/socket.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
771 #include <sys/wait.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
772 #include <sys/stat.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
773 #include <unistd.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
774 #include <fcntl.h> |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
775 #include "fdpass.h" |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
776 |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
777 int main(void) |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
778 { |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
779 int fd[2], send_fd, recv_fd, status; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
780 struct stat st, st2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
781 char data; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
782 |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
783 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
|
784 if (send_fd == -1) return 2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
785 unlink("conftest.fdpass"); |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
786 if (fstat(send_fd, &st) < 0) return 2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
787 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
|
788 |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
789 switch (fork()) { |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
790 case -1: |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
791 return 2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
792 case 0: |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
793 if (fd_send(fd[0], send_fd, &data, 1) != 1) return 2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
794 wait(&status); |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
795 return status; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
796 default: |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
797 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
|
798 if (fstat(recv_fd, &st2) < 0) return 2; |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
799 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
|
800 } |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
801 } |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
802 ], [ |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
803 CFLAGS=$old_cflags |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
804 if test $i = 2; then |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
805 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
|
806 fi |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
807 AC_MSG_RESULT(yes) |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
808 break |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
809 ], [ |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
810 dnl no, try with BUGGY_CMSG_MACROS |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
811 CFLAGS=$old_cflags |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
812 if test $i = 2; then |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
813 AC_MSG_RESULT(no) |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
814 fi |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
815 ]) |
b65456de1b49
Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents:
2325
diff
changeset
|
816 done |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
817 |
2035
0e65efd14eda
Solaris: Move from sendfilev() to sendfile() (was it always there?). Make
Timo Sirainen <tss@iki.fi>
parents:
2028
diff
changeset
|
818 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
|
819 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
|
820 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
|
821 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
|
822 ], [ |
981
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
823 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
|
824 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
|
825 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
|
826 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
|
827 #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
|
828 #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
|
829 #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
|
830 #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
|
831 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
832 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
|
833 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
834 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
|
835 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
|
836 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
837 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
|
838 ]) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
839 |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
840 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
|
841 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
|
842 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
|
843 #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
|
844 #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
|
845 #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
|
846 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
847 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
|
848 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
|
849 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
850 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
|
851 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
|
852 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
853 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
|
854 ]) |
976
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
855 ]) |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
856 |
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
|
857 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
|
858 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
|
859 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
|
860 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
861 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
|
862 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
|
863 #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
|
864 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
|
865 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
|
866 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
|
867 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
|
868 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
|
869 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
|
870 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
|
871 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
872 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
|
873 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
|
874 return 0; |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
875 }]])], |
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
|
876 [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
|
877 [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
|
878 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
879 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
|
880 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
|
881 #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
|
882 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
|
883 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
|
884 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
|
885 __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
|
886 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
|
887 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
|
888 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
|
889 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
890 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
|
891 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
|
892 return 0; |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
893 }]])], |
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
|
894 [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
|
895 [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
|
896 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
897 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
898 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
|
899 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
|
900 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
|
901 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
|
902 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
|
903 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
|
904 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
905 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
|
906 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
|
907 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
|
908 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
909 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
|
910 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
|
911 #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
|
912 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
|
913 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
|
914 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
|
915 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
|
916 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
|
917 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
|
918 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
|
919 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
920 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
|
921 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
|
922 return 0; |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
923 }]])], |
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
|
924 [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
|
925 [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
|
926 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
927 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
928 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
|
929 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
|
930 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
|
931 |
0 | 932 dnl ** |
622 | 933 dnl ** SSL |
0 | 934 dnl ** |
935 | |
623 | 936 have_ssl=no |
937 | |
1611
fcc5d6bb6244
test -o and -a are apparently non-POSIX. not using.
Timo Sirainen <tss@iki.fi>
parents:
1609
diff
changeset
|
938 if test "$want_openssl" = "yes" && test "$have_ssl" = "no"; then |
1565
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
939 if pkg-config --exists openssl; then |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
940 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
|
941 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
|
942 have_openssl=yes |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
943 else |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
944 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
|
945 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
|
946 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
|
947 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
|
948 have_openssl=yes |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
949 ]) |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
950 ],, -lcrypto) |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
951 fi |
1566 | 952 if test "$have_openssl" = "yes"; then |
953 AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support) | |
954 have_ssl="yes (OpenSSL)" | |
955 fi | |
622 | 956 fi |
957 | |
1990 | 958 if test $want_gnutls = yes && test "$have_ssl" = no; then |
1948 | 959 AC_CHECK_LIB(gnutls, gnutls_global_init, [ |
960 AC_CHECK_HEADERS(gnutls/gnutls.h, [ | |
961 AC_DEFINE(HAVE_GNUTLS,, Build with GNUTLS support) | |
962 SSL_LIBS="-lgnutls -lgcrypt" | |
963 AC_SUBST(SSL_LIBS) | |
964 have_ssl="yes (GNUTLS)" | |
965 have_gnutls=yes | |
966 ]) | |
967 ],, -lgcrypt) | |
968 fi | |
969 | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
970 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
|
971 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
|
972 fi |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
973 |
0 | 974 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
|
975 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
|
976 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
|
977 |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
978 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
|
979 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
|
980 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
|
981 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
|
982 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
|
983 ], [ |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
984 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
|
985 ]) |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
986 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
|
987 |
49b6103dd2e0
Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents:
1729
diff
changeset
|
988 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
|
989 dnl ** userdb and passdb checks |
0 | 990 dnl ** |
991 | |
992 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
|
993 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
|
994 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
|
995 |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
996 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
|
997 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
|
998 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
|
999 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
|
1000 fi |
0 | 1001 |
1002 if test $want_passwd = yes; then | |
1003 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
|
1004 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
|
1005 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
|
1006 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
|
1007 passdb="$passdb passwd" |
0 | 1008 fi |
1009 | |
1010 if test $want_passwd_file = yes; then | |
1011 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
|
1012 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
|
1013 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
|
1014 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
|
1015 passdb="$passdb passwd-file" |
0 | 1016 fi |
1017 | |
1018 if test $want_shadow = yes; then | |
1019 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
|
1020 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
|
1021 need_crypt=yes |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
1022 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
|
1023 passdb="$passdb shadow" |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
1024 ]) |
0 | 1025 ]) |
1026 fi | |
1027 | |
1028 if test $want_pam = yes; then | |
1029 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
|
1030 have_pam=no |
0 | 1031 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
|
1032 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
|
1033 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
|
1034 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
|
1035 ]) |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
1036 |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
1037 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
|
1038 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
|
1039 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
|
1040 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
|
1041 ]) |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
1042 |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
1043 if test "$have_pam" = "yes"; then |
1284 | 1044 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
|
1045 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
|
1046 passdb="$passdb pam" |
547
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
1047 |
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
1048 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
|
1049 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
|
1050 Define if you have pam_setcred()) |
547
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
1051 ]) |
706
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
1052 fi |
0 | 1053 ]) |
1054 fi | |
1055 | |
2162
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
1056 if test $want_checkpassword = yes; then |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
1057 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
|
1058 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
|
1059 userdb="$userdb checkpassword" |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
1060 passdb="$passdb checkpassword" |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
1061 fi |
95b2a6abc01e
Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents:
2103
diff
changeset
|
1062 |
1851
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1063 if test $want_bsdauth = yes; then |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1064 AC_CHECK_FUNC(auth_userokay, [ |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1065 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
|
1066 passdb="$passdb bsdauth" |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1067 ]) |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1068 fi |
d66d53f57e43
Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents:
1849
diff
changeset
|
1069 |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1070 if test $want_ldap = yes; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1071 AC_CHECK_LIB(ldap, ldap_init, [ |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1072 AC_CHECK_HEADER(ldap.h, [ |
2325
7613e0f68513
Fixed to compile with Solaris LDAP library
Timo Sirainen <tss@iki.fi>
parents:
2222
diff
changeset
|
1073 AC_CHECK_LIB(ldap, ldap_initialize, [ |
7613e0f68513
Fixed to compile with Solaris LDAP library
Timo Sirainen <tss@iki.fi>
parents:
2222
diff
changeset
|
1074 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
|
1075 ]) |
1284 | 1076 AUTH_LIBS="$AUTH_LIBS -lldap" |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1077 |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1078 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
|
1079 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
|
1080 userdb="$userdb ldap" |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1081 passdb="$passdb ldap" |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1082 ]) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1083 ]) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1084 fi |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1085 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1086 if test $want_pgsql = yes; then |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1087 # based on code from PHP |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1088 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
|
1089 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
|
1090 if test -r "$i/$j/libpq-fe.h"; then |
1286 | 1091 PGSQL_INCLUDE=$i/$j |
1092 fi | |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1093 done |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1094 for j in lib lib/pgsql lib/postgres lib/postgresql ""; do |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1095 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
|
1096 PGSQL_LIBDIR=$i/$j |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1097 fi |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1098 done |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1099 done |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1100 |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1101 old_LIBS=$LIBS |
1287 | 1102 if test "$PGSQL_LIBDIR" != ""; then |
1103 LIBS="$LIBS -L$PGSQL_LIBDIR" | |
1104 fi | |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1105 |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1106 AC_CHECK_LIB(pq, PQconnectdb, [ |
1287 | 1107 old_CPPFLAGS=$CPPFLAGS |
1108 if test "$PGSQL_INCLUDE" != ""; then | |
1109 CPPFLAGS="$CPPFLAGS -I $PGSQL_INCLUDE" | |
1110 fi | |
1111 AC_CHECK_HEADER(libpq-fe.h, [ | |
1112 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
|
1113 SQL_CFLAGS="$SQL_CFLAGS -I$PGSQL_INCLUDE" |
1287 | 1114 fi |
1115 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
|
1116 SQL_LIBS="$SQL_LIBS -L$PGSQL_LIBDIR" |
1287 | 1117 fi |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1118 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
|
1119 AC_DEFINE(HAVE_PGSQL,, Build with PostgreSQL support) |
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1120 have_sql=yes |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1121 userdb="$userdb pgsql" |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1122 passdb="$passdb pgsql" |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1123 ]) |
1287 | 1124 CPPFLAGS=$old_CPPFLAGS |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1125 ]) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1126 LIBS=$old_LIBS |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1127 fi |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1128 |
1995
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
1129 if test $want_mysql = yes; then |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1130 # based on code from PHP |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1131 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
|
1132 for j in include include/mysql ""; do |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1133 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
|
1134 MYSQL_INCLUDE=$i/$j |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1135 fi |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1136 done |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1137 for j in lib lib/mysql ""; do |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1138 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
|
1139 MYSQL_LIBDIR=$i/$j |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1140 fi |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1141 done |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1142 done |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1143 |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1144 old_LIBS=$LIBS |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1145 if test "$MYSQL_LIBDIR" != ""; then |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1146 LIBS="$LIBS -L$MYSQL_LIBDIR" |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1147 fi |
1995
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
1148 |
2416
e6594431ee4f
If -lmysqlclient doesn't automatically link with zlib, do it manually.
Timo Sirainen <tss@iki.fi>
parents:
2403
diff
changeset
|
1149 mysql_lib="" |
2771
24c128e54337
Use -lz always with mysql. Our previous check wasn't really working because
Timo Sirainen <tss@iki.fi>
parents:
2766
diff
changeset
|
1150 LIBS="$LIBS -lz" |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1151 AC_CHECK_LIB(mysqlclient, mysql_init, [ |
2771
24c128e54337
Use -lz always with mysql. Our previous check wasn't really working because
Timo Sirainen <tss@iki.fi>
parents:
2766
diff
changeset
|
1152 mysql_lib="-lmysqlclient -lz" |
2416
e6594431ee4f
If -lmysqlclient doesn't automatically link with zlib, do it manually.
Timo Sirainen <tss@iki.fi>
parents:
2403
diff
changeset
|
1153 ]) |
e6594431ee4f
If -lmysqlclient doesn't automatically link with zlib, do it manually.
Timo Sirainen <tss@iki.fi>
parents:
2403
diff
changeset
|
1154 |
e6594431ee4f
If -lmysqlclient doesn't automatically link with zlib, do it manually.
Timo Sirainen <tss@iki.fi>
parents:
2403
diff
changeset
|
1155 if test "$mysql_lib" != ""; then |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1156 old_CPPFLAGS=$CPPFLAGS |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1157 if test "$MYSQL_INCLUDE" != ""; then |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1158 CPPFLAGS="$CPPFLAGS -I $MYSQL_INCLUDE" |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1159 fi |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1160 AC_CHECK_HEADER(mysql.h, [ |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1161 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
|
1162 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
|
1163 fi |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1164 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
|
1165 SQL_LIBS="$SQL_LIBS -L$MYSQL_LIBDIR" |
2369 | 1166 fi |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1167 SQL_LIBS="$SQL_LIBS $mysql_lib" |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1168 |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1169 AC_CHECK_LIB(mysqlclient, mysql_ssl_set, [ |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1170 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
|
1171 if test "x$have_openssl" = "yes"; then |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1172 ssl_define="#define HAVE_OPENSSL" |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1173 else |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1174 ssl_define="" |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1175 fi |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1176 AC_TRY_COMPILE([ |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1177 $ssl_define |
2403 | 1178 #include <mysql.h> |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1179 ], [ |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1180 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
|
1181 ], [ |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1182 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
|
1183 ]) |
2369 | 1184 ]) |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1185 |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1186 AC_DEFINE(HAVE_MYSQL,, Build with MySQL support) |
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1187 have_sql=yes |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1188 userdb="$userdb mysql" |
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1189 passdb="$passdb mysql" |
2369 | 1190 ]) |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1191 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
|
1192 fi |
1995
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
1193 |
2384
0cc72087752f
Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents:
2377
diff
changeset
|
1194 LIBS=$old_LIBS |
1995
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
1195 fi |
cc64f8bb4716
MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents:
1990
diff
changeset
|
1196 |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1197 if test "$have_sql" = yes; then |
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1198 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
|
1199 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
|
1200 AUTH_LIBS="$AUTH_LIBS $SQL_LIBS" |
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1201 fi |
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1202 |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1203 if test $want_vpopmail = yes; then |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1204 vpopmail_home="`echo ~vpopmail`" |
281 | 1205 vpop_libdeps="$vpopmail_home/etc/lib_deps" |
1206 | |
1207 AC_MSG_CHECKING([for vpopmail configuration at $vpop_libdeps]) | |
1208 if test -f $vpop_libdeps; then | |
283 | 1209 need_crypt=yes |
1284 | 1210 AUTH_CFLAGS="$AUTH_CFLAGS `cat $vpopmail_home/etc/inc_deps` $CFLAGS" |
1211 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
|
1212 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
|
1213 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
|
1214 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
|
1215 passdb="$passdb vpopmail" |
281 | 1216 AC_MSG_RESULT(found) |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1217 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1218 want_vpopmail=no |
281 | 1219 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
|
1220 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1221 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
1222 |
0 | 1223 if test $need_crypt = yes; then |
1224 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
|
1225 AUTH_LIBS="-lcrypt $AUTH_LIBS" |
0 | 1226 ], [ |
1227 AC_CHECK_FUNC(crypt,, [ | |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1228 AC_MSG_ERROR([crypt() wasn't found]) |
0 | 1229 ]) |
1230 ]) | |
1231 fi | |
1232 | |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1233 dnl * dynamic modules? |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1234 have_modules=no |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
1235 AC_CHECK_FUNC(dlopen, [ |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1236 have_modules=yes |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
1237 MODULE_LIBS="-export-dynamic" |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1238 ], [ |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
1239 AC_CHECK_LIB(dl, dlopen, [ |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1240 have_modules=yes |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
1241 MODULE_LIBS="-export-dynamic -ldl" |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1242 ]) |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1243 ]) |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1244 |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1245 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
|
1246 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
|
1247 userdb="$userdb (modules)" |
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1248 passdb="$passdb (modules)" |
1465
03dd87873a81
Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents:
1462
diff
changeset
|
1249 |
03dd87873a81
Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents:
1462
diff
changeset
|
1250 AC_SUBST(MODULE_LIBS) |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
1251 fi |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1252 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
1253 AC_SUBST(AUTH_CFLAGS) |
1284 | 1254 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
|
1255 AC_SUBST(SQL_CFLAGS) |
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1256 AC_SUBST(SQL_LIBS) |
0 | 1257 |
1258 dnl ** | |
1259 dnl ** Index file compatibility flags | |
1260 dnl ** | |
1261 | |
1262 dnl * currently just checking for endianess | |
1263 | |
1264 AC_C_BIGENDIAN | |
1265 | |
1266 if test $ac_cv_c_bigendian = yes; then | |
1267 flags=0 | |
1268 | |
1269 else | |
1270 flags=1 | |
1271 fi | |
1272 | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
1273 AC_DEFINE_UNQUOTED(MAIL_INDEX_COMPAT_FLAGS, $flags, Index file compatibility flags) |
0 | 1274 |
1275 dnl ** | |
1276 dnl ** IPv6 support | |
1277 dnl ** | |
1278 | |
1279 if test "x$want_ipv6" = "xyes"; then | |
1280 AC_MSG_CHECKING([for IPv6]) | |
1281 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
|
1282 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
0 | 1283 #include <sys/types.h> |
1284 #include <sys/socket.h> | |
1285 #include <netinet/in.h> | |
1286 #include <netdb.h> | |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1287 #include <arpa/inet.h>]], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1288 [[struct in6_addr i;]])], |
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1289 [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
|
1290 [i_cv_type_in6_addr=no])]) |
0 | 1291 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
|
1292 AC_DEFINE(HAVE_IPV6,, Build with IPv6 support) |
0 | 1293 fi |
1294 AC_MSG_RESULT($i_cv_type_in6_addr) | |
1295 fi | |
1296 | |
1297 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
|
1298 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
|
1299 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
|
1300 |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1865
diff
changeset
|
1301 maildir_libs="../lib-storage/index/maildir/libstorage_maildir.a" |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1865
diff
changeset
|
1302 mbox_libs="../lib-storage/index/mbox/libstorage_mbox.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
|
1303 index_libs="../lib-storage/index/libstorage_index.a ../lib-index/libindex.a" |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
1304 |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
1305 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
|
1306 for storage in $mail_storages; do |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
1307 STORAGE_LIBS="$STORAGE_LIBS `eval \"echo \\$${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
|
1308 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
|
1309 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
|
1310 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
|
1311 |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
1312 |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
1313 dnl ** |
0 | 1314 dnl ** capabilities |
1315 dnl ** | |
1316 | |
2784
12ac68531a3a
Don't advertise LISTEXT capability. It's still a draft which changes
Timo Sirainen <tss@iki.fi>
parents:
2771
diff
changeset
|
1317 capability="IMAP4rev1 SORT THREAD=REFERENCES 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
|
1318 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability", IMAP capabilities) |
0 | 1319 |
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
|
1320 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
|
1321 |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1322 AC_CONFIG_FILES([ |
0 | 1323 Makefile |
1324 doc/Makefile | |
1325 src/Makefile | |
1326 src/lib/Makefile | |
2754
3c3ac12be307
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents:
2717
diff
changeset
|
1327 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
|
1328 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
|
1329 src/lib-charset/Makefile |
0 | 1330 src/lib-imap/Makefile |
1331 src/lib-index/Makefile | |
1332 src/lib-mail/Makefile | |
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
2369
diff
changeset
|
1333 src/lib-ntlm/Makefile |
1058
3b8fb7bf7ecc
Moved settings parsing to lib-settings.
Timo Sirainen <tss@iki.fi>
parents:
1057
diff
changeset
|
1334 src/lib-settings/Makefile |
0 | 1335 src/lib-storage/Makefile |
1336 src/lib-storage/index/Makefile | |
1337 src/lib-storage/index/maildir/Makefile | |
1338 src/lib-storage/index/mbox/Makefile | |
1339 src/lib-storage/subscription-file/Makefile | |
761
d3bd41a56309
First implementation of SORT extension. String comparing still not up to
Timo Sirainen <tss@iki.fi>
parents:
755
diff
changeset
|
1340 src/lib-storage/register/Makefile |
0 | 1341 src/auth/Makefile |
1342 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
|
1343 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
|
1344 src/login-common/Makefile |
0 | 1345 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
|
1346 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
|
1347 src/pop3-login/Makefile |
1694
0fae24674a9a
Separated rawlog into it's own binary.
Timo Sirainen <tss@iki.fi>
parents:
1669
diff
changeset
|
1348 src/util/Makefile |
1418
c36d18766a35
0.99.9.1 released. Added redhat spec file.
Timo Sirainen <tss@iki.fi>
parents:
1410
diff
changeset
|
1349 stamp.h |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1350 dovecot.spec]) |
1096
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1351 |
2796
fb7f862194b5
Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents:
2784
diff
changeset
|
1352 AC_OUTPUT |
1096
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1353 |
0 | 1354 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
|
1355 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
|
1356 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
|
1357 echo "I/O loop method ..................... : $ioloop" |
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
|
1358 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
|
1359 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
|
1360 echo "Building with pop3 server ........... : $want_pop3d" |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1361 echo "Building with user database modules . :$userdb" |
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1362 echo "Building with password lookup modules :$passdb" |