Mercurial > dovecot > original-hg > dovecot-1.2
annotate configure.in @ 494:83d4617e1dca HEAD
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
fsync() entirely if fdatasync() doesn't exist.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 24 Oct 2002 03:34:20 +0300 |
parents | c634b705f24b |
children | a95b1ccff82e |
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) |
411 | 17 AC_CHECK_HEADERS(sys/uio.h 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, | |
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 | |
224 | 283 dnl * linux compatible mremap() |
284 AC_MSG_CHECKING([linux compatible mremap()]) | |
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 | |
0 | 297 dnl ** |
298 dnl ** SSL (gnutls) | |
299 dnl ** | |
300 | |
244 | 301 if test $want_gnutls = yes; then |
302 AC_CHECK_LIB(gnutls, gnutls_global_init, [ | |
303 AC_DEFINE(HAVE_SSL) | |
304 SSL_LIBS="-lgnutls -lgcrypt" | |
305 AC_SUBST(SSL_LIBS) | |
306 have_ssl=yes | |
307 ], [ | |
308 have_ssl=no | |
309 ], -lgcrypt) | |
247
cba0daefb7a5
report --without-gnutls better..
Timo Sirainen <tss@iki.fi>
parents:
246
diff
changeset
|
310 else |
cba0daefb7a5
report --without-gnutls better..
Timo Sirainen <tss@iki.fi>
parents:
246
diff
changeset
|
311 have_ssl=no |
244 | 312 fi |
0 | 313 |
314 dnl ** | |
315 dnl ** shadow/pam support | |
316 dnl ** | |
317 | |
318 need_crypt=no | |
319 auths="" | |
320 | |
321 if test $want_passwd = yes; then | |
322 need_crypt=yes | |
323 AC_DEFINE(USERINFO_PASSWD) | |
324 auths="$auths passwd" | |
325 fi | |
326 | |
327 if test $want_passwd_file = yes; then | |
328 need_crypt=yes | |
329 AC_DEFINE(USERINFO_PASSWD_FILE) | |
330 auths="$auths passwd-file" | |
331 fi | |
332 | |
333 if test $want_shadow = yes; then | |
334 AC_CHECK_FUNC(getspnam, [ | |
335 need_crypt=yes | |
336 AC_DEFINE(USERINFO_SHADOW) | |
337 auths="$auths shadow" | |
338 ]) | |
339 fi | |
340 | |
341 if test $want_pam = yes; then | |
342 AC_CHECK_LIB(pam, pam_start, [ | |
343 AC_CHECK_HEADER(security/pam_appl.h, [ | |
344 USERINFO_LIBS="$USERINFO_LIBS -lpam" | |
345 AC_DEFINE(USERINFO_PAM) | |
346 auths="$auths pam" | |
347 ]) | |
348 ]) | |
349 fi | |
350 | |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
351 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
|
352 vpopmail_home="`echo ~vpopmail`" |
281 | 353 vpop_libdeps="$vpopmail_home/etc/lib_deps" |
354 | |
355 AC_MSG_CHECKING([for vpopmail configuration at $vpop_libdeps]) | |
356 if test -f $vpop_libdeps; then | |
283 | 357 need_crypt=yes |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
358 VPOPMAIL_CFLAGS="`cat $vpopmail_home/etc/inc_deps` $CFLAGS" |
281 | 359 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
|
360 AC_DEFINE(USERINFO_VPOPMAIL) |
282 | 361 auths="$auths vpopmail" |
281 | 362 AC_MSG_RESULT(found) |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
363 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
364 want_vpopmail=no |
281 | 365 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
|
366 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
367 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
368 |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
369 AC_SUBST(VPOPMAIL_CFLAGS) |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
370 AC_SUBST(VPOPMAIL_LIBS) |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
371 |
0 | 372 if test $need_crypt = yes; then |
373 AC_CHECK_LIB(crypt, crypt, [ | |
374 USERINFO_LIBS="$USERINFO_LIBS -lcrypt" | |
375 ], [ | |
376 AC_CHECK_FUNC(crypt,, [ | |
377 AC_ERROR([crypt() wasn't found]) | |
378 ]) | |
379 ]) | |
380 fi | |
381 | |
382 AC_SUBST(USERINFO_LIBS) | |
383 | |
384 dnl ** | |
385 dnl ** Index file compatibility flags | |
386 dnl ** | |
387 | |
388 dnl * currently just checking for endianess | |
389 | |
390 AC_C_BIGENDIAN | |
391 | |
392 if test $ac_cv_c_bigendian = yes; then | |
393 flags=0 | |
394 | |
395 else | |
396 flags=1 | |
397 fi | |
398 | |
399 AC_DEFINE_UNQUOTED(MAIL_INDEX_COMPAT_FLAGS, $flags) | |
400 | |
401 dnl ** | |
402 dnl ** IPv6 support | |
403 dnl ** | |
404 | |
405 if test "x$want_ipv6" = "xyes"; then | |
406 AC_MSG_CHECKING([for IPv6]) | |
407 AC_CACHE_VAL(i_cv_type_in6_addr, | |
408 [AC_TRY_COMPILE([ | |
409 #include <sys/types.h> | |
410 #include <sys/socket.h> | |
411 #include <netinet/in.h> | |
412 #include <netdb.h> | |
413 #include <arpa/inet.h>], | |
414 [struct in6_addr i;], | |
415 i_cv_type_in6_addr=yes, | |
416 i_cv_type_in6_addr=no, | |
417 )]) | |
418 if test $i_cv_type_in6_addr = yes; then | |
419 AC_DEFINE(HAVE_IPV6) | |
420 fi | |
421 AC_MSG_RESULT($i_cv_type_in6_addr) | |
422 fi | |
423 | |
424 dnl ** | |
425 dnl ** capabilities | |
426 dnl ** | |
427 | |
428 capability="IMAP4rev1" | |
429 if test "$have_ssl" = "yes"; then | |
430 capability="$capability STARTTLS" | |
431 fi | |
432 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability") | |
433 | |
434 dnl ** | |
435 dnl ** register the storage classes | |
436 dnl ** | |
437 | |
438 STORAGE="maildir mbox" | |
439 file="src/lib-storage/mail-storage-register.c" | |
440 | |
441 echo "/* this file is generated by configure */" > $file | |
442 echo '#include "lib.h"' >> $file | |
443 echo '#include "mail-storage.h"' >> $file | |
444 for storage in $STORAGE; do | |
445 echo "extern MailStorage ${storage}_storage;" >> $file | |
446 done | |
447 echo "void mail_storage_register_all(void) {" >> $file | |
448 for storage in $STORAGE; do | |
449 echo "mail_storage_class_register(&${storage}_storage);" >> $file | |
450 done | |
451 echo "}" >> $file | |
452 | |
453 AC_OUTPUT( | |
454 Makefile | |
455 doc/Makefile | |
456 src/Makefile | |
457 src/lib/Makefile | |
458 src/lib-imap/Makefile | |
459 src/lib-index/Makefile | |
460 src/lib-index/maildir/Makefile | |
461 src/lib-index/mbox/Makefile | |
462 src/lib-mail/Makefile | |
463 src/lib-storage/Makefile | |
464 src/lib-storage/index/Makefile | |
465 src/lib-storage/index/maildir/Makefile | |
466 src/lib-storage/index/mbox/Makefile | |
467 src/lib-storage/subscription-file/Makefile | |
468 src/auth/Makefile | |
469 src/imap/Makefile | |
470 src/login/Makefile | |
471 src/master/Makefile | |
472 stamp.h) | |
473 | |
474 echo | |
475 echo "Install prefix ............. : $prefix" | |
476 echo "Building with auth modules . :$auths" | |
477 echo "Building with SSL support .. : $have_ssl" | |
478 echo "Building with IPv6 support . : $want_ipv6" |