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