Mercurial > dovecot > core-2.2
annotate configure.in @ 439:b66ccecbc8a6 HEAD
Added --with-mem-align=BYTES option
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 16 Oct 2002 04:25:14 +0300 |
parents | 951cb252e577 |
children | c634b705f24b |
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 | |
112 dnl * after -lsocket and -lnsl tests, inet_aton() may be in them | |
113 AC_CHECK_FUNCS(fcntl flock inet_aton sigaction getpagesize madvise setreuid) | |
411 | 114 AC_CHECK_FUNCS(strcasecmp stricmp vsnprintf memmove vsyslog writev) |
0 | 115 |
116 dnl * poll/select? | |
117 | |
118 AC_CHECK_FUNC(poll, [ | |
119 have_poll=yes | |
120 ], [ | |
121 have_poll=no | |
122 ]) | |
123 AM_CONDITIONAL(IOLOOP_POLL, test "$have_poll" = "yes") | |
124 | |
125 dnl * gcc specific options | |
126 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
|
127 # -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
|
128 CFLAGS="$CFLAGS -Wall -W" |
0 | 129 fi |
130 | |
131 dnl * OS specific options | |
132 case "$host_os" in | |
133 hpux*) | |
134 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" | |
135 ;; | |
136 *) | |
137 ;; | |
138 esac | |
139 | |
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
|
140 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
|
141 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
|
142 |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
143 AC_CHECK_SIZEOF(int) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
144 AC_CHECK_SIZEOF(long) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
145 AC_CHECK_SIZEOF(long long) |
185 | 146 |
147 dnl * older autoconfs don't include sys/types.h, so do it manually | |
148 AC_MSG_CHECKING([size of ssize_t]) | |
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(ssize_t)); | |
156 exit(0); | |
157 } | |
158 ], [ | |
159 sizeof_ssize_t=`cat conftestval` | |
160 rm -f conftestval | |
161 ], [ | |
162 sizeof_ssize_t=0 | |
163 AC_ERROR([Unsupported ssize_t size]) | |
164 ]) | |
186
041fb6098877
result of ssize_t check wasn't reported
Timo Sirainen <tss@iki.fi>
parents:
185
diff
changeset
|
165 AC_MSG_RESULT($sizeof_ssize_t) |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
166 |
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
|
167 AC_MSG_CHECKING([size of off_t]) |
185 | 168 AC_TRY_RUN([ |
169 #include <stdio.h> | |
170 #include <sys/types.h> | |
171 int main() { | |
172 FILE *f=fopen("conftestval", "w"); | |
173 if (!f) exit(1); | |
174 fprintf(f, "%d\n", sizeof(off_t)); | |
175 exit(0); | |
176 } | |
177 ], [ | |
178 sizeof_off_t=`cat conftestval` | |
179 rm -f conftestval | |
180 ], [ | |
181 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
|
182 AC_ERROR([Unsupported off_t size]) |
185 | 183 ]) |
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
|
184 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
|
185 |
d493b9cc265e
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents:
5
diff
changeset
|
186 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
|
187 # 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
|
188 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
|
189 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
|
190 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
|
191 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
|
192 # 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
|
193 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
|
194 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
|
195 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
|
196 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
|
197 # and finally long long |
56 | 198 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
|
199 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
|
200 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
|
201 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
|
202 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
|
203 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
|
204 |
185 | 205 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
|
206 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
|
207 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
|
208 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
|
209 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
|
210 AC_DEFINE_UNQUOTED(PRIuSIZE_T, "lu") |
185 | 211 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
|
212 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
|
213 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
|
214 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
|
215 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
|
216 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
|
217 |
179
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
218 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
|
219 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
|
220 else |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
221 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
|
222 fi |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
223 |
439
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
224 dnl * memory alignment |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
225 AC_DEFINE_UNQUOTED(MEM_ALIGN_SIZE, $mem_align) |
0 | 226 |
227 dnl * socklen_t - AC_CHECK_TYPE() would be _really_ useful if it only would | |
228 dnl * accept header files where to find the typedef.. | |
229 AC_MSG_CHECKING([for socklen_t]) | |
230 AC_CACHE_VAL(i_cv_type_socklen_t, | |
231 [AC_TRY_COMPILE([ | |
232 #include <sys/types.h> | |
233 #include <sys/socket.h>], | |
234 [socklen_t t;], | |
235 i_cv_type_socklen_t=yes, | |
236 i_cv_type_socklen_t=no, | |
237 )]) | |
238 if test $i_cv_type_socklen_t = no; then | |
239 AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.) | |
240 fi | |
241 AC_MSG_RESULT($i_cv_type_socklen_t) | |
242 | |
243 dnl * do we have tm_gmtoff | |
244 AC_MSG_CHECKING([for tm_gmtoff]) | |
245 AC_CACHE_VAL(i_cv_field_tm_gmtoff, | |
246 [AC_TRY_COMPILE([ | |
247 #include <time.h>], | |
248 [struct tm *tm; return tm->tm_gmtoff;], | |
249 i_cv_field_tm_gmtoff=yes, | |
250 i_cv_field_tm_gmtoff=no, | |
251 )]) | |
252 if test $i_cv_field_tm_gmtoff = yes; then | |
253 AC_DEFINE(HAVE_TM_GMTOFF) | |
254 fi | |
255 AC_MSG_RESULT($i_cv_field_tm_gmtoff) | |
256 | |
411 | 257 dnl * do we have struct iovec |
258 AC_MSG_CHECKING([for struct iovec]) | |
259 AC_CACHE_VAL(i_cv_struct_iovec, | |
412 | 260 [AC_TRY_COMPILE([ |
411 | 261 #include <sys/types.h> |
262 #include <sys/uio.h> | |
263 #include <unistd.h>], | |
264 [struct iovec *iovec;], | |
265 i_cv_struct_iovec=yes, | |
266 i_cv_struct_iovec=no)]) | |
267 | |
268 if test $i_cv_struct_iovec = yes; then | |
269 AC_DEFINE(HAVE_STRUCT_IOVEC) | |
270 fi | |
271 AC_MSG_RESULT($i_cv_struct_iovec) | |
272 | |
224 | 273 dnl * linux compatible mremap() |
274 AC_MSG_CHECKING([linux compatible mremap()]) | |
275 AC_TRY_RUN([ | |
276 #include <unistd.h> | |
277 #define __USE_GNU | |
278 #include <sys/mman.h> | |
279 int main() { mremap(0, 0, 0, MREMAP_MAYMOVE); } | |
280 ], [ | |
281 AC_DEFINE(HAVE_LINUX_MREMAP) | |
282 AC_MSG_RESULT(yes) | |
283 ], [ | |
284 AC_MSG_RESULT(no) | |
285 ]) | |
286 | |
0 | 287 dnl ** |
288 dnl ** SSL (gnutls) | |
289 dnl ** | |
290 | |
244 | 291 if test $want_gnutls = yes; then |
292 AC_CHECK_LIB(gnutls, gnutls_global_init, [ | |
293 AC_DEFINE(HAVE_SSL) | |
294 SSL_LIBS="-lgnutls -lgcrypt" | |
295 AC_SUBST(SSL_LIBS) | |
296 have_ssl=yes | |
297 ], [ | |
298 have_ssl=no | |
299 ], -lgcrypt) | |
247
cba0daefb7a5
report --without-gnutls better..
Timo Sirainen <tss@iki.fi>
parents:
246
diff
changeset
|
300 else |
cba0daefb7a5
report --without-gnutls better..
Timo Sirainen <tss@iki.fi>
parents:
246
diff
changeset
|
301 have_ssl=no |
244 | 302 fi |
0 | 303 |
304 dnl ** | |
305 dnl ** shadow/pam support | |
306 dnl ** | |
307 | |
308 need_crypt=no | |
309 auths="" | |
310 | |
311 if test $want_passwd = yes; then | |
312 need_crypt=yes | |
313 AC_DEFINE(USERINFO_PASSWD) | |
314 auths="$auths passwd" | |
315 fi | |
316 | |
317 if test $want_passwd_file = yes; then | |
318 need_crypt=yes | |
319 AC_DEFINE(USERINFO_PASSWD_FILE) | |
320 auths="$auths passwd-file" | |
321 fi | |
322 | |
323 if test $want_shadow = yes; then | |
324 AC_CHECK_FUNC(getspnam, [ | |
325 need_crypt=yes | |
326 AC_DEFINE(USERINFO_SHADOW) | |
327 auths="$auths shadow" | |
328 ]) | |
329 fi | |
330 | |
331 if test $want_pam = yes; then | |
332 AC_CHECK_LIB(pam, pam_start, [ | |
333 AC_CHECK_HEADER(security/pam_appl.h, [ | |
334 USERINFO_LIBS="$USERINFO_LIBS -lpam" | |
335 AC_DEFINE(USERINFO_PAM) | |
336 auths="$auths pam" | |
337 ]) | |
338 ]) | |
339 fi | |
340 | |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
341 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
|
342 vpopmail_home="`echo ~vpopmail`" |
281 | 343 vpop_libdeps="$vpopmail_home/etc/lib_deps" |
344 | |
345 AC_MSG_CHECKING([for vpopmail configuration at $vpop_libdeps]) | |
346 if test -f $vpop_libdeps; then | |
283 | 347 need_crypt=yes |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
348 VPOPMAIL_CFLAGS="`cat $vpopmail_home/etc/inc_deps` $CFLAGS" |
281 | 349 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
|
350 AC_DEFINE(USERINFO_VPOPMAIL) |
282 | 351 auths="$auths vpopmail" |
281 | 352 AC_MSG_RESULT(found) |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
353 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
354 want_vpopmail=no |
281 | 355 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
|
356 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
357 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
358 |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
359 AC_SUBST(VPOPMAIL_CFLAGS) |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
360 AC_SUBST(VPOPMAIL_LIBS) |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
361 |
0 | 362 if test $need_crypt = yes; then |
363 AC_CHECK_LIB(crypt, crypt, [ | |
364 USERINFO_LIBS="$USERINFO_LIBS -lcrypt" | |
365 ], [ | |
366 AC_CHECK_FUNC(crypt,, [ | |
367 AC_ERROR([crypt() wasn't found]) | |
368 ]) | |
369 ]) | |
370 fi | |
371 | |
372 AC_SUBST(USERINFO_LIBS) | |
373 | |
374 dnl ** | |
375 dnl ** Index file compatibility flags | |
376 dnl ** | |
377 | |
378 dnl * currently just checking for endianess | |
379 | |
380 AC_C_BIGENDIAN | |
381 | |
382 if test $ac_cv_c_bigendian = yes; then | |
383 flags=0 | |
384 | |
385 else | |
386 flags=1 | |
387 fi | |
388 | |
389 AC_DEFINE_UNQUOTED(MAIL_INDEX_COMPAT_FLAGS, $flags) | |
390 | |
391 dnl ** | |
392 dnl ** IPv6 support | |
393 dnl ** | |
394 | |
395 if test "x$want_ipv6" = "xyes"; then | |
396 AC_MSG_CHECKING([for IPv6]) | |
397 AC_CACHE_VAL(i_cv_type_in6_addr, | |
398 [AC_TRY_COMPILE([ | |
399 #include <sys/types.h> | |
400 #include <sys/socket.h> | |
401 #include <netinet/in.h> | |
402 #include <netdb.h> | |
403 #include <arpa/inet.h>], | |
404 [struct in6_addr i;], | |
405 i_cv_type_in6_addr=yes, | |
406 i_cv_type_in6_addr=no, | |
407 )]) | |
408 if test $i_cv_type_in6_addr = yes; then | |
409 AC_DEFINE(HAVE_IPV6) | |
410 fi | |
411 AC_MSG_RESULT($i_cv_type_in6_addr) | |
412 fi | |
413 | |
414 dnl ** | |
415 dnl ** capabilities | |
416 dnl ** | |
417 | |
418 capability="IMAP4rev1" | |
419 if test "$have_ssl" = "yes"; then | |
420 capability="$capability STARTTLS" | |
421 fi | |
422 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability") | |
423 | |
424 dnl ** | |
425 dnl ** register the storage classes | |
426 dnl ** | |
427 | |
428 STORAGE="maildir mbox" | |
429 file="src/lib-storage/mail-storage-register.c" | |
430 | |
431 echo "/* this file is generated by configure */" > $file | |
432 echo '#include "lib.h"' >> $file | |
433 echo '#include "mail-storage.h"' >> $file | |
434 for storage in $STORAGE; do | |
435 echo "extern MailStorage ${storage}_storage;" >> $file | |
436 done | |
437 echo "void mail_storage_register_all(void) {" >> $file | |
438 for storage in $STORAGE; do | |
439 echo "mail_storage_class_register(&${storage}_storage);" >> $file | |
440 done | |
441 echo "}" >> $file | |
442 | |
443 AC_OUTPUT( | |
444 Makefile | |
445 doc/Makefile | |
446 src/Makefile | |
447 src/lib/Makefile | |
448 src/lib-imap/Makefile | |
449 src/lib-index/Makefile | |
450 src/lib-index/maildir/Makefile | |
451 src/lib-index/mbox/Makefile | |
452 src/lib-mail/Makefile | |
453 src/lib-storage/Makefile | |
454 src/lib-storage/index/Makefile | |
455 src/lib-storage/index/maildir/Makefile | |
456 src/lib-storage/index/mbox/Makefile | |
457 src/lib-storage/subscription-file/Makefile | |
458 src/auth/Makefile | |
459 src/imap/Makefile | |
460 src/login/Makefile | |
461 src/master/Makefile | |
462 stamp.h) | |
463 | |
464 echo | |
465 echo "Install prefix ............. : $prefix" | |
466 echo "Building with auth modules . :$auths" | |
467 echo "Building with SSL support .. : $have_ssl" | |
468 echo "Building with IPv6 support . : $want_ipv6" |