Mercurial > dovecot > core-2.2
annotate configure.in @ 183:4a7ab9e94f25 HEAD
size_t fixes for lib/. Changed OFF_T_FORMAT to PRIuOFF_T which is more
C99-like.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 08 Sep 2002 16:20:28 +0300 |
parents | 0ffecd4e7e1a |
children | 60925d3e2c4d |
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) |
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
|
117 AC_CHECK_SIZEOF(ssize_t) |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
118 |
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
|
119 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
|
120 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
|
121 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
|
122 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
|
123 #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
|
124 #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
|
125 #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
|
126 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
|
127 ], [ |
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 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
|
129 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
|
130 ]) |
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 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
|
132 |
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 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
|
134 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
|
135 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
|
136 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
|
137 |
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 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
|
139 # 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
|
140 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
|
141 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
|
142 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
|
143 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
|
144 # 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
|
145 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
|
146 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
|
147 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
|
148 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
|
149 # and finally long long |
56 | 150 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
|
151 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
|
152 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
|
153 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
|
154 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
|
155 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
|
156 |
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
|
157 if test x$ac_cv_sizeof_ssize_t = x$ac_cv_sizeof_int; then |
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
|
158 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
|
159 AC_DEFINE_UNQUOTED(PRIuSIZE_T, "u") |
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
|
160 elif test x$ac_cv_sizeof_ssize_t = x$ac_cv_sizeof_long_long; then |
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
|
161 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
|
162 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
|
163 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
|
164 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
|
165 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
|
166 |
179
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
167 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
|
168 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
|
169 else |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
170 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
|
171 fi |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
172 |
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
|
173 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
|
174 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
|
175 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
|
176 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
|
177 AC_DEFINE(MEM_ALIGN_SIZE, 8) |
0 | 178 |
179 dnl * socklen_t - AC_CHECK_TYPE() would be _really_ useful if it only would | |
180 dnl * accept header files where to find the typedef.. | |
181 AC_MSG_CHECKING([for socklen_t]) | |
182 AC_CACHE_VAL(i_cv_type_socklen_t, | |
183 [AC_TRY_COMPILE([ | |
184 #include <sys/types.h> | |
185 #include <sys/socket.h>], | |
186 [socklen_t t;], | |
187 i_cv_type_socklen_t=yes, | |
188 i_cv_type_socklen_t=no, | |
189 )]) | |
190 if test $i_cv_type_socklen_t = no; then | |
191 AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.) | |
192 fi | |
193 AC_MSG_RESULT($i_cv_type_socklen_t) | |
194 | |
195 dnl * do we have tm_gmtoff | |
196 AC_MSG_CHECKING([for tm_gmtoff]) | |
197 AC_CACHE_VAL(i_cv_field_tm_gmtoff, | |
198 [AC_TRY_COMPILE([ | |
199 #include <time.h>], | |
200 [struct tm *tm; return tm->tm_gmtoff;], | |
201 i_cv_field_tm_gmtoff=yes, | |
202 i_cv_field_tm_gmtoff=no, | |
203 )]) | |
204 if test $i_cv_field_tm_gmtoff = yes; then | |
205 AC_DEFINE(HAVE_TM_GMTOFF) | |
206 fi | |
207 AC_MSG_RESULT($i_cv_field_tm_gmtoff) | |
208 | |
209 dnl ** | |
210 dnl ** SSL (gnutls) | |
211 dnl ** | |
212 | |
213 AC_CHECK_LIB(gnutls, gnutls_global_init, [ | |
214 AC_DEFINE(HAVE_SSL) | |
215 SSL_LIBS="-lgnutls -lgcrypt" | |
216 AC_SUBST(SSL_LIBS) | |
217 have_ssl=yes | |
218 ], [ | |
219 have_ssl=no | |
220 ], -lgcrypt) | |
221 | |
222 dnl ** | |
223 dnl ** shadow/pam support | |
224 dnl ** | |
225 | |
226 need_crypt=no | |
227 auths="" | |
228 | |
229 if test $want_passwd = yes; then | |
230 need_crypt=yes | |
231 AC_DEFINE(USERINFO_PASSWD) | |
232 auths="$auths passwd" | |
233 fi | |
234 | |
235 if test $want_passwd_file = yes; then | |
236 need_crypt=yes | |
237 AC_DEFINE(USERINFO_PASSWD_FILE) | |
238 auths="$auths passwd-file" | |
239 fi | |
240 | |
241 if test $want_shadow = yes; then | |
242 AC_CHECK_FUNC(getspnam, [ | |
243 need_crypt=yes | |
244 AC_DEFINE(USERINFO_SHADOW) | |
245 auths="$auths shadow" | |
246 ]) | |
247 fi | |
248 | |
249 if test $want_pam = yes; then | |
250 AC_CHECK_LIB(pam, pam_start, [ | |
251 AC_CHECK_HEADER(security/pam_appl.h, [ | |
252 USERINFO_LIBS="$USERINFO_LIBS -lpam" | |
253 AC_DEFINE(USERINFO_PAM) | |
254 auths="$auths pam" | |
255 ]) | |
256 ]) | |
257 fi | |
258 | |
259 if test $need_crypt = yes; then | |
260 AC_CHECK_LIB(crypt, crypt, [ | |
261 USERINFO_LIBS="$USERINFO_LIBS -lcrypt" | |
262 ], [ | |
263 AC_CHECK_FUNC(crypt,, [ | |
264 AC_ERROR([crypt() wasn't found]) | |
265 ]) | |
266 ]) | |
267 fi | |
268 | |
269 AC_SUBST(USERINFO_LIBS) | |
270 | |
271 dnl ** | |
272 dnl ** Index file compatibility flags | |
273 dnl ** | |
274 | |
275 dnl * currently just checking for endianess | |
276 | |
277 AC_C_BIGENDIAN | |
278 | |
279 if test $ac_cv_c_bigendian = yes; then | |
280 flags=0 | |
281 | |
282 else | |
283 flags=1 | |
284 fi | |
285 | |
286 AC_DEFINE_UNQUOTED(MAIL_INDEX_COMPAT_FLAGS, $flags) | |
287 | |
288 dnl ** | |
289 dnl ** IPv6 support | |
290 dnl ** | |
291 | |
292 if test "x$want_ipv6" = "xyes"; then | |
293 AC_MSG_CHECKING([for IPv6]) | |
294 AC_CACHE_VAL(i_cv_type_in6_addr, | |
295 [AC_TRY_COMPILE([ | |
296 #include <sys/types.h> | |
297 #include <sys/socket.h> | |
298 #include <netinet/in.h> | |
299 #include <netdb.h> | |
300 #include <arpa/inet.h>], | |
301 [struct in6_addr i;], | |
302 i_cv_type_in6_addr=yes, | |
303 i_cv_type_in6_addr=no, | |
304 )]) | |
305 if test $i_cv_type_in6_addr = yes; then | |
306 AC_DEFINE(HAVE_IPV6) | |
307 fi | |
308 AC_MSG_RESULT($i_cv_type_in6_addr) | |
309 fi | |
310 | |
311 dnl ** | |
312 dnl ** capabilities | |
313 dnl ** | |
314 | |
315 capability="IMAP4rev1" | |
316 if test "$have_ssl" = "yes"; then | |
317 capability="$capability STARTTLS" | |
318 fi | |
319 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability") | |
320 | |
321 dnl ** | |
322 dnl ** register the storage classes | |
323 dnl ** | |
324 | |
325 STORAGE="maildir mbox" | |
326 file="src/lib-storage/mail-storage-register.c" | |
327 | |
328 echo "/* this file is generated by configure */" > $file | |
329 echo '#include "lib.h"' >> $file | |
330 echo '#include "mail-storage.h"' >> $file | |
331 for storage in $STORAGE; do | |
332 echo "extern MailStorage ${storage}_storage;" >> $file | |
333 done | |
334 echo "void mail_storage_register_all(void) {" >> $file | |
335 for storage in $STORAGE; do | |
336 echo "mail_storage_class_register(&${storage}_storage);" >> $file | |
337 done | |
338 echo "}" >> $file | |
339 | |
340 AC_OUTPUT( | |
341 Makefile | |
342 doc/Makefile | |
343 src/Makefile | |
344 src/lib/Makefile | |
345 src/lib-imap/Makefile | |
346 src/lib-index/Makefile | |
347 src/lib-index/maildir/Makefile | |
348 src/lib-index/mbox/Makefile | |
349 src/lib-mail/Makefile | |
350 src/lib-storage/Makefile | |
351 src/lib-storage/index/Makefile | |
352 src/lib-storage/index/maildir/Makefile | |
353 src/lib-storage/index/mbox/Makefile | |
354 src/lib-storage/subscription-file/Makefile | |
355 src/auth/Makefile | |
356 src/imap/Makefile | |
357 src/login/Makefile | |
358 src/master/Makefile | |
359 stamp.h) | |
360 | |
361 echo | |
362 echo "Install prefix ............. : $prefix" | |
363 echo "Building with auth modules . :$auths" | |
364 echo "Building with SSL support .. : $have_ssl" | |
365 echo "Building with IPv6 support . : $want_ipv6" |