Mercurial > dovecot > original-hg > dovecot-1.2
annotate configure.in @ 247:cba0daefb7a5 HEAD
report --without-gnutls better..
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 16 Sep 2002 08:20:54 +0300 |
parents | fa3b4c2e252a |
children | fa2d1a1d025e |
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 | |
224 | 16 AC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h) |
17 AC_CHECK_HEADERS(sys/sendfile.h linux/mman.h) | |
0 | 18 |
19 # check posix headers | |
20 AC_CHECK_HEADERS(sys/time.h) | |
21 | |
22 AC_ARG_ENABLE(ipv6, | |
23 [ --enable-ipv6 Enable IPv6 support], | |
24 if test x$enableval = xno; then | |
25 want_ipv6=no | |
26 else | |
27 want_ipv6=yes | |
28 fi, | |
29 want_ipv6=no) | |
30 | |
31 AC_ARG_ENABLE(passwd, | |
32 [ --disable-passwd Disable /etc/passwd support], | |
33 if test x$enableval = xno; then | |
34 want_passwd=no | |
35 else | |
36 want_passwd=yes | |
37 fi, | |
38 want_passwd=yes) | |
39 | |
40 AC_ARG_ENABLE(passwd-file, | |
41 [ --disable-passwd-file Disable passwd-like file support], | |
42 if test x$enableval = xno; then | |
43 want_passwd_file=no | |
44 else | |
45 want_passwd_file=yes | |
46 fi, | |
47 want_passwd_file=yes) | |
48 | |
49 AC_ARG_ENABLE(shadow, | |
50 [ --disable-shadow Disable shadow password support], | |
51 if test x$enableval = xno; then | |
52 want_shadow=no | |
53 else | |
54 want_shadow=yes | |
55 fi, | |
56 want_shadow=yes) | |
57 | |
58 AC_ARG_ENABLE(pam, | |
59 [ --disable-pam Disable PAM support], | |
60 if test x$enableval = xno; then | |
61 want_pam=no | |
62 else | |
63 want_pam=yes | |
64 fi, | |
65 want_pam=yes) | |
66 | |
246
fa3b4c2e252a
another typo .. maybe --without-gnutls works now :)
Timo Sirainen <tss@iki.fi>
parents:
245
diff
changeset
|
67 AC_ARG_WITH(gnutls, |
244 | 68 [ --without-gnutls Don't try to use GNUTLS], |
245 | 69 if test x$withval = xno; then |
244 | 70 want_gnutls=no |
71 else | |
72 want_gnutls=yes | |
73 fi, | |
74 want_gnutls=yes) | |
75 | |
0 | 76 dnl ** |
77 dnl ** just some generic stuff... | |
78 dnl ** | |
79 | |
80 AC_CHECK_FUNC(socket, [], [ | |
81 AC_CHECK_LIB(socket, socket, [ | |
82 LIBS="$LIBS -lsocket" | |
83 ]) | |
84 ]) | |
85 | |
86 AC_CHECK_FUNC(inet_addr, [], [ | |
87 AC_CHECK_LIB(nsl, inet_addr, [ | |
88 LIBS="$LIBS -lnsl" | |
89 ]) | |
90 ]) | |
91 | |
92 dnl * after -lsocket and -lnsl tests, inet_aton() may be in them | |
93 AC_CHECK_FUNCS(fcntl flock inet_aton sigaction getpagesize madvise setreuid) | |
94 AC_CHECK_FUNCS(strcasecmp stricmp vsnprintf memmove vsyslog) | |
95 | |
96 dnl * poll/select? | |
97 | |
98 AC_CHECK_FUNC(poll, [ | |
99 have_poll=yes | |
100 ], [ | |
101 have_poll=no | |
102 ]) | |
103 AM_CONDITIONAL(IOLOOP_POLL, test "$have_poll" = "yes") | |
104 | |
105 dnl * gcc specific options | |
106 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
|
107 # -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
|
108 CFLAGS="$CFLAGS -Wall -W" |
0 | 109 fi |
110 | |
111 dnl * OS specific options | |
112 case "$host_os" in | |
113 hpux*) | |
114 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" | |
115 ;; | |
116 *) | |
117 ;; | |
118 esac | |
119 | |
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
|
120 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
|
121 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
|
122 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
|
123 |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
124 AC_CHECK_SIZEOF(int) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
125 AC_CHECK_SIZEOF(long) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
126 AC_CHECK_SIZEOF(long long) |
185 | 127 |
128 dnl * older autoconfs don't include sys/types.h, so do it manually | |
129 AC_MSG_CHECKING([size of ssize_t]) | |
130 AC_TRY_RUN([ | |
131 #include <stdio.h> | |
132 #include <sys/types.h> | |
133 int main() { | |
134 FILE *f=fopen("conftestval", "w"); | |
135 if (!f) exit(1); | |
136 fprintf(f, "%d\n", sizeof(ssize_t)); | |
137 exit(0); | |
138 } | |
139 ], [ | |
140 sizeof_ssize_t=`cat conftestval` | |
141 rm -f conftestval | |
142 ], [ | |
143 sizeof_ssize_t=0 | |
144 AC_ERROR([Unsupported ssize_t size]) | |
145 ]) | |
186
041fb6098877
result of ssize_t check wasn't reported
Timo Sirainen <tss@iki.fi>
parents:
185
diff
changeset
|
146 AC_MSG_RESULT($sizeof_ssize_t) |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
147 |
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
|
148 AC_MSG_CHECKING([size of off_t]) |
185 | 149 AC_TRY_RUN([ |
150 #include <stdio.h> | |
151 #include <sys/types.h> | |
152 int main() { | |
153 FILE *f=fopen("conftestval", "w"); | |
154 if (!f) exit(1); | |
155 fprintf(f, "%d\n", sizeof(off_t)); | |
156 exit(0); | |
157 } | |
158 ], [ | |
159 sizeof_off_t=`cat conftestval` | |
160 rm -f conftestval | |
161 ], [ | |
162 sizeof_off_t=0 | |
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
|
163 AC_ERROR([Unsupported off_t size]) |
185 | 164 ]) |
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
|
165 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
|
166 |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
167 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
|
168 # 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
|
169 AC_DEFINE_UNQUOTED(OFF_T_MAX, LONG_MAX) |
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
|
170 AC_DEFINE_UNQUOTED(PRIuUOFF_T, "lu") |
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
|
171 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
|
172 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
|
173 # 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
|
174 AC_DEFINE_UNQUOTED(OFF_T_MAX, INT_MAX) |
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
|
175 AC_DEFINE_UNQUOTED(PRIuUOFF_T, "u") |
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
|
176 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
|
177 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
|
178 # and finally long long |
56 | 179 AC_DEFINE_UNQUOTED(OFF_T_MAX, LLONG_MAX) |
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
|
180 AC_DEFINE_UNQUOTED(PRIuUOFF_T, "llu") |
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
|
181 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
|
182 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
|
183 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
|
184 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
|
185 |
185 | 186 if test x$sizeof_ssize_t = x$ac_cv_sizeof_int; then |
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
|
187 AC_DEFINE_UNQUOTED(SSIZE_T_MAX, INT_MAX) |
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
|
188 AC_DEFINE_UNQUOTED(PRIuSIZE_T, "u") |
191
e5465a0c6964
ssize_t should be checked against long before long long.
Timo Sirainen <tss@iki.fi>
parents:
186
diff
changeset
|
189 elif test x$sizeof_ssize_t = x$ac_cv_sizeof_long; then |
e5465a0c6964
ssize_t should be checked against long before long long.
Timo Sirainen <tss@iki.fi>
parents:
186
diff
changeset
|
190 AC_DEFINE_UNQUOTED(SSIZE_T_MAX, LONG_MAX) |
e5465a0c6964
ssize_t should be checked against long before long long.
Timo Sirainen <tss@iki.fi>
parents:
186
diff
changeset
|
191 AC_DEFINE_UNQUOTED(PRIuSIZE_T, "lu") |
185 | 192 elif test x$sizeof_ssize_t = x$ac_cv_sizeof_long_long; then |
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
|
193 AC_DEFINE_UNQUOTED(SSIZE_T_MAX, LLONG_MAX) |
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
|
194 AC_DEFINE_UNQUOTED(PRIuSIZE_T, "llu") |
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
|
195 else |
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
|
196 AC_ERROR([Couldn't find integer type for ssize_t]) |
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
|
197 fi |
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
|
198 |
179
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
199 if test x$ac_cv_sizeof_long_long != x0; then |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
200 AC_DEFINE(LARGEST_T_LONG_LONG) |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
201 else |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
202 AC_DEFINE(LARGEST_T_LONG) |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
203 fi |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
204 |
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
|
205 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
|
206 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
|
207 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
|
208 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
|
209 AC_DEFINE(MEM_ALIGN_SIZE, 8) |
0 | 210 |
211 dnl * socklen_t - AC_CHECK_TYPE() would be _really_ useful if it only would | |
212 dnl * accept header files where to find the typedef.. | |
213 AC_MSG_CHECKING([for socklen_t]) | |
214 AC_CACHE_VAL(i_cv_type_socklen_t, | |
215 [AC_TRY_COMPILE([ | |
216 #include <sys/types.h> | |
217 #include <sys/socket.h>], | |
218 [socklen_t t;], | |
219 i_cv_type_socklen_t=yes, | |
220 i_cv_type_socklen_t=no, | |
221 )]) | |
222 if test $i_cv_type_socklen_t = no; then | |
223 AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.) | |
224 fi | |
225 AC_MSG_RESULT($i_cv_type_socklen_t) | |
226 | |
227 dnl * do we have tm_gmtoff | |
228 AC_MSG_CHECKING([for tm_gmtoff]) | |
229 AC_CACHE_VAL(i_cv_field_tm_gmtoff, | |
230 [AC_TRY_COMPILE([ | |
231 #include <time.h>], | |
232 [struct tm *tm; return tm->tm_gmtoff;], | |
233 i_cv_field_tm_gmtoff=yes, | |
234 i_cv_field_tm_gmtoff=no, | |
235 )]) | |
236 if test $i_cv_field_tm_gmtoff = yes; then | |
237 AC_DEFINE(HAVE_TM_GMTOFF) | |
238 fi | |
239 AC_MSG_RESULT($i_cv_field_tm_gmtoff) | |
240 | |
224 | 241 dnl * linux compatible mremap() |
242 AC_MSG_CHECKING([linux compatible mremap()]) | |
243 AC_TRY_RUN([ | |
244 #include <unistd.h> | |
245 #define __USE_GNU | |
246 #include <sys/mman.h> | |
247 int main() { mremap(0, 0, 0, MREMAP_MAYMOVE); } | |
248 ], [ | |
249 AC_DEFINE(HAVE_LINUX_MREMAP) | |
250 AC_MSG_RESULT(yes) | |
251 ], [ | |
252 AC_MSG_RESULT(no) | |
253 ]) | |
254 | |
0 | 255 dnl ** |
256 dnl ** SSL (gnutls) | |
257 dnl ** | |
258 | |
244 | 259 if test $want_gnutls = yes; then |
260 AC_CHECK_LIB(gnutls, gnutls_global_init, [ | |
261 AC_DEFINE(HAVE_SSL) | |
262 SSL_LIBS="-lgnutls -lgcrypt" | |
263 AC_SUBST(SSL_LIBS) | |
264 have_ssl=yes | |
265 ], [ | |
266 have_ssl=no | |
267 ], -lgcrypt) | |
247
cba0daefb7a5
report --without-gnutls better..
Timo Sirainen <tss@iki.fi>
parents:
246
diff
changeset
|
268 else |
cba0daefb7a5
report --without-gnutls better..
Timo Sirainen <tss@iki.fi>
parents:
246
diff
changeset
|
269 have_ssl=no |
244 | 270 fi |
0 | 271 |
272 dnl ** | |
273 dnl ** shadow/pam support | |
274 dnl ** | |
275 | |
276 need_crypt=no | |
277 auths="" | |
278 | |
279 if test $want_passwd = yes; then | |
280 need_crypt=yes | |
281 AC_DEFINE(USERINFO_PASSWD) | |
282 auths="$auths passwd" | |
283 fi | |
284 | |
285 if test $want_passwd_file = yes; then | |
286 need_crypt=yes | |
287 AC_DEFINE(USERINFO_PASSWD_FILE) | |
288 auths="$auths passwd-file" | |
289 fi | |
290 | |
291 if test $want_shadow = yes; then | |
292 AC_CHECK_FUNC(getspnam, [ | |
293 need_crypt=yes | |
294 AC_DEFINE(USERINFO_SHADOW) | |
295 auths="$auths shadow" | |
296 ]) | |
297 fi | |
298 | |
299 if test $want_pam = yes; then | |
300 AC_CHECK_LIB(pam, pam_start, [ | |
301 AC_CHECK_HEADER(security/pam_appl.h, [ | |
302 USERINFO_LIBS="$USERINFO_LIBS -lpam" | |
303 AC_DEFINE(USERINFO_PAM) | |
304 auths="$auths pam" | |
305 ]) | |
306 ]) | |
307 fi | |
308 | |
309 if test $need_crypt = yes; then | |
310 AC_CHECK_LIB(crypt, crypt, [ | |
311 USERINFO_LIBS="$USERINFO_LIBS -lcrypt" | |
312 ], [ | |
313 AC_CHECK_FUNC(crypt,, [ | |
314 AC_ERROR([crypt() wasn't found]) | |
315 ]) | |
316 ]) | |
317 fi | |
318 | |
319 AC_SUBST(USERINFO_LIBS) | |
320 | |
321 dnl ** | |
322 dnl ** Index file compatibility flags | |
323 dnl ** | |
324 | |
325 dnl * currently just checking for endianess | |
326 | |
327 AC_C_BIGENDIAN | |
328 | |
329 if test $ac_cv_c_bigendian = yes; then | |
330 flags=0 | |
331 | |
332 else | |
333 flags=1 | |
334 fi | |
335 | |
336 AC_DEFINE_UNQUOTED(MAIL_INDEX_COMPAT_FLAGS, $flags) | |
337 | |
338 dnl ** | |
339 dnl ** IPv6 support | |
340 dnl ** | |
341 | |
342 if test "x$want_ipv6" = "xyes"; then | |
343 AC_MSG_CHECKING([for IPv6]) | |
344 AC_CACHE_VAL(i_cv_type_in6_addr, | |
345 [AC_TRY_COMPILE([ | |
346 #include <sys/types.h> | |
347 #include <sys/socket.h> | |
348 #include <netinet/in.h> | |
349 #include <netdb.h> | |
350 #include <arpa/inet.h>], | |
351 [struct in6_addr i;], | |
352 i_cv_type_in6_addr=yes, | |
353 i_cv_type_in6_addr=no, | |
354 )]) | |
355 if test $i_cv_type_in6_addr = yes; then | |
356 AC_DEFINE(HAVE_IPV6) | |
357 fi | |
358 AC_MSG_RESULT($i_cv_type_in6_addr) | |
359 fi | |
360 | |
361 dnl ** | |
362 dnl ** capabilities | |
363 dnl ** | |
364 | |
365 capability="IMAP4rev1" | |
366 if test "$have_ssl" = "yes"; then | |
367 capability="$capability STARTTLS" | |
368 fi | |
369 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability") | |
370 | |
371 dnl ** | |
372 dnl ** register the storage classes | |
373 dnl ** | |
374 | |
375 STORAGE="maildir mbox" | |
376 file="src/lib-storage/mail-storage-register.c" | |
377 | |
378 echo "/* this file is generated by configure */" > $file | |
379 echo '#include "lib.h"' >> $file | |
380 echo '#include "mail-storage.h"' >> $file | |
381 for storage in $STORAGE; do | |
382 echo "extern MailStorage ${storage}_storage;" >> $file | |
383 done | |
384 echo "void mail_storage_register_all(void) {" >> $file | |
385 for storage in $STORAGE; do | |
386 echo "mail_storage_class_register(&${storage}_storage);" >> $file | |
387 done | |
388 echo "}" >> $file | |
389 | |
390 AC_OUTPUT( | |
391 Makefile | |
392 doc/Makefile | |
393 src/Makefile | |
394 src/lib/Makefile | |
395 src/lib-imap/Makefile | |
396 src/lib-index/Makefile | |
397 src/lib-index/maildir/Makefile | |
398 src/lib-index/mbox/Makefile | |
399 src/lib-mail/Makefile | |
400 src/lib-storage/Makefile | |
401 src/lib-storage/index/Makefile | |
402 src/lib-storage/index/maildir/Makefile | |
403 src/lib-storage/index/mbox/Makefile | |
404 src/lib-storage/subscription-file/Makefile | |
405 src/auth/Makefile | |
406 src/imap/Makefile | |
407 src/login/Makefile | |
408 src/master/Makefile | |
409 stamp.h) | |
410 | |
411 echo | |
412 echo "Install prefix ............. : $prefix" | |
413 echo "Building with auth modules . :$auths" | |
414 echo "Building with SSL support .. : $have_ssl" | |
415 echo "Building with IPv6 support . : $want_ipv6" |