Mercurial > dovecot > original-hg > dovecot-1.2
annotate configure.in @ 1611:fcc5d6bb6244 HEAD
test -o and -a are apparently non-POSIX. not using.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 10 Jul 2003 17:45:58 +0300 |
parents | 5c2ad8ec50db |
children | d22e03714d36 |
rev | line source |
---|---|
0 | 1 AC_INIT(src) |
2 | |
1421
7594cb84e9c8
Removed AM_CONFIG_HEADER accidentally
Timo Sirainen <tss@iki.fi>
parents:
1420
diff
changeset
|
3 AM_CONFIG_HEADER(config.h) |
1585 | 4 AM_INIT_AUTOMAKE(dovecot, 0.99.10) |
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 | |
1300 | 15 AM_ICONV |
0 | 16 |
1300 | 17 AC_CHECK_HEADERS(string.h stdlib.h stdint.h unistd.h dirent.h) |
722
0438621d25ff
Added virtual memory size limits to processes. Default values are pretty
Timo Sirainen <tss@iki.fi>
parents:
712
diff
changeset
|
18 AC_CHECK_HEADERS(sys/uio.h sys/sysmacros.h sys/resource.h linux/mman.h) |
777
a02e5e7790bb
select() is nowadays defined to be in sys/select.h
Timo Sirainen <tss@iki.fi>
parents:
761
diff
changeset
|
19 AC_CHECK_HEADERS(sys/select.h) |
0 | 20 |
21 # check posix headers | |
22 AC_CHECK_HEADERS(sys/time.h) | |
23 | |
24 AC_ARG_ENABLE(ipv6, | |
426 | 25 [ --enable-ipv6 Enable IPv6 support (default)], |
0 | 26 if test x$enableval = xno; then |
27 want_ipv6=no | |
28 else | |
29 want_ipv6=yes | |
30 fi, | |
426 | 31 want_ipv6=yes) |
0 | 32 |
544
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
33 AC_ARG_ENABLE(debug, |
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
34 [ --enable-debug Enable some extra checks for debugging], |
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
35 if test x$enableval = xyes; then |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
36 AC_DEFINE(DEBUG,, Build with extra debugging checks) |
544
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
37 fi) |
42e65c2ba49d
Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents:
530
diff
changeset
|
38 |
546
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
39 AC_ARG_ENABLE(asserts, |
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
40 [ --enable-asserts Enable asserts (default)], |
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
41 if test x$enableval = xno; then |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
42 AC_DEFINE(DISABLE_ASSERTS,, Disable asserts) |
546
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
43 fi) |
e1254b838e0b
Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents:
544
diff
changeset
|
44 |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
45 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
|
46 [ --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
|
47 (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
|
48 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
|
49 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
|
50 |
439
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
51 AC_ARG_WITH(mem-align, |
1394
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
52 [ --with-mem-align=BYTES Set the memory alignment (default: 8)], |
439
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
53 mem_align=$withval, |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
54 mem_align=8) |
b66ccecbc8a6
Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents:
426
diff
changeset
|
55 |
1394
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
56 AC_ARG_WITH(index-align, |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
57 [ --with-index-align=BYTES Set the index file alignment (default: detect)], |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
58 index_align=$withval, |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
59 index_align=0) |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
60 |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
61 AC_ARG_WITH(passwd, |
426 | 62 [ --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
|
63 if test x$withval = xno; then |
0 | 64 want_passwd=no |
65 else | |
66 want_passwd=yes | |
67 fi, | |
68 want_passwd=yes) | |
69 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
70 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
|
71 [ --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
|
72 if test x$withval = xno; then |
0 | 73 want_passwd_file=no |
74 else | |
75 want_passwd_file=yes | |
76 fi, | |
77 want_passwd_file=yes) | |
78 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
79 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
|
80 [ --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
|
81 if test x$withval = xno; then |
0 | 82 want_shadow=no |
83 else | |
84 want_shadow=yes | |
85 fi, | |
86 want_shadow=yes) | |
87 | |
328
a0abed892d11
s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents:
313
diff
changeset
|
88 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
|
89 [ --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
|
90 if test x$withval = xno; then |
0 | 91 want_pam=no |
92 else | |
93 want_pam=yes | |
94 fi, | |
95 want_pam=yes) | |
96 | |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
97 AC_ARG_WITH(ldap, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
98 [ --with-ldap Build with LDAP support], |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
99 if test x$withval = xno; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
100 want_ldap=no |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
101 else |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
102 want_ldap=yes |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
103 fi, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
104 want_ldap=no) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
105 |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
106 AC_ARG_WITH(vpopmail, |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
107 [ --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
|
108 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
|
109 want_vpopmail=no |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
110 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
111 want_vpopmail=yes |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
112 fi, |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
113 want_vpopmail=yes) |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
114 |
1043
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
115 AC_ARG_WITH(static-userdb, |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
116 [ --with-static-userdb Build with static userdb support (default)], |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
117 if test x$withval = xno; then |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
118 want_static_userdb=no |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
119 else |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
120 want_static_userdb=yes |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
121 fi, |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
122 want_static_userdb=yes) |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
123 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
124 AC_ARG_WITH(pgsql, |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
125 [ --with-pgsql Build with PostgreSQL support], |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
126 if test x$withval = xno; then |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
127 want_pgsql=no |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
128 else |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
129 want_pgsql=yes |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
130 fi, |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
131 want_pgsql=no) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
132 |
907
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
133 AC_ARG_WITH(cyrus-sasl2, |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
134 [ --with-cyrus-sasl2 Build with Cyrus SASL 2 library support], |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
135 if test x$withval = xno; then |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
136 want_cyrus_sasl2=no |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
137 else |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
138 want_cyrus_sasl2=yes |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
139 fi, |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
140 want_cyrus_sasl2=no) |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
141 |
550
3a83b05a0be3
--with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents:
547
diff
changeset
|
142 AC_ARG_WITH(rawlog, |
3a83b05a0be3
--with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents:
547
diff
changeset
|
143 [ --with-rawlog Build support for logging user traffic], |
3a83b05a0be3
--with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents:
547
diff
changeset
|
144 if test x$withval = xyes; then |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
145 AC_DEFINE(BUILD_RAWLOG,, Build with rawlogging feature) |
550
3a83b05a0be3
--with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents:
547
diff
changeset
|
146 fi) |
3a83b05a0be3
--with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents:
547
diff
changeset
|
147 |
622 | 148 AC_ARG_WITH(ssl, |
149 [ --with-ssl=[gnutls|openssl] Build with GNUTLS (default) or OpenSSL], | |
245 | 150 if test x$withval = xno; then |
244 | 151 want_gnutls=no |
622 | 152 want_openssl=no |
153 elif test x$withval = xgnutls; then | |
154 want_gnutls=yes | |
155 want_openssl=no | |
156 elif test x$withval = xopenssl; then | |
157 want_gnutls=no | |
158 want_openssl=yes | |
244 | 159 else |
160 want_gnutls=yes | |
622 | 161 want_openssl=yes |
162 fi, [ | |
163 want_gnutls=yes | |
164 want_openssl=yes | |
165 ]) | |
244 | 166 |
657
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
167 AC_ARG_WITH(ssldir, |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
168 [ --with-ssldir=DIR SSL base directory for certificates (/etc/ssl)], |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
169 ssldir="$withval", |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
170 ssldir=/etc/ssl |
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
171 ) |
712
385f862a4005
--with-ssldir actually didn't do anything, and the default directory for
Timo Sirainen <tss@iki.fi>
parents:
711
diff
changeset
|
172 AC_SUBST(ssldir) |
657
85a888d2766e
Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents:
654
diff
changeset
|
173 |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
174 AC_ARG_WITH(pop3d, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
175 [ --with-pop3d Build POP3 server (default)], |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
176 if test x$withval = xno; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
177 want_pop3d=no |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
178 else |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
179 want_pop3d=yes |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
180 fi, |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
181 want_pop3d=yes) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
182 AM_CONDITIONAL(BUILD_POP3D, test "$want_pop3d" = "yes") |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
183 |
1404
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
184 AC_ARG_WITH(storages, |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
185 [ --with-storages Build specified mail storage formats (maildir,mbox)], [ |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
186 mail_storages=`echo "$withval"|sed 's/,/ /g'` ], |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
187 mail_storages="maildir mbox") |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
188 |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
189 dnl * gcc specific options |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
190 if test "x$ac_cv_prog_gcc" = "xyes"; then |
850 | 191 # -Wcast-qual -Wcast-align -Wconversion # too many warnings |
192 # -Wstrict-prototypes -Wredundant-decls # may give warnings in some systems | |
1043
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
193 # -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings |
850 | 194 CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast" |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
195 fi |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
196 |
0 | 197 dnl ** |
198 dnl ** just some generic stuff... | |
199 dnl ** | |
200 | |
201 AC_CHECK_FUNC(socket, [], [ | |
202 AC_CHECK_LIB(socket, socket, [ | |
203 LIBS="$LIBS -lsocket" | |
204 ]) | |
205 ]) | |
206 | |
207 AC_CHECK_FUNC(inet_addr, [], [ | |
208 AC_CHECK_LIB(nsl, inet_addr, [ | |
209 LIBS="$LIBS -lnsl" | |
210 ]) | |
211 ]) | |
212 | |
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
|
213 AC_CHECK_FUNC(fdatasync, [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
214 have_fdatasync=yes |
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
|
215 ], [ |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
216 AC_CHECK_LIB(rt, fdatasync, [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
217 have_fdatasync=yes |
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
|
218 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
|
219 ]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
220 ]) |
83d4617e1dca
Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents:
464
diff
changeset
|
221 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
222 if test "$have_fdatasync" = "yes"; then |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
223 AC_DEFINE(HAVE_FDATASYNC,, Define if you have fdatasync()) |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
224 fi |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
225 |
0 | 226 dnl * after -lsocket and -lnsl tests, inet_aton() may be in them |
800
db1608b43054
Don't bother trying to use setreuid(), setuid() check should be enough and
Timo Sirainen <tss@iki.fi>
parents:
792
diff
changeset
|
227 AC_CHECK_FUNCS(fcntl flock inet_aton sigaction getpagesize madvise \ |
805
5ac361acb316
Marked all non-trivial buffer modifications with @UNSAFE tag. Several
Timo Sirainen <tss@iki.fi>
parents:
800
diff
changeset
|
228 strcasecmp stricmp vsnprintf vsyslog writev setrlimit \ |
745
32040b730b37
Login process now changes it's name if verbose_proctitle = yes, and we're
Timo Sirainen <tss@iki.fi>
parents:
742
diff
changeset
|
229 setproctitle) |
0 | 230 |
231 dnl * poll/select? | |
232 | |
233 AC_CHECK_FUNC(poll, [ | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
234 AC_DEFINE(IOLOOP_POLL,, Implement I/O loop with poll()) |
0 | 235 ], [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
236 AC_DEFINE(IOLOOP_SELECT,, Implement I/O loop with select()) |
0 | 237 ]) |
238 | |
239 dnl * OS specific options | |
240 case "$host_os" in | |
241 hpux*) | |
242 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" | |
243 ;; | |
244 *) | |
245 ;; | |
246 esac | |
247 | |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
248 AC_CHECK_SIZEOF(int) |
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
249 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
|
250 AC_CHECK_SIZEOF(void *) |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
251 AC_CHECK_SIZEOF(long long) |
185 | 252 |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
253 AC_DEFUN(AC_TYPEOF, [ |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
254 dnl * first check if we can get the size with redefining typedefs |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
255 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
256 order="$2" |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
257 if test "$2" = ""; then |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
258 order="int long long-long" |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
259 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
260 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
261 result="" |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
262 visible="unknown" |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
263 AC_MSG_CHECKING([type of $1]) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
264 |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
265 if test "x$ac_cv_prog_gcc" = "xyes"; then |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
266 dnl * try with printf() + -Werror |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
267 old_CFLAGS="$CFLAGS" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
268 CFLAGS="$CFLAGS -Werror" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
269 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
270 for type in $order; do |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
271 case "$type" in |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
272 int) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
273 fmt="%d" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
274 ;; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
275 long) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
276 fmt="%ld" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
277 ;; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
278 long-long) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
279 fmt="%lld" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
280 ;; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
281 *) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
282 fmt="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
283 ;; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
284 esac |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
285 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
286 if test "$fmt" != ""; then |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
287 AC_TRY_COMPILE([ |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
288 #include <sys/types.h> |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
289 #include <stdio.h> |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
290 ], [ |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
291 printf("$fmt", ($1)0); |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
292 ], [ |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
293 if test "$result" != ""; then |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
294 dnl * warning check isn't working |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
295 result="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
296 visible="unknown" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
297 break |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
298 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
299 result="`echo $type|sed 's/-/ /g'`" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
300 visible="$result" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
301 ]) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
302 fi |
733
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
303 done |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
304 CFLAGS="$old_CFLAGS" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
305 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
306 |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
307 if test "$result" = ""; then |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
308 for type in $order; do |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
309 type="`echo $type|sed 's/-/ /g'`" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
310 AC_TRY_COMPILE([ |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
311 #include <sys/types.h> |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
312 typedef $type $1; |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
313 ],, [ |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
314 if test "$result" != ""; then |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
315 dnl * compiler allows redefining to anything |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
316 result="" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
317 visible="unknown" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
318 break |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
319 fi |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
320 result="$type" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
321 visible="$type" |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
322 ]) |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
323 done |
280c0952fa90
AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents:
732
diff
changeset
|
324 fi |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
325 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
326 if test "$result" = ""; then |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
327 dnl * check with sizes |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
328 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
329 dnl * older autoconfs don't include sys/types.h, so do it manually |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
330 AC_TRY_RUN([ |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
331 #include <stdio.h> |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
332 #include <sys/types.h> |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
333 int main() { |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
334 FILE *f=fopen("conftestval", "w"); |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
335 if (!f) exit(1); |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
336 fprintf(f, "%d\n", sizeof($1)); |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
337 exit(0); |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
338 } |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
339 ], [ |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
340 size=`cat conftestval` |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
341 rm -f conftestval |
55
db8ea2c11ab7
whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents:
50
diff
changeset
|
342 |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
343 for type in $order; do |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
344 actype="ac_cv_sizeof_`echo $type|sed 's/-/_/g'`" |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
345 if test "$size" = "`eval \"echo \\$$actype\"`"; then |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
346 result="`echo $type|sed 's/-/ /g'`" |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
347 visible="`expr $size \* 8`bit (using $result)" |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
348 break |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
349 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
350 done |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
351 if test "$result" = ""; then |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
352 visible="`expr $size \* 8`bit (unknown type)" |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
353 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
354 ]) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
355 fi |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
356 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
357 typeof_$1=$result |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
358 AC_MSG_RESULT($visible) |
185 | 359 ]) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
360 |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
361 dnl * off_t checks, try to make it 64bit |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
362 AC_DEFINE_UNQUOTED(_FILE_OFFSET_BITS, $preferred_off_t_bits, |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
363 [If set to 64, enables 64bit off_t for some systems (eg. Linux, Solaris)]) |
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
|
364 |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
365 AC_TYPEOF(off_t, long int long-long) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
366 case "$typeof_off_t" in |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
367 int) |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
368 offt_max=INT_MAX |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
369 uofft_fmt="u" |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
370 AC_DEFINE(UOFF_T_INT,, Define if off_t is int) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
371 offt_bits=`expr 8 \* $ac_cv_sizeof_int` |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
372 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
373 long) |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
374 offt_max=LONG_MAX |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
375 uofft_fmt="lu" |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
376 AC_DEFINE(UOFF_T_LONG,, Define if off_t is long) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
377 offt_bits=`expr 8 \* $ac_cv_sizeof_long` |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
378 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
379 "long long") |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
380 offt_max=LLONG_MAX |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
381 uofft_fmt="llu" |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
382 AC_DEFINE(UOFF_T_LONG_LONG,, Define if off_t is long long) |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
383 offt_bits=`expr 8 \* $ac_cv_sizeof_long_long` |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
384 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
385 *) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
386 AC_ERROR([Unsupported off_t type]) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
387 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
388 esac |
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
|
389 |
1382
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
390 dnl * Do we have OFF_T_MAX? |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
391 AC_TRY_COMPILE([ |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
392 #include <limits.h> |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
393 #include <sys/types.h> |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
394 ], [ |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
395 off_t i = OFF_T_MAX; |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
396 ], [ |
1403 | 397 : |
1382
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
398 ], [ |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
399 AC_DEFINE_UNQUOTED(OFF_T_MAX, $offt_max, Maximum value of off_t) |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
400 ]) |
c4d519a6395d
Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents:
1341
diff
changeset
|
401 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
402 AC_DEFINE_UNQUOTED(PRIuUOFF_T, "$uofft_fmt", printf() format for uoff_t) |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
403 |
750
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
404 dnl * make sure size_t isn't signed. we'd probably work fine with it, but |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
405 dnl * it's more likely vulnerable to buffer overflows. Anyway, C99 specifies |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
406 dnl * that it's unsigned and only some old systems define it as signed. |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
407 AC_MSG_CHECKING([whether size_t is signed]) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
408 AC_TRY_RUN([ |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
409 #include <sys/types.h> |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
410 int main() { |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
411 /* return 0 if we're signed */ |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
412 exit((size_t)(int)-1 <= 0 ? 0 : 1); |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
413 } |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
414 ], [ |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
415 AC_MSG_RESULT(yes) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
416 |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
417 echo |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
418 echo "Your system's size_t is a signed integer, Dovecot isn't designed to" |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
419 echo "support it. It probably works just fine, but it's less resistant to" |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
420 echo "buffer overflows. If you're not worried about this and still want to" |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
421 echo "compile Dovecot, set ignore_signed_size=1 environment." |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
422 |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
423 if test "$ignore_signed_size" = ""; then |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
424 AC_ERROR([aborting]) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
425 fi |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
426 echo "..ignoring as requested.." |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
427 ], [ |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
428 AC_MSG_RESULT(no) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
429 ]) |
b97c8964d7c1
Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents:
745
diff
changeset
|
430 |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
431 AC_TYPEOF(ssize_t) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
432 case "$typeof_ssize_t" in |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
433 long) |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
434 ssizet_max=LONG_MAX |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
435 sizet_fmt="lu" |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
436 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
437 "long long") |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
438 ssizet_max=LLONG_MAX |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
439 sizet_fmt="llu" |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
440 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
441 *) |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
442 dnl older systems didn't have ssize_t, default to int |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
443 ssizet_max=INT_MAX |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
444 sizet_fmt="u" |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
445 |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
446 if test "$typeof_ssize_t" = ""; then |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
447 AC_DEFINE(size_t, unsigned int, Define to 'unsigned int' if you don't have it) |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
448 AC_DEFINE(ssize_t, int, Define to 'int' if you don't have it) |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
449 fi |
677
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
450 ;; |
3089685bbb7e
Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents:
676
diff
changeset
|
451 esac |
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
|
452 |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
453 AC_DEFINE_UNQUOTED(SSIZE_T_MAX, $ssizet_max, Maximum value of ssize_t) |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
454 AC_DEFINE_UNQUOTED(PRIuSIZE_T, "$sizet_fmt", printf() format for size_t) |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
455 |
678
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
456 AC_DEFUN(AC_CHECKTYPE2, [ |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
457 AC_MSG_CHECKING([for $1]) |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
458 AC_CACHE_VAL(i_cv_type_$1, |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
459 [AC_TRY_COMPILE([ |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
460 #include <sys/types.h> |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
461 $2], |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
462 [$1 t;], |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
463 i_cv_type_$1=yes, |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
464 i_cv_type_$1=no, |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
465 )]) |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
466 AC_MSG_RESULT($i_cv_type_$1) |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
467 ]) |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
468 |
679
78966c511e57
Get uintmax_t from inttypes.h instead of stdint.h.
Timo Sirainen <tss@iki.fi>
parents:
678
diff
changeset
|
469 AC_CHECKTYPE2(uintmax_t, [#include <inttypes.h>]) |
678
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
470 if test $i_cv_type_uintmax_t = yes; then |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
471 AC_DEFINE(HAVE_UINTMAX_T,, Define if you have uintmax_t (C99 type)) |
179
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
472 fi |
0ffecd4e7e1a
added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents:
175
diff
changeset
|
473 |
908
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
474 dnl use separate check, eg. Solaris 8 has uintmax_t but not uint_fast32_t |
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
475 AC_CHECKTYPE2(uint_fast32_t, [#include <inttypes.h>]) |
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
476 if test $i_cv_type_uint_fast32_t = yes; then |
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
477 AC_DEFINE(HAVE_UINT_FAST32_T,, Define if you have uint_fast32_t (C99 type)) |
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
478 fi |
bc55266563cd
Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents:
907
diff
changeset
|
479 |
678
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
480 AC_CHECKTYPE2(socklen_t, [#include <sys/socket.h>]) |
1e5c655bad25
Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents:
677
diff
changeset
|
481 if test $i_cv_type_socklen_t = yes; then |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
482 AC_DEFINE(HAVE_SOCKLEN_T,, Define to 'int' if you don't have socklen_t) |
0 | 483 fi |
484 | |
1394
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
485 dnl * memory alignment |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
486 if test "$index_align" = "0"; then |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
487 if test $offt_bits = 64; then |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
488 index_align=8 |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
489 else |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
490 index_align=4 |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
491 fi |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
492 fi |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
493 |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
494 AC_DEFINE_UNQUOTED(MEM_ALIGN_SIZE, $mem_align, Required memory alignment) |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
495 AC_DEFINE_UNQUOTED(INDEX_ALIGN_SIZE, $index_align, Required index alignment) |
059f13d577bb
Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents:
1389
diff
changeset
|
496 |
1335
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
497 dnl * find random source |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
498 AC_MSG_CHECKING([for /dev/urandom]) |
1611
fcc5d6bb6244
test -o and -a are apparently non-POSIX. not using.
Timo Sirainen <tss@iki.fi>
parents:
1609
diff
changeset
|
499 if test -c /dev/urandom || test -s /dev/urandom; then |
1335
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
500 AC_MSG_RESULT(yes) |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
501 AC_DEFINE(HAVE_DEV_URANDOM,, Define if you have /dev/urandom) |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
502 have_random_source=yes |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
503 else |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
504 AC_MSG_RESULT(no) |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
505 |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
506 AC_CHECK_HEADER(openssl/rand.h, [ |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
507 AC_DEFINE(HAVE_OPENSSL_RAND_H,, Define if you have openssl/rand.h) |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
508 RAND_LIBS=-lcrypto |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
509 ]) |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
510 fi |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
511 AC_SUBST(RAND_LIBS) |
5ad84c54eb7e
Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents:
1300
diff
changeset
|
512 |
0 | 513 dnl * do we have tm_gmtoff |
514 AC_MSG_CHECKING([for tm_gmtoff]) | |
515 AC_CACHE_VAL(i_cv_field_tm_gmtoff, | |
516 [AC_TRY_COMPILE([ | |
517 #include <time.h>], | |
518 [struct tm *tm; return tm->tm_gmtoff;], | |
519 i_cv_field_tm_gmtoff=yes, | |
520 i_cv_field_tm_gmtoff=no, | |
521 )]) | |
522 if test $i_cv_field_tm_gmtoff = yes; then | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
523 AC_DEFINE(HAVE_TM_GMTOFF,, Define if you have struct tm->tm_gmtoff) |
0 | 524 fi |
525 AC_MSG_RESULT($i_cv_field_tm_gmtoff) | |
526 | |
411 | 527 dnl * do we have struct iovec |
528 AC_MSG_CHECKING([for struct iovec]) | |
529 AC_CACHE_VAL(i_cv_struct_iovec, | |
412 | 530 [AC_TRY_COMPILE([ |
411 | 531 #include <sys/types.h> |
532 #include <sys/uio.h> | |
533 #include <unistd.h>], | |
534 [struct iovec *iovec;], | |
535 i_cv_struct_iovec=yes, | |
536 i_cv_struct_iovec=no)]) | |
537 | |
538 if test $i_cv_struct_iovec = yes; then | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
539 AC_DEFINE(HAVE_STRUCT_IOVEC,, Define if you have struct iovec) |
411 | 540 fi |
541 AC_MSG_RESULT($i_cv_struct_iovec) | |
542 | |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
543 dnl * is dev_t an integer or something else? |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
544 AC_TRY_COMPILE([ |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
545 #include <sys/types.h> |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
546 struct test { dev_t a; }; |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
547 static struct test t = { 0 }; |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
548 ],,, [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
549 AC_DEFINE(DEV_T_STRUCT,, Define if your dev_t is a structure instead of integer type) |
691
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
550 |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
551 dnl we can't initialize structures, so don't warn about them either |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
552 if test "x$ac_cv_prog_gcc" = "xyes"; then |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
553 CFLAGS=`echo $CFLAGS|sed 's/ -W\b//'` |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
554 fi |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
555 ]) |
567f5e66c7b8
We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents:
679
diff
changeset
|
556 |
739
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
557 dnl * Do we have RLIMIT_AS? |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
558 AC_TRY_COMPILE([ |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
559 #include <sys/types.h> |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
560 #include <sys/time.h> |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
561 #include <sys/resource.h> |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
562 ], [ |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
563 struct rlimit r; |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
564 getrlimit(RLIMIT_AS, &r); |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
565 ], [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
566 AC_DEFINE(HAVE_RLIMIT_AS,, Define if you have RLIMIT_AS for setrlimit()) |
739
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
567 ]) |
f50714973d0b
RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents:
733
diff
changeset
|
568 |
1065 | 569 dnl * Do we have RLIMIT_NPROC? |
570 AC_TRY_COMPILE([ | |
571 #include <sys/types.h> | |
572 #include <sys/time.h> | |
573 #include <sys/resource.h> | |
574 ], [ | |
575 struct rlimit r; | |
576 getrlimit(RLIMIT_NPROC, &r); | |
577 ], [ | |
578 AC_DEFINE(HAVE_RLIMIT_NPROC,, Define if you have RLIMIT_NPROC for setrlimit()) | |
579 ]) | |
580 | |
528
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
581 dnl * Linux compatible mremap() |
a95b1ccff82e
Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents:
494
diff
changeset
|
582 AC_MSG_CHECKING([Linux compatible mremap()]) |
529
3a1be480d16a
buggy checks. we were supposed to compile them, not run. plus fixes for
Timo Sirainen <tss@iki.fi>
parents:
528
diff
changeset
|
583 AC_TRY_COMPILE([ |
224 | 584 #include <unistd.h> |
585 #define __USE_GNU | |
586 #include <sys/mman.h> | |
529
3a1be480d16a
buggy checks. we were supposed to compile them, not run. plus fixes for
Timo Sirainen <tss@iki.fi>
parents:
528
diff
changeset
|
587 ], [ |
3a1be480d16a
buggy checks. we were supposed to compile them, not run. plus fixes for
Timo Sirainen <tss@iki.fi>
parents:
528
diff
changeset
|
588 mremap(0, 0, 0, MREMAP_MAYMOVE); |
224 | 589 ], [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
590 AC_DEFINE(HAVE_LINUX_MREMAP,, Define if you have Linux-compatible mremap()) |
224 | 591 AC_MSG_RESULT(yes) |
592 ], [ | |
593 AC_MSG_RESULT(no) | |
594 ]) | |
595 | |
976
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
596 dnl * Solaris compatible sendfilev() |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
597 AC_CHECK_LIB(sendfile, sendfilev, [ |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
598 LIBS="$LIBS -lsendfile" |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
599 AC_DEFINE(HAVE_SOLARIS_SENDFILEV,, Define if you have Solaris-compatible sendfilev()) |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
600 ], [ |
981
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
601 dnl * Linux compatible sendfile() - don't check if Solaris one was found. |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
602 dnl * This seems to pass with Solaris for some reason.. |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
603 AC_MSG_CHECKING([Linux compatible sendfile()]) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
604 AC_TRY_COMPILE([ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
605 #undef _FILE_OFFSET_BITS |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
606 #include <sys/types.h> |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
607 #include <sys/socket.h> |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
608 #include <sys/sendfile.h> |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
609 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
610 sendfile(0, 0, (void *) 0, 0); |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
611 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
612 AC_DEFINE(HAVE_LINUX_SENDFILE,, Define if you have Linux-compatible sendfile()) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
613 AC_MSG_RESULT(yes) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
614 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
615 AC_MSG_RESULT(no) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
616 ]) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
617 |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
618 dnl * FreeBSD compatible sendfile() |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
619 AC_MSG_CHECKING([FreeBSD compatible sendfile()]) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
620 AC_TRY_COMPILE([ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
621 #include <sys/types.h> |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
622 #include <sys/socket.h> |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
623 #include <sys/uio.h> |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
624 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
625 struct sf_hdtr hdtr; |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
626 sendfile(0, 0, 0, 0, &hdtr, (void *) 0, 0); |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
627 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
628 AC_DEFINE(HAVE_FREEBSD_SENDFILE,, Define if you have FreeBSD-compatible sendfile()) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
629 AC_MSG_RESULT(yes) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
630 ], [ |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
631 AC_MSG_RESULT(no) |
7e9b90bfe78c
If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents:
976
diff
changeset
|
632 ]) |
976
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
633 ]) |
b3e0f857981c
Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents:
975
diff
changeset
|
634 |
859
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
635 dnl *** |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
636 dnl *** va_copy checks (from GLIB) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
637 dnl *** |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
638 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
639 AC_CACHE_CHECK([for an implementation of va_copy()],lib_cv_va_copy,[ |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
640 AC_TRY_RUN([ |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
641 #include <stdarg.h> |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
642 void f (int i, ...) { |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
643 va_list args1, args2; |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
644 va_start (args1, i); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
645 va_copy (args2, args1); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
646 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
647 exit (1); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
648 va_end (args1); va_end (args2); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
649 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
650 int main() { |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
651 f (0, 42); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
652 return 0; |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
653 }], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
654 [lib_cv_va_copy=yes], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
655 [lib_cv_va_copy=no], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
656 []) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
657 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
658 AC_CACHE_CHECK([for an implementation of __va_copy()],lib_cv___va_copy,[ |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
659 AC_TRY_RUN([ |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
660 #include <stdarg.h> |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
661 void f (int i, ...) { |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
662 va_list args1, args2; |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
663 va_start (args1, i); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
664 __va_copy (args2, args1); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
665 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
666 exit (1); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
667 va_end (args1); va_end (args2); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
668 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
669 int main() { |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
670 f (0, 42); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
671 return 0; |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
672 }], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
673 [lib_cv___va_copy=yes], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
674 [lib_cv___va_copy=no], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
675 []) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
676 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
677 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
678 if test "x$lib_cv_va_copy" = "xyes"; then |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
679 va_copy_func=va_copy |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
680 else if test "x$lib_cv___va_copy" = "xyes"; then |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
681 va_copy_func=__va_copy |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
682 fi |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
683 fi |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
684 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
685 if test -n "$va_copy_func"; then |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
686 AC_DEFINE_UNQUOTED(VA_COPY,$va_copy_func,[A 'va_copy' style function]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
687 fi |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
688 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
689 AC_CACHE_CHECK([whether va_lists can be copied by value],lib_cv_va_val_copy,[ |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
690 AC_TRY_RUN([ |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
691 #include <stdarg.h> |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
692 void f (int i, ...) { |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
693 va_list args1, args2; |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
694 va_start (args1, i); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
695 args2 = args1; |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
696 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
697 exit (1); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
698 va_end (args1); va_end (args2); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
699 } |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
700 int main() { |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
701 f (0, 42); |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
702 return 0; |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
703 }], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
704 [lib_cv_va_val_copy=yes], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
705 [lib_cv_va_val_copy=no], |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
706 []) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
707 ]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
708 |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
709 if test "x$lib_cv_va_val_copy" = "xno"; then |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
710 AC_DEFINE(VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values]) |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
711 fi |
c4754c5770f3
We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents:
850
diff
changeset
|
712 |
0 | 713 dnl ** |
622 | 714 dnl ** SSL |
0 | 715 dnl ** |
716 | |
623 | 717 have_ssl=no |
718 | |
244 | 719 if test $want_gnutls = yes; then |
622 | 720 AC_CHECK_LIB(gnutls, gnutls_global_init, [ |
623 | 721 AC_CHECK_HEADERS(gnutls/gnutls.h, [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
722 AC_DEFINE(HAVE_GNUTLS,, Build with GNUTLS support) |
623 | 723 SSL_LIBS="-lgnutls -lgcrypt" |
724 AC_SUBST(SSL_LIBS) | |
725 have_ssl="yes (GNUTLS)" | |
726 have_gnutls=yes | |
727 ]) | |
653 | 728 ],, -lgcrypt) |
244 | 729 fi |
0 | 730 |
1611
fcc5d6bb6244
test -o and -a are apparently non-POSIX. not using.
Timo Sirainen <tss@iki.fi>
parents:
1609
diff
changeset
|
731 if test "$want_openssl" = "yes" && test "$have_ssl" = "no"; then |
1565
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
732 if pkg-config --exists openssl; then |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
733 PKG_CHECK_MODULES(SSL, openssl) |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
734 CFLAGS="$CFLAGS $SSL_CFLAGS" |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
735 have_openssl=yes |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
736 else |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
737 AC_CHECK_LIB(ssl, SSL_read, [ |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
738 AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h, [ |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
739 SSL_LIBS="-lssl -lcrypto" |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
740 AC_SUBST(SSL_LIBS) |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
741 have_openssl=yes |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
742 ]) |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
743 ],, -lcrypto) |
97572a77243a
Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents:
1539
diff
changeset
|
744 fi |
1566 | 745 if test "$have_openssl" = "yes"; then |
746 AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support) | |
747 have_ssl="yes (OpenSSL)" | |
748 fi | |
622 | 749 fi |
750 | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
751 if test "$have_ssl" != "no"; then |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
752 AC_DEFINE(HAVE_SSL,, Build with SSL/TLS support) |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
753 fi |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
754 |
0 | 755 dnl ** |
1043
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
756 dnl ** userdb and passdb checks |
0 | 757 dnl ** |
758 | |
759 need_crypt=no | |
1043
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
760 userdb="" |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
761 passdb="" |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
762 |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
763 if test $want_static_userdb = yes; then |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
764 need_crypt=yes |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
765 AC_DEFINE(USERDB_STATIC,, Build with static userdb support) |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
766 userdb="$userdb static" |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
767 fi |
0 | 768 |
769 if test $want_passwd = yes; then | |
770 need_crypt=yes | |
1043
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
771 AC_DEFINE(USERDB_PASSWD,, Build with passwd support) |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
772 AC_DEFINE(PASSDB_PASSWD,, Build with passwd support) |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
773 userdb="$userdb passwd" |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
774 passdb="$passdb passwd" |
0 | 775 fi |
776 | |
777 if test $want_passwd_file = yes; then | |
778 need_crypt=yes | |
1043
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
779 AC_DEFINE(USERDB_PASSWD_FILE,, Build with passwd-file support) |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
780 AC_DEFINE(PASSDB_PASSWD_FILE,, Build with passwd-file support) |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
781 userdb="$userdb passwd-file" |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
782 passdb="$passdb passwd-file" |
0 | 783 fi |
784 | |
785 if test $want_shadow = yes; then | |
786 AC_CHECK_FUNC(getspnam, [ | |
1089
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
787 AC_CHECK_HEADER(shadow.h, [ |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
788 need_crypt=yes |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
789 AC_DEFINE(PASSDB_SHADOW,, Build with shadow support) |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
790 passdb="$passdb shadow" |
088c7d83f2f2
Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents:
1065
diff
changeset
|
791 ]) |
0 | 792 ]) |
793 fi | |
794 | |
795 if test $want_pam = yes; then | |
796 AC_CHECK_LIB(pam, pam_start, [ | |
706
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
797 have_pam=no |
0 | 798 AC_CHECK_HEADER(security/pam_appl.h, [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
799 AC_DEFINE(HAVE_SECURITY_PAM_APPL_H,, |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
800 Define if you have security/pam_appl.h) |
706
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
801 have_pam=yes |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
802 ]) |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
803 |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
804 AC_CHECK_HEADER(pam/pam_appl.h, [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
805 AC_DEFINE(HAVE_PAM_PAM_APPL_H,, |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
806 Define if you have pam/pam_appl.h) |
706
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
807 have_pam=yes |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
808 ]) |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
809 |
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
810 if test "$have_pam" = "yes"; then |
1284 | 811 AUTH_LIBS="$AUTH_LIBS -lpam" |
1043
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
812 AC_DEFINE(PASSDB_PAM,, Build with PAM support) |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
813 passdb="$passdb pam" |
547
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
814 |
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
815 AC_CHECK_LIB(pam, pam_setcred, [ |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
816 AC_DEFINE(HAVE_PAM_SETCRED,, |
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
817 Define if you have pam_setcred()) |
547
39a24074abf4
Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents:
546
diff
changeset
|
818 ]) |
706
df5bf4ee669f
OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents:
702
diff
changeset
|
819 fi |
0 | 820 ]) |
821 fi | |
822 | |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
823 if test $want_ldap = yes; then |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
824 AC_CHECK_LIB(ldap, ldap_init, [ |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
825 AC_CHECK_HEADER(ldap.h, [ |
1284 | 826 AUTH_LIBS="$AUTH_LIBS -lldap" |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
827 |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
828 AC_DEFINE(USERDB_LDAP,, Build with LDAP support) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
829 AC_DEFINE(PASSDB_LDAP,, Build with LDAP support) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
830 userdb="$userdb ldap" |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
831 passdb="$passdb ldap" |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
832 ]) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
833 ]) |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
834 fi |
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
835 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
836 if test $want_pgsql = yes; then |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
837 # based on code from PHP |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
838 for i in /usr /usr/local /usr/local/pgsql; do |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
839 for j in include include/pgsql include/postgres include/postgresql ""; do |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
840 if test -r "$i/$j/libpq-fe.h"; then |
1286 | 841 PGSQL_INCLUDE=$i/$j |
842 fi | |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
843 done |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
844 for j in lib lib/pgsql lib/postgres lib/postgresql ""; do |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
845 if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
846 PGSQL_LIBDIR=$i/$j |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
847 fi |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
848 done |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
849 done |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
850 |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
851 old_LIBS=$LIBS |
1287 | 852 if test "$PGSQL_LIBDIR" != ""; then |
853 LIBS="$LIBS -L$PGSQL_LIBDIR" | |
854 fi | |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
855 |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
856 AC_CHECK_LIB(pq, PQconnectdb, [ |
1287 | 857 old_CPPFLAGS=$CPPFLAGS |
858 if test "$PGSQL_INCLUDE" != ""; then | |
859 CPPFLAGS="$CPPFLAGS -I $PGSQL_INCLUDE" | |
860 fi | |
861 AC_CHECK_HEADER(libpq-fe.h, [ | |
862 if test "$PGSQL_INCLUDE" != ""; then | |
863 AUTH_CFLAGS="$AUTH_CFLAGS -I$PGSQL_INCLUDE" | |
864 fi | |
865 if test "$PGSQL_LIBDIR" != ""; then | |
866 AUTH_LIBS="$AUTH_LIBS -L$PGSQL_LIBDIR" | |
867 fi | |
868 AUTH_LIBS="$AUTH_LIBS -lpq" | |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
869 AC_DEFINE(USERDB_PGSQL,, Build with PostgreSQL support) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
870 AC_DEFINE(PASSDB_PGSQL,, Build with PostgreSQL support) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
871 userdb="$userdb pgsql" |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
872 passdb="$passdb pgsql" |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
873 ]) |
1287 | 874 CPPFLAGS=$old_CPPFLAGS |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
875 ]) |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
876 LIBS=$old_LIBS |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
877 fi |
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
878 |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
879 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
|
880 vpopmail_home="`echo ~vpopmail`" |
281 | 881 vpop_libdeps="$vpopmail_home/etc/lib_deps" |
882 | |
883 AC_MSG_CHECKING([for vpopmail configuration at $vpop_libdeps]) | |
884 if test -f $vpop_libdeps; then | |
283 | 885 need_crypt=yes |
1284 | 886 AUTH_CFLAGS="$AUTH_CFLAGS `cat $vpopmail_home/etc/inc_deps` $CFLAGS" |
887 AUTH_LIBS="$AUTH_LIBS `cat $vpop_libdeps`" | |
1043
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
888 AC_DEFINE(USERDB_VPOPMAIL,, Build with vpopmail support) |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
889 AC_DEFINE(PASSDB_VPOPMAIL,, Build with vpopmail support) |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
890 userdb="$userdb vpopmail" |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
891 passdb="$passdb vpopmail" |
281 | 892 AC_MSG_RESULT(found) |
280
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
893 else |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
894 want_vpopmail=no |
281 | 895 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
|
896 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
897 fi |
fa2d1a1d025e
vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents:
247
diff
changeset
|
898 |
907
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
899 if test $want_cyrus_sasl2 = yes; then |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
900 AC_CHECK_LIB(sasl2, sasl_server_start, [ |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
901 AC_CHECK_HEADER(sasl/sasl.h, [ |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
902 AC_DEFINE(USE_CYRUS_SASL2,, |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
903 Define if you want to use Cyrus SASL library) |
1284 | 904 AUTH_LIBS="$AUTH_LIBS -lsasl2" |
907
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
905 ]) |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
906 ]) |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
907 fi |
218e68ab290d
Initial support for Cyrus SASL 2 library. I couldn't get it to work yet
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
908 |
0 | 909 if test $need_crypt = yes; then |
910 AC_CHECK_LIB(crypt, crypt, [ | |
1284 | 911 AUTH_LIBS="$AUTH_LIBS -lcrypt" |
0 | 912 ], [ |
913 AC_CHECK_FUNC(crypt,, [ | |
914 AC_ERROR([crypt() wasn't found]) | |
915 ]) | |
916 ]) | |
917 fi | |
918 | |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
919 dnl * dynamic modules? |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
920 have_modules=no |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
921 AC_CHECK_FUNC(dlopen, [ |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
922 have_modules=yes |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
923 MODULE_LIBS="-export-dynamic" |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
924 ], [ |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
925 AC_CHECK_LIB(dl, dlopen, [ |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
926 have_modules=yes |
1539
c31852cc94f5
Check dlopen() from libc before from libdl
Timo Sirainen <tss@iki.fi>
parents:
1524
diff
changeset
|
927 MODULE_LIBS="-export-dynamic -ldl" |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
928 ]) |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
929 ]) |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
930 |
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
931 if test $have_modules = yes; then |
1465
03dd87873a81
Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents:
1462
diff
changeset
|
932 AC_DEFINE(HAVE_MODULES,, Define if you have dynamic module support) |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
933 userdb="$userdb (modules)" |
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
934 passdb="$passdb (modules)" |
1465
03dd87873a81
Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents:
1462
diff
changeset
|
935 |
03dd87873a81
Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents:
1462
diff
changeset
|
936 AC_SUBST(MODULE_LIBS) |
1511
a4ad03c210af
Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents:
1467
diff
changeset
|
937 fi |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
938 |
1283
2d8af547a8b4
Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents:
1256
diff
changeset
|
939 AC_SUBST(AUTH_CFLAGS) |
1284 | 940 AC_SUBST(AUTH_LIBS) |
0 | 941 |
942 dnl ** | |
943 dnl ** Index file compatibility flags | |
944 dnl ** | |
945 | |
946 dnl * currently just checking for endianess | |
947 | |
948 AC_C_BIGENDIAN | |
949 | |
950 if test $ac_cv_c_bigendian = yes; then | |
951 flags=0 | |
952 | |
953 else | |
954 flags=1 | |
955 fi | |
956 | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
957 AC_DEFINE_UNQUOTED(MAIL_INDEX_COMPAT_FLAGS, $flags, Index file compatibility flags) |
0 | 958 |
959 dnl ** | |
960 dnl ** IPv6 support | |
961 dnl ** | |
962 | |
963 if test "x$want_ipv6" = "xyes"; then | |
964 AC_MSG_CHECKING([for IPv6]) | |
965 AC_CACHE_VAL(i_cv_type_in6_addr, | |
966 [AC_TRY_COMPILE([ | |
967 #include <sys/types.h> | |
968 #include <sys/socket.h> | |
969 #include <netinet/in.h> | |
970 #include <netdb.h> | |
971 #include <arpa/inet.h>], | |
972 [struct in6_addr i;], | |
973 i_cv_type_in6_addr=yes, | |
974 i_cv_type_in6_addr=no, | |
975 )]) | |
976 if test $i_cv_type_in6_addr = yes; then | |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
977 AC_DEFINE(HAVE_IPV6,, Build with IPv6 support) |
0 | 978 fi |
979 AC_MSG_RESULT($i_cv_type_in6_addr) | |
980 fi | |
981 | |
982 dnl ** | |
1404
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
983 dnl ** storage classes |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
984 dnl ** |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
985 |
1462
314a91d2761f
libstorage_index_* -> libindex_*
Timo Sirainen <tss@iki.fi>
parents:
1422
diff
changeset
|
986 maildir_libs="../lib-storage/index/maildir/libstorage_maildir.a ../lib-index/maildir/libindex_maildir.a" |
314a91d2761f
libstorage_index_* -> libindex_*
Timo Sirainen <tss@iki.fi>
parents:
1422
diff
changeset
|
987 mbox_libs="../lib-storage/index/mbox/libstorage_mbox.a ../lib-index/mbox/libindex_mbox.a" |
1404
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
988 index_libs="../lib-storage/index/libstorage_index.a ../lib-index/libindex.a" |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
989 |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
990 STORAGE_LIBS= |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
991 for storage in $mail_storages; do |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
992 STORAGE_LIBS="$STORAGE_LIBS `eval \"echo \\$${storage}_libs\"`" |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
993 done |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
994 STORAGE_LIBS="$STORAGE_LIBS $index_libs" |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
995 AC_SUBST(STORAGE_LIBS) |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
996 |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
997 |
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
998 dnl ** |
0 | 999 dnl ** capabilities |
1000 dnl ** | |
1001 | |
1244
40bae47bdba1
Added support for CHILDREN and LISTEXT extensions.
Timo Sirainen <tss@iki.fi>
parents:
1172
diff
changeset
|
1002 capability="IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN LISTEXT LIST-SUBSCRIBED" |
742
b3dd87844fff
acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents:
739
diff
changeset
|
1003 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability", IMAP capabilities) |
0 | 1004 |
843
e9a5ce16f0f3
EXTRA_CFLAGS environment is now added to CFLAGS after all tests. Useful for adding -Werror there.
Timo Sirainen <tss@iki.fi>
parents:
835
diff
changeset
|
1005 CFLAGS="$CFLAGS $EXTRA_CFLAGS" |
e9a5ce16f0f3
EXTRA_CFLAGS environment is now added to CFLAGS after all tests. Useful for adding -Werror there.
Timo Sirainen <tss@iki.fi>
parents:
835
diff
changeset
|
1006 |
0 | 1007 AC_OUTPUT( |
1008 Makefile | |
1009 doc/Makefile | |
1010 src/Makefile | |
1011 src/lib/Makefile | |
568
f2aa58c2afd0
SEARCH CHARSET support. Currently we do it through iconv() and only ASCII
Timo Sirainen <tss@iki.fi>
parents:
550
diff
changeset
|
1012 src/lib-charset/Makefile |
0 | 1013 src/lib-imap/Makefile |
1014 src/lib-index/Makefile | |
1015 src/lib-index/maildir/Makefile | |
1016 src/lib-index/mbox/Makefile | |
1017 src/lib-mail/Makefile | |
1058
3b8fb7bf7ecc
Moved settings parsing to lib-settings.
Timo Sirainen <tss@iki.fi>
parents:
1057
diff
changeset
|
1018 src/lib-settings/Makefile |
0 | 1019 src/lib-storage/Makefile |
1020 src/lib-storage/index/Makefile | |
1021 src/lib-storage/index/maildir/Makefile | |
1022 src/lib-storage/index/mbox/Makefile | |
1023 src/lib-storage/subscription-file/Makefile | |
761
d3bd41a56309
First implementation of SORT extension. String comparing still not up to
Timo Sirainen <tss@iki.fi>
parents:
755
diff
changeset
|
1024 src/lib-storage/register/Makefile |
0 | 1025 src/auth/Makefile |
1026 src/imap/Makefile | |
1049
c41787e8c3f4
Moved common login process code to login-common, created pop3-login.
Timo Sirainen <tss@iki.fi>
parents:
1043
diff
changeset
|
1027 src/imap-login/Makefile |
c41787e8c3f4
Moved common login process code to login-common, created pop3-login.
Timo Sirainen <tss@iki.fi>
parents:
1043
diff
changeset
|
1028 src/login-common/Makefile |
0 | 1029 src/master/Makefile |
1043
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
1030 src/pop3/Makefile |
1049
c41787e8c3f4
Moved common login process code to login-common, created pop3-login.
Timo Sirainen <tss@iki.fi>
parents:
1043
diff
changeset
|
1031 src/pop3-login/Makefile |
1418
c36d18766a35
0.99.9.1 released. Added redhat spec file.
Timo Sirainen <tss@iki.fi>
parents:
1410
diff
changeset
|
1032 stamp.h |
c36d18766a35
0.99.9.1 released. Added redhat spec file.
Timo Sirainen <tss@iki.fi>
parents:
1410
diff
changeset
|
1033 dovecot.spec) |
0 | 1034 |
1096
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1035 dnl ** |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1036 dnl ** register the storage classes |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1037 dnl ** |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1038 |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1039 dnl * do it after AC_OUTPUT(), so we know that the directory exists. |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1040 dnl * it doesn't when building in different directory |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1041 |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1042 file="src/lib-storage/register/mail-storage-register.c" |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1043 |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1044 echo "/* this file is generated by configure */" > $file |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1045 echo '#include "lib.h"' >> $file |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1046 echo '#include "mail-storage.h"' >> $file |
1404
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
1047 for storage in $mail_storages; do |
1096
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1048 echo "extern struct mail_storage ${storage}_storage;" >> $file |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1049 done |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1050 echo "void mail_storage_register_all(void) {" >> $file |
1404
54015ae11177
--with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents:
1403
diff
changeset
|
1051 for storage in $mail_storages; do |
1096
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1052 echo "mail_storage_class_register(&${storage}_storage);" >> $file |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1053 done |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1054 echo "}" >> $file |
2ea48622afbc
Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents:
1089
diff
changeset
|
1055 |
0 | 1056 echo |
1043
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
1057 echo "Install prefix ...................... : $prefix" |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
1058 echo "File offsets ........................ : ${offt_bits}bit" |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
1059 echo "Building with SSL support ........... : $have_ssl" |
cacabd33c68a
Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents:
1022
diff
changeset
|
1060 echo "Building with IPv6 support .......... : $want_ipv6" |
1057
c5ab972db48c
libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents:
1049
diff
changeset
|
1061 echo "Building with pop3 server ........... : $want_pop3d" |
1150
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1062 echo "Building with user database modules . :$userdb" |
18a2074a4d3d
Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents:
1096
diff
changeset
|
1063 echo "Building with password lookup modules :$passdb" |