annotate configure.in @ 1335:5ad84c54eb7e HEAD

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