Mercurial > dovecot > original-hg > dovecot-1.2
annotate configure.in @ 1626:08b73ec005f8 HEAD
Get the size_t type properly in OSX
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 15 Jul 2003 23:24:21 +0300 |
parents | 4f38b6de621a |
children | e9e533b323fb |
rev | line source |
---|---|
0 | 1 AC_INIT(src) |
2 | |
1421
7594cb84e9c8
Removed AM_CONFIG_HEADER accidentally
Timo Sirainen <tss@iki.fi>
parents:
1420
diff
changeset
|
3 AM_CONFIG_HEADER(config.h) |
1585 | 4 AM_INIT_AUTOMAKE(dovecot, 0.99.10) |
0 | 5 |
6 AM_MAINTAINER_MODE | |
7 | |
8 AC_ISC_POSIX | |
9 AC_PROG_CC | |
10 AC_PROG_CPP | |
11 AC_STDC_HEADERS | |
12 AC_C_INLINE | |
13 AC_ARG_PROGRAM | |
14 AM_PROG_LIBTOOL | |
1300 | 15 AM_ICONV |
0 | 16 |
1300 | 17 AC_CHECK_HEADERS(string.h stdlib.h stdint.h unistd.h dirent.h) |
722
0438621d25ff
Added virtual memory size limits to processes. Default values are pretty
Timo Sirainen <tss@iki.fi>
parents:
712
diff
changeset
|
18 AC_CHECK_HEADERS(sys/uio.h sys/sysmacros.h sys/resource.h linux/mman.h) |
777
a02e5e7790bb
select() is nowadays defined to be in sys/select.h
Timo Sirainen <tss@iki.fi>
parents:
761
diff
changeset
|
19 AC_CHECK_HEADERS(sys/select.h) |
0 | 20 |
21 # check posix headers | |
22 AC_CHECK_HEADERS(sys/time.h) | |
23 | |
24 AC_ARG_ENABLE(ipv6, | |
426 | 25 [ --enable-ipv6 Enable IPv6 support (default)], |
0 | 26 if test x$enableval = xno; then |
27 want_ipv6=no | |
28 else | |
29 want_ipv6=yes | |
30 fi, | |
426 | 31 want_ipv6=yes) |
0 | 32 |
544
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
33 AC_ARG_ENABLE(debug, |
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
34 [ --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
|
35 if test x$enableval = xyes; then |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
36 AC_DEFINE(DEBUG,, Build with extra debugging checks) |
544
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
37 fi) |
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
38 |
546
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
39 AC_ARG_ENABLE(asserts, |
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
40 [ --enable-asserts Enable asserts (default)], |
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
41 if test x$enableval = xno; then |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
42 AC_DEFINE(DISABLE_ASSERTS,, Disable asserts) |
546
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
43 fi) |
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
44 |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
45 AC_ARG_WITH(file-offset-size, |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
46 [ --with-file-offset-size=BITS Set size of file offsets. Usually 32 or 64. |
439
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
47 (default: 64 if available)], |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
48 preferred_off_t_bits=$withval, |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
49 preferred_off_t_bits=64) |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
50 |
439
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
51 AC_ARG_WITH(mem-align, |
1394
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
52 [ --with-mem-align=BYTES Set the memory alignment (default: 8)], |
439
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
53 mem_align=$withval, |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
54 mem_align=8) |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
55 |
1394
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
56 AC_ARG_WITH(index-align, |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
57 [ --with-index-align=BYTES Set the index file alignment (default: detect)], |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
58 index_align=$withval, |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
59 index_align=0) |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
60 |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
61 AC_ARG_WITH(passwd, |
426 | 62 [ --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
|
63 if test x$withval = xno; then |
0 | 64 want_passwd=no |
65 else | |
66 want_passwd=yes | |
67 fi, | |
68 want_passwd=yes) | |
69 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
70 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
|
71 [ --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
|
72 if test x$withval = xno; then |
0 | 73 want_passwd_file=no |
74 else | |
75 want_passwd_file=yes | |
76 fi, | |
77 want_passwd_file=yes) | |
78 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
79 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
|
80 [ --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
|
81 if test x$withval = xno; then |
0 | 82 want_shadow=no |
83 else | |
84 want_shadow=yes | |
85 fi, | |
86 want_shadow=yes) | |
87 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
88 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
|
89 [ --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
|
90 if test x$withval = xno; then |
0 | 91 want_pam=no |
92 else | |
93 want_pam=yes | |
94 fi, | |
95 want_pam=yes) | |
96 | |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
97 AC_ARG_WITH(ldap, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
98 [ --with-ldap Build with LDAP support], |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
99 if test x$withval = xno; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
100 want_ldap=no |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
101 else |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
102 want_ldap=yes |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
103 fi, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
104 want_ldap=no) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
105 |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
106 AC_ARG_WITH(vpopmail, |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
107 [ --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
|
108 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
|
109 want_vpopmail=no |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
110 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
111 want_vpopmail=yes |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
112 fi, |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
113 want_vpopmail=yes) |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
114 |
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
|
115 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
|
116 [ --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
|
117 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
|
118 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
|
119 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
|
120 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
|
121 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
|
122 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
|
123 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
124 AC_ARG_WITH(pgsql, |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
125 [ --with-pgsql Build with PostgreSQL support], |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
126 if test x$withval = xno; then |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
127 want_pgsql=no |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
128 else |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
129 want_pgsql=yes |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
130 fi, |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
131 want_pgsql=no) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
132 |
907
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
133 AC_ARG_WITH(cyrus-sasl2, |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
134 [ --with-cyrus-sasl2 Build with Cyrus SASL 2 library support], |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
135 if test x$withval = xno; then |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
136 want_cyrus_sasl2=no |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
137 else |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
138 want_cyrus_sasl2=yes |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
139 fi, |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
140 want_cyrus_sasl2=no) |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
141 |
550
3a83b05a0be3
--with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents:
547
diff
changeset
|
142 AC_ARG_WITH(rawlog, |
3a83b05a0be3
--with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents:
547
diff
changeset
|
143 [ --with-rawlog Build support for logging user traffic], |
3a83b05a0be3
--with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents:
547
diff
changeset
|
144 if test x$withval = 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
|
145 AC_DEFINE(BUILD_RAWLOG,, Build with rawlogging feature) |
550
3a83b05a0be3
--with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents:
547
diff
changeset
|
146 fi) |
3a83b05a0be3
--with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents:
547
diff
changeset
|
147 |
622 | 148 AC_ARG_WITH(ssl, |
149 [ --with-ssl=[gnutls|openssl] Build with GNUTLS (default) or OpenSSL], | |
245 | 150 if test x$withval = xno; then |
244 | 151 want_gnutls=no |
622 | 152 want_openssl=no |
153 elif test x$withval = xgnutls; then | |
154 want_gnutls=yes | |
155 want_openssl=no | |
156 elif test x$withval = xopenssl; then | |
157 want_gnutls=no | |
158 want_openssl=yes | |
244 | 159 else |
160 want_gnutls=yes | |
622 | 161 want_openssl=yes |
162 fi, [ | |
163 want_gnutls=yes | |
164 want_openssl=yes | |
165 ]) | |
244 | 166 |
657
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
167 AC_ARG_WITH(ssldir, |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
168 [ --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
|
169 ssldir="$withval", |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
170 ssldir=/etc/ssl |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
171 ) |
712
385f862a4005
--with-ssldir actually didn't do anything, and the default directory for
Timo Sirainen <tss@iki.fi>
parents:
711
diff
changeset
|
172 AC_SUBST(ssldir) |
657
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
173 |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
174 AC_ARG_WITH(pop3d, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
175 [ --with-pop3d Build POP3 server (default)], |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
176 if test x$withval = xno; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
177 want_pop3d=no |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
178 else |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
179 want_pop3d=yes |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
180 fi, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
181 want_pop3d=yes) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
182 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
|
183 |
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
|
184 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
|
185 [ --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
|
186 mail_storages=`echo "$withval"|sed 's/,/ /g'` ], |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
187 mail_storages="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
|
188 |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
189 dnl * gcc specific options |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
190 if test "x$ac_cv_prog_gcc" = "xyes"; then |
850 | 191 # -Wcast-qual -Wcast-align -Wconversion # too many warnings |
192 # -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
|
193 # -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings |
850 | 194 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
|
195 fi |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
196 |
0 | 197 dnl ** |
198 dnl ** just some generic stuff... | |
199 dnl ** | |
200 | |
201 AC_CHECK_FUNC(socket, [], [ | |
202 AC_CHECK_LIB(socket, socket, [ | |
203 LIBS="$LIBS -lsocket" | |
204 ]) | |
205 ]) | |
206 | |
207 AC_CHECK_FUNC(inet_addr, [], [ | |
208 AC_CHECK_LIB(nsl, inet_addr, [ | |
209 LIBS="$LIBS -lnsl" | |
210 ]) | |
211 ]) | |
212 | |
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
|
213 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
|
214 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
|
215 ], [ |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
216 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
|
217 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
|
218 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
|
219 ]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
220 ]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
221 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
222 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
|
223 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
|
224 fi |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
225 |
0 | 226 dnl * after -lsocket and -lnsl tests, inet_aton() may be in them |
800
db1608b43054
Don't bother trying to use setreuid(), setuid() check should be enough and
Timo Sirainen <tss@iki.fi>
parents:
792
diff
changeset
|
227 AC_CHECK_FUNCS(fcntl flock inet_aton sigaction getpagesize madvise \ |
805
5ac361acb316
Marked all non-trivial buffer modifications with @UNSAFE tag. Several
Timo Sirainen <tss@iki.fi>
parents:
800
diff
changeset
|
228 strcasecmp stricmp vsnprintf vsyslog writev setrlimit \ |
745
32040b730b37
Login process now changes it's name if verbose_proctitle = yes, and we're
Timo Sirainen <tss@iki.fi>
parents:
742
diff
changeset
|
229 setproctitle) |
0 | 230 |
231 dnl * poll/select? | |
232 | |
233 AC_CHECK_FUNC(poll, [ | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
234 AC_DEFINE(IOLOOP_POLL,, Implement I/O loop with poll()) |
0 | 235 ], [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
236 AC_DEFINE(IOLOOP_SELECT,, Implement I/O loop with select()) |
0 | 237 ]) |
238 | |
239 dnl * OS specific options | |
240 case "$host_os" in | |
241 hpux*) | |
242 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" | |
243 ;; | |
244 *) | |
245 ;; | |
246 esac | |
247 | |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
248 AC_CHECK_SIZEOF(int) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
249 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
|
250 AC_CHECK_SIZEOF(void *) |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
251 AC_CHECK_SIZEOF(long long) |
185 | 252 |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
253 AC_DEFUN(AC_TYPEOF, [ |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
254 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
|
255 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
256 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
|
257 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
|
258 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
|
259 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
260 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
261 result="" |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
262 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
|
263 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
|
264 |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
265 if test "x$ac_cv_prog_gcc" = "xyes"; then |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
266 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
|
267 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
|
268 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
|
269 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
270 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
|
271 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
|
272 int) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
273 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
|
274 ;; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
275 long) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
276 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
|
277 ;; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
278 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
|
279 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
|
280 ;; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
281 *) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
282 fmt="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
283 ;; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
284 esac |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
285 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
286 if test "$fmt" != ""; then |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
287 AC_TRY_COMPILE([ |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
288 #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
|
289 #include <stdio.h> |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
290 ], [ |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
291 printf("$fmt", ($1)0); |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
292 ], [ |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
293 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
|
294 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
|
295 result="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
296 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
|
297 break |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
298 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
299 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
|
300 visible="$result" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
301 ]) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
302 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
|
303 done |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
304 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
|
305 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
306 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
307 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
|
308 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
|
309 type="`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
|
310 AC_TRY_COMPILE([ |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
311 #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
|
312 typedef $type $1; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
313 ],, [ |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
314 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
|
315 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
|
316 result="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
317 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
|
318 break |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
319 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
320 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
|
321 visible="$type" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
322 ]) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
323 done |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
324 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
|
325 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
326 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
|
327 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
|
328 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
329 dnl * older autoconfs don't include sys/types.h, so do it manually |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
330 AC_TRY_RUN([ |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
331 #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
|
332 #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
|
333 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
|
334 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
|
335 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
|
336 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
|
337 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
|
338 } |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
339 ], [ |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
340 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
|
341 rm -f conftestval |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
342 |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
343 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
|
344 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
|
345 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
|
346 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
|
347 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
|
348 break |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
349 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
350 done |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
351 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
|
352 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
|
353 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
354 ]) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
355 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
356 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
357 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
|
358 AC_MSG_RESULT($visible) |
185 | 359 ]) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
360 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
361 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
|
362 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
|
363 [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
|
364 |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
365 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
|
366 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
|
367 int) |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
368 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
|
369 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
|
370 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
|
371 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
|
372 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
373 long) |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
374 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
|
375 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
|
376 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
|
377 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
|
378 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
379 "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
|
380 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
|
381 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
|
382 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
|
383 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
|
384 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
385 *) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
386 AC_ERROR([Unsupported off_t type]) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
387 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
388 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
|
389 |
1382
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
390 dnl * Do we have OFF_T_MAX? |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
391 AC_TRY_COMPILE([ |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
392 #include <limits.h> |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
393 #include <sys/types.h> |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
394 ], [ |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
395 off_t i = OFF_T_MAX; |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
396 ], [ |
1403 | 397 : |
1382
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
398 ], [ |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
399 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
|
400 ]) |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
401 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
402 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
|
403 |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
404 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
|
405 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
|
406 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
|
407 AC_MSG_CHECKING([whether size_t is signed]) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
408 AC_TRY_RUN([ |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
409 #include <sys/types.h> |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
410 int main() { |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
411 /* 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
|
412 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
|
413 } |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
414 ], [ |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
415 AC_MSG_RESULT(yes) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
416 |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
417 echo |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
418 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
|
419 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
|
420 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
|
421 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
|
422 |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
423 if test "$ignore_signed_size" = ""; then |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
424 AC_ERROR([aborting]) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
425 fi |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
426 echo "..ignoring as requested.." |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
427 ], [ |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
428 AC_MSG_RESULT(no) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
429 ]) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
430 |
1626
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
431 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
|
432 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
|
433 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
|
434 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
|
435 case "$typeof_size_t" in |
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
436 "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
|
437 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
|
438 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
|
439 ;; |
1626
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
440 "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
|
441 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
|
442 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
|
443 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
444 *) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
445 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
|
446 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
|
447 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
|
448 |
1626
08b73ec005f8
Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents:
1625
diff
changeset
|
449 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
|
450 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
|
451 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
|
452 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
|
453 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
454 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
|
455 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
456 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
|
457 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
|
458 |
678
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
459 AC_DEFUN(AC_CHECKTYPE2, [ |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
460 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
|
461 AC_CACHE_VAL(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
|
462 [AC_TRY_COMPILE([ |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
463 #include <sys/types.h> |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
464 $2], |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
465 [$1 t;], |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
466 i_cv_type_$1=yes, |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
467 i_cv_type_$1=no, |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
468 )]) |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
469 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
|
470 ]) |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
471 |
679
78966c511e57
Get uintmax_t from inttypes.h instead of stdint.h.
Timo Sirainen <tss@iki.fi>
parents:
678
diff
changeset
|
472 AC_CHECKTYPE2(uintmax_t, [#include <inttypes.h>]) |
678
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
473 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
|
474 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
|
475 fi |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
476 |
908
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
477 dnl use separate check, eg. Solaris 8 has uintmax_t but not uint_fast32_t |
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
478 AC_CHECKTYPE2(uint_fast32_t, [#include <inttypes.h>]) |
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
479 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
|
480 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
|
481 fi |
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
482 |
678
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
483 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
|
484 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
|
485 AC_DEFINE(HAVE_SOCKLEN_T,, Define to 'int' if you don't have socklen_t) |
0 | 486 fi |
487 | |
1394
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
488 dnl * 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
|
489 if test "$index_align" = "0"; then |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
490 if test $offt_bits = 64; then |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
491 index_align=8 |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
492 else |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
493 index_align=4 |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
494 fi |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
495 fi |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
496 |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
497 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
|
498 AC_DEFINE_UNQUOTED(INDEX_ALIGN_SIZE, $index_align, Required index alignment) |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
499 |
1335
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
500 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
|
501 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
|
502 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
|
503 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
|
504 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
|
505 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
|
506 else |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
507 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
|
508 |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
509 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
|
510 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
|
511 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
|
512 ]) |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
513 fi |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
514 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
|
515 |
0 | 516 dnl * do we have tm_gmtoff |
517 AC_MSG_CHECKING([for tm_gmtoff]) | |
518 AC_CACHE_VAL(i_cv_field_tm_gmtoff, | |
519 [AC_TRY_COMPILE([ | |
520 #include <time.h>], | |
521 [struct tm *tm; return tm->tm_gmtoff;], | |
522 i_cv_field_tm_gmtoff=yes, | |
523 i_cv_field_tm_gmtoff=no, | |
524 )]) | |
525 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
|
526 AC_DEFINE(HAVE_TM_GMTOFF,, Define if you have struct tm->tm_gmtoff) |
0 | 527 fi |
528 AC_MSG_RESULT($i_cv_field_tm_gmtoff) | |
529 | |
411 | 530 dnl * do we have struct iovec |
531 AC_MSG_CHECKING([for struct iovec]) | |
532 AC_CACHE_VAL(i_cv_struct_iovec, | |
412 | 533 [AC_TRY_COMPILE([ |
411 | 534 #include <sys/types.h> |
535 #include <sys/uio.h> | |
536 #include <unistd.h>], | |
537 [struct iovec *iovec;], | |
538 i_cv_struct_iovec=yes, | |
539 i_cv_struct_iovec=no)]) | |
540 | |
541 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
|
542 AC_DEFINE(HAVE_STRUCT_IOVEC,, Define if you have struct iovec) |
411 | 543 fi |
544 AC_MSG_RESULT($i_cv_struct_iovec) | |
545 | |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
546 dnl * is dev_t an integer or something else? |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
547 AC_TRY_COMPILE([ |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
548 #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
|
549 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
|
550 static struct test t = { 0 }; |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
551 ],,, [ |
742
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(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
|
553 |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
554 dnl we can't initialize structures, so don't warn about them either |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
555 if test "x$ac_cv_prog_gcc" = "xyes"; then |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
556 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
|
557 fi |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
558 ]) |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
559 |
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
|
560 dnl * Do we have RLIMIT_AS? |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
561 AC_TRY_COMPILE([ |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
562 #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
|
563 #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
|
564 #include <sys/resource.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
|
565 ], [ |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
566 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
|
567 getrlimit(RLIMIT_AS, &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
|
568 ], [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
569 AC_DEFINE(HAVE_RLIMIT_AS,, Define if you have RLIMIT_AS for setrlimit()) |
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
|
570 ]) |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
571 |
1065 | 572 dnl * Do we have RLIMIT_NPROC? |
573 AC_TRY_COMPILE([ | |
574 #include <sys/types.h> | |
575 #include <sys/time.h> | |
576 #include <sys/resource.h> | |
577 ], [ | |
578 struct rlimit r; | |
579 getrlimit(RLIMIT_NPROC, &r); | |
580 ], [ | |
581 AC_DEFINE(HAVE_RLIMIT_NPROC,, Define if you have RLIMIT_NPROC for setrlimit()) | |
582 ]) | |
583 | |
528
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
584 dnl * Linux compatible mremap() |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
585 AC_MSG_CHECKING([Linux compatible mremap()]) |
529
3a1be480d16a
buggy checks. we were supposed to compile them, not run. plus fixes for
Timo Sirainen <tss@iki.fi>
parents:
528
diff
changeset
|
586 AC_TRY_COMPILE([ |
224 | 587 #include <unistd.h> |
588 #define __USE_GNU | |
589 #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
|
590 ], [ |
3a1be480d16a
buggy checks. we were supposed to compile them, not run. plus fixes for
Timo Sirainen <tss@iki.fi>
parents:
528
diff
changeset
|
591 mremap(0, 0, 0, MREMAP_MAYMOVE); |
224 | 592 ], [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
593 AC_DEFINE(HAVE_LINUX_MREMAP,, Define if you have Linux-compatible mremap()) |
224 | 594 AC_MSG_RESULT(yes) |
595 ], [ | |
596 AC_MSG_RESULT(no) | |
597 ]) | |
598 | |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
599 dnl * If mmap() plays nicely with write() |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
600 AC_MSG_CHECKING([whether we need to use MS_INVALIDATE with mmaps]) |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
601 AC_TRY_RUN([ |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
602 #include <stdio.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
603 #include <sys/types.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
604 #include <sys/stat.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
605 #include <unistd.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
606 #include <fcntl.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
607 #include <sys/mman.h> |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
608 int main() { |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
609 /* 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
|
610 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
|
611 void *mem; |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
612 if (f == -1) { |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
613 perror("open()"); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
614 return 1; |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
615 } |
1623 | 616 unlink("conftest.mmap"); |
617 | |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
618 write(f, "1", 2); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
619 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
|
620 if (mem == MAP_FAILED) { |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
621 perror("mmap()"); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
622 return 1; |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
623 } |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
624 strcpy(mem, "2"); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
625 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
|
626 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
|
627 write(f, "3", 2); |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
628 |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
629 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
|
630 } |
1625 | 631 ], [ |
1622
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
632 AC_MSG_RESULT(no) |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
633 ], [ |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
634 AC_MSG_RESULT(yes) |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
635 AC_DEFINE(NEED_MS_INVALIDATE,, Define if your mmap() implementation requires use of MS_INVALIDATE to work with write()) |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
636 ]) |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
637 |
d22e03714d36
index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents:
1611
diff
changeset
|
638 |
976
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
639 dnl * Solaris compatible sendfilev() |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
640 AC_CHECK_LIB(sendfile, sendfilev, [ |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
641 LIBS="$LIBS -lsendfile" |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
642 AC_DEFINE(HAVE_SOLARIS_SENDFILEV,, Define if you have Solaris-compatible sendfilev()) |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
643 ], [ |
981
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
644 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
|
645 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
|
646 AC_MSG_CHECKING([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
|
647 AC_TRY_COMPILE([ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
648 #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
|
649 #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
|
650 #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
|
651 #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
|
652 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
653 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
|
654 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
655 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
|
656 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
|
657 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
658 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
|
659 ]) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
660 |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
661 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
|
662 AC_MSG_CHECKING([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
|
663 AC_TRY_COMPILE([ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
664 #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
|
665 #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
|
666 #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
|
667 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
668 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
|
669 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
|
670 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
671 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
|
672 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
|
673 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
674 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
|
675 ]) |
976
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
676 ]) |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
677 |
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
|
678 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
|
679 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
|
680 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
|
681 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
682 AC_CACHE_CHECK([for an implementation of va_copy()],lib_cv_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
|
683 AC_TRY_RUN([ |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
684 #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
|
685 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
|
686 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
|
687 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
|
688 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
|
689 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
|
690 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
|
691 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
|
692 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
693 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
|
694 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
|
695 return 0; |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
696 }], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
697 [lib_cv_va_copy=yes], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
698 [lib_cv_va_copy=no], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
699 []) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
700 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
701 AC_CACHE_CHECK([for an implementation of __va_copy()],lib_cv___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
|
702 AC_TRY_RUN([ |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
703 #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
|
704 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
|
705 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
|
706 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
|
707 __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
|
708 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
|
709 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
|
710 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
|
711 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
712 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
|
713 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
|
714 return 0; |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
715 }], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
716 [lib_cv___va_copy=yes], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
717 [lib_cv___va_copy=no], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
718 []) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
719 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
720 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
721 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
|
722 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
|
723 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
|
724 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
|
725 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
|
726 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
|
727 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
728 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
|
729 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
|
730 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
|
731 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
732 AC_CACHE_CHECK([whether va_lists can be copied by value],lib_cv_va_val_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
|
733 AC_TRY_RUN([ |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
734 #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
|
735 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
|
736 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
|
737 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
|
738 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
|
739 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
|
740 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
|
741 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
|
742 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
743 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
|
744 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
|
745 return 0; |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
746 }], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
747 [lib_cv_va_val_copy=yes], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
748 [lib_cv_va_val_copy=no], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
749 []) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
750 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
751 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
752 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
|
753 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
|
754 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
|
755 |
0 | 756 dnl ** |
622 | 757 dnl ** SSL |
0 | 758 dnl ** |
759 | |
623 | 760 have_ssl=no |
761 | |
244 | 762 if test $want_gnutls = yes; then |
622 | 763 AC_CHECK_LIB(gnutls, gnutls_global_init, [ |
623 | 764 AC_CHECK_HEADERS(gnutls/gnutls.h, [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
765 AC_DEFINE(HAVE_GNUTLS,, Build with GNUTLS support) |
623 | 766 SSL_LIBS="-lgnutls -lgcrypt" |
767 AC_SUBST(SSL_LIBS) | |
768 have_ssl="yes (GNUTLS)" | |
769 have_gnutls=yes | |
770 ]) | |
653 | 771 ],, -lgcrypt) |
244 | 772 fi |
0 | 773 |
1611
fcc5d6bb6244
test -o and -a are apparently non-POSIX. not using.
Timo Sirainen <tss@iki.fi>
parents:
1609
diff
changeset
|
774 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
|
775 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
|
776 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
|
777 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
|
778 have_openssl=yes |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
779 else |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
780 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
|
781 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
|
782 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
|
783 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
|
784 have_openssl=yes |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
785 ]) |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
786 ],, -lcrypto) |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
787 fi |
1566 | 788 if test "$have_openssl" = "yes"; then |
789 AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support) | |
790 have_ssl="yes (OpenSSL)" | |
791 fi | |
622 | 792 fi |
793 | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
794 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
|
795 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
|
796 fi |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
797 |
0 | 798 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
|
799 dnl ** userdb and passdb checks |
0 | 800 dnl ** |
801 | |
802 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
|
803 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
|
804 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
|
805 |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
806 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
|
807 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
|
808 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
|
809 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
|
810 fi |
0 | 811 |
812 if test $want_passwd = yes; then | |
813 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
|
814 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
|
815 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
|
816 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
|
817 passdb="$passdb passwd" |
0 | 818 fi |
819 | |
820 if test $want_passwd_file = yes; then | |
821 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
|
822 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
|
823 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
|
824 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
|
825 passdb="$passdb passwd-file" |
0 | 826 fi |
827 | |
828 if test $want_shadow = yes; then | |
829 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
|
830 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
|
831 need_crypt=yes |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
832 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
|
833 passdb="$passdb shadow" |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
834 ]) |
0 | 835 ]) |
836 fi | |
837 | |
838 if test $want_pam = yes; then | |
839 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
|
840 have_pam=no |
0 | 841 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
|
842 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
|
843 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
|
844 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
|
845 ]) |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
846 |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
847 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
|
848 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
|
849 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
|
850 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
|
851 ]) |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
852 |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
853 if test "$have_pam" = "yes"; then |
1284 | 854 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
|
855 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
|
856 passdb="$passdb pam" |
547
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
857 |
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
858 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
|
859 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
|
860 Define if you have pam_setcred()) |
547
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
861 ]) |
706
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
862 fi |
0 | 863 ]) |
864 fi | |
865 | |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
866 if test $want_ldap = yes; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
867 AC_CHECK_LIB(ldap, ldap_init, [ |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
868 AC_CHECK_HEADER(ldap.h, [ |
1284 | 869 AUTH_LIBS="$AUTH_LIBS -lldap" |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
870 |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
871 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
|
872 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
|
873 userdb="$userdb ldap" |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
874 passdb="$passdb ldap" |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
875 ]) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
876 ]) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
877 fi |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
878 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
879 if test $want_pgsql = yes; then |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
880 # based on code from PHP |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
881 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
|
882 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
|
883 if test -r "$i/$j/libpq-fe.h"; then |
1286 | 884 PGSQL_INCLUDE=$i/$j |
885 fi | |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
886 done |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
887 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
|
888 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
|
889 PGSQL_LIBDIR=$i/$j |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
890 fi |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
891 done |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
892 done |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
893 |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
894 old_LIBS=$LIBS |
1287 | 895 if test "$PGSQL_LIBDIR" != ""; then |
896 LIBS="$LIBS -L$PGSQL_LIBDIR" | |
897 fi | |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
898 |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
899 AC_CHECK_LIB(pq, PQconnectdb, [ |
1287 | 900 old_CPPFLAGS=$CPPFLAGS |
901 if test "$PGSQL_INCLUDE" != ""; then | |
902 CPPFLAGS="$CPPFLAGS -I $PGSQL_INCLUDE" | |
903 fi | |
904 AC_CHECK_HEADER(libpq-fe.h, [ | |
905 if test "$PGSQL_INCLUDE" != ""; then | |
906 AUTH_CFLAGS="$AUTH_CFLAGS -I$PGSQL_INCLUDE" | |
907 fi | |
908 if test "$PGSQL_LIBDIR" != ""; then | |
909 AUTH_LIBS="$AUTH_LIBS -L$PGSQL_LIBDIR" | |
910 fi | |
911 AUTH_LIBS="$AUTH_LIBS -lpq" | |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
912 AC_DEFINE(USERDB_PGSQL,, Build with PostgreSQL support) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
913 AC_DEFINE(PASSDB_PGSQL,, Build with PostgreSQL support) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
914 userdb="$userdb pgsql" |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
915 passdb="$passdb pgsql" |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
916 ]) |
1287 | 917 CPPFLAGS=$old_CPPFLAGS |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
918 ]) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
919 LIBS=$old_LIBS |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
920 fi |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
921 |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
922 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
|
923 vpopmail_home="`echo ~vpopmail`" |
281 | 924 vpop_libdeps="$vpopmail_home/etc/lib_deps" |
925 | |
926 AC_MSG_CHECKING([for vpopmail configuration at $vpop_libdeps]) | |
927 if test -f $vpop_libdeps; then | |
283 | 928 need_crypt=yes |
1284 | 929 AUTH_CFLAGS="$AUTH_CFLAGS `cat $vpopmail_home/etc/inc_deps` $CFLAGS" |
930 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
|
931 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
|
932 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
|
933 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
|
934 passdb="$passdb vpopmail" |
281 | 935 AC_MSG_RESULT(found) |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
936 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
937 want_vpopmail=no |
281 | 938 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
|
939 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
940 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
941 |
907
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
942 if test $want_cyrus_sasl2 = yes; then |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
943 AC_CHECK_LIB(sasl2, sasl_server_start, [ |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
944 AC_CHECK_HEADER(sasl/sasl.h, [ |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
945 AC_DEFINE(USE_CYRUS_SASL2,, |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
946 Define if you want to use Cyrus SASL library) |
1284 | 947 AUTH_LIBS="$AUTH_LIBS -lsasl2" |
907
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
948 ]) |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
949 ]) |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
950 fi |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
951 |
0 | 952 if test $need_crypt = yes; then |
953 AC_CHECK_LIB(crypt, crypt, [ | |
1284 | 954 AUTH_LIBS="$AUTH_LIBS -lcrypt" |
0 | 955 ], [ |
956 AC_CHECK_FUNC(crypt,, [ | |
957 AC_ERROR([crypt() wasn't found]) | |
958 ]) | |
959 ]) | |
960 fi | |
961 | |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
962 dnl * dynamic modules? |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
963 have_modules=no |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
964 AC_CHECK_FUNC(dlopen, [ |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
965 have_modules=yes |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
966 MODULE_LIBS="-export-dynamic" |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
967 ], [ |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
968 AC_CHECK_LIB(dl, dlopen, [ |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
969 have_modules=yes |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
970 MODULE_LIBS="-export-dynamic -ldl" |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
971 ]) |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
972 ]) |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
973 |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
974 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
|
975 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
|
976 userdb="$userdb (modules)" |
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
977 passdb="$passdb (modules)" |
1465
03dd87873a81
Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents:
1462
diff
changeset
|
978 |
03dd87873a81
Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents:
1462
diff
changeset
|
979 AC_SUBST(MODULE_LIBS) |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
980 fi |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
981 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
982 AC_SUBST(AUTH_CFLAGS) |
1284 | 983 AC_SUBST(AUTH_LIBS) |
0 | 984 |
985 dnl ** | |
986 dnl ** Index file compatibility flags | |
987 dnl ** | |
988 | |
989 dnl * currently just checking for endianess | |
990 | |
991 AC_C_BIGENDIAN | |
992 | |
993 if test $ac_cv_c_bigendian = yes; then | |
994 flags=0 | |
995 | |
996 else | |
997 flags=1 | |
998 fi | |
999 | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
1000 AC_DEFINE_UNQUOTED(MAIL_INDEX_COMPAT_FLAGS, $flags, Index file compatibility flags) |
0 | 1001 |
1002 dnl ** | |
1003 dnl ** IPv6 support | |
1004 dnl ** | |
1005 | |
1006 if test "x$want_ipv6" = "xyes"; then | |
1007 AC_MSG_CHECKING([for IPv6]) | |
1008 AC_CACHE_VAL(i_cv_type_in6_addr, | |
1009 [AC_TRY_COMPILE([ | |
1010 #include <sys/types.h> | |
1011 #include <sys/socket.h> | |
1012 #include <netinet/in.h> | |
1013 #include <netdb.h> | |
1014 #include <arpa/inet.h>], | |
1015 [struct in6_addr i;], | |
1016 i_cv_type_in6_addr=yes, | |
1017 i_cv_type_in6_addr=no, | |
1018 )]) | |
1019 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
|
1020 AC_DEFINE(HAVE_IPV6,, Build with IPv6 support) |
0 | 1021 fi |
1022 AC_MSG_RESULT($i_cv_type_in6_addr) | |
1023 fi | |
1024 | |
1025 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
|
1026 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
|
1027 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
|
1028 |
1462
314a91d2761f
libstorage_index_* -> libindex_*
Timo Sirainen <tss@iki.fi>
parents:
1422
diff
changeset
|
1029 maildir_libs="../lib-storage/index/maildir/libstorage_maildir.a ../lib-index/maildir/libindex_maildir.a" |
314a91d2761f
libstorage_index_* -> libindex_*
Timo Sirainen <tss@iki.fi>
parents:
1422
diff
changeset
|
1030 mbox_libs="../lib-storage/index/mbox/libstorage_mbox.a ../lib-index/mbox/libindex_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
|
1031 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
|
1032 |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
1033 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
|
1034 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
|
1035 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
|
1036 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
|
1037 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
|
1038 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
|
1039 |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
1040 |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
1041 dnl ** |
0 | 1042 dnl ** capabilities |
1043 dnl ** | |
1044 | |
1244
40bae47bdba1
Added support for CHILDREN and LISTEXT extensions.
Timo Sirainen <tss@iki.fi>
parents:
1172
diff
changeset
|
1045 capability="IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN LISTEXT LIST-SUBSCRIBED" |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
1046 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability", IMAP capabilities) |
0 | 1047 |
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
|
1048 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
|
1049 |
0 | 1050 AC_OUTPUT( |
1051 Makefile | |
1052 doc/Makefile | |
1053 src/Makefile | |
1054 src/lib/Makefile | |
568
f2aa58c2afd0
SEARCH CHARSET support. Currently we do it through iconv() and only ASCII
Timo Sirainen <tss@iki.fi>
parents:
550
diff
changeset
|
1055 src/lib-charset/Makefile |
0 | 1056 src/lib-imap/Makefile |
1057 src/lib-index/Makefile | |
1058 src/lib-index/maildir/Makefile | |
1059 src/lib-index/mbox/Makefile | |
1060 src/lib-mail/Makefile | |
1058
3b8fb7bf7ecc
Moved settings parsing to lib-settings.
Timo Sirainen <tss@iki.fi>
parents:
1057
diff
changeset
|
1061 src/lib-settings/Makefile |
0 | 1062 src/lib-storage/Makefile |
1063 src/lib-storage/index/Makefile | |
1064 src/lib-storage/index/maildir/Makefile | |
1065 src/lib-storage/index/mbox/Makefile | |
1066 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
|
1067 src/lib-storage/register/Makefile |
0 | 1068 src/auth/Makefile |
1069 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
|
1070 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
|
1071 src/login-common/Makefile |
0 | 1072 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
|
1073 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
|
1074 src/pop3-login/Makefile |
1418
c36d18766a35
0.99.9.1 released. Added redhat spec file.
Timo Sirainen <tss@iki.fi>
parents:
1410
diff
changeset
|
1075 stamp.h |
c36d18766a35
0.99.9.1 released. Added redhat spec file.
Timo Sirainen <tss@iki.fi>
parents:
1410
diff
changeset
|
1076 dovecot.spec) |
0 | 1077 |
1096
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1078 dnl ** |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1079 dnl ** register the storage classes |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1080 dnl ** |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1081 |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1082 dnl * do it after AC_OUTPUT(), so we know that the directory exists. |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1083 dnl * it doesn't when building in different directory |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1084 |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1085 file="src/lib-storage/register/mail-storage-register.c" |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1086 |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1087 echo "/* this file is generated by configure */" > $file |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1088 echo '#include "lib.h"' >> $file |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1089 echo '#include "mail-storage.h"' >> $file |
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
|
1090 for storage in $mail_storages; do |
1096
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1091 echo "extern struct mail_storage ${storage}_storage;" >> $file |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1092 done |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1093 echo "void mail_storage_register_all(void) {" >> $file |
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
|
1094 for storage in $mail_storages; do |
1096
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1095 echo "mail_storage_class_register(&${storage}_storage);" >> $file |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1096 done |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1097 echo "}" >> $file |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1098 |
0 | 1099 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
|
1100 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
|
1101 echo "File offsets ........................ : ${offt_bits}bit" |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
1102 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
|
1103 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
|
1104 echo "Building with pop3 server ........... : $want_pop3d" |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1105 echo "Building with user database modules . :$userdb" |
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1106 echo "Building with password lookup modules :$passdb" |