Mercurial > dovecot > original-hg > dovecot-1.2
annotate configure.in @ 160:ff05b320482c HEAD
Bigger changes.. full_virtual_size was removed from index record and
MessagePart caching is now forced. Also added per-message flags, including
binary flags which can be used to check if CRs need to be inserted into
message data.
Added mbox-rewrite support which can be used to write out mbox file with
updated flags. This still has the problem of being able to read changed
custom flags, that'll require another bigger change.
There's also several other mostly mbox related fixes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 06 Sep 2002 16:43:58 +0300 |
parents | fb7500933a11 |
children | 73bf05a1d862 |
rev | line source |
---|---|
0 | 1 AC_INIT(src) |
2 | |
3 AM_CONFIG_HEADER(config.h) | |
96 | 4 AM_INIT_AUTOMAKE(dovecot, 0.97) |
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 | |
15 | |
16 AC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h sys/sendfile.h) | |
17 | |
18 # check posix headers | |
19 AC_CHECK_HEADERS(sys/time.h) | |
20 | |
21 AC_ARG_ENABLE(ipv6, | |
22 [ --enable-ipv6 Enable IPv6 support], | |
23 if test x$enableval = xno; then | |
24 want_ipv6=no | |
25 else | |
26 want_ipv6=yes | |
27 fi, | |
28 want_ipv6=no) | |
29 | |
30 AC_ARG_ENABLE(passwd, | |
31 [ --disable-passwd Disable /etc/passwd support], | |
32 if test x$enableval = xno; then | |
33 want_passwd=no | |
34 else | |
35 want_passwd=yes | |
36 fi, | |
37 want_passwd=yes) | |
38 | |
39 AC_ARG_ENABLE(passwd-file, | |
40 [ --disable-passwd-file Disable passwd-like file support], | |
41 if test x$enableval = xno; then | |
42 want_passwd_file=no | |
43 else | |
44 want_passwd_file=yes | |
45 fi, | |
46 want_passwd_file=yes) | |
47 | |
48 AC_ARG_ENABLE(shadow, | |
49 [ --disable-shadow Disable shadow password support], | |
50 if test x$enableval = xno; then | |
51 want_shadow=no | |
52 else | |
53 want_shadow=yes | |
54 fi, | |
55 want_shadow=yes) | |
56 | |
57 AC_ARG_ENABLE(pam, | |
58 [ --disable-pam Disable PAM support], | |
59 if test x$enableval = xno; then | |
60 want_pam=no | |
61 else | |
62 want_pam=yes | |
63 fi, | |
64 want_pam=yes) | |
65 | |
66 dnl ** | |
67 dnl ** just some generic stuff... | |
68 dnl ** | |
69 | |
70 AC_CHECK_FUNC(socket, [], [ | |
71 AC_CHECK_LIB(socket, socket, [ | |
72 LIBS="$LIBS -lsocket" | |
73 ]) | |
74 ]) | |
75 | |
76 AC_CHECK_FUNC(inet_addr, [], [ | |
77 AC_CHECK_LIB(nsl, inet_addr, [ | |
78 LIBS="$LIBS -lnsl" | |
79 ]) | |
80 ]) | |
81 | |
82 dnl * after -lsocket and -lnsl tests, inet_aton() may be in them | |
83 AC_CHECK_FUNCS(fcntl flock inet_aton sigaction getpagesize madvise setreuid) | |
84 AC_CHECK_FUNCS(strcasecmp stricmp vsnprintf memmove vsyslog) | |
85 | |
86 dnl * poll/select? | |
87 | |
88 AC_CHECK_FUNC(poll, [ | |
89 have_poll=yes | |
90 ], [ | |
91 have_poll=no | |
92 ]) | |
93 AM_CONDITIONAL(IOLOOP_POLL, test "$have_poll" = "yes") | |
94 | |
95 dnl * gcc specific options | |
96 if test "x$ac_cv_prog_gcc" = "xyes"; then | |
65
168e0bd616b6
added -Wcast-qual to list of "remember to test with" cflags :)
Timo Sirainen <tss@iki.fi>
parents:
60
diff
changeset
|
97 # -Wchar-subscripts -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations |
5
1b34ec11fff8
Message data is parsed in blocks (no longer entirely mmap()ed). Several
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
98 CFLAGS="$CFLAGS -Wall -W" |
0 | 99 fi |
100 | |
101 dnl * OS specific options | |
102 case "$host_os" in | |
103 hpux*) | |
104 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" | |
105 ;; | |
106 *) | |
107 ;; | |
108 esac | |
109 | |
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
|
110 dnl * off_t checks, try to make it 64bit |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
111 preferred_off_t_bits=64 |
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
|
112 AC_DEFINE_UNQUOTED(_FILE_OFFSET_BITS, $preferred_off_t_bits) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
113 |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
114 AC_CHECK_SIZEOF(int) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
115 AC_CHECK_SIZEOF(long) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
116 AC_CHECK_SIZEOF(long long) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
117 |
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
|
118 AC_MSG_CHECKING([size of off_t]) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
119 sizeof_off_t=0 |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
120 for size in 4 8; do |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
121 AC_TRY_RUN([ |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
122 #define _FILE_OFFSET_BITS $preferred_off_t_bits |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
123 #include <sys/types.h> |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
124 #include <unistd.h> |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
125 int main() { off_t size; return sizeof(size) == $size ? 0 : 1; } |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
126 ], [ |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
127 sizeof_off_t=$size |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
128 break |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
129 ]) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
130 done |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
131 |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
132 if test x$sizeof_off_t = x0; then |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
133 AC_ERROR([Unsupported off_t size]) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
134 fi |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
135 AC_MSG_RESULT($sizeof_off_t) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
136 |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
137 if test x$sizeof_off_t = x$ac_cv_sizeof_long; then |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
138 # try to use unsigned long always first |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
139 AC_DEFINE_UNQUOTED(OFF_T_MAX, LONG_MAX) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
140 AC_DEFINE_UNQUOTED(UOFF_T_FORMAT, "lu") |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
141 AC_DEFINE(UOFF_T_LONG) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
142 elif test x$sizeof_off_t = x$ac_cv_sizeof_int; then |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
143 # next try int |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
144 AC_DEFINE_UNQUOTED(OFF_T_MAX, INT_MAX) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
145 AC_DEFINE_UNQUOTED(UOFF_T_FORMAT, "u") |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
146 AC_DEFINE(UOFF_T_INT) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
147 elif test x$sizeof_off_t = x$ac_cv_sizeof_long_long; then |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
148 # and finally long long |
56 | 149 AC_DEFINE_UNQUOTED(OFF_T_MAX, LLONG_MAX) |
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
|
150 AC_DEFINE_UNQUOTED(UOFF_T_FORMAT, "llu") |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
151 AC_DEFINE(UOFF_T_LONG_LONG) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
152 else |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
153 AC_ERROR([Couldn't find integer type for off_t]) |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
154 fi |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
155 |
60
4ecb78d94182
Use 8 byte memory alignment by default. Also fixed index headers a bit to be
Timo Sirainen <tss@iki.fi>
parents:
56
diff
changeset
|
156 dnl * memory alignment, needed with non-x86 systems and should speed up |
4ecb78d94182
Use 8 byte memory alignment by default. Also fixed index headers a bit to be
Timo Sirainen <tss@iki.fi>
parents:
56
diff
changeset
|
157 dnl * x86 systems too. Use 8 with everyone to make sure 64bit lookups |
4ecb78d94182
Use 8 byte memory alignment by default. Also fixed index headers a bit to be
Timo Sirainen <tss@iki.fi>
parents:
56
diff
changeset
|
158 dnl * work. Currently it should also be safe to set to 4 if off_t == 32bit. |
4ecb78d94182
Use 8 byte memory alignment by default. Also fixed index headers a bit to be
Timo Sirainen <tss@iki.fi>
parents:
56
diff
changeset
|
159 dnl * With x86 it could be 1 as well if you want to save a bit space/memory. |
4ecb78d94182
Use 8 byte memory alignment by default. Also fixed index headers a bit to be
Timo Sirainen <tss@iki.fi>
parents:
56
diff
changeset
|
160 AC_DEFINE(MEM_ALIGN_SIZE, 8) |
0 | 161 |
162 dnl * socklen_t - AC_CHECK_TYPE() would be _really_ useful if it only would | |
163 dnl * accept header files where to find the typedef.. | |
164 AC_MSG_CHECKING([for socklen_t]) | |
165 AC_CACHE_VAL(i_cv_type_socklen_t, | |
166 [AC_TRY_COMPILE([ | |
167 #include <sys/types.h> | |
168 #include <sys/socket.h>], | |
169 [socklen_t t;], | |
170 i_cv_type_socklen_t=yes, | |
171 i_cv_type_socklen_t=no, | |
172 )]) | |
173 if test $i_cv_type_socklen_t = no; then | |
174 AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.) | |
175 fi | |
176 AC_MSG_RESULT($i_cv_type_socklen_t) | |
177 | |
178 dnl * do we have tm_gmtoff | |
179 AC_MSG_CHECKING([for tm_gmtoff]) | |
180 AC_CACHE_VAL(i_cv_field_tm_gmtoff, | |
181 [AC_TRY_COMPILE([ | |
182 #include <time.h>], | |
183 [struct tm *tm; return tm->tm_gmtoff;], | |
184 i_cv_field_tm_gmtoff=yes, | |
185 i_cv_field_tm_gmtoff=no, | |
186 )]) | |
187 if test $i_cv_field_tm_gmtoff = yes; then | |
188 AC_DEFINE(HAVE_TM_GMTOFF) | |
189 fi | |
190 AC_MSG_RESULT($i_cv_field_tm_gmtoff) | |
191 | |
192 dnl ** | |
193 dnl ** SSL (gnutls) | |
194 dnl ** | |
195 | |
196 AC_CHECK_LIB(gnutls, gnutls_global_init, [ | |
197 AC_DEFINE(HAVE_SSL) | |
198 SSL_LIBS="-lgnutls -lgcrypt" | |
199 AC_SUBST(SSL_LIBS) | |
200 have_ssl=yes | |
201 ], [ | |
202 have_ssl=no | |
203 ], -lgcrypt) | |
204 | |
205 dnl ** | |
206 dnl ** shadow/pam support | |
207 dnl ** | |
208 | |
209 need_crypt=no | |
210 auths="" | |
211 | |
212 if test $want_passwd = yes; then | |
213 need_crypt=yes | |
214 AC_DEFINE(USERINFO_PASSWD) | |
215 auths="$auths passwd" | |
216 fi | |
217 | |
218 if test $want_passwd_file = yes; then | |
219 need_crypt=yes | |
220 AC_DEFINE(USERINFO_PASSWD_FILE) | |
221 auths="$auths passwd-file" | |
222 fi | |
223 | |
224 if test $want_shadow = yes; then | |
225 AC_CHECK_FUNC(getspnam, [ | |
226 need_crypt=yes | |
227 AC_DEFINE(USERINFO_SHADOW) | |
228 auths="$auths shadow" | |
229 ]) | |
230 fi | |
231 | |
232 if test $want_pam = yes; then | |
233 AC_CHECK_LIB(pam, pam_start, [ | |
234 AC_CHECK_HEADER(security/pam_appl.h, [ | |
235 USERINFO_LIBS="$USERINFO_LIBS -lpam" | |
236 AC_DEFINE(USERINFO_PAM) | |
237 auths="$auths pam" | |
238 ]) | |
239 ]) | |
240 fi | |
241 | |
242 if test $need_crypt = yes; then | |
243 AC_CHECK_LIB(crypt, crypt, [ | |
244 USERINFO_LIBS="$USERINFO_LIBS -lcrypt" | |
245 ], [ | |
246 AC_CHECK_FUNC(crypt,, [ | |
247 AC_ERROR([crypt() wasn't found]) | |
248 ]) | |
249 ]) | |
250 fi | |
251 | |
252 AC_SUBST(USERINFO_LIBS) | |
253 | |
254 dnl ** | |
255 dnl ** Index file compatibility flags | |
256 dnl ** | |
257 | |
258 dnl * currently just checking for endianess | |
259 | |
260 AC_C_BIGENDIAN | |
261 | |
262 if test $ac_cv_c_bigendian = yes; then | |
263 flags=0 | |
264 | |
265 else | |
266 flags=1 | |
267 fi | |
268 | |
269 AC_DEFINE_UNQUOTED(MAIL_INDEX_COMPAT_FLAGS, $flags) | |
270 | |
271 dnl ** | |
272 dnl ** IPv6 support | |
273 dnl ** | |
274 | |
275 if test "x$want_ipv6" = "xyes"; then | |
276 AC_MSG_CHECKING([for IPv6]) | |
277 AC_CACHE_VAL(i_cv_type_in6_addr, | |
278 [AC_TRY_COMPILE([ | |
279 #include <sys/types.h> | |
280 #include <sys/socket.h> | |
281 #include <netinet/in.h> | |
282 #include <netdb.h> | |
283 #include <arpa/inet.h>], | |
284 [struct in6_addr i;], | |
285 i_cv_type_in6_addr=yes, | |
286 i_cv_type_in6_addr=no, | |
287 )]) | |
288 if test $i_cv_type_in6_addr = yes; then | |
289 AC_DEFINE(HAVE_IPV6) | |
290 fi | |
291 AC_MSG_RESULT($i_cv_type_in6_addr) | |
292 fi | |
293 | |
294 dnl ** | |
295 dnl ** capabilities | |
296 dnl ** | |
297 | |
298 capability="IMAP4rev1" | |
299 if test "$have_ssl" = "yes"; then | |
300 capability="$capability STARTTLS" | |
301 fi | |
302 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability") | |
303 | |
304 dnl ** | |
305 dnl ** register the storage classes | |
306 dnl ** | |
307 | |
308 STORAGE="maildir mbox" | |
309 file="src/lib-storage/mail-storage-register.c" | |
310 | |
311 echo "/* this file is generated by configure */" > $file | |
312 echo '#include "lib.h"' >> $file | |
313 echo '#include "mail-storage.h"' >> $file | |
314 for storage in $STORAGE; do | |
315 echo "extern MailStorage ${storage}_storage;" >> $file | |
316 done | |
317 echo "void mail_storage_register_all(void) {" >> $file | |
318 for storage in $STORAGE; do | |
319 echo "mail_storage_class_register(&${storage}_storage);" >> $file | |
320 done | |
321 echo "}" >> $file | |
322 | |
323 AC_OUTPUT( | |
324 Makefile | |
325 doc/Makefile | |
326 src/Makefile | |
327 src/lib/Makefile | |
328 src/lib-imap/Makefile | |
329 src/lib-index/Makefile | |
330 src/lib-index/maildir/Makefile | |
331 src/lib-index/mbox/Makefile | |
332 src/lib-mail/Makefile | |
333 src/lib-storage/Makefile | |
334 src/lib-storage/index/Makefile | |
335 src/lib-storage/index/maildir/Makefile | |
336 src/lib-storage/index/mbox/Makefile | |
337 src/lib-storage/subscription-file/Makefile | |
338 src/lib-storage/flags-file/Makefile | |
339 src/auth/Makefile | |
340 src/imap/Makefile | |
341 src/login/Makefile | |
342 src/master/Makefile | |
343 stamp.h) | |
344 | |
345 echo | |
346 echo "Install prefix ............. : $prefix" | |
347 echo "Building with auth modules . :$auths" | |
348 echo "Building with SSL support .. : $have_ssl" | |
349 echo "Building with IPv6 support . : $want_ipv6" |