Mercurial > dovecot > core-2.2
annotate configure.in @ 528:a95b1ccff82e HEAD
Support FreeBSD-compatible sendfile(). Completely untested.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 28 Oct 2002 05:35:05 +0200 |
parents | 83d4617e1dca |
children | 3a1be480d16a |
rev | line source |
---|---|
0 | 1 AC_INIT(src) |
2 | |
3 AM_CONFIG_HEADER(config.h) | |
353 | 4 AM_INIT_AUTOMAKE(dovecot, 0.98.4) |
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) |
528
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
17 AC_CHECK_HEADERS(sys/uio.h linux/mman.h) |
0 | 18 |
19 # check posix headers | |
20 AC_CHECK_HEADERS(sys/time.h) | |
21 | |
22 AC_ARG_ENABLE(ipv6, | |
426 | 23 [ --enable-ipv6 Enable IPv6 support (default)], |
0 | 24 if test x$enableval = xno; then |
25 want_ipv6=no | |
26 else | |
27 want_ipv6=yes | |
28 fi, | |
426 | 29 want_ipv6=yes) |
0 | 30 |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
31 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
|
32 [ --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
|
33 (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
|
34 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
|
35 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
|
36 |
439
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
37 AC_ARG_WITH(mem-align, |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
38 [ --with-mem-align=BYTES Set the memory alignment (default: 8)], |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
39 mem_align=$withval, |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
40 mem_align=8) |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
41 |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
42 AC_ARG_WITH(passwd, |
426 | 43 [ --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
|
44 if test x$withval = xno; then |
0 | 45 want_passwd=no |
46 else | |
47 want_passwd=yes | |
48 fi, | |
49 want_passwd=yes) | |
50 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
51 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
|
52 [ --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
|
53 if test x$withval = xno; then |
0 | 54 want_passwd_file=no |
55 else | |
56 want_passwd_file=yes | |
57 fi, | |
58 want_passwd_file=yes) | |
59 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
60 AC_ARG_WITH(shadow, |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
61 [ --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
|
62 if test x$withval = xno; then |
0 | 63 want_shadow=no |
64 else | |
65 want_shadow=yes | |
66 fi, | |
67 want_shadow=yes) | |
68 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
69 AC_ARG_WITH(pam, |
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
70 [ --with-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
|
71 if test x$withval = xno; then |
0 | 72 want_pam=no |
73 else | |
74 want_pam=yes | |
75 fi, | |
76 want_pam=yes) | |
77 | |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
78 AC_ARG_WITH(vpopmail, |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
79 [ --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
|
80 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
|
81 want_vpopmail=no |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
82 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
83 want_vpopmail=yes |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
84 fi, |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
85 want_vpopmail=yes) |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
86 |
246
fa3b4c2e252a
another typo .. maybe --without-gnutls works now :)
Timo Sirainen <tss@iki.fi>
parents:
245
diff
changeset
|
87 AC_ARG_WITH(gnutls, |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
88 [ --with-gnutls Build with GNUTLS (default)], |
245 | 89 if test x$withval = xno; then |
244 | 90 want_gnutls=no |
91 else | |
92 want_gnutls=yes | |
93 fi, | |
94 want_gnutls=yes) | |
95 | |
0 | 96 dnl ** |
97 dnl ** just some generic stuff... | |
98 dnl ** | |
99 | |
100 AC_CHECK_FUNC(socket, [], [ | |
101 AC_CHECK_LIB(socket, socket, [ | |
102 LIBS="$LIBS -lsocket" | |
103 ]) | |
104 ]) | |
105 | |
106 AC_CHECK_FUNC(inet_addr, [], [ | |
107 AC_CHECK_LIB(nsl, inet_addr, [ | |
108 LIBS="$LIBS -lnsl" | |
109 ]) | |
110 ]) | |
111 | |
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
|
112 AC_CHECK_FUNC(fdatasync, [ |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
113 AC_DEFINE([HAVE_FDATASYNC]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
114 ], [ |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
115 AC_CHECK_LIB(rt, fdatasync, [ |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
116 AC_DEFINE([HAVE_FDATASYNC]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
117 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
|
118 ]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
119 ]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
120 |
0 | 121 dnl * after -lsocket and -lnsl tests, inet_aton() may be in them |
122 AC_CHECK_FUNCS(fcntl flock inet_aton sigaction getpagesize madvise setreuid) | |
411 | 123 AC_CHECK_FUNCS(strcasecmp stricmp vsnprintf memmove vsyslog writev) |
0 | 124 |
125 dnl * poll/select? | |
126 | |
127 AC_CHECK_FUNC(poll, [ | |
128 have_poll=yes | |
129 ], [ | |
130 have_poll=no | |
131 ]) | |
132 AM_CONDITIONAL(IOLOOP_POLL, test "$have_poll" = "yes") | |
133 | |
134 dnl * gcc specific options | |
135 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
|
136 # -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
|
137 CFLAGS="$CFLAGS -Wall -W" |
0 | 138 fi |
139 | |
140 dnl * OS specific options | |
141 case "$host_os" in | |
142 hpux*) | |
143 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" | |
144 ;; | |
145 *) | |
146 ;; | |
147 esac | |
148 | |
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
|
149 dnl * off_t checks, try to make it 64bit |
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(_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
|
151 |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
152 AC_CHECK_SIZEOF(int) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
153 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
|
154 AC_CHECK_SIZEOF(void *) |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
155 AC_CHECK_SIZEOF(long long) |
185 | 156 |
157 dnl * older autoconfs don't include sys/types.h, so do it manually | |
158 AC_MSG_CHECKING([size of ssize_t]) | |
159 AC_TRY_RUN([ | |
160 #include <stdio.h> | |
161 #include <sys/types.h> | |
162 int main() { | |
163 FILE *f=fopen("conftestval", "w"); | |
164 if (!f) exit(1); | |
165 fprintf(f, "%d\n", sizeof(ssize_t)); | |
166 exit(0); | |
167 } | |
168 ], [ | |
169 sizeof_ssize_t=`cat conftestval` | |
170 rm -f conftestval | |
171 ], [ | |
172 sizeof_ssize_t=0 | |
173 AC_ERROR([Unsupported ssize_t size]) | |
174 ]) | |
186
041fb6098877
result of ssize_t check wasn't reported
Timo Sirainen <tss@iki.fi>
parents:
185
diff
changeset
|
175 AC_MSG_RESULT($sizeof_ssize_t) |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
176 |
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
|
177 AC_MSG_CHECKING([size of off_t]) |
185 | 178 AC_TRY_RUN([ |
179 #include <stdio.h> | |
180 #include <sys/types.h> | |
181 int main() { | |
182 FILE *f=fopen("conftestval", "w"); | |
183 if (!f) exit(1); | |
184 fprintf(f, "%d\n", sizeof(off_t)); | |
185 exit(0); | |
186 } | |
187 ], [ | |
188 sizeof_off_t=`cat conftestval` | |
189 rm -f conftestval | |
190 ], [ | |
191 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
|
192 AC_ERROR([Unsupported off_t size]) |
185 | 193 ]) |
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
|
194 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
|
195 |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
196 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
|
197 # 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
|
198 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
|
199 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
|
200 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
|
201 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
|
202 # 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
|
203 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
|
204 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
|
205 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
|
206 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
|
207 # and finally long long |
56 | 208 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
|
209 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
|
210 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
|
211 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
|
212 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
|
213 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
|
214 |
185 | 215 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
|
216 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
|
217 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
|
218 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
|
219 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
|
220 AC_DEFINE_UNQUOTED(PRIuSIZE_T, "lu") |
185 | 221 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
|
222 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
|
223 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
|
224 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
|
225 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
|
226 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
|
227 |
179
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
228 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
|
229 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
|
230 else |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
231 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
|
232 fi |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
233 |
439
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
234 dnl * memory alignment |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
235 AC_DEFINE_UNQUOTED(MEM_ALIGN_SIZE, $mem_align) |
0 | 236 |
237 dnl * socklen_t - AC_CHECK_TYPE() would be _really_ useful if it only would | |
238 dnl * accept header files where to find the typedef.. | |
239 AC_MSG_CHECKING([for socklen_t]) | |
240 AC_CACHE_VAL(i_cv_type_socklen_t, | |
241 [AC_TRY_COMPILE([ | |
242 #include <sys/types.h> | |
243 #include <sys/socket.h>], | |
244 [socklen_t t;], | |
245 i_cv_type_socklen_t=yes, | |
246 i_cv_type_socklen_t=no, | |
247 )]) | |
248 if test $i_cv_type_socklen_t = no; then | |
249 AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.) | |
250 fi | |
251 AC_MSG_RESULT($i_cv_type_socklen_t) | |
252 | |
253 dnl * do we have tm_gmtoff | |
254 AC_MSG_CHECKING([for tm_gmtoff]) | |
255 AC_CACHE_VAL(i_cv_field_tm_gmtoff, | |
256 [AC_TRY_COMPILE([ | |
257 #include <time.h>], | |
258 [struct tm *tm; return tm->tm_gmtoff;], | |
259 i_cv_field_tm_gmtoff=yes, | |
260 i_cv_field_tm_gmtoff=no, | |
261 )]) | |
262 if test $i_cv_field_tm_gmtoff = yes; then | |
263 AC_DEFINE(HAVE_TM_GMTOFF) | |
264 fi | |
265 AC_MSG_RESULT($i_cv_field_tm_gmtoff) | |
266 | |
411 | 267 dnl * do we have struct iovec |
268 AC_MSG_CHECKING([for struct iovec]) | |
269 AC_CACHE_VAL(i_cv_struct_iovec, | |
412 | 270 [AC_TRY_COMPILE([ |
411 | 271 #include <sys/types.h> |
272 #include <sys/uio.h> | |
273 #include <unistd.h>], | |
274 [struct iovec *iovec;], | |
275 i_cv_struct_iovec=yes, | |
276 i_cv_struct_iovec=no)]) | |
277 | |
278 if test $i_cv_struct_iovec = yes; then | |
279 AC_DEFINE(HAVE_STRUCT_IOVEC) | |
280 fi | |
281 AC_MSG_RESULT($i_cv_struct_iovec) | |
282 | |
528
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
283 dnl * Linux compatible mremap() |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
284 AC_MSG_CHECKING([Linux compatible mremap()]) |
224 | 285 AC_TRY_RUN([ |
286 #include <unistd.h> | |
287 #define __USE_GNU | |
288 #include <sys/mman.h> | |
289 int main() { mremap(0, 0, 0, MREMAP_MAYMOVE); } | |
290 ], [ | |
291 AC_DEFINE(HAVE_LINUX_MREMAP) | |
292 AC_MSG_RESULT(yes) | |
293 ], [ | |
294 AC_MSG_RESULT(no) | |
295 ]) | |
296 | |
528
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
297 dnl * Linux compatible sendfile() |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
298 AC_MSG_CHECKING([Linux compatible sendfile()]) |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
299 AC_TRY_RUN([ |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
300 #include <sys/sendfile.h> |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
301 int main() { sendfile(0, 0, (void *) 0, 0); } |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
302 ], [ |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
303 AC_DEFINE(HAVE_LINUX_SENDFILE) |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
304 AC_MSG_RESULT(yes) |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
305 ], [ |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
306 AC_MSG_RESULT(no) |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
307 ]) |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
308 |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
309 dnl * FreeBSD compatible sendfile() |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
310 AC_MSG_CHECKING([FreeBSD compatible sendfile()]) |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
311 AC_TRY_RUN([ |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
312 #include <sys/types.h> |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
313 #include <sys/socket.h> |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
314 #include <sys/uio.h> |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
315 int main() { sendfile(0, 0, 0, 0, (void *) 0, (void *) 0, 0); } |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
316 ], [ |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
317 AC_DEFINE(HAVE_FREEBSD_SENDFILE) |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
318 AC_MSG_RESULT(yes) |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
319 ], [ |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
320 AC_MSG_RESULT(no) |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
321 ]) |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
322 |
0 | 323 dnl ** |
324 dnl ** SSL (gnutls) | |
325 dnl ** | |
326 | |
244 | 327 if test $want_gnutls = yes; then |
328 AC_CHECK_LIB(gnutls, gnutls_global_init, [ | |
329 AC_DEFINE(HAVE_SSL) | |
330 SSL_LIBS="-lgnutls -lgcrypt" | |
331 AC_SUBST(SSL_LIBS) | |
332 have_ssl=yes | |
333 ], [ | |
334 have_ssl=no | |
335 ], -lgcrypt) | |
247
cba0daefb7a5
report --without-gnutls better..
Timo Sirainen <tss@iki.fi>
parents:
246
diff
changeset
|
336 else |
cba0daefb7a5
report --without-gnutls better..
Timo Sirainen <tss@iki.fi>
parents:
246
diff
changeset
|
337 have_ssl=no |
244 | 338 fi |
0 | 339 |
340 dnl ** | |
341 dnl ** shadow/pam support | |
342 dnl ** | |
343 | |
344 need_crypt=no | |
345 auths="" | |
346 | |
347 if test $want_passwd = yes; then | |
348 need_crypt=yes | |
349 AC_DEFINE(USERINFO_PASSWD) | |
350 auths="$auths passwd" | |
351 fi | |
352 | |
353 if test $want_passwd_file = yes; then | |
354 need_crypt=yes | |
355 AC_DEFINE(USERINFO_PASSWD_FILE) | |
356 auths="$auths passwd-file" | |
357 fi | |
358 | |
359 if test $want_shadow = yes; then | |
360 AC_CHECK_FUNC(getspnam, [ | |
361 need_crypt=yes | |
362 AC_DEFINE(USERINFO_SHADOW) | |
363 auths="$auths shadow" | |
364 ]) | |
365 fi | |
366 | |
367 if test $want_pam = yes; then | |
368 AC_CHECK_LIB(pam, pam_start, [ | |
369 AC_CHECK_HEADER(security/pam_appl.h, [ | |
370 USERINFO_LIBS="$USERINFO_LIBS -lpam" | |
371 AC_DEFINE(USERINFO_PAM) | |
372 auths="$auths pam" | |
373 ]) | |
374 ]) | |
375 fi | |
376 | |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
377 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
|
378 vpopmail_home="`echo ~vpopmail`" |
281 | 379 vpop_libdeps="$vpopmail_home/etc/lib_deps" |
380 | |
381 AC_MSG_CHECKING([for vpopmail configuration at $vpop_libdeps]) | |
382 if test -f $vpop_libdeps; then | |
283 | 383 need_crypt=yes |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
384 VPOPMAIL_CFLAGS="`cat $vpopmail_home/etc/inc_deps` $CFLAGS" |
281 | 385 VPOPMAIL_LIBS="`cat $vpop_libdeps`" |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
386 AC_DEFINE(USERINFO_VPOPMAIL) |
282 | 387 auths="$auths vpopmail" |
281 | 388 AC_MSG_RESULT(found) |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
389 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
390 want_vpopmail=no |
281 | 391 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
|
392 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
393 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
394 |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
395 AC_SUBST(VPOPMAIL_CFLAGS) |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
396 AC_SUBST(VPOPMAIL_LIBS) |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
397 |
0 | 398 if test $need_crypt = yes; then |
399 AC_CHECK_LIB(crypt, crypt, [ | |
400 USERINFO_LIBS="$USERINFO_LIBS -lcrypt" | |
401 ], [ | |
402 AC_CHECK_FUNC(crypt,, [ | |
403 AC_ERROR([crypt() wasn't found]) | |
404 ]) | |
405 ]) | |
406 fi | |
407 | |
408 AC_SUBST(USERINFO_LIBS) | |
409 | |
410 dnl ** | |
411 dnl ** Index file compatibility flags | |
412 dnl ** | |
413 | |
414 dnl * currently just checking for endianess | |
415 | |
416 AC_C_BIGENDIAN | |
417 | |
418 if test $ac_cv_c_bigendian = yes; then | |
419 flags=0 | |
420 | |
421 else | |
422 flags=1 | |
423 fi | |
424 | |
425 AC_DEFINE_UNQUOTED(MAIL_INDEX_COMPAT_FLAGS, $flags) | |
426 | |
427 dnl ** | |
428 dnl ** IPv6 support | |
429 dnl ** | |
430 | |
431 if test "x$want_ipv6" = "xyes"; then | |
432 AC_MSG_CHECKING([for IPv6]) | |
433 AC_CACHE_VAL(i_cv_type_in6_addr, | |
434 [AC_TRY_COMPILE([ | |
435 #include <sys/types.h> | |
436 #include <sys/socket.h> | |
437 #include <netinet/in.h> | |
438 #include <netdb.h> | |
439 #include <arpa/inet.h>], | |
440 [struct in6_addr i;], | |
441 i_cv_type_in6_addr=yes, | |
442 i_cv_type_in6_addr=no, | |
443 )]) | |
444 if test $i_cv_type_in6_addr = yes; then | |
445 AC_DEFINE(HAVE_IPV6) | |
446 fi | |
447 AC_MSG_RESULT($i_cv_type_in6_addr) | |
448 fi | |
449 | |
450 dnl ** | |
451 dnl ** capabilities | |
452 dnl ** | |
453 | |
454 capability="IMAP4rev1" | |
455 if test "$have_ssl" = "yes"; then | |
456 capability="$capability STARTTLS" | |
457 fi | |
458 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability") | |
459 | |
460 dnl ** | |
461 dnl ** register the storage classes | |
462 dnl ** | |
463 | |
464 STORAGE="maildir mbox" | |
465 file="src/lib-storage/mail-storage-register.c" | |
466 | |
467 echo "/* this file is generated by configure */" > $file | |
468 echo '#include "lib.h"' >> $file | |
469 echo '#include "mail-storage.h"' >> $file | |
470 for storage in $STORAGE; do | |
471 echo "extern MailStorage ${storage}_storage;" >> $file | |
472 done | |
473 echo "void mail_storage_register_all(void) {" >> $file | |
474 for storage in $STORAGE; do | |
475 echo "mail_storage_class_register(&${storage}_storage);" >> $file | |
476 done | |
477 echo "}" >> $file | |
478 | |
479 AC_OUTPUT( | |
480 Makefile | |
481 doc/Makefile | |
482 src/Makefile | |
483 src/lib/Makefile | |
484 src/lib-imap/Makefile | |
485 src/lib-index/Makefile | |
486 src/lib-index/maildir/Makefile | |
487 src/lib-index/mbox/Makefile | |
488 src/lib-mail/Makefile | |
489 src/lib-storage/Makefile | |
490 src/lib-storage/index/Makefile | |
491 src/lib-storage/index/maildir/Makefile | |
492 src/lib-storage/index/mbox/Makefile | |
493 src/lib-storage/subscription-file/Makefile | |
494 src/auth/Makefile | |
495 src/imap/Makefile | |
496 src/login/Makefile | |
497 src/master/Makefile | |
498 stamp.h) | |
499 | |
500 echo | |
501 echo "Install prefix ............. : $prefix" | |
502 echo "Building with auth modules . :$auths" | |
503 echo "Building with SSL support .. : $have_ssl" | |
504 echo "Building with IPv6 support . : $want_ipv6" |