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