annotate configure.in @ 1256:cb1782907902 HEAD

0.99.8 released
author Timo Sirainen <tss@iki.fi>
date Tue, 25 Feb 2003 22:58:36 +0200
parents 40bae47bdba1
children 2d8af547a8b4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1 AC_INIT(src)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3 AM_CONFIG_HEADER(config.h)
1256
cb1782907902 0.99.8 released
Timo Sirainen <tss@iki.fi>
parents: 1244
diff changeset
4 AM_INIT_AUTOMAKE(dovecot, 0.99.8)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6 AM_MAINTAINER_MODE
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
7
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
8 AC_ISC_POSIX
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
9 AC_PROG_CC
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
10 AC_PROG_CPP
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
11 AC_STDC_HEADERS
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
12 AC_C_INLINE
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
13 AC_ARG_PROGRAM
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
14 AM_PROG_LIBTOOL
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
15
722
0438621d25ff Added virtual memory size limits to processes. Default values are pretty
Timo Sirainen <tss@iki.fi>
parents: 712
diff changeset
16 AC_CHECK_HEADERS(string.h stdlib.h stdint.h unistd.h dirent.h iconv.h)
0438621d25ff Added virtual memory size limits to processes. Default values are pretty
Timo Sirainen <tss@iki.fi>
parents: 712
diff changeset
17 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
18 AC_CHECK_HEADERS(sys/select.h)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
19
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
20 # check posix headers
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
21 AC_CHECK_HEADERS(sys/time.h)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
22
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
23 AC_ARG_ENABLE(ipv6,
426
951cb252e577 help update
Timo Sirainen <tss@iki.fi>
parents: 412
diff changeset
24 [ --enable-ipv6 Enable IPv6 support (default)],
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
25 if test x$enableval = xno; then
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
26 want_ipv6=no
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
27 else
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
28 want_ipv6=yes
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
29 fi,
426
951cb252e577 help update
Timo Sirainen <tss@iki.fi>
parents: 412
diff changeset
30 want_ipv6=yes)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
31
544
42e65c2ba49d Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents: 530
diff changeset
32 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
33 [ --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
34 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
35 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
36 fi)
42e65c2ba49d Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents: 530
diff changeset
37
546
e1254b838e0b Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents: 544
diff changeset
38 AC_ARG_ENABLE(asserts,
e1254b838e0b Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents: 544
diff changeset
39 [ --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
40 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
41 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
42 fi)
e1254b838e0b Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents: 544
diff changeset
43
328
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
44 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
45 [ --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
46 (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
47 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
48 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
49
439
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
50 AC_ARG_WITH(mem-align,
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
51 [ --with-mem-align=BYTES Set the memory alignment (default: 8)],
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
52 mem_align=$withval,
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
53 mem_align=8)
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
54
328
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
55 AC_ARG_WITH(passwd,
426
951cb252e577 help update
Timo Sirainen <tss@iki.fi>
parents: 412
diff changeset
56 [ --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
57 if test x$withval = xno; then
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
58 want_passwd=no
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
59 else
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
60 want_passwd=yes
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
61 fi,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
62 want_passwd=yes)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
63
328
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
64 AC_ARG_WITH(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
65 [ --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
66 if test x$withval = xno; then
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
67 want_passwd_file=no
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
68 else
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
69 want_passwd_file=yes
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
70 fi,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
71 want_passwd_file=yes)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
72
328
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
73 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
74 [ --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
75 if test x$withval = xno; then
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
76 want_shadow=no
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
77 else
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
78 want_shadow=yes
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
79 fi,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
80 want_shadow=yes)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
81
328
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
82 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
83 [ --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
84 if test x$withval = xno; then
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
85 want_pam=no
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
86 else
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
87 want_pam=yes
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
88 fi,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
89 want_pam=yes)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
90
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
91 AC_ARG_WITH(ldap,
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
92 [ --with-ldap Build with LDAP support],
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
93 if test x$withval = xno; then
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
94 want_ldap=no
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
95 else
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
96 want_ldap=yes
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
97 fi,
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
98 want_ldap=no)
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
99
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
100 AC_ARG_WITH(vpopmail,
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
101 [ --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
102 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
103 want_vpopmail=no
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
104 else
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
105 want_vpopmail=yes
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
106 fi,
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
107 want_vpopmail=yes)
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
108
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
109 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
110 [ --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
111 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
112 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
113 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
114 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
115 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
116 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
117
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
118 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
119 [ --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
120 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
121 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
122 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
123 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
124 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
125 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
126
550
3a83b05a0be3 --with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents: 547
diff changeset
127 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
128 [ --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
129 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
130 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
131 fi)
3a83b05a0be3 --with-rawlog: Build support for logging traffic of user sessions. If
Timo Sirainen <tss@iki.fi>
parents: 547
diff changeset
132
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
133 AC_ARG_WITH(ssl,
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
134 [ --with-ssl=[gnutls|openssl] Build with GNUTLS (default) or OpenSSL],
245
Timo Sirainen <tss@iki.fi>
parents: 244
diff changeset
135 if test x$withval = xno; then
244
bf1e284fece2 added --without-gnutls option
Timo Sirainen <tss@iki.fi>
parents: 224
diff changeset
136 want_gnutls=no
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
137 want_openssl=no
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
138 elif test x$withval = xgnutls; then
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
139 want_gnutls=yes
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
140 want_openssl=no
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
141 elif test x$withval = xopenssl; then
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
142 want_gnutls=no
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
143 want_openssl=yes
244
bf1e284fece2 added --without-gnutls option
Timo Sirainen <tss@iki.fi>
parents: 224
diff changeset
144 else
bf1e284fece2 added --without-gnutls option
Timo Sirainen <tss@iki.fi>
parents: 224
diff changeset
145 want_gnutls=yes
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
146 want_openssl=yes
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
147 fi, [
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
148 want_gnutls=yes
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
149 want_openssl=yes
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
150 ])
244
bf1e284fece2 added --without-gnutls option
Timo Sirainen <tss@iki.fi>
parents: 224
diff changeset
151
657
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
152 AC_ARG_WITH(ssldir,
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
153 [ --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
154 ssldir="$withval",
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
155 ssldir=/etc/ssl
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
156 )
712
385f862a4005 --with-ssldir actually didn't do anything, and the default directory for
Timo Sirainen <tss@iki.fi>
parents: 711
diff changeset
157 AC_SUBST(ssldir)
657
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
158
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
159 AC_ARG_WITH(pop3d,
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
160 [ --with-pop3d Build POP3 server (default)],
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
161 if test x$withval = xno; then
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
162 want_pop3d=no
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
163 else
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
164 want_pop3d=yes
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
165 fi,
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
166 want_pop3d=yes)
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
167 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
168
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
169 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
170 if test "x$ac_cv_prog_gcc" = "xyes"; then
850
a6f53dbe803f Enable more warnings with gcc
Timo Sirainen <tss@iki.fi>
parents: 843
diff changeset
171 # -Wcast-qual -Wcast-align -Wconversion # too many warnings
a6f53dbe803f Enable more warnings with gcc
Timo Sirainen <tss@iki.fi>
parents: 843
diff changeset
172 # -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
173 # -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings
850
a6f53dbe803f Enable more warnings with gcc
Timo Sirainen <tss@iki.fi>
parents: 843
diff changeset
174 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
175 fi
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
176
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
177 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
178 dnl ** just some generic stuff...
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
179 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
180
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
181 AC_CHECK_FUNC(socket, [], [
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
182 AC_CHECK_LIB(socket, socket, [
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
183 LIBS="$LIBS -lsocket"
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
184 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
185 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
186
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
187 AC_CHECK_FUNC(inet_addr, [], [
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
188 AC_CHECK_LIB(nsl, inet_addr, [
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
189 LIBS="$LIBS -lnsl"
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
190 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
191 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
192
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
193 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
194 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
195 ], [
83d4617e1dca Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents: 464
diff changeset
196 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
197 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
198 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
199 ])
83d4617e1dca Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents: 464
diff changeset
200 ])
83d4617e1dca Check fdatasync() from -lrt if it's not in libc (solaris). Also fallback to
Timo Sirainen <tss@iki.fi>
parents: 464
diff changeset
201
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
202 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
203 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
204 fi
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
205
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
206 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
207 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
208 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
209 setproctitle)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
210
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
211 dnl * poll/select?
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
212
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
213 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
214 AC_DEFINE(IOLOOP_POLL,, Implement I/O loop with poll())
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
215 ], [
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
216 AC_DEFINE(IOLOOP_SELECT,, Implement I/O loop with select())
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
217 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
218
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
219 dnl * memory alignment
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
220 AC_DEFINE_UNQUOTED(MEM_ALIGN_SIZE, $mem_align, Required memory alignment)
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
221
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
222 dnl * OS specific options
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
223 case "$host_os" in
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
224 hpux*)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
225 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
226 ;;
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
227 *)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
228 ;;
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
229 esac
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
230
55
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
231 AC_CHECK_SIZEOF(int)
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
232 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
233 AC_CHECK_SIZEOF(void *)
55
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
234 AC_CHECK_SIZEOF(long long)
185
60925d3e2c4d fixed ssize_t and off_t checks.
Timo Sirainen <tss@iki.fi>
parents: 183
diff changeset
235
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
236 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
237 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
238
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
239 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
240 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
241 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
242 fi
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
243
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
244 result=""
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
245 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
246 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
247
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
248 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
249 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
250 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
251 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
252
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
253 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
254 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
255 int)
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
256 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
257 ;;
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
258 long)
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
259 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
260 ;;
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
261 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
262 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
263 ;;
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
264 *)
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
265 fmt=""
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
266 ;;
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
267 esac
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
268
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
269 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
270 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
271 #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
272 #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
273 ], [
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
274 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
275 ], [
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
276 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
277 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
278 result=""
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
279 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
280 break
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
281 fi
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
282 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
283 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
284 ])
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
285 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
286 done
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
287 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
288 fi
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
289
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
290 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
291 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
292 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
293 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
294 #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
295 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
296 ],, [
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
297 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
298 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
299 result=""
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="unknown"
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
301 break
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
302 fi
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
303 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
304 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
305 ])
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
306 done
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
307 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
308
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
309 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
310 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
311
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
312 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
313 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
314 #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
315 #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
316 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
317 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
318 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
319 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
320 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
321 }
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
322 ], [
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
323 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
324 rm -f conftestval
55
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
325
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
326 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
327 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
328 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
329 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
330 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
331 break
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
332 fi
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
333 done
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
334 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
335 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
336 fi
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
337 ])
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
338 fi
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 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
341 AC_MSG_RESULT($visible)
185
60925d3e2c4d fixed ssize_t and off_t checks.
Timo Sirainen <tss@iki.fi>
parents: 183
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
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
344 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
345 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
346 [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
347
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
348 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
349 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
350 int)
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
351 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
352 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
353 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
354 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
355 ;;
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
356 long)
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
357 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
358 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
359 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
360 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
361 ;;
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
362 "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
363 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
364 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
365 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
366 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
367 ;;
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
368 *)
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
369 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
370 ;;
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
371 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
372
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
373 AC_DEFINE_UNQUOTED(OFF_T_MAX, $offt_max, Maximum value of off_t)
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
374 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
375
750
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
376 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
377 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
378 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
379 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
380 AC_TRY_RUN([
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
381 #include <sys/types.h>
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
382 int main() {
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
383 /* 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
384 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
385 }
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
386 ], [
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
387 AC_MSG_RESULT(yes)
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
388
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
389 echo
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
390 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
391 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
392 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
393 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
394
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
395 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
396 AC_ERROR([aborting])
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
397 fi
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
398 echo "..ignoring as requested.."
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
399 ], [
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
400 AC_MSG_RESULT(no)
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
401 ])
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
402
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
403 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
404 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
405 long)
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
406 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
407 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
408 ;;
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
409 "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
410 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
411 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
412 ;;
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
413 *)
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
414 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
415 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
416 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
417
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
418 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
419 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
420 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
421 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
422 ;;
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
423 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
424
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
425 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
426 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
427
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
428 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
429 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
430 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
431 [AC_TRY_COMPILE([
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
432 #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
433 $2],
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
434 [$1 t;],
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
435 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
436 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
437 )])
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
438 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
439 ])
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
440
679
78966c511e57 Get uintmax_t from inttypes.h instead of stdint.h.
Timo Sirainen <tss@iki.fi>
parents: 678
diff changeset
441 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
442 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
443 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
444 fi
0ffecd4e7e1a added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents: 175
diff changeset
445
908
bc55266563cd Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents: 907
diff changeset
446 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
447 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
448 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
449 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
450 fi
bc55266563cd Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents: 907
diff changeset
451
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
452 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
453 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
454 AC_DEFINE(HAVE_SOCKLEN_T,, Define to 'int' if you don't have socklen_t)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
455 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
456
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
457 dnl * do we have tm_gmtoff
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
458 AC_MSG_CHECKING([for tm_gmtoff])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
459 AC_CACHE_VAL(i_cv_field_tm_gmtoff,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
460 [AC_TRY_COMPILE([
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
461 #include <time.h>],
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
462 [struct tm *tm; return tm->tm_gmtoff;],
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
463 i_cv_field_tm_gmtoff=yes,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
464 i_cv_field_tm_gmtoff=no,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
465 )])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
466 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
467 AC_DEFINE(HAVE_TM_GMTOFF,, Define if you have struct tm->tm_gmtoff)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
468 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
469 AC_MSG_RESULT($i_cv_field_tm_gmtoff)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
470
411
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
471 dnl * do we have struct iovec
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
472 AC_MSG_CHECKING([for struct iovec])
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
473 AC_CACHE_VAL(i_cv_struct_iovec,
412
Timo Sirainen <tss@iki.fi>
parents: 411
diff changeset
474 [AC_TRY_COMPILE([
411
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
475 #include <sys/types.h>
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
476 #include <sys/uio.h>
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
477 #include <unistd.h>],
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
478 [struct iovec *iovec;],
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
479 i_cv_struct_iovec=yes,
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
480 i_cv_struct_iovec=no)])
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
481
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
482 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
483 AC_DEFINE(HAVE_STRUCT_IOVEC,, Define if you have struct iovec)
411
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
484 fi
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
485 AC_MSG_RESULT($i_cv_struct_iovec)
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
486
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
487 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
488 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
489 #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
490 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
491 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
492 ],,, [
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
493 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
494
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
495 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
496 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
497 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
498 fi
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
499 ])
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
500
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
501 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
502 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
503 #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
504 #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
505 #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
506 ], [
f50714973d0b RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents: 733
diff changeset
507 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
508 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
509 ], [
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
510 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
511 ])
f50714973d0b RLIMIT_AS isn't supported everywhere - use it if it exists, but also use
Timo Sirainen <tss@iki.fi>
parents: 733
diff changeset
512
1065
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
513 dnl * Do we have RLIMIT_NPROC?
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
514 AC_TRY_COMPILE([
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
515 #include <sys/types.h>
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
516 #include <sys/time.h>
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
517 #include <sys/resource.h>
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
518 ], [
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
519 struct rlimit r;
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
520 getrlimit(RLIMIT_NPROC, &r);
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
521 ], [
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
522 AC_DEFINE(HAVE_RLIMIT_NPROC,, Define if you have RLIMIT_NPROC for setrlimit())
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
523 ])
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
524
528
a95b1ccff82e Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents: 494
diff changeset
525 dnl * Linux compatible mremap()
a95b1ccff82e Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents: 494
diff changeset
526 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
527 AC_TRY_COMPILE([
224
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
528 #include <unistd.h>
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
529 #define __USE_GNU
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
530 #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
531 ], [
3a1be480d16a buggy checks. we were supposed to compile them, not run. plus fixes for
Timo Sirainen <tss@iki.fi>
parents: 528
diff changeset
532 mremap(0, 0, 0, MREMAP_MAYMOVE);
224
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
533 ], [
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
534 AC_DEFINE(HAVE_LINUX_MREMAP,, Define if you have Linux-compatible mremap())
224
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
535 AC_MSG_RESULT(yes)
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
536 ], [
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
537 AC_MSG_RESULT(no)
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
538 ])
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
539
976
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
540 dnl * Solaris compatible sendfilev()
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
541 AC_CHECK_LIB(sendfile, sendfilev, [
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
542 LIBS="$LIBS -lsendfile"
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
543 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
544 ], [
981
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
545 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
546 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
547 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
548 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
549 #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
550 #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
551 #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
552 #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
553 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
554 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
555 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
556 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
557 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
558 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
559 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
560 ])
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
561
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
562 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
563 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
564 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
565 #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
566 #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
567 #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
568 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
569 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
570 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
571 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
572 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
573 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
574 ], [
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
575 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
576 ])
976
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
577 ])
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
578
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
579 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
580 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
581 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
582
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
583 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
584 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
585 #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
586 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
587 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
588 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
589 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
590 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
591 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
592 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
593 }
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
594 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
595 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
596 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
597 }],
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
598 [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
599 [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
600 [])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
601 ])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
602 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
603 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
604 #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
605 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
606 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
607 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
608 __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
609 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
610 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
611 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
612 }
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
613 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
614 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
615 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
616 }],
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
617 [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
618 [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
619 [])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
620 ])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
621
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
622 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
623 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
624 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
625 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
626 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
627 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
628
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
629 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
630 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
631 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
632
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
633 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
634 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
635 #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
636 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
637 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
638 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
639 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
640 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
641 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
642 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
643 }
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 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
645 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
646 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
647 }],
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 [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
649 [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
650 [])
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 ])
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
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 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
654 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
655 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
656
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
657 dnl **
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
658 dnl ** SSL
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
659 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
660
623
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
661 have_ssl=no
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
662
244
bf1e284fece2 added --without-gnutls option
Timo Sirainen <tss@iki.fi>
parents: 224
diff changeset
663 if test $want_gnutls = yes; then
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
664 AC_CHECK_LIB(gnutls, gnutls_global_init, [
623
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
665 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
666 AC_DEFINE(HAVE_GNUTLS,, Build with GNUTLS support)
623
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
667 SSL_LIBS="-lgnutls -lgcrypt"
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
668 AC_SUBST(SSL_LIBS)
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
669 have_ssl="yes (GNUTLS)"
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
670 have_gnutls=yes
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
671 ])
653
67c840670ee2 Final bugfix..
Timo Sirainen <tss@iki.fi>
parents: 652
diff changeset
672 ],, -lgcrypt)
244
bf1e284fece2 added --without-gnutls option
Timo Sirainen <tss@iki.fi>
parents: 224
diff changeset
673 fi
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
674
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
675 if test "$want_openssl" = "yes" -a "$have_ssl" = "no"; then
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
676 AC_CHECK_LIB(ssl, SSL_read, [
623
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
677 AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h, [
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
678 AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support)
623
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
679 SSL_LIBS="-lssl -lcrypto"
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
680 AC_SUBST(SSL_LIBS)
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
681 have_ssl="yes (OpenSSL)"
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
682 have_openssl=yes
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
683 ])
654
5ad6e4f51c96 Was missing -lcrypto when checking for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 653
diff changeset
684 ],, -lcrypto)
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
685 fi
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
686
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
687 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
688 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
689 fi
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
690
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
691 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
692 dnl ** userdb and passdb checks
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
693 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
694
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
695 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
696 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
697 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
698
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
699 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
700 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
701 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
702 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
703 fi
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
704
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
705 if test $want_passwd = yes; then
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
706 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
707 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
708 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
709 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
710 passdb="$passdb passwd"
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
711 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
712
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
713 if test $want_passwd_file = yes; then
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
714 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
715 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
716 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
717 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
718 passdb="$passdb passwd-file"
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
719 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
720
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
721 if test $want_shadow = yes; then
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
722 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
723 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
724 need_crypt=yes
088c7d83f2f2 Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents: 1065
diff changeset
725 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
726 passdb="$passdb shadow"
088c7d83f2f2 Check for shadow.h before assuming shadow auth is possible.
Timo Sirainen <tss@iki.fi>
parents: 1065
diff changeset
727 ])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
728 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
729 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
730
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
731 if test $want_pam = yes; then
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
732 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
733 have_pam=no
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
734 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
735 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
736 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
737 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
738 ])
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
739
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
740 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
741 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
742 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
743 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
744 ])
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
745
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
746 if test "$have_pam" = "yes"; then
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
747 PASSDB_LIBS="$PASSDB_LIBS -lpam"
cacabd33c68a Initial code for POP3 server. RETR isn't working right yet, there's some
Timo Sirainen <tss@iki.fi>
parents: 1022
diff changeset
748 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
749 passdb="$passdb pam"
547
39a24074abf4 Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents: 546
diff changeset
750
39a24074abf4 Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents: 546
diff changeset
751 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
752 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
753 Define if you have pam_setcred())
547
39a24074abf4 Call pam_setcred() if it exists.
Timo Sirainen <tss@iki.fi>
parents: 546
diff changeset
754 ])
706
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
755 fi
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
756 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
757 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
758
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
759 if test $want_ldap = yes; then
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
760 AC_CHECK_LIB(ldap, ldap_init, [
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
761 AC_CHECK_HEADER(ldap.h, [
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
762 PASSDB_LIBS="$PASSDB_LIBS -lldap"
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
763
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
764 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
765 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
766 userdb="$userdb ldap"
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
767 passdb="$passdb ldap"
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
768 ])
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
769 ])
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
770 fi
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
771
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
772 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
773 vpopmail_home="`echo ~vpopmail`"
281
b7fe6867e549 print "checking vpopmail"
Timo Sirainen <tss@iki.fi>
parents: 280
diff changeset
774 vpop_libdeps="$vpopmail_home/etc/lib_deps"
b7fe6867e549 print "checking vpopmail"
Timo Sirainen <tss@iki.fi>
parents: 280
diff changeset
775
b7fe6867e549 print "checking vpopmail"
Timo Sirainen <tss@iki.fi>
parents: 280
diff changeset
776 AC_MSG_CHECKING([for vpopmail configuration at $vpop_libdeps])
b7fe6867e549 print "checking vpopmail"
Timo Sirainen <tss@iki.fi>
parents: 280
diff changeset
777 if test -f $vpop_libdeps; then
283
00dbc7e5f441 vpopmail needs also crypt()
Timo Sirainen <tss@iki.fi>
parents: 282
diff changeset
778 need_crypt=yes
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
779 VPOPMAIL_CFLAGS="`cat $vpopmail_home/etc/inc_deps` $CFLAGS"
281
b7fe6867e549 print "checking vpopmail"
Timo Sirainen <tss@iki.fi>
parents: 280
diff changeset
780 VPOPMAIL_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
781 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
782 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
783 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
784 passdb="$passdb vpopmail"
281
b7fe6867e549 print "checking vpopmail"
Timo Sirainen <tss@iki.fi>
parents: 280
diff changeset
785 AC_MSG_RESULT(found)
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
786 else
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
787 want_vpopmail=no
281
b7fe6867e549 print "checking vpopmail"
Timo Sirainen <tss@iki.fi>
parents: 280
diff changeset
788 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
789 fi
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
790 fi
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
791
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
792 AC_SUBST(VPOPMAIL_CFLAGS)
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
793 AC_SUBST(VPOPMAIL_LIBS)
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
794
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
795 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
796 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
797 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
798 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
799 Define if you want to use Cyrus SASL library)
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
800 SASL_LIBS="-lsasl2"
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
801 ])
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
802 ])
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
803 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
804
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
805 AC_SUBST(SASL_LIBS)
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
806
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
807 if test $need_crypt = yes; then
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
808 AC_CHECK_LIB(crypt, crypt, [
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
809 PASSDB_LIBS="$PASSDB_LIBS -lcrypt"
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
810 ], [
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
811 AC_CHECK_FUNC(crypt,, [
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
812 AC_ERROR([crypt() wasn't found])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
813 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
814 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
815 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
816
1150
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
817 dnl * dynamic modules?
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
818 AC_CHECK_LIB(dl, dlopen, [
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
819 PASSDB_LIBS="$PASSDB_LIBS -ldl"
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
820 AC_DEFINE(AUTH_MODULES,, Define if you want to build with dynamic auth modules)
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
821 auth_modules=yes
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
822 userdb="$userdb (modules)"
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
823 passdb="$passdb (modules)"
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
824 ])
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
825
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
826 AM_CONDITIONAL(AUTH_MODULES, test "$auth_modules" = "yes")
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
827
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
828 AC_SUBST(PASSDB_LIBS)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
829
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
830 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
831 dnl ** Index file compatibility flags
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
832 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
833
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
834 dnl * currently just checking for endianess
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
835
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
836 AC_C_BIGENDIAN
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
837
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
838 if test $ac_cv_c_bigendian = yes; then
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
839 flags=0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
840
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
841 else
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
842 flags=1
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
843 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
844
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
845 AC_DEFINE_UNQUOTED(MAIL_INDEX_COMPAT_FLAGS, $flags, Index file compatibility flags)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
846
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
847 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
848 dnl ** IPv6 support
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
849 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
850
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
851 if test "x$want_ipv6" = "xyes"; then
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
852 AC_MSG_CHECKING([for IPv6])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
853 AC_CACHE_VAL(i_cv_type_in6_addr,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
854 [AC_TRY_COMPILE([
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
855 #include <sys/types.h>
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
856 #include <sys/socket.h>
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
857 #include <netinet/in.h>
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
858 #include <netdb.h>
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
859 #include <arpa/inet.h>],
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
860 [struct in6_addr i;],
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
861 i_cv_type_in6_addr=yes,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
862 i_cv_type_in6_addr=no,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
863 )])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
864 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
865 AC_DEFINE(HAVE_IPV6,, Build with IPv6 support)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
866 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
867 AC_MSG_RESULT($i_cv_type_in6_addr)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
868 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
869
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
870 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
871 dnl ** capabilities
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
872 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
873
1244
40bae47bdba1 Added support for CHILDREN and LISTEXT extensions.
Timo Sirainen <tss@iki.fi>
parents: 1172
diff changeset
874 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
875 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability", IMAP capabilities)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
876
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
877 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
878
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
879 AC_OUTPUT(
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
880 Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
881 doc/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
882 src/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
883 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
884 src/lib-charset/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
885 src/lib-imap/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
886 src/lib-index/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
887 src/lib-index/maildir/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
888 src/lib-index/mbox/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
889 src/lib-mail/Makefile
1058
3b8fb7bf7ecc Moved settings parsing to lib-settings.
Timo Sirainen <tss@iki.fi>
parents: 1057
diff changeset
890 src/lib-settings/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
891 src/lib-storage/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
892 src/lib-storage/index/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
893 src/lib-storage/index/maildir/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
894 src/lib-storage/index/mbox/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
895 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
896 src/lib-storage/register/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
897 src/auth/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
898 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
899 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
900 src/login-common/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
901 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
902 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
903 src/pop3-login/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
904 stamp.h)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
905
1096
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
906 dnl **
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
907 dnl ** register the storage classes
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
908 dnl **
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
909
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
910 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
911 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
912
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
913 STORAGE="maildir mbox"
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
914 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
915
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
916 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
917 echo '#include "lib.h"' >> $file
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
918 echo '#include "mail-storage.h"' >> $file
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
919 for storage in $STORAGE; do
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
920 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
921 done
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
922 echo "void mail_storage_register_all(void) {" >> $file
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
923 for storage in $STORAGE; do
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
924 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
925 done
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
926 echo "}" >> $file
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
927
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
928 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
929 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
930 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
931 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
932 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
933 echo "Building with pop3 server ........... : $want_pop3d"
1150
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
934 echo "Building with user database modules . :$userdb"
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
935 echo "Building with password lookup modules :$passdb"