annotate configure.ac @ 22503:2a6a6cfe8af6

notify-status: Provide access to all easy fields
author Aki Tuomi <aki.tuomi@dovecot.fi>
date Mon, 04 Sep 2017 15:32:24 +0300
parents fc335480acb3
children b50c55023f08
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3784
beeae4f17615 Cleanups and some more kqueue stuff
Timo Sirainen <tss@iki.fi>
parents: 3783
diff changeset
1 AC_PREREQ([2.59])
15357
f5941f3ac762 Released v2.2.alpha1.
Timo Sirainen <tss@iki.fi>
parents: 15355
diff changeset
2
f5941f3ac762 Released v2.2.alpha1.
Timo Sirainen <tss@iki.fi>
parents: 15355
diff changeset
3 # Be sure to update ABI version also if anything changes that might require
f5941f3ac762 Released v2.2.alpha1.
Timo Sirainen <tss@iki.fi>
parents: 15355
diff changeset
4 # recompiling plugins. Most importantly that means if any structs are changed.
19518
f1ec963e9436 configure: Changed version number to v2.2.devel.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 19509
diff changeset
5 AC_INIT([Dovecot],[2.2.devel],[dovecot@dovecot.org])
19452
c35e62a9e710 Released v2.2.20.rc1.
Timo Sirainen <tss@iki.fi>
parents: 19378
diff changeset
6 AC_DEFINE_UNQUOTED([DOVECOT_ABI_VERSION], "2.2.ABIv20($PACKAGE_VERSION)", [Dovecot ABI version])
20493
4c77eadf2e9f configure: Add m4 and aux dir to configure
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20492
diff changeset
7 AC_CONFIG_AUX_DIR([.])
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
8 AC_CONFIG_SRCDIR([src])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
9
8523
426b356a0708 Use "foreign" automake option so it doesn't complain about missing ChangeLog.
Timo Sirainen <tss@iki.fi>
parents: 8517
diff changeset
10 AM_INIT_AUTOMAKE([foreign])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
11
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
12 AM_MAINTAINER_MODE
12438
c1d8fb31c1ad configure: Use PKG_PROG_PKG_CONFIG to find pkg-config binary.
Timo Sirainen <tss@iki.fi>
parents: 12400
diff changeset
13 PKG_PROG_PKG_CONFIG
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
14
10754
c5cbc99f4627 configure: Set ACLOCAL_AMFLAGS so make finds dovecot.m4.
Timo Sirainen <tss@iki.fi>
parents: 10753
diff changeset
15 ACLOCAL_AMFLAGS='-I $(top_srcdir)'
c5cbc99f4627 configure: Set ACLOCAL_AMFLAGS so make finds dovecot.m4.
Timo Sirainen <tss@iki.fi>
parents: 10753
diff changeset
16 AC_SUBST(ACLOCAL_AMFLAGS)
c5cbc99f4627 configure: Set ACLOCAL_AMFLAGS so make finds dovecot.m4.
Timo Sirainen <tss@iki.fi>
parents: 10753
diff changeset
17
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
18 dnl TEST_WITH(name, value, [plugin])
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
19 AC_DEFUN([TEST_WITH], [
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
20 want=want_`echo $1|sed s/-/_/g`
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
21 if test $2 = yes || test $2 = no || test $2 = auto; then
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
22 eval $want=$2
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
23 elif test $2 = plugin; then
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
24 if test "$3" = plugin; then
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
25 eval $want=plugin
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
26 else
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
27 AC_ERROR([--with-$1=plugin not supported])
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
28 fi
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
29 elif `echo $2|grep '^/' >/dev/null`; then
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
30 AC_ERROR([--with-$1=path not supported. You may want to use instead:
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
31 CPPFLAGS=-I$2/include LDFLAGS=-L$2/lib ./configure --with-$1])
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
32 else
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
33 AC_ERROR([--with-$1: Unknown value: $2])
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
34 fi
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
35 ])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
36
7929
55d1a2bf4573 Renamed --enable-debug to --enable-devel-checks, which describes it better.
Timo Sirainen <tss@iki.fi>
parents: 7924
diff changeset
37 AC_ARG_ENABLE(devel-checks,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
38 AS_HELP_STRING([--enable-devel-checks], [Enable some extra expensive checks for developers]),
544
42e65c2ba49d Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents: 530
diff changeset
39 if test x$enableval = xyes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
40 AC_DEFINE(DEBUG,, [Build with extra debugging checks])
13866
c682a5bf3de7 --enable-devel-checks: Use -fcatch-undefined-behavior -ftrapv with clang.
Timo Sirainen <tss@iki.fi>
parents: 13794
diff changeset
41 want_devel_checks=yes
544
42e65c2ba49d Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents: 530
diff changeset
42 fi)
42e65c2ba49d Added --enable-debug. Currently it just forces file locks so that index
Timo Sirainen <tss@iki.fi>
parents: 530
diff changeset
43
546
e1254b838e0b Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents: 544
diff changeset
44 AC_ARG_ENABLE(asserts,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
45 AS_HELP_STRING([--enable-asserts], [Enable asserts (default)]),
4057
f4807accc1d5 Unbreak last accidental change..
Timo Sirainen <tss@iki.fi>
parents: 4055
diff changeset
46 if test x$enableval = xno; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
47 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
48 fi)
e1254b838e0b Added --enable-asserts (default) and fixed some warnings when building
Timo Sirainen <tss@iki.fi>
parents: 544
diff changeset
49
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
50 AC_ARG_WITH(shared-libs,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
51 AS_HELP_STRING([--with-shared-libs], [Link binaries using shared Dovecot libraries (default)]),
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
52 want_shared_libs=$withval,
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
53 want_shared_libs=yes)
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
54 AM_CONDITIONAL(BUILD_SHARED_LIBS, test "$want_shared_libs" = "yes")
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
55
439
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
56 AC_ARG_WITH(mem-align,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
57 AS_HELP_STRING([--with-mem-align=BYTES], [Set the memory alignment (default: 8)]),
439
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
58 mem_align=$withval,
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
59 mem_align=8)
b66ccecbc8a6 Added --with-mem-align=BYTES option
Timo Sirainen <tss@iki.fi>
parents: 426
diff changeset
60
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
61 AC_ARG_WITH(ioloop,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
62 AS_HELP_STRING([--with-ioloop=IOLOOP], [Specify the I/O loop method to use (epoll, kqueue, poll; best for the fastest available; default is best)]),
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
63 ioloop=$withval,
7268
80cd999d5623 Changed the default ioloop to "best".
Timo Sirainen <tss@iki.fi>
parents: 7264
diff changeset
64 ioloop=best)
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
65
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
66 AC_ARG_WITH(notify,
18980
39255150d521 Removed support for dnotify.
Timo Sirainen <tss@iki.fi>
parents: 18702
diff changeset
67 AS_HELP_STRING([--with-notify=NOTIFY], [Specify the file system notification method to use (inotify, kqueue, none; default is detected in the above order)]),
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
68 notify=$withval,
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
69 notify=)
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
70
6111
c83546491bad --with-passwd was used also for --with-nss
Timo Sirainen <tss@iki.fi>
parents: 6106
diff changeset
71 AC_ARG_WITH(nss,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
72 AS_HELP_STRING([--with-nss], [Build with NSS module support (auto)]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
73 TEST_WITH(nss, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
74 want_nss=auto)
5870
c9b49ed99d28 Added userdb nss which currently supports glibc-compatible NSS modules.
Timo Sirainen <tss@iki.fi>
parents: 5859
diff changeset
75
328
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
76 AC_ARG_WITH(shadow,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
77 AS_HELP_STRING([--with-shadow], [Build with shadow password support (auto)]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
78 TEST_WITH(shadow, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
79 want_shadow=auto)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
80
328
a0abed892d11 s/--enable/--with/ to all auth modules. added --with-file-offset-size=BITS
Timo Sirainen <tss@iki.fi>
parents: 313
diff changeset
81 AC_ARG_WITH(pam,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
82 AS_HELP_STRING([--with-pam], [Build with PAM support (auto)]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
83 TEST_WITH(pam, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
84 want_pam=auto)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
85
1851
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
86 AC_ARG_WITH(bsdauth,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
87 AS_HELP_STRING([--with-bsdauth], [Build with BSD authentication support (auto)]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
88 TEST_WITH(bsdauth, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
89 want_bsdauth=auto)
1851
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
90
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
91 AC_ARG_WITH(gssapi,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
92 AS_HELP_STRING([--with-gssapi=yes|plugin Build with GSSAPI authentication support]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
93 TEST_WITH(gssapi, $withval, plugin),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
94 want_gssapi=no)
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
95
4638
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
96 AC_ARG_WITH(sia,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
97 AS_HELP_STRING([--with-sia], [Build with Tru64 SIA support]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
98 TEST_WITH(sia, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
99 want_sia=no)
4638
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
100
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
101 AC_ARG_WITH(ldap,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
102 AS_HELP_STRING([--with-ldap=yes|plugin], [Build with LDAP support]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
103 TEST_WITH(ldap, $withval, plugin),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
104 want_ldap=no)
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
105
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
106 AC_ARG_WITH(vpopmail,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
107 AS_HELP_STRING([--with-vpopmail], [Build with vpopmail support (auto)]),
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
108 if test x$withval = xno; then
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
109 want_vpopmail=no
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
110 else
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
111 if test x$withval = xyes || test x$withval = xauto; then
5035
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
112 vpopmail_home="`echo ~vpopmail`"
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
113 want_vpopmail=$withval
5035
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
114 else
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
115 vpopmail_home="$withval"
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
116 want_vpopmail=yes
5035
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
117 fi
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
118 fi, [
12049
f90590836165 configure: vpopmail is broken, fail configure if --with-vpopmail is used.
Timo Sirainen <tss@iki.fi>
parents: 12044
diff changeset
119 want_vpopmail=no
5035
80f0ee36e905 Allow --with-vpopmail=path specify the vpopmail_home path.
Timo Sirainen <tss@iki.fi>
parents: 5034
diff changeset
120 ])
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
121
10581
6ecb1b7528c9 Disabled Berkeley DB support until someone fixes it.
Timo Sirainen <tss@iki.fi>
parents: 10567
diff changeset
122 # Berkeley DB support is more or less broken. Disabled for now.
6ecb1b7528c9 Disabled Berkeley DB support until someone fixes it.
Timo Sirainen <tss@iki.fi>
parents: 10567
diff changeset
123 #AC_ARG_WITH(db,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
124 #AS_HELP_STRING([--with-db], [Build with Berkeley DB support]),
10581
6ecb1b7528c9 Disabled Berkeley DB support until someone fixes it.
Timo Sirainen <tss@iki.fi>
parents: 10567
diff changeset
125 # TEST_WITH(db, $withval),
6ecb1b7528c9 Disabled Berkeley DB support until someone fixes it.
Timo Sirainen <tss@iki.fi>
parents: 10567
diff changeset
126 # want_db=no)
10600
20963e8ec560 configure: Another try at fixing Berkeley DB check to not give an error.
Timo Sirainen <tss@iki.fi>
parents: 10598
diff changeset
127 want_db=no
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
128
15665
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
129 AC_ARG_WITH(cdb,
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
130 AS_HELP_STRING([--with-cdb], [Build with CDB support]),
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
131 TEST_WITH(cdb, $withval),
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
132 want_cdb=no)
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
133
4013
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
134 dnl The --with-sql is useful only if Dovecot is being built with all the SQL
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
135 dnl drivers as modules. If any SQL driver is built-in, this option is ignored.
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
136 AC_ARG_WITH(sql,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
137 AS_HELP_STRING([--with-sql=yes|plugin], [Build with generic SQL support]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
138 TEST_WITH(sql, $withval, plugin),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
139 want_sql=no)
4013
bf0357107349 Added --with-sql option to build with SQL userdb/passdb but without any
Timo Sirainen <tss@iki.fi>
parents: 4012
diff changeset
140
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
141 AC_ARG_WITH(pgsql,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
142 AS_HELP_STRING([--with-pgsql], [Build with PostgreSQL driver support]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
143 TEST_WITH(pgsql, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
144 want_pgsql=no)
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
145
1995
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
146 AC_ARG_WITH(mysql,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
147 AS_HELP_STRING([--with-mysql], [Build with MySQL driver support]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
148 TEST_WITH(mysql, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
149 want_mysql=no)
1995
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
150
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
151 AC_ARG_WITH(sqlite,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
152 AS_HELP_STRING([--with-sqlite], [Build with SQLite3 driver support]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
153 TEST_WITH(sqlite, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
154 want_sqlite=no)
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
155
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
156 AC_ARG_WITH(cassandra,
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
157 AS_HELP_STRING([--with-cassandra], [Build with Cassandra driver support]),
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
158 TEST_WITH(cassandra, $withval),
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
159 want_cassandra=no)
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
160
4621
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
161 AC_ARG_WITH(lucene,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
162 AS_HELP_STRING([--with-lucene], [Build with CLucene full text search support]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
163 TEST_WITH(lucene, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
164 want_lucene=no)
4621
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
165 AM_CONDITIONAL(BUILD_LUCENE, test "$want_lucene" = "yes")
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
166
13305
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
167 AC_ARG_WITH(stemmer,
18412
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
168 AS_HELP_STRING([--with-stemmer], [Build with libstemmer support (for FTS) (auto)]),
13305
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
169 TEST_WITH(stemmer, $withval),
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
170 want_stemmer=auto)
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
171
18396
33685b996cf2 configure: Added --with-textcat parameter
Timo Sirainen <tss@iki.fi>
parents: 18391
diff changeset
172 AC_ARG_WITH(textcat,
18412
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
173 AS_HELP_STRING([--with-textcat], [Build with libtextcat support (for FTS) (auto)]),
18396
33685b996cf2 configure: Added --with-textcat parameter
Timo Sirainen <tss@iki.fi>
parents: 18391
diff changeset
174 TEST_WITH(textcat, $withval),
33685b996cf2 configure: Added --with-textcat parameter
Timo Sirainen <tss@iki.fi>
parents: 18391
diff changeset
175 want_textcat=auto)
33685b996cf2 configure: Added --with-textcat parameter
Timo Sirainen <tss@iki.fi>
parents: 18391
diff changeset
176
18439
b179bbd226e5 configure: s/normalizer/libicu/ since we it could be used for something else as well.
Timo Sirainen <tss@iki.fi>
parents: 18426
diff changeset
177 AC_ARG_WITH(icu,
b179bbd226e5 configure: s/normalizer/libicu/ since we it could be used for something else as well.
Timo Sirainen <tss@iki.fi>
parents: 18426
diff changeset
178 AS_HELP_STRING([--with-icu], [Build with libicu support (for FTS normalization) (auto)]),
b179bbd226e5 configure: s/normalizer/libicu/ since we it could be used for something else as well.
Timo Sirainen <tss@iki.fi>
parents: 18426
diff changeset
179 want_icu=$withval,
b179bbd226e5 configure: s/normalizer/libicu/ since we it could be used for something else as well.
Timo Sirainen <tss@iki.fi>
parents: 18426
diff changeset
180 want_icu=auto)
18414
81e5b977e5c5 Initial import for lib-fts.
Timo Sirainen <tss@iki.fi>
parents: 18413
diff changeset
181
7990
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
182 AC_ARG_WITH(solr,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
183 AS_HELP_STRING([--with-solr], [Build with Solr full text search support]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
184 TEST_WITH(solr, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
185 want_solr=no)
7990
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
186
8090
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
187 AC_ARG_WITH(zlib,
18391
11f7bbed333e configure: Add missing (auto) to autodetected options.
Teemu Huovila <teemu.huovila@dovecot.fi>
parents: 18340
diff changeset
188 AS_HELP_STRING([--with-zlib], [Build with zlib compression support (auto)]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
189 TEST_WITH(zlib, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
190 want_zlib=auto)
8090
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
191
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
192 AC_ARG_WITH(bzlib,
18391
11f7bbed333e configure: Add missing (auto) to autodetected options.
Teemu Huovila <teemu.huovila@dovecot.fi>
parents: 18340
diff changeset
193 AS_HELP_STRING([--with-bzlib], [Build with bzlib compression support (auto)]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
194 TEST_WITH(bzlib, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
195 want_bzlib=auto)
8090
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
196
17028
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
197 AC_ARG_WITH(lzma,
18391
11f7bbed333e configure: Add missing (auto) to autodetected options.
Teemu Huovila <teemu.huovila@dovecot.fi>
parents: 18340
diff changeset
198 AS_HELP_STRING([--with-lzma], [Build with LZMA compression support (auto)]),
17028
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
199 TEST_WITH(lzma, $withval),
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
200 want_lzma=auto)
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
201
17104
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
202 AC_ARG_WITH(lz4,
18391
11f7bbed333e configure: Add missing (auto) to autodetected options.
Teemu Huovila <teemu.huovila@dovecot.fi>
parents: 18340
diff changeset
203 AS_HELP_STRING([--with-lz4], [Build with LZ4 compression support (auto)]),
17104
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
204 TEST_WITH(lz4, $withval),
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
205 want_lz4=auto)
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
206
9538
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
207 AC_ARG_WITH(libcap,
18391
11f7bbed333e configure: Add missing (auto) to autodetected options.
Teemu Huovila <teemu.huovila@dovecot.fi>
parents: 18340
diff changeset
208 AS_HELP_STRING([--with-libcap], [Build with libcap support (Dropping capabilities) (auto)]),
9538
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
209 TEST_WITH(libcap, $withval),
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
210 want_libcap=auto)
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
211
10647
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
212 AC_ARG_WITH(libwrap,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
213 AS_HELP_STRING([--with-libwrap], [Build with libwrap, ie. TCP-wrappers]),
10647
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
214 TEST_WITH(libwrap, $withval),
11005
51150f2b3be8 configure: Disabled tcp-wrappers by default.
Timo Sirainen <tss@iki.fi>
parents: 10994
diff changeset
215 want_libwrap=no)
10647
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
216
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
217 AC_ARG_WITH(ssl,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
218 AS_HELP_STRING([--with-ssl=gnutls|openssl], [Build with GNUTLS or OpenSSL (default)]),
245
Timo Sirainen <tss@iki.fi>
parents: 244
diff changeset
219 if test x$withval = xno; then
244
bf1e284fece2 added --without-gnutls option
Timo Sirainen <tss@iki.fi>
parents: 224
diff changeset
220 want_gnutls=no
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
221 want_openssl=no
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
222 elif test x$withval = xgnutls; then
12026
ab75eff633aa configure: --with-ssl=gnutls gives error now immediately
Timo Sirainen <tss@iki.fi>
parents: 12002
diff changeset
223 AC_ERROR([GNUTLS support is broken currently])
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
224 want_gnutls=yes
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
225 want_openssl=no
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
226 elif test x$withval = xopenssl; then
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
227 want_gnutls=no
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
228 want_openssl=yes
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
229 elif test x$withval = xyes; then
3004
60a172e62d11 Don't use GNUTLS unless explicitly specified. It's not working currently
Timo Sirainen <tss@iki.fi>
parents: 3002
diff changeset
230 want_gnutls=no
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
231 want_openssl=yes
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
232 else
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
233 AC_ERROR([--with-ssl: Invalid value: $withval])
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
234 fi, [
3004
60a172e62d11 Don't use GNUTLS unless explicitly specified. It's not working currently
Timo Sirainen <tss@iki.fi>
parents: 3002
diff changeset
235 want_gnutls=no
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
236 want_openssl=auto
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
237 ])
244
bf1e284fece2 added --without-gnutls option
Timo Sirainen <tss@iki.fi>
parents: 224
diff changeset
238
657
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
239 AC_ARG_WITH(ssldir,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
240 AS_HELP_STRING([--with-ssldir=DIR], [SSL base directory for certificates (/etc/ssl)]),
657
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
241 ssldir="$withval",
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
242 ssldir=/etc/ssl
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
243 )
712
385f862a4005 --with-ssldir actually didn't do anything, and the default directory for
Timo Sirainen <tss@iki.fi>
parents: 711
diff changeset
244 AC_SUBST(ssldir)
657
85a888d2766e Added script to easily generate self-signed certificate.
Timo Sirainen <tss@iki.fi>
parents: 654
diff changeset
245
3327
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
246 AC_ARG_WITH(rundir,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
247 AS_HELP_STRING([--with-rundir=DIR], [Runtime data directory (LOCALSTATEDIR/run/dovecot)]),
3327
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
248 rundir="$withval",
7914
5061533382be Uppercased PACKAGE_NAME macro and started using it in some places.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
249 rundir=$localstatedir/run/$PACKAGE
3327
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
250 )
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
251 AC_SUBST(rundir)
ce0733b39311 Added --with-rundir configure option.
Timo Sirainen <tss@iki.fi>
parents: 3284
diff changeset
252
4407
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
253 AC_ARG_WITH(statedir,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
254 AS_HELP_STRING([--with-statedir=DIR], [Permanent data directory (LOCALSTATEDIR/lib/dovecot)]),
4407
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
255 statedir="$withval",
7914
5061533382be Uppercased PACKAGE_NAME macro and started using it in some places.
Timo Sirainen <tss@iki.fi>
parents: 7902
diff changeset
256 statedir=$localstatedir/lib/$PACKAGE
4407
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
257 )
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
258 AC_SUBST(statedir)
2e4857a2b858 Added --with-statedir configure option which defaults to
Timo Sirainen <tss@iki.fi>
parents: 4387
diff changeset
259
12442
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
260 AC_ARG_WITH([systemdsystemunitdir],
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
261 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files (auto=detect)]), [
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
262 if test "$withval" = "auto"; then
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
263 systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
264 elif test "$withval" != "no"; then
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
265 systemdsystemunitdir=$withval
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
266 fi
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
267 ], [])
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
268 if test "$systemdsystemunitdir" != ""; then
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
269 AC_SUBST(systemdsystemunitdir)
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
270 AC_DEFINE(HAVE_SYSTEMD,, [Define if you want to use systemd socket activation])
12442
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
271 fi
12443
94c5d2189006 configure: And small fix to previous --with-systemdsystemunitdir fix.
Timo Sirainen <tss@iki.fi>
parents: 12442
diff changeset
272 AM_CONDITIONAL(HAVE_SYSTEMD, test "$systemdsystemunitdir" != "")
12442
e0b42fcf31a1 configure: --with-systemdsystemunitdir wasn't working right.
Timo Sirainen <tss@iki.fi>
parents: 12441
diff changeset
273
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
274 AC_ARG_WITH(gc,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
275 AS_HELP_STRING([--with-gc], [Use Boehm garbage collector]),
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
276 TEST_WITH(gc, $withval),
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
277 want_gc=no)
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
278
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
279 AC_ARG_WITH(storages,
15380
7c75559cd8f6 Reverted 269104a0821b (Build imapc and pop3c always as plugins.)
Timo Sirainen <tss@iki.fi>
parents: 15379
diff changeset
280 AS_HELP_STRING([--with-storages], [Build with specified mail storage formats (mdbox sdbox maildir mbox cydir imapc pop3c)]), [
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
281 if test "$withval" = "yes" || test "$withval" = "no"; then
4005
450ee12c2e26 Give error if --with-storages or --without-storages is used without
Timo Sirainen <tss@iki.fi>
parents: 3997
diff changeset
282 AC_MSG_ERROR([--with-storages needs storage list as parameter])
450ee12c2e26 Give error if --with-storages or --without-storages is used without
Timo Sirainen <tss@iki.fi>
parents: 3997
diff changeset
283 fi
8398
d331b8fc8ba8 configure: Previous change broke shared storage completely.
Timo Sirainen <tss@iki.fi>
parents: 8392
diff changeset
284 mail_storages="shared `echo "$withval"|sed 's/,/ /g'`" ],
15380
7c75559cd8f6 Reverted 269104a0821b (Build imapc and pop3c always as plugins.)
Timo Sirainen <tss@iki.fi>
parents: 15379
diff changeset
285 mail_storages="shared mdbox sdbox maildir mbox cydir imapc pop3c")
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
286 AC_SUBST(mail_storages)
15380
7c75559cd8f6 Reverted 269104a0821b (Build imapc and pop3c always as plugins.)
Timo Sirainen <tss@iki.fi>
parents: 15379
diff changeset
287 mail_storages="$mail_storages raw fail"
13699
500bf1444ad6 configure: Don't reorder --with-storages values.
Timo Sirainen <tss@iki.fi>
parents: 13679
diff changeset
288 # drop duplicates
500bf1444ad6 configure: Don't reorder --with-storages values.
Timo Sirainen <tss@iki.fi>
parents: 13679
diff changeset
289 duplicates=`(for i in $mail_storages; do echo $i; done)|sort|uniq -d|xargs echo`
500bf1444ad6 configure: Don't reorder --with-storages values.
Timo Sirainen <tss@iki.fi>
parents: 13679
diff changeset
290 if test "$duplicates" != ""; then
500bf1444ad6 configure: Don't reorder --with-storages values.
Timo Sirainen <tss@iki.fi>
parents: 13679
diff changeset
291 AC_ERROR([Duplicate --with-storages: $duplicates])
500bf1444ad6 configure: Don't reorder --with-storages values.
Timo Sirainen <tss@iki.fi>
parents: 13679
diff changeset
292 fi
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
293
12092
711b5f193f04 dovecot.m4: Added --with-moduledir and export dovecotdir
Timo Sirainen <tss@iki.fi>
parents: 12049
diff changeset
294 DC_DOVECOT_MODULEDIR
2070
0c8f884d1648 Added --with-moduledir configure option
Timo Sirainen <tss@iki.fi>
parents: 2036
diff changeset
295
3779
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
296 AC_ARG_WITH(docs,
12441
ae5b5961a6a7 configure: Use AS_HELP_STRING() macro.
Timo Sirainen <tss@iki.fi>
parents: 12439
diff changeset
297 AS_HELP_STRING([--with-docs], [Install documentation (default)]),
3779
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
298 if test x$withval = xno; then
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
299 want_docs=no
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
300 else
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
301 want_docs=yes
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
302 fi,
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
303 want_docs=yes)
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
304 AM_CONDITIONAL(BUILD_DOCS, test "$want_docs" = "yes")
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
305
9158
69aa6e878a59 configure: Removed --with-* parameters for passdbs/userdbs that don't require external libraries.
Timo Sirainen <tss@iki.fi>
parents: 9157
diff changeset
306 dnl always enable all of the passbs and userdbs that don't require extra libs
69aa6e878a59 configure: Removed --with-* parameters for passdbs/userdbs that don't require external libraries.
Timo Sirainen <tss@iki.fi>
parents: 9157
diff changeset
307 want_passwd=yes
69aa6e878a59 configure: Removed --with-* parameters for passdbs/userdbs that don't require external libraries.
Timo Sirainen <tss@iki.fi>
parents: 9157
diff changeset
308 want_passwd_file=yes
69aa6e878a59 configure: Removed --with-* parameters for passdbs/userdbs that don't require external libraries.
Timo Sirainen <tss@iki.fi>
parents: 9157
diff changeset
309 want_checkpassword=yes
69aa6e878a59 configure: Removed --with-* parameters for passdbs/userdbs that don't require external libraries.
Timo Sirainen <tss@iki.fi>
parents: 9157
diff changeset
310 want_prefetch_userdb=yes
69aa6e878a59 configure: Removed --with-* parameters for passdbs/userdbs that don't require external libraries.
Timo Sirainen <tss@iki.fi>
parents: 9157
diff changeset
311
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
312 AC_ISC_POSIX
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
313 AC_PROG_CC
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
314 AC_PROG_CPP
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
315 AC_PROG_CXX # lucene plugin needs this
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
316 AC_HEADER_STDC
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
317 AC_C_INLINE
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
318 AC_PROG_LIBTOOL
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
319 AM_ICONV
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
320
21343
003d74d026f3 configure: Define __STDC_LIMIT_MACROS for CXXFLAGS
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21283
diff changeset
321 # SIZE_MAX is missing without this
003d74d026f3 configure: Define __STDC_LIMIT_MACROS for CXXFLAGS
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21283
diff changeset
322 CXXFLAGS="$CXXFLAGS -D__STDC_LIMIT_MACROS"
003d74d026f3 configure: Define __STDC_LIMIT_MACROS for CXXFLAGS
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21283
diff changeset
323
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
324 AC_DEFINE_UNQUOTED(DOVECOT_NAME, "$PACKAGE_NAME", [Dovecot name])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
325 AC_DEFINE_UNQUOTED(DOVECOT_STRING, "$PACKAGE_STRING", [Dovecot string])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
326 AC_DEFINE_UNQUOTED(DOVECOT_VERSION, "$PACKAGE_VERSION", [Dovecot version])
10645
928312d6017c config.h: Added DOVECOT_* macros for PACKAGE_* macros.
Timo Sirainen <tss@iki.fi>
parents: 10619
diff changeset
327
16180
e294e416f5ba Add macros DOVECOT_VERSION_{MAJOR,MINOR} to config.h to allow version checks in the preprocessor
Dennis Schridde <devurandom@gmx.net>
parents: 15809
diff changeset
328 AC_DEFINE([DOVECOT_VERSION_MAJOR], regexp(AC_PACKAGE_VERSION, [^\([0-9]+\)\.\([0-9]+\)], [\1]), [Dovecot major version])
e294e416f5ba Add macros DOVECOT_VERSION_{MAJOR,MINOR} to config.h to allow version checks in the preprocessor
Dennis Schridde <devurandom@gmx.net>
parents: 15809
diff changeset
329 AC_DEFINE([DOVECOT_VERSION_MINOR], regexp(AC_PACKAGE_VERSION, [^\([0-9]+\)\.\([0-9]+\)], [\2]), [Dovecot minor version])
e294e416f5ba Add macros DOVECOT_VERSION_{MAJOR,MINOR} to config.h to allow version checks in the preprocessor
Dennis Schridde <devurandom@gmx.net>
parents: 15809
diff changeset
330
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
331 AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h malloc.h inttypes.h \
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
332 sys/uio.h sys/sysmacros.h sys/resource.h sys/select.h libgen.h \
15894
b3f890c4a41c quota-fs: Support NetBSD 6.0 libquota.
Timo Sirainen <tss@iki.fi>
parents: 15880
diff changeset
333 sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.h \
b3f890c4a41c quota-fs: Support NetBSD 6.0 libquota.
Timo Sirainen <tss@iki.fi>
parents: 15880
diff changeset
334 quota.h sys/fs/quota_common.h \
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
335 mntent.h sys/mnttab.h sys/event.h sys/time.h sys/mkdev.h linux/dqblk_xfs.h \
9656
dc6d35b51b68 configure: Check sasl.h existence only when using --with-ldap.
Timo Sirainen <tss@iki.fi>
parents: 9655
diff changeset
336 xfs/xqm.h execinfo.h ucontext.h malloc_np.h sys/utsname.h sys/vmount.h \
14233
80688ab1ea3d Extends struct net_unix_cred with pid field and modifies net_getunixcred() to fill it in if possible.
Timo Sirainen <tss@iki.fi>
parents: 14217
diff changeset
337 sys/utsname.h glob.h linux/falloc.h ucred.h sys/ucred.h)
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
338
14101
671b637e20db configure: Avoid some unnecessary warnings with clang.
Timo Sirainen <tss@iki.fi>
parents: 14038
diff changeset
339 dnl * clang check
671b637e20db configure: Avoid some unnecessary warnings with clang.
Timo Sirainen <tss@iki.fi>
parents: 14038
diff changeset
340 have_clang=no
671b637e20db configure: Avoid some unnecessary warnings with clang.
Timo Sirainen <tss@iki.fi>
parents: 14038
diff changeset
341 if $CC -dM -E -x c /dev/null | grep __clang__ > /dev/null 2>&1; then
671b637e20db configure: Avoid some unnecessary warnings with clang.
Timo Sirainen <tss@iki.fi>
parents: 14038
diff changeset
342 have_clang=yes
671b637e20db configure: Avoid some unnecessary warnings with clang.
Timo Sirainen <tss@iki.fi>
parents: 14038
diff changeset
343 fi
671b637e20db configure: Avoid some unnecessary warnings with clang.
Timo Sirainen <tss@iki.fi>
parents: 14038
diff changeset
344
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
345 dnl * gcc specific options
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
346 if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
4826
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
347 # -Wcast-qual -Wcast-align -Wconversion -Wunreachable-code # too many warnings
850
a6f53dbe803f Enable more warnings with gcc
Timo Sirainen <tss@iki.fi>
parents: 843
diff changeset
348 # -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
349 # -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings
4022
2f26567685ff Removed -Wstrict-aliasing=2 since it gives errors with older gccs
Timo Sirainen <tss@iki.fi>
parents: 4018
diff changeset
350 CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast"
3091
0704b595c873 Give -std=gnu99 option to gcc.
Timo Sirainen <tss@iki.fi>
parents: 3062
diff changeset
351
15935
4baf0183f13d Reverted the recent hash.h changes. Instead use -Wno-duplicate-decl-specifier with clang.
Timo Sirainen <tss@iki.fi>
parents: 15928
diff changeset
352 if test "$have_clang" = "yes"; then
4baf0183f13d Reverted the recent hash.h changes. Instead use -Wno-duplicate-decl-specifier with clang.
Timo Sirainen <tss@iki.fi>
parents: 15928
diff changeset
353 AC_TRY_COMPILE([
4baf0183f13d Reverted the recent hash.h changes. Instead use -Wno-duplicate-decl-specifier with clang.
Timo Sirainen <tss@iki.fi>
parents: 15928
diff changeset
354 #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 3)
4baf0183f13d Reverted the recent hash.h changes. Instead use -Wno-duplicate-decl-specifier with clang.
Timo Sirainen <tss@iki.fi>
parents: 15928
diff changeset
355 # error new clang
4baf0183f13d Reverted the recent hash.h changes. Instead use -Wno-duplicate-decl-specifier with clang.
Timo Sirainen <tss@iki.fi>
parents: 15928
diff changeset
356 #endif
4baf0183f13d Reverted the recent hash.h changes. Instead use -Wno-duplicate-decl-specifier with clang.
Timo Sirainen <tss@iki.fi>
parents: 15928
diff changeset
357 ],,,[
4baf0183f13d Reverted the recent hash.h changes. Instead use -Wno-duplicate-decl-specifier with clang.
Timo Sirainen <tss@iki.fi>
parents: 15928
diff changeset
358 # clang 3.3+ unfortunately this gives warnings with hash.h
4baf0183f13d Reverted the recent hash.h changes. Instead use -Wno-duplicate-decl-specifier with clang.
Timo Sirainen <tss@iki.fi>
parents: 15928
diff changeset
359 CFLAGS="$CFLAGS -Wno-duplicate-decl-specifier"
4baf0183f13d Reverted the recent hash.h changes. Instead use -Wno-duplicate-decl-specifier with clang.
Timo Sirainen <tss@iki.fi>
parents: 15928
diff changeset
360 ])
4baf0183f13d Reverted the recent hash.h changes. Instead use -Wno-duplicate-decl-specifier with clang.
Timo Sirainen <tss@iki.fi>
parents: 15928
diff changeset
361 else
14101
671b637e20db configure: Avoid some unnecessary warnings with clang.
Timo Sirainen <tss@iki.fi>
parents: 14038
diff changeset
362 # This is simply to avoid warning when building strftime() wrappers..
671b637e20db configure: Avoid some unnecessary warnings with clang.
Timo Sirainen <tss@iki.fi>
parents: 14038
diff changeset
363 CFLAGS="$CFLAGS -fno-builtin-strftime"
671b637e20db configure: Avoid some unnecessary warnings with clang.
Timo Sirainen <tss@iki.fi>
parents: 14038
diff changeset
364 fi
13930
e0ff21d73630 configure: Add -fno-builtin-strftime flag with gcc to avoid warning.
Timo Sirainen <tss@iki.fi>
parents: 13907
diff changeset
365
4826
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
366 AC_TRY_COMPILE([
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
367 #if __GNUC__ < 4
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
368 # error old gcc
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
369 #endif
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
370 ],,[
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
371 # gcc4
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
372 CFLAGS="$CFLAGS -Wstrict-aliasing=2"
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
373 ])
53ff1a59cdd5 Enable -Wstrict-aliasing=2 with gcc 4.
Timo Sirainen <tss@iki.fi>
parents: 4808
diff changeset
374
3097
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
375 # Use std=gnu99 if we have new enough gcc
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
376 old_cflags=$CFLAGS
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
377 CFLAGS="-std=gnu99"
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
378 AC_TRY_COMPILE([
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
379 ],, [
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
380 CFLAGS="$CFLAGS $old_cflags"
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
381 ], [
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
382 CFLAGS="$old_cflags"
3ba362513202 Don't use -std=gnu99 if gcc doesn't support it.
Timo Sirainen <tss@iki.fi>
parents: 3091
diff changeset
383 ])
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
384 fi
14101
671b637e20db configure: Avoid some unnecessary warnings with clang.
Timo Sirainen <tss@iki.fi>
parents: 14038
diff changeset
385 if test "$have_clang" = "yes"; then
13866
c682a5bf3de7 --enable-devel-checks: Use -fcatch-undefined-behavior -ftrapv with clang.
Timo Sirainen <tss@iki.fi>
parents: 13794
diff changeset
386 # clang specific options
c682a5bf3de7 --enable-devel-checks: Use -fcatch-undefined-behavior -ftrapv with clang.
Timo Sirainen <tss@iki.fi>
parents: 13794
diff changeset
387 if test "$want_devel_checks" = "yes"; then
15926
5be9659a2738 configure: Removed accidentally enabled clang -fsanitize options for now.
Timo Sirainen <tss@iki.fi>
parents: 15904
diff changeset
388 # FIXME: enable once md[45], sha[12] can be compiled without
5be9659a2738 configure: Removed accidentally enabled clang -fsanitize options for now.
Timo Sirainen <tss@iki.fi>
parents: 15904
diff changeset
389 #CFLAGS="$CFLAGS -fsanitize=integer,undefined -ftrapv"
15927
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
390 :
13866
c682a5bf3de7 --enable-devel-checks: Use -fcatch-undefined-behavior -ftrapv with clang.
Timo Sirainen <tss@iki.fi>
parents: 13794
diff changeset
391 fi
c682a5bf3de7 --enable-devel-checks: Use -fcatch-undefined-behavior -ftrapv with clang.
Timo Sirainen <tss@iki.fi>
parents: 13794
diff changeset
392 fi
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
393
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
394 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
395 dnl ** just some generic stuff...
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
396 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
397
5690
c1f51c3510ca Simplify some checks with AC_SEARCH_LIBS()
Timo Sirainen <tss@iki.fi>
parents: 5681
diff changeset
398 AC_SEARCH_LIBS(socket, socket)
c1f51c3510ca Simplify some checks with AC_SEARCH_LIBS()
Timo Sirainen <tss@iki.fi>
parents: 5681
diff changeset
399 AC_SEARCH_LIBS(inet_addr, nsl)
c1f51c3510ca Simplify some checks with AC_SEARCH_LIBS()
Timo Sirainen <tss@iki.fi>
parents: 5681
diff changeset
400 AC_SEARCH_LIBS(fdatasync, rt, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
401 AC_DEFINE(HAVE_FDATASYNC,, [Define if you have fdatasync()])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
402 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
403
9538
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
404 if test $want_libcap != no; then
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
405 AC_CHECK_LIB(cap, cap_init, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
406 AC_DEFINE(HAVE_LIBCAP,, [libcap is installed for cap_init()])
9538
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
407 LIBCAP="-lcap"
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
408 AC_SUBST(LIBCAP)
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
409 ], [
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
410 if test "$want_libcap" = "yes"; then
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
411 AC_ERROR([Can't build with libcap support: libcap not found])
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
412 fi
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
413 ])
b20513ab8f5a Added --without-libcap configure option.
Daniel Mierswa <impulze@impulze.org>
parents: 9410
diff changeset
414 fi
5201
8920e744dac4 Drop privileges if libcap is found. Patch by David (lists edeca.net).
Timo Sirainen <tss@iki.fi>
parents: 5197
diff changeset
415
10647
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
416 have_libwrap=no
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
417 if test $want_libwrap != no; then
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
418 AC_CHECK_HEADER(tcpd.h, [
10700
b14e694fc8b4 configure: libwrap detection cleared $LIBS
Timo Sirainen <tss@iki.fi>
parents: 10699
diff changeset
419 old_LIBS=$LIBS
10980
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
420
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
421 AC_CACHE_CHECK([whether we have libwrap],i_cv_have_libwrap,[
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
422 AC_TRY_COMPILE([
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
423 #include <tcpd.h>
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
424 int allow_severity = 0;
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
425 int deny_severity = 0;
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
426 ], [
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
427 request_init((void *)0);
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
428 ], [
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
429 i_cv_have_libwrap=yes
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
430 ], [
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
431 i_cv_have_libwrap=no
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
432 ])
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
433 ])
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
434 if test $i_cv_have_libwrap = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
435 AC_DEFINE(HAVE_LIBWRAP,, [Define if you have libwrap])
10647
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
436 LIBWRAP_LIBS=-lwrap
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
437 AC_SUBST(LIBWRAP_LIBS)
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
438 have_libwrap=yes
10980
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
439 else
10647
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
440 if test "$want_libwrap" = "yes"; then
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
441 AC_ERROR([Can't build with libwrap support: libwrap not found])
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
442 fi
10980
5b0a88cb9a12 configure: Fixed libwrap checking in some systems.
Timo Sirainen <tss@iki.fi>
parents: 10968
diff changeset
443 fi
10647
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
444 LIBS=$old_LIBS
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
445 ], [
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
446 if test "$want_libwrap" = "yes"; then
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
447 AC_ERROR([Can't build with libwrap support: tcpd.h not found])
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
448 fi
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
449 ])
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
450 fi
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
451 AM_CONDITIONAL(TCPWRAPPERS, test "$have_libwrap" = "yes")
51a978045f47 Added support for tcpwrappers and potentially other login access checks.
Timo Sirainen <tss@iki.fi>
parents: 10645
diff changeset
452
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
453 AC_DEFINE(PACKAGE_WEBPAGE, "http://www.dovecot.org/", [Support URL])
7917
ca2ff54ee9b4 Added support for IMAP ID extension.
Timo Sirainen <tss@iki.fi>
parents: 7914
diff changeset
454
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
455 dnl * after -lsocket and -lnsl tests, inet_aton() may be in them
2103
879b0b9ed5d4 Separate mbox_locks/mbox_read_dotlock to mbox_read_locks and
Timo Sirainen <tss@iki.fi>
parents: 2080
diff changeset
456 AC_CHECK_FUNCS(fcntl flock lockf inet_aton sigaction getpagesize madvise \
8600
7c12e20f1eee env_remove(): Implement a fallback method if unsetenv() doesn't exist.
Timo Sirainen <tss@iki.fi>
parents: 8578
diff changeset
457 strcasecmp stricmp vsyslog writev pread uname unsetenv \
3237
2f57438d9542 Added setegid() emulation for HP-UX.
Timo Sirainen <tss@iki.fi>
parents: 3236
diff changeset
458 setrlimit setproctitle seteuid setreuid setegid setresgid \
19038
f8ab4f979e92 Removed all invocations of strtoll() and friends.
Stephan Bosch <stephan@rename-it.nl>
parents: 18996
diff changeset
459 getmntinfo setpriority quotactl getmntent kqueue kevent \
f8ab4f979e92 Removed all invocations of strtoll() and friends.
Stephan Bosch <stephan@rename-it.nl>
parents: 18996
diff changeset
460 backtrace_symbols walkcontext dirfd clearenv \
f8ab4f979e92 Removed all invocations of strtoll() and friends.
Stephan Bosch <stephan@rename-it.nl>
parents: 18996
diff changeset
461 malloc_usable_size glob fallocate posix_fadvise \
20037
c27f1eac85b7 lib: Implement utc_mktime() with timegm() if it exists.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20031
diff changeset
462 getpeereid getpeerucred inotify_init timegm)
9655
cef143e8719d configure: Use -lrt for clock_gettime() if necessary.
Timo Sirainen <tss@iki.fi>
parents: 9654
diff changeset
463
16346
139ab37f69df configure: Fixed checking for struct sockpeercred with OpenBSD <5.3
Timo Sirainen <tss@iki.fi>
parents: 16309
diff changeset
464 AC_CHECK_TYPES([struct sockpeercred],,,[
139ab37f69df configure: Fixed checking for struct sockpeercred with OpenBSD <5.3
Timo Sirainen <tss@iki.fi>
parents: 16309
diff changeset
465 #include <sys/types.h>
139ab37f69df configure: Fixed checking for struct sockpeercred with OpenBSD <5.3
Timo Sirainen <tss@iki.fi>
parents: 16309
diff changeset
466 #include <sys/socket.h>
139ab37f69df configure: Fixed checking for struct sockpeercred with OpenBSD <5.3
Timo Sirainen <tss@iki.fi>
parents: 16309
diff changeset
467 ])
14233
80688ab1ea3d Extends struct net_unix_cred with pid field and modifies net_getunixcred() to fill it in if possible.
Timo Sirainen <tss@iki.fi>
parents: 14217
diff changeset
468
15493
ac63858cbe5f configure: Use -lrt for check_gettime() only if needed.
Timo Sirainen <tss@iki.fi>
parents: 15406
diff changeset
469 AC_SEARCH_LIBS(clock_gettime, rt, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
470 AC_DEFINE(HAVE_CLOCK_GETTIME,, [Define if you have the clock_gettime function])
9655
cef143e8719d configure: Use -lrt for clock_gettime() if necessary.
Timo Sirainen <tss@iki.fi>
parents: 9654
diff changeset
471 ])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
472
15927
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
473 AC_CACHE_CHECK([for typeof],i_cv_have_typeof,[
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
474 AC_TRY_COMPILE([
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
475 ], [
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
476 int foo;
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
477 typeof(foo) bar;
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
478 ], [
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
479 i_cv_have_typeof=yes
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
480 ], [
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
481 i_cv_have_typeof=no
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
482 ])
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
483 ])
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
484 if test $i_cv_have_typeof = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
485 AC_DEFINE(HAVE_TYPEOF,, [Define if you have typeof()])
15927
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
486 fi
61508a42a44b configure: Fix previous commit & implement AC_C_TYPEOF ourself.
Timo Sirainen <tss@iki.fi>
parents: 15926
diff changeset
487
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
488 dnl * I/O loop function
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
489 have_ioloop=no
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
490
4482
f60b07bd5fa7 --with-ioloop=auto changed to --with-ioloop=best
Timo Sirainen <tss@iki.fi>
parents: 4478
diff changeset
491 if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
492 AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
493 AC_TRY_RUN([
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
494 #include <sys/epoll.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
495
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
496 int main()
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
497 {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
498 return epoll_create(5) < 1;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
499 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
500 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
501 i_cv_epoll_works=yes
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
502 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
503 i_cv_epoll_works=no
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
504 ])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
505 ])
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
506 if test $i_cv_epoll_works = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
507 AC_DEFINE(IOLOOP_EPOLL,, [Implement I/O loop with Linux 2.6 epoll()])
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
508 have_ioloop=yes
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
509 ioloop=epoll
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
510 else
4478
4b01707d6cbe Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents: 4443
diff changeset
511 if test "$ioloop" = "epoll" ; then
4b01707d6cbe Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents: 4443
diff changeset
512 AC_MSG_ERROR([epoll ioloop requested but epoll_create() is not available])
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
513 fi
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
514 fi
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
515 fi
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
516
4482
f60b07bd5fa7 --with-ioloop=auto changed to --with-ioloop=best
Timo Sirainen <tss@iki.fi>
parents: 4478
diff changeset
517 if test "$ioloop" = "best" || test "$ioloop" = "kqueue"; then
4433
Timo Sirainen <tss@iki.fi>
parents: 4426
diff changeset
518 if test "$ac_cv_func_kqueue" = yes && test "$ac_cv_func_kevent" = yes; then
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
519 AC_DEFINE(IOLOOP_KQUEUE,, [Implement I/O loop with BSD kqueue()])
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
520 ioloop=kqueue
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
521 have_ioloop=yes
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
522 elif test "$ioloop" = "kqueue"; then
4478
4b01707d6cbe Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents: 4443
diff changeset
523 AC_MSG_ERROR([kqueue ioloop requested but kqueue() is not available])
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
524 fi
3749
194295062e5e Added kqueue support. Patch by Vaclav Haisman.
Timo Sirainen <tss@iki.fi>
parents: 3745
diff changeset
525 fi
194295062e5e Added kqueue support. Patch by Vaclav Haisman.
Timo Sirainen <tss@iki.fi>
parents: 3745
diff changeset
526
4482
f60b07bd5fa7 --with-ioloop=auto changed to --with-ioloop=best
Timo Sirainen <tss@iki.fi>
parents: 4478
diff changeset
527 if test "$ioloop" = "best" || test "$ioloop" = "poll"; then
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
528 AC_CHECK_FUNC(poll, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
529 AC_DEFINE(IOLOOP_POLL,, [Implement I/O loop with poll()])
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
530 ioloop=poll
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
531 have_ioloop=yes
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
532 ])
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
533 fi
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
534
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
535 if test "$have_ioloop" = "no"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
536 AC_DEFINE(IOLOOP_SELECT,, [Implement I/O loop with select()])
2569
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
537 ioloop="select"
554f1324a435 Added epoll support if --with-ioloop=epoll is given. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2538
diff changeset
538 fi
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
539
3745
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
540 have_notify=none
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
541
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
542 if test "$notify" = "" || test "$notify" = "inotify" ; then
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
543 dnl * inotify?
17455
0d2824d5088d configure: Don't actually run the test to see if inotify works.
Timo Sirainen <tss@iki.fi>
parents: 17454
diff changeset
544 AC_MSG_CHECKING([whether we can use inotify])
0d2824d5088d configure: Don't actually run the test to see if inotify works.
Timo Sirainen <tss@iki.fi>
parents: 17454
diff changeset
545 if test "$ac_cv_func_inotify_init" = yes; then
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
546 have_notify=inotify
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
547 notify=inotify
17455
0d2824d5088d configure: Don't actually run the test to see if inotify works.
Timo Sirainen <tss@iki.fi>
parents: 17454
diff changeset
548 AC_MSG_RESULT("yes")
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
549 AC_DEFINE(IOLOOP_NOTIFY_INOTIFY,, [Use Linux inotify])
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
550 else
17455
0d2824d5088d configure: Don't actually run the test to see if inotify works.
Timo Sirainen <tss@iki.fi>
parents: 17454
diff changeset
551 AC_MSG_RESULT("no")
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
552 if test "$notify" = "inotify"; then
4478
4b01707d6cbe Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents: 4443
diff changeset
553 AC_MSG_ERROR([inotify requested but not available])
4423
26d18749f718 Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents: 4422
diff changeset
554 notify=""
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
555 fi
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
556 fi
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
557 fi
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
558
4572
046b985ed767 Use notify=kqueue automatically only if ioloop=kqueue.
Timo Sirainen <tss@iki.fi>
parents: 4571
diff changeset
559 if (test "$notify" = "" && test "$ioloop" = kqueue) || test "$notify" = "kqueue"; then
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
560 dnl * BSD kqueue() notify
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
561 AC_MSG_CHECKING([whether we can use BSD kqueue() notify])
4442
9eee24bf2960 Fix kqueue notify checking.
Timo Sirainen <tss@iki.fi>
parents: 4433
diff changeset
562 if test "$ac_cv_func_kqueue" = yes && test "$ac_cv_func_kevent" = yes ; then
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
563 have_notify=kqueue
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
564 notify=kqueue
4423
26d18749f718 Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents: 4422
diff changeset
565 AC_MSG_RESULT("yes")
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
566 AC_DEFINE(IOLOOP_NOTIFY_KQUEUE,, [Use BSD kqueue directory changes notificaton])
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
567 else
4423
26d18749f718 Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents: 4422
diff changeset
568 AC_MSG_RESULT("no")
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
569 if test "$notify" = "kqueue" ; then
4478
4b01707d6cbe Don't use epoll/kqueue by default unless --with-ioloop=auto is given.
Timo Sirainen <tss@iki.fi>
parents: 4443
diff changeset
570 AC_MSG_ERROR([kqueue notify requested but kqueue() is not available])
4423
26d18749f718 Fixes to io notify detection. Patch by Marcus Rueckert
Timo Sirainen <tss@iki.fi>
parents: 4422
diff changeset
571 notify=""
4386
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
572 fi
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
573 fi
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
574 fi
e23469650c85 Better detection for ioloop and notify methods. Patch by Roy Marples
Timo Sirainen <tss@iki.fi>
parents: 4349
diff changeset
575
3745
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
576 if test "$have_notify" = "none"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
577 AC_DEFINE(IOLOOP_NOTIFY_NONE,, [No special notify support])
3482
465c465c66be Added inotify patch by Johannes Berg and did some restructuring to
Timo Sirainen <tss@iki.fi>
parents: 3452
diff changeset
578 fi
1729
5bf22d6bb65e Added IO_DIR_NOTIFY and IO_FILE_NOTIFY conditions to io_add(). IO_DIR_NOTIFY
Timo Sirainen <tss@iki.fi>
parents: 1720
diff changeset
579
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
580 AC_CACHE_CHECK([whether we have glibc],i_cv_have_glibc,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
581 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
582 #include <stdlib.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
583 #ifdef __GLIBC__
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
584 we have glibc
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
585 #endif
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
586 ],, [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
587 i_cv_have_glibc=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
588 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
589 i_cv_have_glibc=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
590 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
591 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
592 if test "$i_cv_have_glibc" = "yes"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
593 AC_DEFINE(PREAD_WRAPPERS,, [Define if pread/pwrite needs _XOPEN_SOURCE 500])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
594 fi
1989
a2b009c65e02 Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Timo Sirainen <tss@iki.fi>
parents: 1978
diff changeset
595
7164
d349cdeddc7d Don't use posix_fallocate() with GLIBC versions older than 2.7. It probably
Timo Sirainen <tss@iki.fi>
parents: 7094
diff changeset
596 dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
8227
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
597 dnl * It may also be broken in AIX.
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
598 AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
599 AC_TRY_RUN([
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
600 #define _XOPEN_SOURCE 600
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
601 #include <stdio.h>
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
602 #include <stdlib.h>
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
603 #include <fcntl.h>
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
604 #include <unistd.h>
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
605 #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
606 possibly broken posix_fallocate
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
607 #endif
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
608 int main() {
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
609 int fd = creat("conftest.temp", 0600);
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
610 int ret;
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
611 if (fd == -1) {
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
612 perror("creat()");
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
613 return 2;
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
614 }
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
615 ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0;
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
616 unlink("conftest.temp");
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
617 return ret;
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
618 }
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
619 ], [
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
620 i_cv_posix_fallocate_works=yes
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
621 ], [
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
622 i_cv_posix_fallocate_works=no
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
623 ])
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
624 ])
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
625 if test $i_cv_posix_fallocate_works = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
626 AC_DEFINE(HAVE_POSIX_FALLOCATE,, [Define if you have a working posix_fallocate()])
8227
9886bf0a4c40 Test if posix_fallocate() works already in configure.
Timo Sirainen <tss@iki.fi>
parents: 8226
diff changeset
627 fi
7164
d349cdeddc7d Don't use posix_fallocate() with GLIBC versions older than 2.7. It probably
Timo Sirainen <tss@iki.fi>
parents: 7094
diff changeset
628
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
629 dnl * OS specific options
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents: 10702
diff changeset
630 DC_PLUGIN_DEPS
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
631 case "$host_os" in
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
632 hpux*)
7823
b13dca205eaa HP-UX: Fixed fd passing.
Timo Sirainen <tss@iki.fi>
parents: 7822
diff changeset
633 CFLAGS="$CFLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED"
b13dca205eaa HP-UX: Fixed fd passing.
Timo Sirainen <tss@iki.fi>
parents: 7822
diff changeset
634 # for getting fd_send/fd_recv working:
b13dca205eaa HP-UX: Fixed fd passing.
Timo Sirainen <tss@iki.fi>
parents: 7822
diff changeset
635 LDFLAGS="$LDFLAGS -Wl,+b,:"
b13dca205eaa HP-UX: Fixed fd passing.
Timo Sirainen <tss@iki.fi>
parents: 7822
diff changeset
636 LIBS="-lxnet $LIBS"
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
637 AC_DEFINE(PREAD_BROKEN,, [Define if pread/pwrite implementation is broken])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
638 ;;
11356
348eb4754085 Added process title hack support for OS X.
Timo Sirainen <tss@iki.fi>
parents: 11321
diff changeset
639 linux*|darwin*)
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
640 AC_DEFINE(PROCTITLE_HACK,, [Define if process title can be changed by modifying argv])
10188
affb52c62add Fixed Linux proctitle hack and enabled it by default now.
Timo Sirainen <tss@iki.fi>
parents: 10163
diff changeset
641 ;;
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
642 *)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
643 ;;
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
644 esac
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
645
55
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
646 AC_CHECK_SIZEOF(int)
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
647 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
648 AC_CHECK_SIZEOF(void *)
55
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
649 AC_CHECK_SIZEOF(long long)
185
60925d3e2c4d fixed ssize_t and off_t checks.
Timo Sirainen <tss@iki.fi>
parents: 183
diff changeset
650
2036
b3a56463c812 AC_DEFUN warning fixes for aclocal 1.8..
Timo Sirainen <tss@iki.fi>
parents: 2035
diff changeset
651 AC_DEFUN([AC_TYPEOF], [
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
652 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
653
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
654 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
655 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
656 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
657 fi
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
658
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
659 result=""
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
660 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
661 AC_MSG_CHECKING([type of $1])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
662 AC_CACHE_VAL(i_cv_typeof_$1,[
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
663 if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
664 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
665 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
666 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
667
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
668 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
669 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
670 int)
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
671 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
672 ;;
1630
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
673 unsigned-int)
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
674 fmt="%u"
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
675 ;;
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
676 long)
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
677 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
678 ;;
1630
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
679 unsigned-long)
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
680 fmt="%lu"
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
681 ;;
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
682 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
683 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
684 ;;
1630
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
685 unsigned-long-long)
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
686 fmt="%llu"
e9e533b323fb size_t checking fixes
Timo Sirainen <tss@iki.fi>
parents: 1626
diff changeset
687 ;;
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
688 *)
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
689 fmt=""
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
690 ;;
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
691 esac
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
692
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
693 if test "$fmt" != ""; then
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
694 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
695 #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
696 #include <stdio.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
697 ]], [[
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
698 printf("$fmt", ($1)0);
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
699 ]])],[
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
700 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
701 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
702 result=""
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
703 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
704 break
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
705 fi
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
706 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
707 visible="$result"
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
708 ],[])
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
709 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
710 done
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
711 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
712 fi
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
713
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
714 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
715 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
716 type="`echo $type|sed 's/-/ /g'`"
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
717 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
718 #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
719 typedef $type $1;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
720 ]], [[]])],[
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
721 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
722 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
723 result=""
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
724 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
725 break
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
726 fi
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
727 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
728 visible="$type"
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
729 ],[])
733
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
730 done
280c0952fa90 AC_TYPEOF macro: with gcc we can check the type with printf() + -Werror
Timo Sirainen <tss@iki.fi>
parents: 732
diff changeset
731 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
732
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
733 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
734 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
735
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
736 dnl * older autoconfs don't include sys/types.h, so do it manually
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
737 AC_RUN_IFELSE([AC_LANG_SOURCE([[
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
738 #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
739 #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
740 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
741 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
742 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
743 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
744 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
745 }
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
746 ]])],[
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
747 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
748 rm -f conftestval
55
db8ea2c11ab7 whops, 64bit support was disabled.
Timo Sirainen <tss@iki.fi>
parents: 50
diff changeset
749
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
750 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
751 actype="ac_cv_sizeof_`echo $type|sed 's/-/_/g'`"
4567
32f5df3de2d1 eval doesn't need to have its parameters quoted. The previous \" quoting was
Timo Sirainen <tss@iki.fi>
parents: 4565
diff changeset
752 if test "$size" = "`eval echo \\$$actype`"; then
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
753 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
754 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
755 break
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
756 fi
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
757 done
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
758 if test "$result" = ""; then
4055
f7ff79c3189b If size_t and ssize_t exist but we can't figure out their type, don't
Timo Sirainen <tss@iki.fi>
parents: 4050
diff changeset
759 result=unknown
f7ff79c3189b If size_t and ssize_t exist but we can't figure out their type, don't
Timo Sirainen <tss@iki.fi>
parents: 4050
diff changeset
760 visible="`expr $size \* 8`bit (unknown type)"
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
761 fi
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
762 ],[],[])
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
763 fi
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
764 i_cv_typeof_$1=$result/$visible
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
765 ])
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
766
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
767 typeof_$1=`echo $i_cv_typeof_$1 | sed s,/.*$,,`
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
768 visible=`echo $i_cv_typeof_$1 | sed s,^.*/,,`
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
769 AC_MSG_RESULT($visible)
185
60925d3e2c4d fixed ssize_t and off_t checks.
Timo Sirainen <tss@iki.fi>
parents: 183
diff changeset
770 ])
677
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
771
6616
be366eda336e Use AC_SYS_LARGEFILE instead of our own checks. Also removes
Timo Sirainen <tss@iki.fi>
parents: 6610
diff changeset
772 AC_SYS_LARGEFILE
3929
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
773 AC_CHECK_TYPES(_Bool)
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
774
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
775 AC_CHECK_TYPE(uoff_t, [
3931
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
776 have_uoff_t=yes
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
777 AC_DEFINE(HAVE_UOFF_T,, [Define if you have a native uoff_t type])
3929
49a1a979959e If uoff_t type already exists, use it (UnixWare has it).
Timo Sirainen <tss@iki.fi>
parents: 3919
diff changeset
778 ], [
3931
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
779 have_uoff_t=no
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
780 ])
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
781
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
782 AC_TYPEOF(off_t, long int long-long)
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
783 case "$typeof_off_t" in
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
784 int)
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
785 offt_max=INT_MAX
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
786 uofft_fmt="u"
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
787 if test "$have_uoff_t" != "yes"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
788 AC_DEFINE(UOFF_T_INT,, [Define if off_t is int])
3931
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
789 fi
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
790 offt_bits=`expr 8 \* $ac_cv_sizeof_int`
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
791 ;;
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
792 long)
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
793 offt_max=LONG_MAX
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
794 uofft_fmt="lu"
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
795 if test "$have_uoff_t" != "yes"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
796 AC_DEFINE(UOFF_T_LONG,, [Define if off_t is long])
3931
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
797 fi
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
798 offt_bits=`expr 8 \* $ac_cv_sizeof_long`
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
799 ;;
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
800 "long long")
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
801 offt_max=LLONG_MAX
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
802 uofft_fmt="llu"
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
803 if test "$have_uoff_t" != "yes"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
804 AC_DEFINE(UOFF_T_LONG_LONG,, [Define if off_t is long long])
3931
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
805 fi
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
806 offt_bits=`expr 8 \* $ac_cv_sizeof_long_long`
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
807 ;;
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
808 *)
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
809 AC_MSG_ERROR([Unsupported off_t type])
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
810 ;;
d37797a229c3 And fix for uoff_t checks..
Timo Sirainen <tss@iki.fi>
parents: 3929
diff changeset
811 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
812
2078
b3daf55df932 Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents: 2070
diff changeset
813 dnl * Do we have struct dirent->d_type
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
814 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2078
b3daf55df932 Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents: 2070
diff changeset
815 #include <dirent.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
816 ]], [[
2078
b3daf55df932 Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents: 2070
diff changeset
817 struct dirent d;
b3daf55df932 Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents: 2070
diff changeset
818 d.d_type = DT_DIR;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
819 ]])],[
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
820 AC_DEFINE(HAVE_DIRENT_D_TYPE,, [Define if you have struct dirent->d_type])
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
821 ],[])
2078
b3daf55df932 Added maildir_stat_dirs option.
Timo Sirainen <tss@iki.fi>
parents: 2070
diff changeset
822
1382
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
823 dnl * Do we have OFF_T_MAX?
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
824 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1382
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
825 #include <limits.h>
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
826 #include <sys/types.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
827 ]], [[
1382
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
828 off_t i = OFF_T_MAX;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
829 ]])],[
1403
Timo Sirainen <tss@iki.fi>
parents: 1394
diff changeset
830 :
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
831 ],[
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
832 AC_DEFINE_UNQUOTED(OFF_T_MAX, $offt_max, [Maximum value of off_t])
1382
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
833 ])
c4d519a6395d Don't define OFF_T_MAX if it's already defined
Timo Sirainen <tss@iki.fi>
parents: 1341
diff changeset
834
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
835 AC_DEFINE_UNQUOTED(PRIuUOFF_T, "$uofft_fmt", [printf() format for uoff_t])
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
836
750
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
837 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
838 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
839 dnl * that it's unsigned and only some old systems define it as signed.
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
840 AC_CACHE_CHECK([whether size_t is signed],i_cv_signed_size_t,[
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
841 AC_RUN_IFELSE([AC_LANG_SOURCE([[
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
842 #include <sys/types.h>
21283
16869cca53ce configure: Fix some implicit function declarations
Paul Howarth <paul@city-fan.org>
parents: 21271
diff changeset
843 #include <stdlib.h>
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
844 int main() {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
845 /* return 0 if we're signed */
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
846 exit((size_t)(int)-1 <= 0 ? 0 : 1);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
847 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
848 ]])],[
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
849 i_cv_signed_size_t=yes
750
b97c8964d7c1 Give a hard warning if size_t is signed.
Timo Sirainen <tss@iki.fi>
parents: 745
diff changeset
850
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
851 echo
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
852 echo "Your system's size_t is a signed integer, Dovecot isn't designed to"
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
853 echo "support it. It probably works just fine, but it's less resistant to"
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
854 echo "buffer overflows. If you're not worried about this and still want to"
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
855 echo "compile Dovecot, set ignore_signed_size=1 environment."
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
856
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
857 if test "$ignore_signed_size" = ""; then
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
858 AC_MSG_ERROR([aborting])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
859 fi
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
860 echo "..ignoring as requested.."
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
861 ],[
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
862 i_cv_signed_size_t=no
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
863 ],[])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
864 ])
1626
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
865 dnl Note: we check size_t rather than ssize_t here, because on OSX 10.2
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
866 dnl ssize_t = int and size_t = unsigned long. We're mostly concerned about
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
867 dnl printf format here, so check the size_t one.
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
868 AC_TYPEOF(size_t, unsigned-int unsigned-long unsigned-long-long)
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
869 case "$typeof_size_t" in
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
870 "unsigned long")
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
871 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
872 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
873 ;;
1626
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
874 "unsigned 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
875 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
876 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
877 ;;
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
878 *)
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
879 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
880 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
881 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
882
1626
08b73ec005f8 Get the size_t type properly in OSX
Timo Sirainen <tss@iki.fi>
parents: 1625
diff changeset
883 if test "$typeof_size_t" = ""; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
884 AC_DEFINE(size_t, unsigned int, [Define to 'unsigned int' if you don't have it])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
885 AC_DEFINE(ssize_t, int, [Define to 'int' if you don't have it])
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
886 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
887 ;;
3089685bbb7e Created AC_TYPEOF() which tells what base type (int/long/long long) the
Timo Sirainen <tss@iki.fi>
parents: 676
diff changeset
888 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
889
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
890 AC_DEFINE_UNQUOTED(SSIZE_T_MAX, $ssizet_max, [Maximum value of ssize_t])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
891 AC_DEFINE_UNQUOTED(PRIuSIZE_T, "$sizet_fmt", [printf() format for size_t])
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
892
2036
b3a56463c812 AC_DEFUN warning fixes for aclocal 1.8..
Timo Sirainen <tss@iki.fi>
parents: 2035
diff changeset
893 AC_DEFUN([AC_CHECKTYPE2], [
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
894 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
895 AC_CACHE_VAL(i_cv_type_$1,
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
896 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
897 #include <sys/types.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
898 $2]], [[$1 t;]])],[i_cv_type_$1=yes],[i_cv_type_$1=no])])
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
899 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
900 ])
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
901
1660
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
902 dnl some systems don't have stdint.h, but still have some of the types
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
903 dnl defined elsewhere
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
904 AC_CHECK_HEADER(stdint.h, [
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
905 stdint_include="#include <stdint.h>"
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
906 ])
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
907
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
908 AC_CHECKTYPE2(uintmax_t, [$stdint_include])
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
909 if test $i_cv_type_uintmax_t = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
910 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
911 fi
0ffecd4e7e1a added dec2str() function and largest_t type, removed itoa() and ltoa()
Timo Sirainen <tss@iki.fi>
parents: 175
diff changeset
912
908
bc55266563cd Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents: 907
diff changeset
913 dnl use separate check, eg. Solaris 8 has uintmax_t but not uint_fast32_t
1660
4076387f7ccb We should be checking C99 types using stdint.h, not inttypes.h
Timo Sirainen <tss@iki.fi>
parents: 1658
diff changeset
914 AC_CHECKTYPE2(uint_fast32_t, [$stdint_include])
908
bc55266563cd Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents: 907
diff changeset
915 if test $i_cv_type_uint_fast32_t = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
916 AC_DEFINE(HAVE_UINT_FAST32_T,, [Define if you have uint_fast32_t (C99 type)])
908
bc55266563cd Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents: 907
diff changeset
917 fi
bc55266563cd Use separate check for uint_fast32_t.
Timo Sirainen <tss@iki.fi>
parents: 907
diff changeset
918
678
1e5c655bad25 Renamed largest_t to uintmax_t which already exists in C99.
Timo Sirainen <tss@iki.fi>
parents: 677
diff changeset
919 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
920 if test $i_cv_type_socklen_t = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
921 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
922 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
923
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
924 AC_DEFINE_UNQUOTED(MEM_ALIGN_SIZE, $mem_align, [Required memory alignment])
1394
059f13d577bb Use separate index alignment from memory alignment. We don't use pointers in
Timo Sirainen <tss@iki.fi>
parents: 1389
diff changeset
925
1335
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
926 dnl * find random source
14989
3765e8948f1c configure: Removed OpenBSD /dev/arandom checking.
Timo Sirainen <tss@iki.fi>
parents: 14935
diff changeset
927 AC_MSG_CHECKING([for /dev/urandom])
3765e8948f1c configure: Removed OpenBSD /dev/arandom checking.
Timo Sirainen <tss@iki.fi>
parents: 14935
diff changeset
928 if test -c /dev/urandom || test -s /dev/urandom; then
1335
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
929 AC_MSG_RESULT(yes)
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
930 AC_DEFINE(DEV_URANDOM_PATH, "/dev/urandom", [Path to /dev/urandom])
1335
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
931 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
932 else
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
933 AC_MSG_RESULT(no)
9204
1849c4269ad8 If /dev/arandom exists (OpenBSD), use it instead of /dev/urandom.
Timo Sirainen <tss@iki.fi>
parents: 9159
diff changeset
934 fi
1335
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
935
9204
1849c4269ad8 If /dev/arandom exists (OpenBSD), use it instead of /dev/urandom.
Timo Sirainen <tss@iki.fi>
parents: 9159
diff changeset
936 if test "$have_random_source" != "yes"; then
1335
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
937 AC_CHECK_HEADER(openssl/rand.h, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
938 AC_DEFINE(HAVE_OPENSSL_RAND_H,, [Define if you have openssl/rand.h])
7844
7b39370dae6b If we need -lcrypto for randomness, put it to $LIBS instead of $RAND_LIBS
Timo Sirainen <tss@iki.fi>
parents: 7826
diff changeset
939 LIBS="$LIBS -lcrypto"
1335
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
940 ])
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
941 fi
5ad84c54eb7e Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If
Timo Sirainen <tss@iki.fi>
parents: 1300
diff changeset
942
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
943 dnl * do we have tm_gmtoff
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
944 AC_MSG_CHECKING([for tm_gmtoff])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
945 AC_CACHE_VAL(i_cv_field_tm_gmtoff,
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
946 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
947 #include <time.h>]],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
948 [[struct tm *tm; return tm->tm_gmtoff;]])],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
949 [i_cv_field_tm_gmtoff=yes],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
950 [i_cv_field_tm_gmtoff=no])])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
951 if test $i_cv_field_tm_gmtoff = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
952 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
953 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
954 AC_MSG_RESULT($i_cv_field_tm_gmtoff)
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
955
1658
20519e4bca48 utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents: 1656
diff changeset
956 dnl * how large time_t values does gmtime() accept?
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
957 AC_CACHE_CHECK([how large time_t values gmtime() accepts],i_cv_gmtime_max_time_t,[
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
958 AC_RUN_IFELSE([AC_LANG_SOURCE([[
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
959 #include <stdio.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
960 #include <time.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
961 int main() {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
962 FILE *f;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
963 int bits;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
964
6522
6c46542a5ce5 With 32bit time_t we were checking it up to 64 bits, which overflowed the
Timo Sirainen <tss@iki.fi>
parents: 6501
diff changeset
965 for (bits = 1; bits < sizeof(time_t)*8; bits++) {
6483
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
966 time_t t = ((time_t)1 << bits) - 1;
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
967 if (gmtime(&t) == NULL) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
968 bits--;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
969 break;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
970 }
1658
20519e4bca48 utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents: 1656
diff changeset
971 }
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
972 if (bits > 40) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
973 /* Solaris 9 breaks after 55 bits. Perhaps other systems break earlier.
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
974 Let's just do the same as Cyrus folks and limit it to 40 bits. */
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
975 bits = 40;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
976 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
977
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
978 f = fopen("conftest.temp", "w");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
979 if (f == NULL) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
980 perror("fopen()");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
981 return 1;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
982 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
983 fprintf(f, "%d", bits);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
984 fclose(f);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
985 return 0;
3206
6400a517f087 Limit TIME_T_MAX_BITS to 40.
Timo Sirainen <tss@iki.fi>
parents: 3199
diff changeset
986 }
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
987 ]])],[
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
988 i_cv_gmtime_max_time_t=`cat conftest.temp`
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
989 rm -f conftest.temp
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
990 ], [
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
991 printf "check failed, assuming "
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
992 i_cv_gmtime_max_time_t=31
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
993 ],[])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
994 ])
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
995 AC_DEFINE_UNQUOTED(TIME_T_MAX_BITS, $i_cv_gmtime_max_time_t, [max. time_t bits gmtime() can handle])
1658
20519e4bca48 utc_mktime() crashed with 64bit time_t if gmtime() didn't like >32bit values
Timo Sirainen <tss@iki.fi>
parents: 1656
diff changeset
996
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
997 AC_CACHE_CHECK([whether time_t is signed],i_cv_signed_time_t,[
6483
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
998 AC_RUN_IFELSE([AC_LANG_SOURCE([[
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
999 #include <sys/types.h>
21283
16869cca53ce configure: Fix some implicit function declarations
Paul Howarth <paul@city-fan.org>
parents: 21271
diff changeset
1000 #include <stdlib.h>
6483
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1001 int main() {
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1002 /* return 0 if we're signed */
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1003 exit((time_t)(int)-1 <= 0 ? 0 : 1);
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1004 }
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1005 ]])],[
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1006 i_cv_signed_time_t=yes
6483
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1007 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1008 i_cv_signed_time_t=no
6483
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1009 ])
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1010 ])
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1011 if test $i_cv_signed_time_t = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1012 AC_DEFINE(TIME_T_SIGNED,, [Define if your time_t is signed])
6483
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1013 fi
6d15946eccb5 Rewrote utc_mktime() so it's now MIT licensed. This also fixes handling
Timo Sirainen <tss@iki.fi>
parents: 6403
diff changeset
1014
20474
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1015 AC_CACHE_CHECK([if we can use C99 static in array sizes],i_cv_c99_static_arrays,[
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1016 AC_TRY_COMPILE([
20492
fac0281a2c4e configure: Fix static array check
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20491
diff changeset
1017 void foo(unsigned char [static 20]);
20474
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1018 ], [
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1019 ], [
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1020 i_cv_c99_static_arrays=yes
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1021 ], [
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1022 i_cv_c99_static_arrays=no
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1023 ])
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1024 ])
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1025
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1026 if test $i_cv_c99_static_arrays = yes; then
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1027 static_value=static
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1028 else
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1029 static_value=
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1030 fi
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1031 AC_DEFINE_UNQUOTED(STATIC_ARRAY, $static_value, [C99 static array])
3f63a4e80fe1 configure: Check if C99 "static" keyword is supported for array sizes.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20425
diff changeset
1032
7997
0d66b44689ee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7990
diff changeset
1033 dnl Our implementation of AC_C_FLEXIBLE_ARRAY_MEMBER.
0d66b44689ee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7990
diff changeset
1034 dnl Use it until autoconf 2.61+ becomes more widely used
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1035 AC_CACHE_CHECK([if we can use C99-like flexible array members],i_cv_c99_flex_arrays,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1036 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1037 struct foo {
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1038 int x;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1039 char y[];
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1040 };
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1041 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1042 struct foo foo;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1043 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1044 i_cv_c99_flex_arrays=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1045 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1046 i_cv_c99_flex_arrays=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1047 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1048 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1049
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1050 if test $i_cv_c99_flex_arrays = yes; then
10094
634588d51ae6 configure: FLEXIBLE_ARRAY_MEMBER value was reversed.
Timo Sirainen <tss@iki.fi>
parents: 10091
diff changeset
1051 flexible_value=
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1052 else
10094
634588d51ae6 configure: FLEXIBLE_ARRAY_MEMBER value was reversed.
Timo Sirainen <tss@iki.fi>
parents: 10091
diff changeset
1053 flexible_value=1
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1054 fi
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1055 AC_DEFINE_UNQUOTED(FLEXIBLE_ARRAY_MEMBER, $flexible_value, [How to define flexible array members in structs])
7997
0d66b44689ee Fixed compiling on some older pre-C99 compilers.
Timo Sirainen <tss@iki.fi>
parents: 7990
diff changeset
1056
411
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1057 dnl * do we have struct iovec
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1058 AC_MSG_CHECKING([for struct iovec])
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1059 AC_CACHE_VAL(i_cv_struct_iovec,
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1060 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
411
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1061 #include <sys/types.h>
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1062 #include <sys/uio.h>
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1063 #include <unistd.h>]],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1064 [[struct iovec *iovec;]])],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1065 [i_cv_struct_iovec=yes],
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1066 [i_cv_struct_iovec=no])])
411
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1067
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1068 if test $i_cv_struct_iovec = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1069 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
1070 fi
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1071 AC_MSG_RESULT($i_cv_struct_iovec)
c2fdc076ae7f checks for writev()
Timo Sirainen <tss@iki.fi>
parents: 353
diff changeset
1072
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1073 dnl * is dev_t an integer or something else?
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1074 AC_CACHE_CHECK([whether dev_t is struct],i_cv_dev_t_struct,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1075 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1076 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1077 struct test { dev_t a; };
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1078 static struct test t = { 0 };
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1079 ]],
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1080 [[ ]])], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1081 i_cv_dev_t_struct=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1082 ],[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1083 i_cv_dev_t_struct=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1084 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1085 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1086 if test $i_cv_dev_t_struct = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1087 AC_DEFINE(DEV_T_STRUCT,, [Define if your dev_t is a structure instead of integer type])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1088 fi
691
567f5e66c7b8 We compile now if dev_t is a structure (eg. glibc+tcc).
Timo Sirainen <tss@iki.fi>
parents: 679
diff changeset
1089
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
1090 dnl * Do we have RLIMIT_AS?
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1091 AC_CACHE_CHECK([whether RLIMIT_AS exists],i_cv_have_rlimit_as,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1092 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1093 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1094 #include <sys/time.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1095 #include <sys/resource.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1096 ]], [[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1097 struct rlimit r;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1098 getrlimit(RLIMIT_AS, &r);
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1099 ]])],[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1100 i_cv_have_rlimit_as=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1101 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1102 i_cv_have_rlimit_as=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1103 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1104 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1105
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1106 if test $i_cv_have_rlimit_as = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1107 AC_DEFINE(HAVE_RLIMIT_AS,, [Define if you have RLIMIT_AS for setrlimit()])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1108 fi
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
1109
1065
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
1110 dnl * Do we have RLIMIT_NPROC?
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1111 AC_CACHE_CHECK([whether RLIMIT_NPROC exists],i_cv_have_rlimit_nproc,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1112 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1113 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1114 #include <sys/time.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1115 #include <sys/resource.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1116 ]], [[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1117 struct rlimit r;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1118 getrlimit(RLIMIT_NPROC, &r);
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1119 ]])],[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1120 i_cv_have_rlimit_nproc=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1121 ],[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1122 i_cv_have_rlimit_nproc=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1123 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1124 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1125
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1126 if test $i_cv_have_rlimit_nproc = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1127 AC_DEFINE(HAVE_RLIMIT_NPROC,, [Define if you have RLIMIT_NPROC for setrlimit()])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1128 fi
1065
6cb5b50aea71 Don't let login process fork()
Timo Sirainen <tss@iki.fi>
parents: 1058
diff changeset
1129
7946
aad49536db41 If core dump limit is 0, add "core dumps disabled" to startup log line.
Timo Sirainen <tss@iki.fi>
parents: 7929
diff changeset
1130 dnl * Do we have RLIMIT_CORE?
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1131 AC_CACHE_CHECK([whether RLIMIT_CORE exists],i_cv_have_rlimit_core,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1132 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1133 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1134 #include <sys/time.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1135 #include <sys/resource.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1136 ]], [[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1137 struct rlimit r;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1138 getrlimit(RLIMIT_CORE, &r);
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1139 ]])],[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1140 i_cv_have_rlimit_core=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1141 ],[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1142 i_cv_have_rlimit_core=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1143 ])
8798
c9381a0fdc5e Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8743
diff changeset
1144 ])
c9381a0fdc5e Improved logging for core dumping. With Linux use PR_SET_DUMPABLE for imap/pop3.
Timo Sirainen <tss@iki.fi>
parents: 8743
diff changeset
1145
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1146 if test $i_cv_have_rlimit_core = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1147 AC_DEFINE(HAVE_RLIMIT_CORE,, [Define if you have RLIMIT_CORE for getrlimit()])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1148 fi
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1149
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1150 AC_CACHE_CHECK([whether PR_SET_DUMPABLE exists],i_cv_have_pr_set_dumpable,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1151 AC_TRY_LINK([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1152 #include <sys/prctl.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1153 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1154 prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1155 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1156 i_cv_have_pr_set_dumpable=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1157 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1158 i_cv_have_pr_set_dumpable=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1159 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1160 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1161 if test $i_cv_have_pr_set_dumpable = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1162 AC_DEFINE(HAVE_PR_SET_DUMPABLE,, [Define if you have prctl(PR_SET_DUMPABLE)])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1163 fi
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1164
528
a95b1ccff82e Support FreeBSD-compatible sendfile(). Completely untested.
Timo Sirainen <tss@iki.fi>
parents: 494
diff changeset
1165 dnl * Linux compatible mremap()
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1166 AC_CACHE_CHECK([Linux compatible mremap()],i_cv_have_linux_mremap,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1167 AC_TRY_LINK([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1168 #include <unistd.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1169 #define __USE_GNU
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1170 #include <sys/mman.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1171 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1172 mremap(0, 0, 0, MREMAP_MAYMOVE);
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1173 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1174 i_cv_have_linux_mremap=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1175 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1176 i_cv_have_linux_mremap=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1177 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1178 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1179 if test $i_cv_have_linux_mremap = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1180 AC_DEFINE(HAVE_LINUX_MREMAP,, [Define if you have Linux-compatible mremap()])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1181 fi
224
e8863d6088fe mremap() check
Timo Sirainen <tss@iki.fi>
parents: 191
diff changeset
1182
1622
d22e03714d36 index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents: 1611
diff changeset
1183 dnl * If mmap() plays nicely with write()
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1184 AC_CACHE_CHECK([whether shared mmaps get updated by write()s],i_cv_mmap_plays_with_write,[
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1185 AC_TRY_RUN([
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1186 #include <stdio.h>
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1187 #include <sys/types.h>
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1188 #include <sys/stat.h>
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1189 #include <unistd.h>
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1190 #include <fcntl.h>
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1191 #include <sys/mman.h>
21283
16869cca53ce configure: Fix some implicit function declarations
Paul Howarth <paul@city-fan.org>
parents: 21271
diff changeset
1192 #include <string.h>
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1193 int main() {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1194 /* return 0 if we're signed */
8226
3e493fd3a9fa configure: create test files with mode 0600.
Timo Sirainen <tss@iki.fi>
parents: 8173
diff changeset
1195 int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC, 0600);
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1196 void *mem;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1197 if (f == -1) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1198 perror("open()");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1199 return 1;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1200 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1201 unlink("conftest.mmap");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1202
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1203 write(f, "1", 2);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1204 mem = mmap(NULL, 2, PROT_READ|PROT_WRITE, MAP_SHARED, f, 0);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1205 if (mem == MAP_FAILED) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1206 perror("mmap()");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1207 return 1;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1208 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1209 strcpy(mem, "2");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1210 msync(mem, 2, MS_SYNC);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1211 lseek(f, 0, SEEK_SET);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1212 write(f, "3", 2);
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1213
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1214 return strcmp(mem, "3") == 0 ? 0 : 1;
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1215 }
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1216 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1217 i_cv_mmap_plays_with_write=yes
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1218 ], [
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1219 i_cv_mmap_plays_with_write=no
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1220 ])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1221 ])
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1222 if test $i_cv_mmap_plays_with_write = no; then
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1223 AC_DEFINE(MMAP_CONFLICTS_WRITE,, [Define if shared mmaps don't get updated by write()s])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1224 fi
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1225
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1226 dnl * see if fd passing works
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1227 AC_CACHE_CHECK([whether fd passing works],i_cv_fd_passing,[
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1228 for i in 1 2; do
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1229 old_cflags="$CFLAGS"
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1230 CFLAGS="$CFLAGS -I$srcdir/src/lib $srcdir/src/lib/fdpass.c"
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1231 if test $i = 2; then
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1232 CFLAGS="$CFLAGS -DBUGGY_CMSG_MACROS"
2349
b65456de1b49 Check BUGGY_CMSG_MACROS in configure.
Timo Sirainen <tss@iki.fi>
parents: 2325
diff changeset
1233 fi
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1234
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1235 AC_TRY_RUN([
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1236 #include <sys/types.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1237 #include <sys/socket.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1238 #include <sys/wait.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1239 #include <sys/stat.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1240 #include <unistd.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1241 #include <fcntl.h>
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1242 #include "fdpass.h"
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1243
8578
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1244 int nopen(void)
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1245 {
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1246 int i, n;
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1247 struct stat sb;
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1248 for (i = n = 0; i < 256; i++)
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1249 if (fstat(i, &sb) == 0) n++;
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1250 return n;
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1251 }
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1252 int main(void)
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1253 {
8578
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1254 int fd[2], send_fd, recv_fd, status, n1, n2;
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1255 struct stat st, st2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1256 char data;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1257
8226
3e493fd3a9fa configure: create test files with mode 0600.
Timo Sirainen <tss@iki.fi>
parents: 8173
diff changeset
1258 send_fd = creat("conftest.fdpass", 0600);
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1259 if (send_fd == -1) return 2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1260 unlink("conftest.fdpass");
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1261 if (fstat(send_fd, &st) < 0) return 2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1262 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) return 2;
8578
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1263 n1 = nopen();
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1264
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1265 switch (fork()) {
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1266 case -1:
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1267 return 2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1268 case 0:
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1269 alarm(1);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1270 if (fd_send(fd[0], send_fd, &data, 1) != 1) return 2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1271 return 0;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1272 default:
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1273 alarm(2);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1274 if (wait(&status) == -1)
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1275 return 2;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1276 if (status != 0)
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1277 return status;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1278 if (fd_read(fd[1], &data, 1, &recv_fd) != 1) return 1;
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1279 if (fstat(recv_fd, &st2) < 0) return 2;
8578
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1280 /* nopen check is for making sure that only a single fd
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1281 was received */
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1282 n2 = nopen();
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1283 return st.st_ino == st2.st_ino && n2 == n1 + 1 ? 0 : 1;
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1284 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1285 }
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1286 ], [
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1287 CFLAGS=$old_cflags
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1288 if test $i = 2; then
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1289 i_cv_fd_passing=buggy_cmsg_macros
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1290 else
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1291 i_cv_fd_passing=yes
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1292 fi
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1293 break
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1294 ], [
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1295 dnl no, try with BUGGY_CMSG_MACROS
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1296 CFLAGS=$old_cflags
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1297 i_cv_fd_passing=no
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1298 ])
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1299 done
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1300 ]);
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1301
8578
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1302 case "$host_os" in
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1303 darwin[[1-9]].*)
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1304 if test "$i_cv_fd_passing" = "yes"; then
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1305 i_cv_fd_passing=buggy_cmsg_macros
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1306 fi
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1307 ;;
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1308 esac
729576bb91d8 Some versions of Mac OS X have buggy CMSG_* macros, avoid using them.
Timo Sirainen <tss@iki.fi>
parents: 8572
diff changeset
1309
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1310 if test $i_cv_fd_passing = buggy_cmsg_macros; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1311 AC_DEFINE(BUGGY_CMSG_MACROS,, [Define if you have buggy CMSG macros])
5165
04bdc7c83854 Added AC_CACHE_CHECK()s to all AC_TRY_RUN and AC_RUN_IFELSE checks so that
Timo Sirainen <tss@iki.fi>
parents: 5103
diff changeset
1312 fi
11839
8cf47a359213 configure: If fd passing check fails, abort
Timo Sirainen <tss@iki.fi>
parents: 11820
diff changeset
1313 if test $i_cv_fd_passing = no; then
8cf47a359213 configure: If fd passing check fails, abort
Timo Sirainen <tss@iki.fi>
parents: 11820
diff changeset
1314 AC_ERROR([fd passing is required for Dovecot to work])
8cf47a359213 configure: If fd passing check fails, abort
Timo Sirainen <tss@iki.fi>
parents: 11820
diff changeset
1315 fi
1622
d22e03714d36 index_mmap_invalidate = yes now invalidate memory maps before accessing
Timo Sirainen <tss@iki.fi>
parents: 1611
diff changeset
1316
2035
0e65efd14eda Solaris: Move from sendfilev() to sendfile() (was it always there?). Make
Timo Sirainen <tss@iki.fi>
parents: 2028
diff changeset
1317 dnl * Solaris compatible sendfile()
0e65efd14eda Solaris: Move from sendfilev() to sendfile() (was it always there?). Make
Timo Sirainen <tss@iki.fi>
parents: 2028
diff changeset
1318 AC_CHECK_LIB(sendfile, sendfile, [
976
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
1319 LIBS="$LIBS -lsendfile"
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1320 AC_DEFINE(HAVE_SOLARIS_SENDFILE,, [Define if you have Solaris-compatible sendfile()])
976
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
1321 ], [
981
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1322 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
1323 dnl * This seems to pass with Solaris for some reason..
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1324 AC_CACHE_CHECK([Linux compatible sendfile()],i_cv_have_linux_sendfile,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1325 AC_TRY_LINK([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1326 #undef _FILE_OFFSET_BITS
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1327 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1328 #include <sys/socket.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1329 #include <sys/sendfile.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1330 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1331 sendfile(0, 0, (void *) 0, 0);
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1332 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1333 i_cv_have_linux_sendfile=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1334 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1335 i_cv_have_linux_sendfile=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1336 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1337 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1338 if test $i_cv_have_linux_sendfile = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1339 AC_DEFINE(HAVE_LINUX_SENDFILE,, [Define if you have Linux-compatible sendfile()])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1340 fi
981
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1341
7e9b90bfe78c If Solaris sendfilev() is found, don't try checking for Linux one. Linux
Timo Sirainen <tss@iki.fi>
parents: 976
diff changeset
1342 dnl * FreeBSD compatible sendfile()
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1343 AC_CACHE_CHECK([FreeBSD compatible sendfile()],i_cv_have_freebsd_sendfile,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1344 AC_TRY_LINK([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1345 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1346 #include <sys/socket.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1347 #include <sys/uio.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1348 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1349 struct sf_hdtr hdtr;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1350 sendfile(0, 0, 0, 0, &hdtr, (void *) 0, 0);
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1351 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1352 i_cv_have_freebsd_sendfile=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1353 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1354 i_cv_have_freebsd_sendfile=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1355 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1356 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1357 if test $i_cv_have_freebsd_sendfile = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1358 AC_DEFINE(HAVE_FREEBSD_SENDFILE,, [Define if you have FreeBSD-compatible sendfile()])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1359 fi
976
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
1360 ])
b3e0f857981c Support for Solaris sendfilev(). Entirely untested, hope it works.
Timo Sirainen <tss@iki.fi>
parents: 975
diff changeset
1361
10491
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1362 AC_CACHE_CHECK([if unsetenv returns int],i_cv_unsetenv_ret_int,[
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1363 AC_TRY_COMPILE([
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1364 #include <stdlib.h>
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1365 ], [
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1366 if (unsetenv("env") < 0) ;
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1367 ], [
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1368 i_cv_unsetenv_ret_int=yes
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1369 ], [
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1370 i_cv_unsetenv_ret_int=no
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1371 ])
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1372 ])
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1373 if test $i_cv_unsetenv_ret_int = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1374 AC_DEFINE(UNSETENV_RET_INT,, [Define if unsetenv() returns int])
10491
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1375 fi
617fa0739538 Compile fix for systems where unsetenv() returns void.
Timo Sirainen <tss@iki.fi>
parents: 10489
diff changeset
1376
3590
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1377 dnl * Check for crypt() if unistd.h compiles with _XOPEN_SOURCE + _XPG6
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1378 dnl * Add other macros there too "just in case".
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1379 AC_CACHE_CHECK([if we should use _XPG6 macro for crypt()],i_cv_use_xpg6_crypt,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1380 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1381 #define _XOPEN_SOURCE 4
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1382 #define _XOPEN_SOURCE_EXTENDED 1
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1383 #define _XOPEN_VERSION 4
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1384 #define _XPG4_2
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1385 #define _XPG6
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1386 #include <unistd.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1387 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1388 crypt("a", "b");
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1389 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1390 i_cv_use_xpg6_crypt=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1391 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1392 i_cv_use_xpg6_crypt=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1393 ])
3590
340e1b87c27b Added check for _XPG6 macro for crypt().
Timo Sirainen <tss@iki.fi>
parents: 3575
diff changeset
1394 ])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1395 if test $i_cv_use_xpg6_crypt = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1396 AC_DEFINE(CRYPT_USE_XPG6,, [Define if _XPG6 macro is needed for crypt()])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1397 fi
7526
a957567706ec Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
Timo Sirainen <tss@iki.fi>
parents: 7502
diff changeset
1398
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1399 AC_CACHE_CHECK([if struct stat has st_?tim timespec fields],i_cv_have_st_tim_timespec,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1400 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1401 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1402 #include <sys/stat.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1403 #include <unistd.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1404 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1405 struct stat st;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1406 unsigned long x = st.st_mtim.tv_nsec;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1407
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1408 return 0;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1409 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1410 i_cv_have_st_tim_timespec=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1411 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1412 i_cv_have_st_tim_timespec=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1413 ])
5375
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1414 ])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1415 if test $i_cv_have_st_tim_timespec = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1416 AC_DEFINE(HAVE_STAT_XTIM,, [Define if you have st_?tim timespec fields in struct stat])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1417 fi
5375
94f043494a12 Check if struct stat has tv_nsec fields
Timo Sirainen <tss@iki.fi>
parents: 5359
diff changeset
1418
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1419 AC_CACHE_CHECK([if struct stat has st_?timespec fields],i_cv_have_st_timespec,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1420 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1421 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1422 #include <sys/stat.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1423 #include <unistd.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1424 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1425 struct stat st;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1426 unsigned long x = st.st_mtimespec.tv_nsec;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1427
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1428 return 0;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1429 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1430 i_cv_have_st_timespec=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1431 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1432 i_cv_have_st_timespec=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1433 ])
4736
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1434 ])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1435 if test $i_cv_have_st_timespec = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1436 AC_DEFINE(HAVE_STAT_XTIMESPEC,, [Define if you have st_?timespec fields in struct stat])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1437 fi
4736
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1438
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1439 dnl * Check if statvfs() can be used to find out block device for files
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1440 AC_CACHE_CHECK([if statvfs.f_mntfromname exists],i_cv_have_statvfs_f_mntfromname,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1441 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1442 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1443 #include <sys/statvfs.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1444 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1445 struct statvfs buf;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1446 char *p = buf.f_mntfromname;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1447
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1448 statvfs(".", &buf);
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1449 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1450 i_cv_have_statvfs_f_mntfromname=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1451 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1452 i_cv_have_statvfs_f_mntfromname=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1453 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1454 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1455 if test $i_cv_have_statvfs_f_mntfromname = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1456 AC_DEFINE(HAVE_STATVFS_MNTFROMNAME,, [Define if you have statvfs.f_mntfromname])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1457 fi
4736
6789961fe02e Added support for statvfs(), which is what the newer BSDs use.
Timo Sirainen <tss@iki.fi>
parents: 4645
diff changeset
1458
3745
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1459 dnl * Check if statfs() can be used to find out block device for files
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1460 AC_CACHE_CHECK([if statfs.f_mntfromname exists],i_cv_have_statfs_f_mntfromname,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1461 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1462 #include <sys/param.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1463 #include <sys/mount.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1464 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1465 struct statfs buf;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1466 char *p = buf.f_mntfromname;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1467
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1468 statfs(".", &buf);
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1469 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1470 i_cv_have_statfs_f_mntfromname=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1471 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1472 i_cv_have_statfs_f_mntfromname=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1473 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1474 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1475 if test $i_cv_have_statfs_f_mntfromname = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1476 AC_DEFINE(HAVE_STATFS_MNTFROMNAME,, [Define if you have statfs.f_mntfromname])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1477 fi
3745
840cc63e439b Don't allow giving invalid notify methods in --with-notify
Timo Sirainen <tss@iki.fi>
parents: 3744
diff changeset
1478
4552
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1479 dnl * Check if we have struct dqblk.dqb_curblocks
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1480 AC_CACHE_CHECK([if struct dqblk.dqb_curblocks exists],i_cv_have_dqblk_dqb_curblocks,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1481 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1482 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1483 #include "$srcdir/src/plugins/quota/quota-fs.h"
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1484 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1485 struct dqblk dqblk;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1486 unsigned int x = dqblk.dqb_curblocks;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1487 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1488 i_cv_have_dqblk_dqb_curblocks=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1489 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1490 i_cv_have_dqblk_dqb_curblocks=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1491 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1492 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1493 if test $i_cv_have_dqblk_dqb_curblocks = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1494 AC_DEFINE(HAVE_STRUCT_DQBLK_CURBLOCKS,, [Define if struct sqblk.dqb_curblocks exists])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1495 fi
4552
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1496
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1497 dnl * Check if we have struct dqblk.dqb_curspace
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1498 AC_CACHE_CHECK([if struct dqblk.dqb_curspace exists],i_cv_have_dqblk_dqb_curspace,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1499 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1500 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1501 #include "$srcdir/src/plugins/quota/quota-fs.h"
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1502 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1503 struct dqblk dqblk;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1504 unsigned int x = dqblk.dqb_curspace;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1505 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1506 i_cv_have_dqblk_dqb_curspace=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1507 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1508 i_cv_have_dqblk_dqb_curspace=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1509 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1510 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1511 if test $i_cv_have_dqblk_dqb_curspace = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1512 AC_DEFINE(HAVE_STRUCT_DQBLK_CURSPACE,, [Define if struct sqblk.dqb_curspace exists])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1513 fi
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1514
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1515 dnl * Check if we have Q_QUOTACTL ioctl (Solaris)
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1516 AC_CACHE_CHECK([if Q_QUOTACTL ioctl exists],i_cv_have_ioctl_q_quotactl,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1517 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1518 #include <sys/types.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1519 #include <sys/fs/ufs_quota.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1520 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1521 struct quotctl ctl;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1522 ioctl(0, Q_QUOTACTL, &ctl);
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1523 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1524 i_cv_have_ioctl_q_quotactl=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1525 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1526 i_cv_have_ioctl_q_quotactl=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1527 ])
4552
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1528 ])
ef71b2fdd433 Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
Timo Sirainen <tss@iki.fi>
parents: 4551
diff changeset
1529
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1530 if test $i_cv_have_ioctl_q_quotactl = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1531 AC_DEFINE(HAVE_Q_QUOTACTL,, [Define if Q_QUOTACTL exists])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
1532 fi
4063
f60237ad2edd Support Solaris's ioctl(Q_QUOTACTL).
Timo Sirainen <tss@iki.fi>
parents: 4057
diff changeset
1533
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
1534 dnl ***
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1535 dnl *** C99 vsnprintf()?
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1536 dnl ***
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1537
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1538 AC_CACHE_CHECK([for C99 vsnprintf()],i_cv_c99_vsnprintf,[
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1539 AC_RUN_IFELSE([AC_LANG_SOURCE([[
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1540 #include <stdio.h>
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1541 #include <stdarg.h>
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1542 static int f(const char *fmt, ...) {
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1543 va_list args;
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1544 char buf[13];
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1545 int ret;
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1546
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1547 va_start(args, fmt);
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1548 ret = vsnprintf(buf, 11, fmt, args) != 12 || buf[11-1] != '\0';
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1549 va_end(args);
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1550 return ret;
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1551 }
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1552 int main() {
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1553 return f("hello %s%d", "world", 1);
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1554 }]])],
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1555 [i_cv_c99_vsnprintf=yes],
7850
7f9f7fc02359 Support systems with non-C99 vsnprintf().
Timo Sirainen <tss@iki.fi>
parents: 7847
diff changeset
1556 [i_cv_c99_vsnprintf=no])
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1557 ])
7555
47c5e52c1181 Prefix AC_CACHE_CHECK variables with i_cv_.
Timo Sirainen <tss@iki.fi>
parents: 7554
diff changeset
1558 if test $i_cv_c99_vsnprintf = no; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1559 AC_DEFINE(HAVE_OLD_VSNPRINTF,, [Define if you don't have C99 compatible vsnprintf() call])
5681
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1560 fi
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1561
09415e6a0892 Require C99 compatible vsnprintf(). Removed printf_string_upper_bound() and
Timo Sirainen <tss@iki.fi>
parents: 5633
diff changeset
1562 dnl ***
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
1563 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
1564 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
1565
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1566 AC_CACHE_CHECK([for an implementation of va_copy()],lib_cv_va_copy,[
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1567 AC_RUN_IFELSE([AC_LANG_SOURCE([[
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
1568 #include <stdarg.h>
21283
16869cca53ce configure: Fix some implicit function declarations
Paul Howarth <paul@city-fan.org>
parents: 21271
diff changeset
1569 #include <stdlib.h>
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
1570 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
1571 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
1572 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
1573 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
1574 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
1575 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
1576 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
1577 }
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1578 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
1579 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
1580 return 0;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1581 }]])],
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
1582 [lib_cv_va_copy=yes],
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1583 [lib_cv_va_copy=no],[])
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
1584 ])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1585 AC_CACHE_CHECK([for an implementation of __va_copy()],lib_cv___va_copy,[
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1586 AC_RUN_IFELSE([AC_LANG_SOURCE([[
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
1587 #include <stdarg.h>
21283
16869cca53ce configure: Fix some implicit function declarations
Paul Howarth <paul@city-fan.org>
parents: 21271
diff changeset
1588 #include <stdlib.h>
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
1589 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
1590 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
1591 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
1592 __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
1593 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
1594 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
1595 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
1596 }
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1597 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
1598 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
1599 return 0;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1600 }]])],
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
1601 [lib_cv___va_copy=yes],
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1602 [lib_cv___va_copy=no],[])
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
1603 ])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1604
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1605 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
1606 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
1607 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
1608 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
1609 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
1610 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
1611
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1612 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
1613 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
1614 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
1615
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1616 AC_CACHE_CHECK([whether va_lists can be copied by value],lib_cv_va_val_copy,[
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1617 AC_RUN_IFELSE([AC_LANG_SOURCE([[
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
1618 #include <stdarg.h>
21283
16869cca53ce configure: Fix some implicit function declarations
Paul Howarth <paul@city-fan.org>
parents: 21271
diff changeset
1619 #include <stdlib.h>
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
1620 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
1621 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
1622 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
1623 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
1624 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
1625 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
1626 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
1627 }
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1628 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
1629 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
1630 return 0;
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1631 }]])],
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
1632 [lib_cv_va_val_copy=yes],
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
1633 [lib_cv_va_val_copy=no],[])
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
1634 ])
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1635
c4754c5770f3 We weren't using va_list properly, especially gcc/PowerPC didn't like it.
Timo Sirainen <tss@iki.fi>
parents: 850
diff changeset
1636 if test "x$lib_cv_va_val_copy" = "xno"; then
21283
16869cca53ce configure: Fix some implicit function declarations
Paul Howarth <paul@city-fan.org>
parents: 21271
diff changeset
1637 AC_DEFINE(VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copied as values])
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
1638 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
1639
7958
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1640 dnl * dynamic modules?
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1641 have_modules=no
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1642 AC_CHECK_FUNC(dlopen, [
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1643 have_modules=yes
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1644 MODULE_LIBS="-export-dynamic"
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1645 ], [
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1646 AC_CHECK_LIB(dl, dlopen, [
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1647 have_modules=yes
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1648 MODULE_LIBS="-export-dynamic -ldl"
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1649 DLLIB=-ldl
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1650 ])
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1651 ])
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1652
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1653 dnl **
8022
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1654 dnl ** AIX mntctl
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1655 dnl **
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1656
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1657 if test $ac_cv_header_sys_vmount_h = yes; then
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1658 AC_MSG_CHECKING([for reasonable mntctl buffer size])
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1659 AC_RUN_IFELSE([AC_LANG_SOURCE([[
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1660 #include <stdio.h>
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1661 #include <stdlib.h>
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1662 #include <sys/vmount.h>
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1663 int main() {
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1664 int size,count; char *m;
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1665 FILE *f=fopen("conftestval", "w");
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1666 if (!f) exit(1);
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1667 if ((count=mntctl(MCTL_QUERY,sizeof(size),&size))!=0 || !(m=malloc(size)) ||
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1668 (count=mntctl(MCTL_QUERY,size,m))<=0) exit(1);
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1669 fprintf(f, "%d\n",(size * (count + 5))/count & ~1); /* 5 mounts more */
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1670 exit(0);
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1671 }
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1672 ]])],[
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1673 size=`cat conftestval`
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1674 rm -f conftestval
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1675 AC_DEFINE_UNQUOTED(STATIC_MTAB_SIZE,$size, [reasonable mntctl buffer size])
8022
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1676 AC_MSG_RESULT($size)
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1677 ],[
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1678 AC_MSG_RESULT(default)
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1679 ])
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1680 fi
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1681
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1682
d1da922a437d mountpoint_get(): Added support for AIX support with mntctl().
Timo Sirainen <tss@iki.fi>
parents: 8008
diff changeset
1683 dnl **
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
1684 dnl ** SSL
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1685 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1686
623
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
1687 have_ssl=no
20623
d961f2a542d7 configure: Fix dcrypt build
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20496
diff changeset
1688 build_dcrypt_openssl=no
623
3fa9e363cd3d SSL fixes and doc updates.
Timo Sirainen <tss@iki.fi>
parents: 622
diff changeset
1689
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1690 if test $want_openssl != no && test $have_ssl = no; then
12438
c1d8fb31c1ad configure: Use PKG_PROG_PKG_CONFIG to find pkg-config binary.
Timo Sirainen <tss@iki.fi>
parents: 12400
diff changeset
1691 if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists openssl 2>/dev/null; then
1565
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1692 PKG_CHECK_MODULES(SSL, openssl)
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1693 CFLAGS="$CFLAGS $SSL_CFLAGS"
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1694 have_openssl=yes
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1695 else
7958
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1696 # openssl 0.9.8 wants -ldl and it's required if there's only .a lib
1565
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1697 AC_CHECK_LIB(ssl, SSL_read, [
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1698 AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h, [
7958
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1699 SSL_LIBS="-lssl -lcrypto $DLLIB"
1565
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1700 AC_SUBST(SSL_LIBS)
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1701 have_openssl=yes
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1702 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1703 if test $want_openssl = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1704 AC_ERROR([Can't build with OpenSSL: openssl/ssl.h or openssl/err.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1705 fi
1565
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1706 ])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1707 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1708 if test $want_openssl = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1709 AC_ERROR([Can't build with OpenSSL: libssl not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1710 fi
7958
adb7d13d7d97 When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.
Timo Sirainen <tss@iki.fi>
parents: 7946
diff changeset
1711 ], -lcrypto $DLLIB)
1565
97572a77243a Check OpenSSL using pkg-config which at least redhat uses nowadays.
Timo Sirainen <tss@iki.fi>
parents: 1539
diff changeset
1712 fi
1566
919f5aafbc6c fix for openssl detection
Timo Sirainen <tss@iki.fi>
parents: 1565
diff changeset
1713 if test "$have_openssl" = "yes"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1714 AC_DEFINE(HAVE_OPENSSL,, [Build with OpenSSL support])
1566
919f5aafbc6c fix for openssl detection
Timo Sirainen <tss@iki.fi>
parents: 1565
diff changeset
1715 have_ssl="yes (OpenSSL)"
20623
d961f2a542d7 configure: Fix dcrypt build
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20496
diff changeset
1716 build_dcrypt_openssl="no"
9973
ba12a404d3b3 Compiling fix for OpenSSL 0.9.7 and older.
Timo Sirainen <tss@iki.fi>
parents: 9942
diff changeset
1717
21240
005884a0d3f7 m4: Detect OpenSSL version 1.0.2
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21233
diff changeset
1718 AC_MSG_CHECKING([if OpenSSL version is 1.0.2 or better])
005884a0d3f7 m4: Detect OpenSSL version 1.0.2
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21233
diff changeset
1719
005884a0d3f7 m4: Detect OpenSSL version 1.0.2
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21233
diff changeset
1720 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
005884a0d3f7 m4: Detect OpenSSL version 1.0.2
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21233
diff changeset
1721 #include <openssl/opensslv.h>
005884a0d3f7 m4: Detect OpenSSL version 1.0.2
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21233
diff changeset
1722 #if OPENSSL_VERSION_NUMBER < 0x10002000L
005884a0d3f7 m4: Detect OpenSSL version 1.0.2
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21233
diff changeset
1723 #error "fail-compile"
005884a0d3f7 m4: Detect OpenSSL version 1.0.2
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21233
diff changeset
1724 #endif]], [[ return 0; ]])], [ssl_version_ge_102=true], [ssl_version_ge_102=false])
005884a0d3f7 m4: Detect OpenSSL version 1.0.2
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21233
diff changeset
1725 AC_MSG_RESULT([$ssl_version_ge_102])
005884a0d3f7 m4: Detect OpenSSL version 1.0.2
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21233
diff changeset
1726
21143
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1727 # SSL_clear_options introduced in openssl 0.9.8m but may be backported to
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1728 # older versions in "enterprise" OS releases; originally implemented as a
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1729 # macro but as a function in more recent openssl versions
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1730 AC_CACHE_CHECK([whether SSL_clear_options exists],i_cv_have_ssl_clear_options,[
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1731 old_LIBS=$LIBS
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1732 LIBS="$LIBS -lssl"
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1733 AC_TRY_LINK([
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1734 #include <openssl/ssl.h>
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1735 ], [
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1736 SSL *ssl;
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1737 long options;
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1738 SSL_clear_options(ssl, options);
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1739 ], [
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1740 i_cv_have_ssl_clear_options=yes
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1741 ], [
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1742 i_cv_have_ssl_clear_options=no
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1743 ])
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1744 LIBS=$old_LIBS
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1745 ])
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1746 if test $i_cv_have_ssl_clear_options = yes; then
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1747 AC_DEFINE(HAVE_SSL_CLEAR_OPTIONS,, [Define if you have SSL_clear_options])
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1748 fi
aeb2d1f53ae5 configure: Fix build with old OpenSSL without SSL_clear_options
Paul Howarth <paul@city-fan.org>
parents: 21123
diff changeset
1749
21478
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1750 # New style mem functions? Should be in v1.1+
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1751 AC_CACHE_CHECK([whether CRYPTO_set_mem_functions has new style parameters],i_cv_have_ssl_new_mem_funcs,[
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1752 old_LIBS=$LIBS
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1753 LIBS="$LIBS -lssl"
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1754 AC_TRY_LINK([
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1755 #include <openssl/ssl.h>
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1756 int CRYPTO_set_mem_functions(
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1757 void *(*m) (size_t, const char *, int),
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1758 void *(*r) (void *, size_t, const char *, int),
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1759 void (*f) (void *, const char *, int));
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1760 ], [
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1761 ], [
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1762 i_cv_have_ssl_new_mem_funcs=yes
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1763 ], [
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1764 i_cv_have_ssl_new_mem_funcs=no
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1765 ])
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1766 LIBS=$old_LIBS
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1767 ])
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1768 if test $i_cv_have_ssl_new_mem_funcs = yes; then
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1769 AC_DEFINE(HAVE_SSL_NEW_MEM_FUNCS,, [Define if CRYPTO_set_mem_functions has new style parameters])
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1770 fi
25414f008456 lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21477
diff changeset
1771
21481
0f676a75b649 lib-ssl-iostream: Detect whether to call ERR_remove_[thread_]state() via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21479
diff changeset
1772 AC_CHECK_LIB(ssl, ERR_remove_thread_state, [
0f676a75b649 lib-ssl-iostream: Detect whether to call ERR_remove_[thread_]state() via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21479
diff changeset
1773 AC_DEFINE(HAVE_OPENSSL_ERR_REMOVE_THREAD_STATE,, [Define if you have ERR_remove_thread_state])
0f676a75b649 lib-ssl-iostream: Detect whether to call ERR_remove_[thread_]state() via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21479
diff changeset
1774 ],, $SSL_LIBS)
0f676a75b649 lib-ssl-iostream: Detect whether to call ERR_remove_[thread_]state() via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21479
diff changeset
1775 AC_CHECK_LIB(ssl, OPENSSL_thread_stop, [
0f676a75b649 lib-ssl-iostream: Detect whether to call ERR_remove_[thread_]state() via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21479
diff changeset
1776 AC_DEFINE(HAVE_OPENSSL_AUTO_THREAD_DEINIT,, [Define if OpenSSL performs thread cleanup automatically])
0f676a75b649 lib-ssl-iostream: Detect whether to call ERR_remove_[thread_]state() via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21479
diff changeset
1777 ],, $SSL_LIBS)
21479
7bd5c8609f37 lib-ssl-iostream: Detect OPENSSL_cleanup() via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21478
diff changeset
1778 AC_CHECK_LIB(ssl, OPENSSL_cleanup, [
7bd5c8609f37 lib-ssl-iostream: Detect OPENSSL_cleanup() via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21478
diff changeset
1779 AC_DEFINE(HAVE_OPENSSL_CLEANUP,, [OpenSSL supports OPENSSL_cleanup()])
7bd5c8609f37 lib-ssl-iostream: Detect OPENSSL_cleanup() via configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21478
diff changeset
1780 ],, $SSL_LIBS)
9973
ba12a404d3b3 Compiling fix for OpenSSL 0.9.7 and older.
Timo Sirainen <tss@iki.fi>
parents: 9942
diff changeset
1781 AC_CHECK_LIB(ssl, SSL_get_current_compression, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1782 AC_DEFINE(HAVE_SSL_COMPRESSION,, [Build with OpenSSL compression])
9973
ba12a404d3b3 Compiling fix for OpenSSL 0.9.7 and older.
Timo Sirainen <tss@iki.fi>
parents: 9942
diff changeset
1783 ],, $SSL_LIBS)
11995
53147e8bdaf9 Compile fix for some OpenSSL version.
Timo Sirainen <tss@iki.fi>
parents: 11974
diff changeset
1784 AC_CHECK_LIB(ssl, SSL_get_servername, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1785 AC_DEFINE(HAVE_SSL_GET_SERVERNAME,, [Build with TLS hostname support])
11995
53147e8bdaf9 Compile fix for some OpenSSL version.
Timo Sirainen <tss@iki.fi>
parents: 11974
diff changeset
1786 ],, $SSL_LIBS)
20425
b522777ffbf6 configure: Detect SSL_COMP_free_compression_methods() by linking
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20392
diff changeset
1787 AC_CHECK_LIB(ssl, SSL_COMP_free_compression_methods, [
b522777ffbf6 configure: Detect SSL_COMP_free_compression_methods() by linking
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20392
diff changeset
1788 AC_DEFINE(HAVE_SSL_COMP_FREE_COMPRESSION_METHODS,, [Build with SSL_COMP_free_compression_methods() support])
b522777ffbf6 configure: Detect SSL_COMP_free_compression_methods() by linking
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20392
diff changeset
1789 ],, $SSL_LIBS)
21476
75ff4f96cdc4 lib-ssl-iostream: Use RSA_generate_key_ex() if it exists
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21388
diff changeset
1790 AC_CHECK_LIB(ssl, RSA_generate_key_ex, [
75ff4f96cdc4 lib-ssl-iostream: Use RSA_generate_key_ex() if it exists
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21388
diff changeset
1791 AC_DEFINE(HAVE_RSA_GENERATE_KEY_EX,, [Build with RSA_generate_key_ex() support])
75ff4f96cdc4 lib-ssl-iostream: Use RSA_generate_key_ex() if it exists
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21388
diff changeset
1792 ],, $SSL_LIBS)
21477
15eafce831ed lib-ssl-iostream: Use ASN1_STRING_get0_data() if it exists
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21476
diff changeset
1793 AC_CHECK_LIB(ssl, ASN1_STRING_get0_data, [
15eafce831ed lib-ssl-iostream: Use ASN1_STRING_get0_data() if it exists
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21476
diff changeset
1794 AC_DEFINE(HAVE_ASN1_STRING_GET0_DATA,, [Build with ASN1_STRING_get0_data() support])
15eafce831ed lib-ssl-iostream: Use ASN1_STRING_get0_data() if it exists
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21476
diff changeset
1795 ],, $SSL_LIBS)
21705
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1796 AC_CHECK_LIB(ssl, HMAC_CTX_new, [
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1797 AC_DEFINE(HAVE_HMAC_CTX_NEW,, [Build with HMAC_CTX_new() support])
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1798 ],, $SSL_LIBS)
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1799 AC_CHECK_LIB(ssl, EVP_MD_CTX_new, [
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1800 AC_DEFINE(HAVE_EVP_MD_CTX_NEW,, [Build with EVP_MD_CTX_new() support])
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1801 ],, $SSL_LIBS)
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1802 AC_CHECK_LIB(ssl, OBJ_length, [
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1803 AC_DEFINE(HAVE_OBJ_LENGTH,, [Build with OBJ_length() support])
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1804 ],, $SSL_LIBS)
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1805 AC_CHECK_LIB(ssl, EVP_PKEY_get0_RSA, [
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1806 AC_DEFINE(HAVE_EVP_PKEY_get0,, [Build with EVP_PKEY_get0_*() support])
041cd0683ad3 lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21575
diff changeset
1807 ],, $SSL_LIBS)
21010
9247d273129e configure: Improve check for OpenSSL without EC support
Paul Howarth <paul@city-fan.org>
parents: 20953
diff changeset
1808 AC_CHECK_LIB(ssl, [EVP_PKEY_CTX_new_id], [have_evp_pkey_ctx_new_id="yes"],, $SSL_LIBS)
9247d273129e configure: Improve check for OpenSSL without EC support
Paul Howarth <paul@city-fan.org>
parents: 20953
diff changeset
1809 AC_CHECK_LIB(ssl, [EC_KEY_new], [have_ec_key_new="yes"],, $SSL_LIBS)
9247d273129e configure: Improve check for OpenSSL without EC support
Paul Howarth <paul@city-fan.org>
parents: 20953
diff changeset
1810 if test "$have_evp_pkey_ctx_new_id" = "yes" && test "$have_ec_key_new" = "yes"; then
9247d273129e configure: Improve check for OpenSSL without EC support
Paul Howarth <paul@city-fan.org>
parents: 20953
diff changeset
1811 build_dcrypt_openssl="yes"
9247d273129e configure: Improve check for OpenSSL without EC support
Paul Howarth <paul@city-fan.org>
parents: 20953
diff changeset
1812 else
9247d273129e configure: Improve check for OpenSSL without EC support
Paul Howarth <paul@city-fan.org>
parents: 20953
diff changeset
1813 AC_MSG_WARN([No ECC support in OpenSSL - not enabling dcrypt])
9247d273129e configure: Improve check for OpenSSL without EC support
Paul Howarth <paul@city-fan.org>
parents: 20953
diff changeset
1814 fi
1566
919f5aafbc6c fix for openssl detection
Timo Sirainen <tss@iki.fi>
parents: 1565
diff changeset
1815 fi
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
1816 fi
21268
08bd444ec0c8 configure: Fix building without OpenSSL
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 21240
diff changeset
1817 AM_CONDITIONAL([SSL_VERSION_GE_102], [test x$ssl_version_ge_102 = xtrue])
20623
d961f2a542d7 configure: Fix dcrypt build
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20496
diff changeset
1818
13211
eb6d2fcca15b Fixed compiling without OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 13186
diff changeset
1819 AM_CONDITIONAL(BUILD_OPENSSL, test "$have_openssl" = "yes")
20623
d961f2a542d7 configure: Fix dcrypt build
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20496
diff changeset
1820 AM_CONDITIONAL(BUILD_DCRYPT_OPENSSL, test "$build_dcrypt_openssl" = "yes")
622
235188ee7a05 Support for OpenSSL.
Timo Sirainen <tss@iki.fi>
parents: 576
diff changeset
1821
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1822 if test $want_gnutls != no && test $have_ssl = no; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1823 AC_CHECK_LIB(gnutls, gnutls_global_init, [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1824 AC_CHECK_HEADER(gnutls/gnutls.h, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1825 AC_DEFINE(HAVE_GNUTLS,, [Build with GNUTLS support])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1826 SSL_LIBS="-lgnutls -lgcrypt"
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1827 AC_SUBST(SSL_LIBS)
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1828 have_ssl="yes (GNUTLS)"
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1829 have_gnutls=yes
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1830 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1831 if test $want_gnutls = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1832 AC_ERROR([Can't build with GNUTLS: gnutls/gnutls.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1833 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1834 ])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1835 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1836 if test $want_gnutls = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1837 AC_ERROR([Can't build with GNUTLS: libgnutls not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1838 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1839 ], -lgcrypt)
1948
7fa8697bc2a9 Default to OpenSSL
Timo Sirainen <tss@iki.fi>
parents: 1924
diff changeset
1840 fi
7fa8697bc2a9 Default to OpenSSL
Timo Sirainen <tss@iki.fi>
parents: 1924
diff changeset
1841
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1842 if test "$have_ssl" != "no"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1843 AC_DEFINE(HAVE_SSL,, [Build with SSL/TLS support])
742
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1844 fi
b3dd87844fff acconfig.h is deprecated with autoconf 2.5, changed configure to contain
Timo Sirainen <tss@iki.fi>
parents: 739
diff changeset
1845
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1846 dnl **
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1847 dnl ** Garbage Collector
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1848 dnl **
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1849
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1850 if test $want_gc != no; then
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1851 AC_CHECK_LIB(gc, GC_malloc, [
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1852 AC_CHECK_HEADERS(gc/gc.h gc.h)
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1853 AC_DEFINE(USE_GC,, [Define if you want to use Boehm GC])
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1854 LIBS="$LIBS -lgc"
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1855 ], [
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1856 if test $want_gc = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1857 AC_ERROR([Can't build with GC: libgc not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1858 fi
1786
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1859 ])
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1860 fi
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1861
49b6103dd2e0 Added support for Boehm GC. However it seems to be crashing for some reason
Timo Sirainen <tss@iki.fi>
parents: 1729
diff changeset
1862 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
1863 dnl ** userdb and passdb checks
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1864 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1865
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
1866 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
1867 passdb=""
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1868 not_userdb=""
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1869 not_passdb=""
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
1870
11454
df93f0c290ea auth: Added passdb static.
Timo Sirainen <tss@iki.fi>
parents: 11453
diff changeset
1871 passdb="$passdb static"
11453
d8a801d2d3f1 auth: Removed USERDB_STATIC macro. It's always built anyway.
Timo Sirainen <tss@iki.fi>
parents: 11446
diff changeset
1872 userdb="$userdb static"
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1873
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1874 if test $want_prefetch_userdb != no; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1875 AC_DEFINE(USERDB_PREFETCH,, [Build with prefetch userdb support])
3667
b7569a6a4ada Renamed userdb passdb to prefetch.
Timo Sirainen <tss@iki.fi>
parents: 3600
diff changeset
1876 userdb="$userdb prefetch"
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1877 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1878 not_userdb="$not_userdb prefetch"
3062
5e2e4cdbfe2e Added "passdb" userdb. It works only if passdb gives all the information
Timo Sirainen <tss@iki.fi>
parents: 3004
diff changeset
1879 fi
5e2e4cdbfe2e Added "passdb" userdb. It works only if passdb gives all the information
Timo Sirainen <tss@iki.fi>
parents: 3004
diff changeset
1880
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1881 if test $want_passwd != no; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1882 AC_DEFINE(USERDB_PASSWD,, [Build with passwd support])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1883 AC_DEFINE(PASSDB_PASSWD,, [Build with passwd support])
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
1884 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
1885 passdb="$passdb passwd"
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1886 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1887 not_passdb="$not_passdb passwd"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1888 not_userdb="$not_userdb passwd"
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1889 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1890
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1891 if test $want_passwd_file != no; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1892 AC_DEFINE(USERDB_PASSWD_FILE,, [Build with passwd-file support])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1893 AC_DEFINE(PASSDB_PASSWD_FILE,, [Build with passwd-file support])
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
1894 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
1895 passdb="$passdb passwd-file"
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1896 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1897 not_passdb="$not_passdb passwd-file"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1898 not_userdb="$not_userdb passwd-file"
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1899 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1900
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1901 have_shadow=no
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1902 if test $want_shadow != no; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1903 AC_CHECK_FUNC(getspnam, [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1904 AC_CHECK_HEADER(shadow.h, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1905 AC_DEFINE(PASSDB_SHADOW,, [Build with shadow support])
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1906 have_shadow=yes
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1907 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1908 if test $want_shadow = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1909 AC_ERROR([Can't build with shadow support: shadow.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1910 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1911 ])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1912 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1913 if test $want_shadow = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1914 AC_ERROR([Can't build with shadow support: getspnam() not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1915 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1916 ])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1917 fi
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1918 if test $have_shadow = no; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1919 not_passdb="$not_passdb shadow"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1920 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1921 passdb="$passdb shadow"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1922 fi
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1923
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1924 if test $want_pam != no; then
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1925 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
1926 have_pam=no
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1927 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
1928 AC_DEFINE(HAVE_SECURITY_PAM_APPL_H,,
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1929 [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
1930 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
1931 ])
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1932
df5bf4ee669f OSX puts PAM includes into pam/ directory instead of security. Detect that.
Timo Sirainen <tss@iki.fi>
parents: 702
diff changeset
1933 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
1934 AC_DEFINE(HAVE_PAM_PAM_APPL_H,,
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1935 [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
1936 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
1937 ])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1938 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1939 if test $want_pam = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1940 AC_ERROR([Can't build with PAM support: libpam not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1941 fi
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1942 ])
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1943 fi
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1944
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1945 if test "$have_pam" = "yes"; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1946 AUTH_LIBS="$AUTH_LIBS -lpam"
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1947 AC_DEFINE(PASSDB_PAM,, [Build with PAM support])
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1948 passdb="$passdb pam"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1949
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1950 AC_CHECK_LIB(pam, pam_setcred, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1951 AC_DEFINE(HAVE_PAM_SETCRED,, [Define if you have pam_setcred()])
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1952 ])
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1953 elif test $want_pam = yes; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1954 AC_ERROR([Can't build with PAM support: pam_appl.h not found])
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1955 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1956 not_passdb="$not_passdb pam"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1957 fi
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1958
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1959 if test $want_checkpassword != no; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1960 AC_DEFINE(PASSDB_CHECKPASSWORD,, [Build with checkpassword passdb support])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1961 AC_DEFINE(USERDB_CHECKPASSWORD,, [Build with checkpassword userdb support])
2162
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
1962 passdb="$passdb checkpassword"
8307
33eae1ca0be0 Added support for userdb checkpassword. Patch by Sascha Wilde.
Timo Sirainen <tss@iki.fi>
parents: 8297
diff changeset
1963 userdb="$userdb checkpassword"
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1964 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1965 not_passdb="$not_passdb checkpassword"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1966 not_userdb="$not_userdb checkpassword"
2162
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
1967 fi
95b2a6abc01e Added checkpassword passdb. userdb has only beginnings.
Timo Sirainen <tss@iki.fi>
parents: 2103
diff changeset
1968
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1969 have_bsdauth=no
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1970 if test $want_bsdauth != no; then
1851
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
1971 AC_CHECK_FUNC(auth_userokay, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
1972 AC_DEFINE(PASSDB_BSDAUTH,, [Build with BSD authentication support])
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1973 have_bsdauth=yes
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1974 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1975 if test $want_bsdauth = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1976 AC_ERROR([Can't build with BSD authentication support: auth_userokay() not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1977 fi
1851
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
1978 ])
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
1979 fi
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1980 if test $have_bsdauth = no; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1981 not_passdb="$not_passdb bsdauth"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1982 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1983 passdb="$passdb bsdauth"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
1984 fi
1851
d66d53f57e43 Added bsdauth support, patch by Dan Cross
Timo Sirainen <tss@iki.fi>
parents: 1849
diff changeset
1985
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
1986 have_gssapi=no
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
1987 if test $want_gssapi != no; then
11948
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
1988 AC_CHECK_PROG(KRB5CONFIG, krb5-config, krb5-config, NO)
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
1989 if test $KRB5CONFIG != NO; then
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
1990 if ! $KRB5CONFIG --version gssapi 2>/dev/null > /dev/null; then
7548
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1991 # krb5-config doesn't support gssapi.
11948
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
1992 KRB5_LIBS="`$KRB5CONFIG --libs`"
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
1993 KRB5_CFLAGS=`$KRB5CONFIG --cflags`
7548
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1994 AC_CHECK_LIB(gss, gss_acquire_cred, [
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1995 # Solaris
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1996 KRB5_LIBS="$KRB5_LIBS -lgss"
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1997 ], [
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1998 # failed
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
1999 KRB5_LIBS=
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
2000 ], $KRB5_LIBS)
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
2001 else
11948
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
2002 KRB5_LIBS=`$KRB5CONFIG --libs gssapi`
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
2003 KRB5_CFLAGS=`$KRB5CONFIG --cflags gssapi`
7548
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
2004 fi
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
2005 if test "$KRB5_LIBS" != ""; then
6199
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
2006 AC_SUBST(KRB5_LIBS)
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
2007 AC_SUBST(KRB5_CFLAGS)
3780
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
2008
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
2009 # Although krb5-config exists, all systems still don't
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
2010 # have gssapi.h
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
2011 old_CFLAGS=$CFLAGS
7548
e6187b556b65 Fixed GSSAPI checks. Perhaps it works now with Solaris krb5-config also.
Timo Sirainen <tss@iki.fi>
parents: 7526
diff changeset
2012 CFLAGS="$CFLAGS $KRB5_CFLAGS"
3780
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
2013 AC_CHECK_HEADER([gssapi/gssapi.h], [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2014 AC_DEFINE(HAVE_GSSAPI_GSSAPI_H,, [GSSAPI headers in gssapi/gssapi.h])
3780
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
2015 have_gssapi=yes
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
2016 ])
4862
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
2017 AC_CHECK_HEADER([gssapi.h], [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2018 AC_DEFINE(HAVE_GSSAPI_H,, [GSSAPI headers in gssapi.h])
4862
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
2019 have_gssapi=yes
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
2020 ])
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2021 if test $have_gssapi != no; then
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2022 if test $want_gssapi = plugin; then
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2023 have_gssapi=plugin
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2024 fi
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2025 AC_DEFINE(HAVE_GSSAPI,, [Build with GSSAPI support])
7610
280e570a5ced gssapi: Check for gssapi_krb5.h existence before trying to use it.
Timo Sirainen <tss@iki.fi>
parents: 7603
diff changeset
2026 AC_CHECK_HEADERS(gssapi/gssapi_ext.h gssapi_krb5.h gssapi/gssapi_krb5.h)
5859
dfdedb187b26 If __gss_userok() exists, use it to verify username. Patch by Peter Eriksson.
Timo Sirainen <tss@iki.fi>
parents: 5692
diff changeset
2027 AC_CHECK_LIB(gss, __gss_userok, [
dfdedb187b26 If __gss_userok() exists, use it to verify username. Patch by Peter Eriksson.
Timo Sirainen <tss@iki.fi>
parents: 5692
diff changeset
2028 AC_DEFINE(HAVE___GSS_USEROK,,
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2029 [Define if you have __gss_userok()])
7261
e665ef583668 If __gss_userok() is found from -lgss, make sure we link with -lgss.
Timo Sirainen <tss@iki.fi>
parents: 7259
diff changeset
2030 KRB5_LIBS="$KRB5_LIBS -lgss"
6199
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
2031 ],, $KRB5_LIBS)
6501
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
2032
8068
9569038e0816 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 8055
diff changeset
2033 # MIT has a #define for Heimdal acceptor_identity, but it's way too
9569038e0816 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 8055
diff changeset
2034 # difficult to test for it..
9569038e0816 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 8055
diff changeset
2035 old_LIBS=$LIBS
9569038e0816 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 8055
diff changeset
2036 LIBS="$LIBS $KRB5_LIBS"
9569038e0816 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 8055
diff changeset
2037 AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity krb5_gss_register_acceptor_identity)
8094
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2038
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2039 # does the kerberos library support SPNEGO?
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2040 AC_CACHE_CHECK([whether GSSAPI supports SPNEGO],i_cv_gssapi_spnego,[
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2041 AC_TRY_RUN([
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2042 #ifdef HAVE_GSSAPI_H
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2043 # include <gssapi.h>
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2044 #else
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2045 # include <gssapi/gssapi.h>
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2046 #endif
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2047 #include <krb5.h>
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2048 #include <string.h>
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2049 int main(void) {
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2050 OM_uint32 minor_status;
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2051 gss_OID_set mech_set;
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2052 unsigned char spnego_oid[] = { 0x2b, 0x06, 0x01, 0x05, 0x05, 0x02 };
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2053 unsigned int i;
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2054
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2055 gss_indicate_mechs(&minor_status, &mech_set);
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2056 for (i = 0; i < mech_set->count; i++) {
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2057 if (mech_set->elements[i].length == 6 &&
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2058 memcmp(mech_set->elements[i].elements,
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2059 spnego_oid, 6) == 0)
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2060 return 0;
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2061 }
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2062 return 1;
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2063 }
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2064 ], [
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2065 i_cv_gssapi_spnego=yes
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2066 ], [
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2067 i_cv_gssapi_spnego=no
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2068 ])
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2069 ])
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2070 if test "$i_cv_gssapi_spnego" = "yes"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2071 AC_DEFINE(HAVE_GSSAPI_SPNEGO,, [GSSAPI supports SPNEGO])
8094
641d761219a6 Support GSS-SPNEGO mechanism if GSSAPI library supports it.
Timo Sirainen <tss@iki.fi>
parents: 8090
diff changeset
2072 fi
8068
9569038e0816 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 8055
diff changeset
2073 LIBS=$old_LIBS
9569038e0816 gssapi: Make auth_krb5_keytab work by calling _register_acceptor_identity()
Timo Sirainen <tss@iki.fi>
parents: 8055
diff changeset
2074
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2075 if test $want_gssapi != plugin; then
6501
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
2076 AUTH_LIBS="$AUTH_LIBS $KRB5_LIBS"
7554
419b7cfc954c Once $KRB5_CFLAGS is set, use it instead of calling krb5-config again.
Timo Sirainen <tss@iki.fi>
parents: 7548
diff changeset
2077 AUTH_CFLAGS="$AUTH_CFLAGS $KRB5_CFLAGS"
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2078 AC_DEFINE(BUILTIN_GSSAPI,, [GSSAPI support is built in])
6501
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
2079 else
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
2080 have_gssapi_plugin=yes
dee85392c5c1 Make sure we don't define BUILTIN_GSSAPI unless HAVE_GSSAPI is also defined.
Timo Sirainen <tss@iki.fi>
parents: 6489
diff changeset
2081 fi
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2082 else
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2083 if test $want_gssapi != auto; then
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2084 AC_ERROR([Can't build with GSSAPI support: gssapi.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2085 fi
4862
bddfbc560857 Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain
Timo Sirainen <tss@iki.fi>
parents: 4855
diff changeset
2086 fi
3780
0128534525d8 Check that gssapi/gssapi.h exists before using it.
Timo Sirainen <tss@iki.fi>
parents: 3779
diff changeset
2087 CFLAGS=$old_CFLAGS
3705
561e81dfa20b MIT kerberos v1.2 (and older) doesn't work with us.
Timo Sirainen <tss@iki.fi>
parents: 3686
diff changeset
2088 fi
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2089 else
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2090 if test $want_gssapi != auto; then
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2091 AC_ERROR([Can't build with GSSAPI support: krb5-config not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2092 fi
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
2093 fi
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
2094 fi
6199
c1d09af8bdda Added --with-gssapi=plugin
Timo Sirainen <tss@iki.fi>
parents: 6198
diff changeset
2095 AM_CONDITIONAL(GSSAPI_PLUGIN, test "$have_gssapi_plugin" = "yes")
3683
28cca6317829 Added GSSAPI support. Patch by Jelmer Vernooij and some fixes by
Timo Sirainen <tss@iki.fi>
parents: 3671
diff changeset
2096
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2097 have_sia=no
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2098 if test $want_sia != no; then
4638
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
2099 AC_CHECK_FUNC(sia_validate_user, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2100 AC_DEFINE(PASSDB_SIA,, [Build with Tru64 SIA support])
4638
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
2101 AUTH_LIBS="$AUTH_LIBS -depth_ring_search"
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2102 have_sia=yes
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2103 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2104 if test $want_sia = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2105 AC_ERROR([Can't build with SIA support: sia_validate_user() not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2106 fi
4638
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
2107 ])
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
2108 fi
689a02ca02d3 Tru64 SIA authentication support. Patch by Simon L Jackson
Timo Sirainen <tss@iki.fi>
parents: 4621
diff changeset
2109
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2110 if test $have_sia = no; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2111 not_passdb="$not_passdb sia"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2112 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2113 passdb="$passdb sia"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2114 fi
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2115
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2116 have_ldap=no
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2117 if test $want_ldap != no; then
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
2118 AC_CHECK_LIB(ldap, ldap_init, [
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
2119 AC_CHECK_HEADER(ldap.h, [
2325
7613e0f68513 Fixed to compile with Solaris LDAP library
Timo Sirainen <tss@iki.fi>
parents: 2222
diff changeset
2120 AC_CHECK_LIB(ldap, ldap_initialize, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2121 AC_DEFINE(LDAP_HAVE_INITIALIZE,, [Define if you have ldap_initialize])
2325
7613e0f68513 Fixed to compile with Solaris LDAP library
Timo Sirainen <tss@iki.fi>
parents: 2222
diff changeset
2122 ])
4415
b91816cd1d16 Added TLS support for LDAP if the library supports it.
Timo Sirainen <tss@iki.fi>
parents: 4411
diff changeset
2123 AC_CHECK_LIB(ldap, ldap_start_tls_s, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2124 AC_DEFINE(LDAP_HAVE_START_TLS_S,, [Define if you have ldap_start_tls_s])
4415
b91816cd1d16 Added TLS support for LDAP if the library supports it.
Timo Sirainen <tss@iki.fi>
parents: 4411
diff changeset
2125 ])
10551
2882650531e0 configure: Use -llber for ldap only if necessary.
Timo Sirainen <tss@iki.fi>
parents: 10491
diff changeset
2126 LDAP_LIBS="-lldap"
11117
eee1e2a1c25b configure: Removed --enable-header-install. It's now always enabled.
Timo Sirainen <tss@iki.fi>
parents: 11008
diff changeset
2127 AC_CHECK_LIB(ldap, ber_free, [
eee1e2a1c25b configure: Removed --enable-header-install. It's now always enabled.
Timo Sirainen <tss@iki.fi>
parents: 11008
diff changeset
2128 # do nothing, default is to add -lldap to LIBS
11120
829cc91ed831 configure: Fix to older autoconfs
Timo Sirainen <tss@iki.fi>
parents: 11117
diff changeset
2129 :
11117
eee1e2a1c25b configure: Removed --enable-header-install. It's now always enabled.
Timo Sirainen <tss@iki.fi>
parents: 11008
diff changeset
2130 ], [
10551
2882650531e0 configure: Use -llber for ldap only if necessary.
Timo Sirainen <tss@iki.fi>
parents: 10491
diff changeset
2131 AC_CHECK_LIB(lber, ber_free, [
2882650531e0 configure: Use -llber for ldap only if necessary.
Timo Sirainen <tss@iki.fi>
parents: 10491
diff changeset
2132 LDAP_LIBS="$LDAP_LIBS -llber"
2882650531e0 configure: Use -llber for ldap only if necessary.
Timo Sirainen <tss@iki.fi>
parents: 10491
diff changeset
2133 ])
2882650531e0 configure: Use -llber for ldap only if necessary.
Timo Sirainen <tss@iki.fi>
parents: 10491
diff changeset
2134 ])
6198
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
2135 AC_SUBST(LDAP_LIBS)
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2136 if test $want_ldap != plugin; then
6198
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
2137 AUTH_LIBS="$AUTH_LIBS $LDAP_LIBS"
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2138 AC_DEFINE(BUILTIN_LDAP,, [LDAP support is built in])
6198
4f6c4aeafafb --with-ldap=plugin builds LDAP passdb and userdb support as a plugin.
Timo Sirainen <tss@iki.fi>
parents: 6196
diff changeset
2139 fi
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
2140
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2141 AC_DEFINE(USERDB_LDAP,, [Build with LDAP support])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2142 AC_DEFINE(PASSDB_LDAP,, [Build with LDAP support])
9656
dc6d35b51b68 configure: Check sasl.h existence only when using --with-ldap.
Timo Sirainen <tss@iki.fi>
parents: 9655
diff changeset
2143 AC_CHECK_HEADERS(sasl.h sasl/sasl.h)
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2144 have_ldap=yes
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2145 ], [
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2146 if test $want_ldap != auto; then
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2147 AC_ERROR([Can't build with LDAP support: ldap.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2148 fi
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
2149 ])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2150 ], [
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2151 if test $want_ldap != auto; then
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2152 AC_ERROR([Can't build with LDAP support: libldap not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2153 fi
1057
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
2154 ])
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
2155 fi
c5ab972db48c libldap checks, --without-pop3 disables pop3 server
Timo Sirainen <tss@iki.fi>
parents: 1049
diff changeset
2156
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2157 if test $have_ldap = no; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2158 not_passdb="$not_passdb ldap"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2159 not_userdb="$not_userdb ldap"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2160 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2161 userdb="$userdb ldap"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2162 passdb="$passdb ldap"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2163 if test $want_ldap = plugin; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2164 have_ldap_plugin=yes
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2165 userdb="$userdb (plugin)"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2166 passdb="$passdb (plugin)"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2167 fi
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2168 fi
9551
49a1e47cb037 Fixed building LDAP support as plugin.
Timo Sirainen <tss@iki.fi>
parents: 9542
diff changeset
2169 AM_CONDITIONAL(LDAP_PLUGIN, test "$have_ldap_plugin" = "yes")
20095
666a6129479b configure: Fixed (again) --with-ldap=plugin
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20067
diff changeset
2170 AM_CONDITIONAL(HAVE_LDAP, test "$want_ldap" != "no")
12214
e3fbe13c0eab dict: Support file backend also with dict proxy.
Timo Sirainen <tss@iki.fi>
parents: 12181
diff changeset
2171 dict_drivers=
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
2172
10600
20963e8ec560 configure: Another try at fixing Berkeley DB check to not give an error.
Timo Sirainen <tss@iki.fi>
parents: 10598
diff changeset
2173 if test $want_db != no; then
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2174 AC_CACHE_CHECK([db_env_create in -ldb],i_cv_have_db_env_create,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2175 old_LIBS=$LIBS
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2176 LIBS="$LIBS -ldb"
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2177 AC_TRY_LINK([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2178 #include <db.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2179 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2180 db_env_create(0, 0);
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2181 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2182 i_cv_have_db_env_create=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2183 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2184 i_cv_have_db_env_create=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2185 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2186 LIBS=$old_LIBS
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2187 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2188 if test $i_cv_have_db_env_create = yes; then
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2189 AC_CHECK_HEADER(db.h, [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2190 DICT_LIBS="$DICT_LIBS -ldb"
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2191 dict_drivers="$dict_drivers db"
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2192 AC_DEFINE(BUILD_DB,, [Build with Berkeley DB support])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2193 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2194 if test $want_db = yes; then
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2195 AC_ERROR([Can't build with db support: db.h not found])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2196 fi
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2197 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2198 else
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2199 if test $want_db = yes; then
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2200 AC_ERROR([Can't build with db support: libdb not found])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2201 fi
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2202 fi
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
2203 fi
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
2204
15665
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2205 if test $want_cdb != no; then
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2206 AC_CHECK_LIB(cdb, cdb_init, [
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2207 AC_CHECK_HEADER(cdb.h, [
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2208 DICT_LIBS="$DICT_LIBS -lcdb"
18337
16ff063e3588 dict: cdb support should be available only to dict process.
Timo Sirainen <tss@iki.fi>
parents: 18306
diff changeset
2209 dict_drivers="$dict_drivers cdb"
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2210 AC_DEFINE(BUILD_CDB,, [Build with CDB support])
15665
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2211 ], [
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2212 if test $want_cdb = yes; then
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2213 AC_ERROR([Can't build with CDB support: cdb.h not found])
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2214 fi
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2215 ])
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2216 ], [
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2217 if test $want_cdb = yes; then
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2218 AC_ERROR([Can't build with CDB support: libcdb not found])
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2219 fi
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2220 ])
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2221 fi
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2222
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2223 if test $want_pgsql != no; then
11948
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
2224 AC_CHECK_PROG(PG_CONFIG, pg_config, pg_config, NO)
9640
ac52d79b7b94 configure: Use pg_config for figuring out PostgreSQL include/libs paths.
Timo Sirainen <tss@iki.fi>
parents: 9559
diff changeset
2225 if test $PG_CONFIG = NO; then
9654
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2226 # based on code from PHP
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2227 for i in /usr /usr/local /usr/local/pgsql; do
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2228 for j in include include/pgsql include/postgres include/postgresql ""; do
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2229 if test -r "$i/$j/libpq-fe.h"; then
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2230 PGSQL_INCLUDE=$i/$j
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2231 fi
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2232 done
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2233 for lib in lib lib64; do
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2234 for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2235 if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2236 PGSQL_LIBDIR=$i/$j
9640
ac52d79b7b94 configure: Use pg_config for figuring out PostgreSQL include/libs paths.
Timo Sirainen <tss@iki.fi>
parents: 9559
diff changeset
2237 fi
9654
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2238 done
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2239 done
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2240 done
9640
ac52d79b7b94 configure: Use pg_config for figuring out PostgreSQL include/libs paths.
Timo Sirainen <tss@iki.fi>
parents: 9559
diff changeset
2241 else
11948
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
2242 PGSQL_INCLUDE="`$PG_CONFIG --includedir`"
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
2243 PGSQL_LIBDIR="`$PG_CONFIG --libdir`"
9654
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2244 fi
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
2245
9654
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2246 old_LIBS=$LIBS
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2247 if test "$PGSQL_LIBDIR" != ""; then
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2248 LIBS="$LIBS -L$PGSQL_LIBDIR"
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2249 fi
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
2250
9654
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2251 AC_CHECK_LIB(pq, PQconnectdb, [
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2252 AC_CHECK_LIB(pq, PQescapeStringConn, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2253 AC_DEFINE(HAVE_PQESCAPE_STRING_CONN,, [Define if libpq has PQescapeStringConn function])
9654
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2254 ])
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2255 old_CPPFLAGS=$CPPFLAGS
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2256 if test "$PGSQL_INCLUDE" != ""; then
11446
044589aca7c6 configure: Don't use spaces after -I and -L compiler flags.
Timo Sirainen <tss@iki.fi>
parents: 11370
diff changeset
2257 CPPFLAGS="$CPPFLAGS -I$PGSQL_INCLUDE"
9654
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2258 fi
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2259 AC_CHECK_HEADER(libpq-fe.h, [
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2260 if test "$PGSQL_INCLUDE" != ""; then
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2261 PGSQL_CFLAGS="$PGSQL_CFLAGS -I$PGSQL_INCLUDE"
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2262 fi
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2263 if test "$PGSQL_LIBDIR" != ""; then
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2264 PGSQL_LIBS="$PGSQL_LIBS -L$PGSQL_LIBDIR"
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2265 fi
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2266 PGSQL_LIBS="$PGSQL_LIBS -lpq"
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2267 AC_DEFINE(HAVE_PGSQL,, [Build with PostgreSQL support])
9654
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2268 found_sql_drivers="$found_sql_drivers pgsql"
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2269 ], [
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2270 if test $want_pgsql = yes; then
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2271 AC_ERROR([Can't build with PostgreSQL support: libpq-fe.h not found])
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2272 fi
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2273 ])
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2274 CPPFLAGS=$old_CPPFLAGS
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2275 ], [
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2276 if test $want_pgsql = yes; then
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2277 AC_ERROR([Can't build with PostgreSQL support: libpq not found])
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2278 fi
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2279 ])
5714aba539f0 configure: Support finding PostgreSQL without pg_config after all.
Timo Sirainen <tss@iki.fi>
parents: 9640
diff changeset
2280 LIBS=$old_LIBS
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
2281 fi
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
2282
11871
45b835e6f59c configure: Make sure mysql libs/cflags aren't used if they don't work.
Timo Sirainen <tss@iki.fi>
parents: 11839
diff changeset
2283 have_mysql=no
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2284 if test $want_mysql != no; then
11948
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
2285 AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, mysql_config, NO)
9942
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2286 if test $MYSQL_CONFIG = NO; then
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2287 # based on code from PHP
15308
c8d55ba25f39 configure: Make sure MYSQL_LIBS has -lmysqlclient even if it's not explicitly found.
Timo Sirainen <tss@iki.fi>
parents: 15145
diff changeset
2288 MYSQL_LIBS="-lmysqlclient -lz -lm"
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2289 for i in /usr /usr/local /usr/local/mysql; do
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2290 for j in include include/mysql ""; do
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2291 if test -r "$i/$j/mysql.h"; then
11446
044589aca7c6 configure: Don't use spaces after -I and -L compiler flags.
Timo Sirainen <tss@iki.fi>
parents: 11370
diff changeset
2292 MYSQL_INCLUDE="-I$i/$j"
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2293 fi
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2294 done
4142
08aef9a8e22c Added lib64 directory to mysql/pgsql checks. Removed all special lib/include
Timo Sirainen <tss@iki.fi>
parents: 4141
diff changeset
2295 for j in lib lib/mysql lib64 lib64/mysql ""; do
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2296 if test -f "$i/$j/libmysqlclient.so" || test -f "$i/$j/libmysqlclient.a"; then
11446
044589aca7c6 configure: Don't use spaces after -I and -L compiler flags.
Timo Sirainen <tss@iki.fi>
parents: 11370
diff changeset
2297 MYSQL_LIBS="-L$i/$j -lmysqlclient -lz -lm"
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2298 fi
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2299 done
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2300 done
9942
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2301 else
11948
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
2302 MYSQL_INCLUDE="`$MYSQL_CONFIG --include`"
ebb4362b6d0d configure: AC_CHECK_PROG() calls now allow specifying full path to prog via environment.
Timo Sirainen <tss@iki.fi>
parents: 11939
diff changeset
2303 MYSQL_LIBS="`$MYSQL_CONFIG --libs`"
9942
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2304 fi
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2305
9942
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2306 old_LIBS=$LIBS
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2307 if test "$MYSQL_LIBS" != ""; then
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2308 LIBS="$LIBS $MYSQL_LIBS"
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2309 fi
1995
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
2310
9942
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2311 mysql_lib=""
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2312 LIBS="$LIBS -lz -lm"
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2313 AC_CHECK_LIB(mysqlclient, mysql_init, [
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2314 old_CPPFLAGS=$CPPFLAGS
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2315 if test "$MYSQL_INCLUDE" != ""; then
9942
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2316 CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE"
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2317 fi
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2318 AC_CHECK_HEADER(mysql.h, [
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2319 if test "$MYSQL_INCLUDE" != ""; then
9942
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2320 MYSQL_CFLAGS="$MYSQL_CFLAGS $MYSQL_INCLUDE"
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2321 fi
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2322
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2323 AC_CHECK_LIB(mysqlclient, mysql_ssl_set, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2324 AC_DEFINE(HAVE_MYSQL_SSL,, [Define if your MySQL library has SSL functions])
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2325 if test "x$have_openssl" = "yes"; then
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2326 ssl_define="#define HAVE_OPENSSL"
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2327 else
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2328 ssl_define=""
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2329 fi
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2330 AC_TRY_COMPILE([
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2331 $ssl_define
2403
3af28e102a39 Mysql check fix
Timo Sirainen <tss@iki.fi>
parents: 2384
diff changeset
2332 #include <mysql.h>
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2333 ], [
21271
33c22eca39fc configure: Fix HAVE_MYSQL_SSL_CIPHER check
Paul Howarth <paul@city-fan.org>
parents: 21268
diff changeset
2334 mysql_ssl_set(0, 0, 0, 0, 0, 0);
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2335 ], [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2336 AC_DEFINE(HAVE_MYSQL_SSL_CIPHER,, [Define if your MySQL library supports setting cipher])
17053
7a7898ffe87f mysql: Added ssl_verify_server_cert=no|yes parameter.
Timo Sirainen <tss@iki.fi>
parents: 17031
diff changeset
2337
7a7898ffe87f mysql: Added ssl_verify_server_cert=no|yes parameter.
Timo Sirainen <tss@iki.fi>
parents: 17031
diff changeset
2338 AC_TRY_COMPILE([
7a7898ffe87f mysql: Added ssl_verify_server_cert=no|yes parameter.
Timo Sirainen <tss@iki.fi>
parents: 17031
diff changeset
2339 $ssl_define
7a7898ffe87f mysql: Added ssl_verify_server_cert=no|yes parameter.
Timo Sirainen <tss@iki.fi>
parents: 17031
diff changeset
2340 #include <mysql.h>
7a7898ffe87f mysql: Added ssl_verify_server_cert=no|yes parameter.
Timo Sirainen <tss@iki.fi>
parents: 17031
diff changeset
2341 ], [
7a7898ffe87f mysql: Added ssl_verify_server_cert=no|yes parameter.
Timo Sirainen <tss@iki.fi>
parents: 17031
diff changeset
2342 int i = MYSQL_OPT_SSL_VERIFY_SERVER_CERT;
7a7898ffe87f mysql: Added ssl_verify_server_cert=no|yes parameter.
Timo Sirainen <tss@iki.fi>
parents: 17031
diff changeset
2343 ], [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2344 AC_DEFINE(HAVE_MYSQL_SSL_VERIFY_SERVER_CERT,, [Define if your MySQL library supports verifying the name in the SSL certificate])
17053
7a7898ffe87f mysql: Added ssl_verify_server_cert=no|yes parameter.
Timo Sirainen <tss@iki.fi>
parents: 17031
diff changeset
2345 ])
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2346 ])
2369
189a6de6b166 Added MySQL SSL support.
Timo Sirainen <tss@iki.fi>
parents: 2367
diff changeset
2347 ])
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2348
11871
45b835e6f59c configure: Make sure mysql libs/cflags aren't used if they don't work.
Timo Sirainen <tss@iki.fi>
parents: 11839
diff changeset
2349 have_mysql=yes
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2350 AC_DEFINE(HAVE_MYSQL,, [Build with MySQL support])
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2351 found_sql_drivers="$found_sql_drivers mysql"
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2352 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2353 if test $want_mysql = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2354 AC_ERROR([Can't build with MySQL support: mysql.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2355 fi
2369
189a6de6b166 Added MySQL SSL support.
Timo Sirainen <tss@iki.fi>
parents: 2367
diff changeset
2356 ])
2384
0cc72087752f Better MySQL checking. Patch by John Dennis
Timo Sirainen <tss@iki.fi>
parents: 2377
diff changeset
2357 CPPFLAGS=$old_CPPFLAGS
9942
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2358 ], [
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2359 if test $want_mysql = yes; then
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2360 AC_ERROR([Can't build with MySQL support: libmysqlclient not found])
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2361 fi
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2362 ])
1995
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
2363
11871
45b835e6f59c configure: Make sure mysql libs/cflags aren't used if they don't work.
Timo Sirainen <tss@iki.fi>
parents: 11839
diff changeset
2364 if test $have_mysql != yes; then
45b835e6f59c configure: Make sure mysql libs/cflags aren't used if they don't work.
Timo Sirainen <tss@iki.fi>
parents: 11839
diff changeset
2365 MYSQL_LIBS=
45b835e6f59c configure: Make sure mysql libs/cflags aren't used if they don't work.
Timo Sirainen <tss@iki.fi>
parents: 11839
diff changeset
2366 MYSQL_CFLAGS=
45b835e6f59c configure: Make sure mysql libs/cflags aren't used if they don't work.
Timo Sirainen <tss@iki.fi>
parents: 11839
diff changeset
2367 fi
9942
a22c9e8a01ae configure: Use mysql_config to find where mysql exists.
Timo Sirainen <tss@iki.fi>
parents: 9842
diff changeset
2368 LIBS=$old_LIBS
1995
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
2369 fi
cc64f8bb4716 MySQL authentication patch by Matther Reimer
Timo Sirainen <tss@iki.fi>
parents: 1990
diff changeset
2370
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2371 if test $want_sqlite != no; then
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2372 AC_CHECK_LIB(sqlite3, sqlite3_open, [
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2373 AC_CHECK_HEADER(sqlite3.h, [
18510
e4ad83ed88c9 configure: When compiling with sqlite3, don't forcibly link with zlib.
Timo Sirainen <tss@iki.fi>
parents: 18439
diff changeset
2374 SQLITE_LIBS="$SQLITE_LIBS -lsqlite3"
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2375
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2376 AC_DEFINE(HAVE_SQLITE,, [Build with SQLite3 support])
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2377 found_sql_drivers="$found_sql_drivers sqlite"
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2378 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2379 if test $want_sqlite = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2380 AC_ERROR([Can't build with SQLite support: sqlite3.h not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2381 fi
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2382 ])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2383 ], [
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2384 if test $want_sqlite = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2385 AC_ERROR([Can't build with SQLite support: libsqlite3 not found])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2386 fi
4144
13665379afa8 Unbreak last sqlite change
Timo Sirainen <tss@iki.fi>
parents: 4143
diff changeset
2387 ])
3919
b967ffb7e3a6 SQLite support. Patch by Jakob Hirsch.
Timo Sirainen <tss@iki.fi>
parents: 3904
diff changeset
2388 fi
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2389
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2390 if test $want_cassandra != no; then
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2391 AC_CHECK_LIB(cassandra, cass_session_new, [
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2392 AC_CHECK_HEADER(cassandra.h, [
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2393 CASSANDRA_LIBS="$CASSANDRA_LIBS -lcassandra"
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2394
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2395 AC_DEFINE(HAVE_CASSANDRA,, [Build with Cassandra support])
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2396 found_sql_drivers="$found_sql_drivers cassandra"
21531
a326cf8a579a driver-cassandra: Add support for speculative execution
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21481
diff changeset
2397 AC_CHECK_LIB(cassandra, cass_cluster_set_constant_speculative_execution_policy, [
a326cf8a579a driver-cassandra: Add support for speculative execution
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21481
diff changeset
2398 AC_DEFINE(HAVE_CASSANDRA_SPECULATIVE_POLICY, 1, [Cassandra supports speculative execution policy])
a326cf8a579a driver-cassandra: Add support for speculative execution
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21481
diff changeset
2399 ])
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2400 ], [
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2401 if test $want_cassandra = yes; then
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2402 AC_ERROR([Can't build with Cassandra support: cassandra.h not found])
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2403 fi
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2404 ])
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2405 ], [
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2406 if test $want_cassandra = yes; then
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2407 AC_ERROR([Can't build with Cassandra support: libcassandra not found])
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2408 fi
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2409 ])
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2410 fi
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2411
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2412 SQL_CFLAGS="$MYSQL_CFLAGS $PGSQL_CFLAGS $SQLITE_CFLAGS $CASSANDRA_CFLAGS"
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2413 if test "$want_sql" != "plugin"; then
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2414 SQL_LIBS="$MYSQL_LIBS $PGSQL_LIBS $SQLITE_LIBS $CASSANDRA_LIBS"
9329
ed142749ce67 dovecot --build-options: If SQL or LDAP was built as plugins, say it.
Timo Sirainen <tss@iki.fi>
parents: 9258
diff changeset
2415 else
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2416 AC_DEFINE(SQL_DRIVER_PLUGINS,, [Build SQL drivers as plugins])
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2417 fi
10155
3a32306aa473 configure: Removed --with-sql-drivers parameter. I'm not sure what it tried to do.
Timo Sirainen <tss@iki.fi>
parents: 10095
diff changeset
2418 sql_drivers=
3a32306aa473 configure: Removed --with-sql-drivers parameter. I'm not sure what it tried to do.
Timo Sirainen <tss@iki.fi>
parents: 10095
diff changeset
2419 not_sql_drivers=
3a32306aa473 configure: Removed --with-sql-drivers parameter. I'm not sure what it tried to do.
Timo Sirainen <tss@iki.fi>
parents: 10095
diff changeset
2420
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2421 if test "$found_sql_drivers" != "" || test "$want_sql" != "no"; then
10155
3a32306aa473 configure: Removed --with-sql-drivers parameter. I'm not sure what it tried to do.
Timo Sirainen <tss@iki.fi>
parents: 10095
diff changeset
2422 sql_drivers="$found_sql_drivers"
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2423
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2424 AC_DEFINE(PASSDB_SQL,, [Build with SQL support])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2425 AC_DEFINE(USERDB_SQL,, [Build with SQL support])
2754
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2426 AUTH_LIBS="$AUTH_LIBS $SQL_LIBS"
4012
d8c1e641b435 Building with SQL support replaced passdb list with userdbs.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4005
diff changeset
2427 passdb="$passdb sql"
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2428 userdb="$userdb sql"
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2429 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2430 not_passdb="$not_passdb sql"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2431 not_userdb="$not_userdb sql"
2754
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2432 fi
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2433
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2434 have_vpopmail=no
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2435 if test $want_vpopmail != no; then
8828
71f385df3de4 --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8798
diff changeset
2436 vpop_etc="$vpopmail_home/etc"
71f385df3de4 --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8798
diff changeset
2437 AC_MSG_CHECKING([for vpopmail configuration at $vpop_etc/lib_deps])
71f385df3de4 --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8798
diff changeset
2438 if ! test -f $vpop_etc/lib_deps; then
8829
f67a966f2792 --with-vpopmail: Minor fix for previous change.
Timo Sirainen <tss@iki.fi>
parents: 8828
diff changeset
2439 AC_MSG_RESULT(not found)
8828
71f385df3de4 --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8798
diff changeset
2440 vpop_etc="$vpopmail_home"
71f385df3de4 --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8798
diff changeset
2441 AC_MSG_CHECKING([for vpopmail configuration at $vpop_etc/lib_deps])
71f385df3de4 --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8798
diff changeset
2442 fi
71f385df3de4 --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8798
diff changeset
2443 if test -f $vpop_etc/lib_deps; then
71f385df3de4 --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8798
diff changeset
2444 AUTH_CFLAGS="$AUTH_CFLAGS `cat $vpop_etc/inc_deps` $CFLAGS"
71f385df3de4 --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8798
diff changeset
2445 AUTH_LIBS="$AUTH_LIBS `cat $vpop_etc/lib_deps`"
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2446 AC_DEFINE(USERDB_VPOPMAIL,, [Build with vpopmail support])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2447 AC_DEFINE(PASSDB_VPOPMAIL,, [Build with vpopmail support])
281
b7fe6867e549 print "checking vpopmail"
Timo Sirainen <tss@iki.fi>
parents: 280
diff changeset
2448 AC_MSG_RESULT(found)
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2449 have_vpopmail=yes
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
2450 else
281
b7fe6867e549 print "checking vpopmail"
Timo Sirainen <tss@iki.fi>
parents: 280
diff changeset
2451 AC_MSG_RESULT(not found)
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2452 if test $want_vpopmail = yes; then
8828
71f385df3de4 --with-vpopmail=path now also checks path/lib_deps instead of only path/etc/lib_deps.
Timo Sirainen <tss@iki.fi>
parents: 8798
diff changeset
2453 AC_ERROR([Can't build with vpopmail support: $vpop_etc/lib_deps not found])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2454 fi
280
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
2455 fi
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
2456 fi
fa2d1a1d025e vpopmail authentication. compiles, not tested if it really works.
Timo Sirainen <tss@iki.fi>
parents: 247
diff changeset
2457
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2458 if test $have_vpopmail = no; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2459 not_passdb="$not_passdb vpopmail"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2460 not_userdb="$not_userdb vpopmail"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2461 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2462 userdb="$userdb vpopmail"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2463 passdb="$passdb vpopmail"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2464 fi
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2465
5692
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2466 AC_CHECK_FUNC(crypt,, [
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2467 AC_CHECK_LIB(crypt, crypt, [
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2468 AUTH_LIBS="-lcrypt $AUTH_LIBS"
12876
b93d45b71332 doveadm: Don't link with all AUTH_LIBS, only -lcrypt is needed.
Timo Sirainen <tss@iki.fi>
parents: 12874
diff changeset
2469 CRYPT_LIBS="-lcrypt"
5692
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2470 ], [
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2471 AC_MSG_ERROR([crypt() wasn't found])
1034fcaffcce If crypt() is in libc, don't link -lcrypt even if it's found.
Timo Sirainen <tss@iki.fi>
parents: 5691
diff changeset
2472 ])
5346
e39ce58a463b Link dovecot-auth always with -lcrypto if it's needed for crypt(). It could
Timo Sirainen <tss@iki.fi>
parents: 5217
diff changeset
2473 ])
12876
b93d45b71332 doveadm: Don't link with all AUTH_LIBS, only -lcrypt is needed.
Timo Sirainen <tss@iki.fi>
parents: 12874
diff changeset
2474 AC_SUBST(CRYPT_LIBS)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2475
1511
a4ad03c210af Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents: 1467
diff changeset
2476 if test $have_modules = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2477 AC_DEFINE(HAVE_MODULES,, [Define if you have dynamic module support])
1465
03dd87873a81 Added support for dynamically loadable imap/pop3 modules.
Timo Sirainen <tss@iki.fi>
parents: 1462
diff changeset
2478 AC_SUBST(MODULE_LIBS)
7826
b63aa0ffe564 Use dynamic module suffix provided by libtool rather than hardcoded ".so".
Timo Sirainen <tss@iki.fi>
parents: 7823
diff changeset
2479
b63aa0ffe564 Use dynamic module suffix provided by libtool rather than hardcoded ".so".
Timo Sirainen <tss@iki.fi>
parents: 7823
diff changeset
2480 # shrext_cmds comes from libtool.m4
7867
3f8282688777 Fixed looking up plugin suffix.
Timo Sirainen <tss@iki.fi>
parents: 7865
diff changeset
2481 module=yes eval MODULE_SUFFIX=$shrext_cmds
7869
fe465f0f86fb If $shrext_cmds isn't set for some reason, fallback to ".so" suffix.
Timo Sirainen <tss@iki.fi>
parents: 7867
diff changeset
2482 if test "$MODULE_SUFFIX" = ""; then
fe465f0f86fb If $shrext_cmds isn't set for some reason, fallback to ".so" suffix.
Timo Sirainen <tss@iki.fi>
parents: 7867
diff changeset
2483 # too old libtool?
fe465f0f86fb If $shrext_cmds isn't set for some reason, fallback to ".so" suffix.
Timo Sirainen <tss@iki.fi>
parents: 7867
diff changeset
2484 MODULE_SUFFIX=.so
fe465f0f86fb If $shrext_cmds isn't set for some reason, fallback to ".so" suffix.
Timo Sirainen <tss@iki.fi>
parents: 7867
diff changeset
2485 fi
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2486 AC_DEFINE_UNQUOTED(MODULE_SUFFIX,"$MODULE_SUFFIX", [Dynamic module suffix])
7826
b63aa0ffe564 Use dynamic module suffix provided by libtool rather than hardcoded ".so".
Timo Sirainen <tss@iki.fi>
parents: 7823
diff changeset
2487 AC_SUBST(MODULE_SUFFIX)
1511
a4ad03c210af Check if dlopen is in libc too.
Timo Sirainen <tss@iki.fi>
parents: 1467
diff changeset
2488 fi
1150
18a2074a4d3d Support for dynamic authentication modules.
Timo Sirainen <tss@iki.fi>
parents: 1096
diff changeset
2489
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2490 have_nss=no
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2491 if test $want_nss != no; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2492 if test $have_modules != yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2493 if test $want_nss = yes; then
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2494 AC_ERROR([Can't build with NSS support: Dynamic modules not supported])
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2495 fi
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2496 else
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2497 AC_CACHE_CHECK([for NSS support],i_cv_have_nss,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2498 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2499 #include <nss.h>
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2500 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2501 enum nss_status status = NSS_STATUS_TRYAGAIN;
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2502 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2503 i_cv_have_nss=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2504 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2505 i_cv_have_nss=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2506 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2507 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2508 if test $i_cv_have_nss = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2509 AC_DEFINE(USERDB_NSS,, [Build with NSS module support])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2510 have_nss=yes
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2511 else
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2512 if test $want_nss = yes; then
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2513 AC_ERROR([Can't build with NSS support: nss.h not found or not usable])
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2514 fi
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2515 fi
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2516 fi
5870
c9b49ed99d28 Added userdb nss which currently supports glibc-compatible NSS modules.
Timo Sirainen <tss@iki.fi>
parents: 5859
diff changeset
2517 fi
c9b49ed99d28 Added userdb nss which currently supports glibc-compatible NSS modules.
Timo Sirainen <tss@iki.fi>
parents: 5859
diff changeset
2518
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2519 if test $have_nss = no; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2520 not_userdb="$not_userdb nss"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2521 else
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2522 userdb="$userdb nss"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2523 fi
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2524
1283
2d8af547a8b4 Added PostgreSQL support, patch by Alex Howansky
Timo Sirainen <tss@iki.fi>
parents: 1256
diff changeset
2525 AC_SUBST(AUTH_CFLAGS)
1284
71f61b6a0f02 cleanups
Timo Sirainen <tss@iki.fi>
parents: 1283
diff changeset
2526 AC_SUBST(AUTH_LIBS)
2754
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2527 AC_SUBST(SQL_CFLAGS)
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2528 AC_SUBST(SQL_LIBS)
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2529 AC_SUBST(MYSQL_CFLAGS)
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2530 AC_SUBST(MYSQL_LIBS)
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2531 AC_SUBST(PGSQL_CFLAGS)
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2532 AC_SUBST(PGSQL_LIBS)
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2533 AC_SUBST(SQLITE_CFLAGS)
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2534 AC_SUBST(SQLITE_LIBS)
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2535 AC_SUBST(CASSANDRA_CFLAGS)
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2536 AC_SUBST(CASSANDRA_LIBS)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2537
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
2538 AC_SUBST(DICT_LIBS)
15665
2c249941f9c2 dict: Added support for cdb backend.
Timo Sirainen <tss@iki.fi>
parents: 15646
diff changeset
2539 AC_SUBST(CDB_LIBS)
4517
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
2540 AC_SUBST(dict_drivers)
e661182eab75 Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4482
diff changeset
2541
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2542 dnl **
8572
9ec2882243a6 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8556
diff changeset
2543 dnl ** Endianess
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2544 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2545
8572
9ec2882243a6 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8556
diff changeset
2546 dnl At least Apple's gcc supports __BIG_ENDIAN__ and __LITTLE_ENDIAN__
9ec2882243a6 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8556
diff changeset
2547 dnl defines. Use them if possible to allow cross-compiling.
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2548 AC_CACHE_CHECK([if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined],i_cv_have___big_endian__,[
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2549 AC_TRY_COMPILE([
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2550 #if !(__BIG_ENDIAN__ || __LITTLE_ENDIAN__)
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2551 #error nope
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2552 #endif
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2553 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2554 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2555 i_cv_have___big_endian__=yes
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2556 ], [
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2557 i_cv_have___big_endian__=no
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2558 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2559 ])
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2560 if test $i_cv_have___big_endian__ = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2561 AC_DEFINE(WORDS_BIGENDIAN, __BIG_ENDIAN__, [Define if your CPU is big endian])
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2562 else
8572
9ec2882243a6 Try to use (Apple) gcc's __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros if possible.
Timo Sirainen <tss@iki.fi>
parents: 8556
diff changeset
2563 AC_C_BIGENDIAN
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2564 fi
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2565
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2566 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2567 dnl ** IPv6 support
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2568 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2569
6974
ec6cc297dd82 --with-package=yes now fails if package can't be used. --with-package=auto
Timo Sirainen <tss@iki.fi>
parents: 6919
diff changeset
2570 have_ipv6=no
9157
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2571 AC_MSG_CHECKING([for IPv6])
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2572 AC_CACHE_VAL(i_cv_type_in6_addr,
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2573 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2574 #include <sys/types.h>
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2575 #include <sys/socket.h>
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2576 #include <netinet/in.h>
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2577 #include <netdb.h>
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2578 #include <arpa/inet.h>]],
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2579 [[struct in6_addr i;]])],
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2580 [i_cv_type_in6_addr=yes],
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2581 [i_cv_type_in6_addr=no])])
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2582 if test $i_cv_type_in6_addr = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2583 AC_DEFINE(HAVE_IPV6,, [Build with IPv6 support])
9157
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2584 have_ipv6=yes
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2585 fi
9157
ee378a4ba6cd configure: Removed --disable-ipv6 parameter. There's really no point having it.
Timo Sirainen <tss@iki.fi>
parents: 9135
diff changeset
2586 AC_MSG_RESULT($i_cv_type_in6_addr)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2587
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2588 dnl **
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2589 dnl ** storage classes
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2590 dnl **
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2591
9017
1b586a2fee8b Build libdovecot.so and libdovecot-storage.so.
Timo Sirainen <tss@iki.fi>
parents: 9016
diff changeset
2592 maildir_libs='$(top_builddir)/src/lib-storage/index/maildir/libstorage_maildir.la'
1b586a2fee8b Build libdovecot.so and libdovecot-storage.so.
Timo Sirainen <tss@iki.fi>
parents: 9016
diff changeset
2593 mbox_libs='$(top_builddir)/src/lib-storage/index/mbox/libstorage_mbox.la'
9977
0bb321c347ae Split dbox (single-dbox) and mdbox (multi-dbox) into separate storage backends.
Timo Sirainen <tss@iki.fi>
parents: 9973
diff changeset
2594 dbox_common_libs='$(top_builddir)/src/lib-storage/index/dbox-common/libstorage_dbox_common.la'
11820
76ee1fa16012 Renamed "dbox" to "sdbox". Keep also dbox as an alias for it.
Timo Sirainen <tss@iki.fi>
parents: 11768
diff changeset
2595 sdbox_libs='$(top_builddir)/src/lib-storage/index/dbox-single/libstorage_dbox_single.la'
9977
0bb321c347ae Split dbox (single-dbox) and mdbox (multi-dbox) into separate storage backends.
Timo Sirainen <tss@iki.fi>
parents: 9973
diff changeset
2596 mdbox_libs='$(top_builddir)/src/lib-storage/index/dbox-multi/libstorage_dbox_multi.la'
9017
1b586a2fee8b Build libdovecot.so and libdovecot-storage.so.
Timo Sirainen <tss@iki.fi>
parents: 9016
diff changeset
2597 cydir_libs='$(top_builddir)/src/lib-storage/index/cydir/libstorage_cydir.la'
15380
7c75559cd8f6 Reverted 269104a0821b (Build imapc and pop3c always as plugins.)
Timo Sirainen <tss@iki.fi>
parents: 15379
diff changeset
2598 imapc_libs='$(top_builddir)/src/lib-storage/index/imapc/libstorage_imapc.la $(top_builddir)/src/lib-imap-client/libimap_client.la'
7c75559cd8f6 Reverted 269104a0821b (Build imapc and pop3c always as plugins.)
Timo Sirainen <tss@iki.fi>
parents: 15379
diff changeset
2599 pop3c_libs='$(top_builddir)/src/lib-storage/index/pop3c/libstorage_pop3c.la'
9017
1b586a2fee8b Build libdovecot.so and libdovecot-storage.so.
Timo Sirainen <tss@iki.fi>
parents: 9016
diff changeset
2600 raw_libs='$(top_builddir)/src/lib-storage/index/raw/libstorage_raw.la'
1b586a2fee8b Build libdovecot.so and libdovecot-storage.so.
Timo Sirainen <tss@iki.fi>
parents: 9016
diff changeset
2601 shared_libs='$(top_builddir)/src/lib-storage/index/shared/libstorage_shared.la'
8376
2d24b8b46308 $STORAGE_LIBS now contains all the libraries that libstorage needs.
Timo Sirainen <tss@iki.fi>
parents: 8354
diff changeset
2602
9017
1b586a2fee8b Build libdovecot.so and libdovecot-storage.so.
Timo Sirainen <tss@iki.fi>
parents: 9016
diff changeset
2603 CORE_LIBS='$(top_builddir)/src/lib-dovecot/libdovecot.la'
1b586a2fee8b Build libdovecot.so and libdovecot-storage.so.
Timo Sirainen <tss@iki.fi>
parents: 9016
diff changeset
2604 STORAGE_LIB='$(top_builddir)/src/lib-storage/libdovecot-storage.la'
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2605
9017
1b586a2fee8b Build libdovecot.so and libdovecot-storage.so.
Timo Sirainen <tss@iki.fi>
parents: 9016
diff changeset
2606 LINKED_STORAGE_LIBS=
12671
437e24ac6303 Fixed compiling with configure --with-storages when imapc wasn't listed.
Timo Sirainen <tss@iki.fi>
parents: 12617
diff changeset
2607
15167
0fa075f2e85a lib-storage: Added initial implementation for layout=index.
Timo Sirainen <tss@iki.fi>
parents: 15162
diff changeset
2608 mailbox_list_drivers="maildir imapdir fs index none shared"
11820
76ee1fa16012 Renamed "dbox" to "sdbox". Keep also dbox as an alias for it.
Timo Sirainen <tss@iki.fi>
parents: 11768
diff changeset
2609 have_sdbox=no
16896
e00ad71ee548 configure: Added mdbox_deleted storage.
Timo Sirainen <tss@iki.fi>
parents: 16824
diff changeset
2610 have_mdbox=no
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2611 for storage in $mail_storages; do
9017
1b586a2fee8b Build libdovecot.so and libdovecot-storage.so.
Timo Sirainen <tss@iki.fi>
parents: 9016
diff changeset
2612 LINKED_STORAGE_LIBS="$LINKED_STORAGE_LIBS `eval echo \\$${storage}_libs`"
11820
76ee1fa16012 Renamed "dbox" to "sdbox". Keep also dbox as an alias for it.
Timo Sirainen <tss@iki.fi>
parents: 11768
diff changeset
2613 if test $storage = sdbox; then
76ee1fa16012 Renamed "dbox" to "sdbox". Keep also dbox as an alias for it.
Timo Sirainen <tss@iki.fi>
parents: 11768
diff changeset
2614 have_sdbox=yes
76ee1fa16012 Renamed "dbox" to "sdbox". Keep also dbox as an alias for it.
Timo Sirainen <tss@iki.fi>
parents: 11768
diff changeset
2615 fi
16896
e00ad71ee548 configure: Added mdbox_deleted storage.
Timo Sirainen <tss@iki.fi>
parents: 16824
diff changeset
2616 if test $storage = mdbox; then
e00ad71ee548 configure: Added mdbox_deleted storage.
Timo Sirainen <tss@iki.fi>
parents: 16824
diff changeset
2617 have_mdbox=yes
e00ad71ee548 configure: Added mdbox_deleted storage.
Timo Sirainen <tss@iki.fi>
parents: 16824
diff changeset
2618 fi
11820
76ee1fa16012 Renamed "dbox" to "sdbox". Keep also dbox as an alias for it.
Timo Sirainen <tss@iki.fi>
parents: 11768
diff changeset
2619 if test $storage = sdbox || test $storage = mdbox; then
9977
0bb321c347ae Split dbox (single-dbox) and mdbox (multi-dbox) into separate storage backends.
Timo Sirainen <tss@iki.fi>
parents: 9973
diff changeset
2620 LINKED_STORAGE_LIBS="$LINKED_STORAGE_LIBS $dbox_common_libs"
0bb321c347ae Split dbox (single-dbox) and mdbox (multi-dbox) into separate storage backends.
Timo Sirainen <tss@iki.fi>
parents: 9973
diff changeset
2621 dbox_common_libs=""
0bb321c347ae Split dbox (single-dbox) and mdbox (multi-dbox) into separate storage backends.
Timo Sirainen <tss@iki.fi>
parents: 9973
diff changeset
2622 fi
15380
7c75559cd8f6 Reverted 269104a0821b (Build imapc and pop3c always as plugins.)
Timo Sirainen <tss@iki.fi>
parents: 15379
diff changeset
2623 if test $storage = imapc; then
7c75559cd8f6 Reverted 269104a0821b (Build imapc and pop3c always as plugins.)
Timo Sirainen <tss@iki.fi>
parents: 15379
diff changeset
2624 mailbox_list_drivers="$mailbox_list_drivers imapc"
7c75559cd8f6 Reverted 269104a0821b (Build imapc and pop3c always as plugins.)
Timo Sirainen <tss@iki.fi>
parents: 15379
diff changeset
2625 fi
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2626 done
15380
7c75559cd8f6 Reverted 269104a0821b (Build imapc and pop3c always as plugins.)
Timo Sirainen <tss@iki.fi>
parents: 15379
diff changeset
2627 LINKED_STORAGE_LDADD=
9017
1b586a2fee8b Build libdovecot.so and libdovecot-storage.so.
Timo Sirainen <tss@iki.fi>
parents: 9016
diff changeset
2628 AC_SUBST(LINKED_STORAGE_LIBS)
15380
7c75559cd8f6 Reverted 269104a0821b (Build imapc and pop3c always as plugins.)
Timo Sirainen <tss@iki.fi>
parents: 15379
diff changeset
2629 AC_SUBST(LINKED_STORAGE_LDADD)
12671
437e24ac6303 Fixed compiling with configure --with-storages when imapc wasn't listed.
Timo Sirainen <tss@iki.fi>
parents: 12617
diff changeset
2630 AC_SUBST(mailbox_list_drivers)
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2631 AC_DEFINE_UNQUOTED(MAIL_STORAGES, "$mail_storages", [List of compiled in mail storages])
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2632
11820
76ee1fa16012 Renamed "dbox" to "sdbox". Keep also dbox as an alias for it.
Timo Sirainen <tss@iki.fi>
parents: 11768
diff changeset
2633 if test $have_sdbox = yes; then
76ee1fa16012 Renamed "dbox" to "sdbox". Keep also dbox as an alias for it.
Timo Sirainen <tss@iki.fi>
parents: 11768
diff changeset
2634 # create alias for sdbox
76ee1fa16012 Renamed "dbox" to "sdbox". Keep also dbox as an alias for it.
Timo Sirainen <tss@iki.fi>
parents: 11768
diff changeset
2635 mail_storages="$mail_storages dbox"
76ee1fa16012 Renamed "dbox" to "sdbox". Keep also dbox as an alias for it.
Timo Sirainen <tss@iki.fi>
parents: 11768
diff changeset
2636 fi
16896
e00ad71ee548 configure: Added mdbox_deleted storage.
Timo Sirainen <tss@iki.fi>
parents: 16824
diff changeset
2637 if test $have_mdbox = yes; then
e00ad71ee548 configure: Added mdbox_deleted storage.
Timo Sirainen <tss@iki.fi>
parents: 16824
diff changeset
2638 mail_storages="$mail_storages mdbox_deleted"
e00ad71ee548 configure: Added mdbox_deleted storage.
Timo Sirainen <tss@iki.fi>
parents: 16824
diff changeset
2639 fi
11820
76ee1fa16012 Renamed "dbox" to "sdbox". Keep also dbox as an alias for it.
Timo Sirainen <tss@iki.fi>
parents: 11768
diff changeset
2640
1404
54015ae11177 --with-storage=maildir,mbox can now be used to compile in only the wanted
Timo Sirainen <tss@iki.fi>
parents: 1403
diff changeset
2641 dnl **
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2642 dnl ** Shared libraries usage
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2643 dnl **
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2644
21575
f6d27a985066 lib-oauth2: Add support library for OAUTH2
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21531
diff changeset
2645 LIBDOVECOT_LA_LIBS='$(top_builddir)/src/lib-dict-extra/libdict_extra.la $(top_builddir)/src/lib-oauth2/liboauth2.la $(top_builddir)/src/lib-program-client/libprogram_client.la $(top_builddir)/src/lib-master/libmaster.la $(top_builddir)/src/lib-settings/libsettings.la $(top_builddir)/src/lib-stats/libstats.la $(top_builddir)/src/lib-http/libhttp.la $(top_builddir)/src/lib-fs/libfs.la $(top_builddir)/src/lib-dict/libdict.la $(top_builddir)/src/lib-smtp/libsmtp.la $(top_builddir)/src/lib-dns/libdns.la $(top_builddir)/src/lib-imap/libimap.la $(top_builddir)/src/lib-mail/libmail.la $(top_builddir)/src/lib-sasl/libsasl.la $(top_builddir)/src/lib-auth/libauth.la $(top_builddir)/src/lib-charset/libcharset.la $(top_builddir)/src/lib-ssl-iostream/libssl_iostream.la $(top_builddir)/src/lib-dcrypt/libdcrypt.la $(top_builddir)/src/lib-test/libtest.la $(top_builddir)/src/lib/liblib.la'
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2646 if test "$want_shared_libs" = "yes"; then
10091
6a1c96577476 Makefiles: Separated LIBDOVECOT and LIBDOVECOT_DEPS.
Timo Sirainen <tss@iki.fi>
parents: 10052
diff changeset
2647 LIBDOVECOT_DEPS='$(top_builddir)/src/lib-dovecot/libdovecot.la'
15960
1ad404473d81 configure: Fixed plugins when compiling --with-shared-libs
Timo Sirainen <tss@iki.fi>
parents: 15957
diff changeset
2648 LIBDOVECOT="$LIBDOVECOT_DEPS \$(MODULE_LIBS)"
14591
07e6ca397a72 Created lib-imap-storage for IMAP-specific functionality that uses lib-storage.
Stephan Bosch <stephan@rename-it.nl>
parents: 14576
diff changeset
2649 LIBDOVECOT_STORAGE_DEPS='$(top_builddir)/src/lib-storage/libdovecot-storage.la $(top_builddir)/src/lib-imap-storage/libimap-storage.la'
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2650 LIBDOVECOT_LOGIN='$(top_builddir)/src/login-common/libdovecot-login.la'
11370
f0141862bdca configure: --without-shared-libs should use static liblda for lda/lmtp.
Timo Sirainen <tss@iki.fi>
parents: 11356
diff changeset
2651 LIBDOVECOT_LDA='$(top_builddir)/src/lib-lda/libdovecot-lda.la'
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2652 else
20067
7811ce869375 lib-dovecot: Avoid duplication of listing *.la in both Makefile.am and configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20065
diff changeset
2653 LIBDOVECOT_DEPS="$LIBDOVECOT_LA_LIBS"
15928
217fb4ca9b5a MODULE_LIBS is now part of LIBDOVECOT. No need to explicitly link it everywhere.
Timo Sirainen <tss@iki.fi>
parents: 15927
diff changeset
2654 LIBDOVECOT="$LIBDOVECOT_DEPS \$(LIBICONV) \$(MODULE_LIBS)"
18247
3ac5933082c4 Link all libstorage.la dependencies into the library itself instead.
Timo Sirainen <tss@iki.fi>
parents: 18239
diff changeset
2655 LIBDOVECOT_STORAGE_DEPS='$(top_builddir)/src/lib-storage/libstorage.la'
15379
68d21f872fd7 lib-ssl-iostream now dynamically loads openssl library instead of linking to it.
Timo Sirainen <tss@iki.fi>
parents: 15357
diff changeset
2656 LIBDOVECOT_LOGIN='$(top_builddir)/src/login-common/liblogin.la'
11370
f0141862bdca configure: --without-shared-libs should use static liblda for lda/lmtp.
Timo Sirainen <tss@iki.fi>
parents: 11356
diff changeset
2657 LIBDOVECOT_LDA='$(top_builddir)/src/lib-lda/liblda.la'
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2658 fi
20031
9271871171f7 configure: Fixed building lib-ldap / dict-ldap --with-ldap=plugin
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 19997
diff changeset
2659 if test $want_ldap != no; then
19997
ebf926e29527 configure: Add lib-ldap
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 19518
diff changeset
2660 LIBDOVECOT_LDAP='$(top_builddir)/src/lib-ldap/libdovecot-ldap.la'
ebf926e29527 configure: Add lib-ldap
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 19518
diff changeset
2661 else
ebf926e29527 configure: Add lib-ldap
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 19518
diff changeset
2662 LIBDOVECOT_LDAP=''
ebf926e29527 configure: Add lib-ldap
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 19518
diff changeset
2663 fi
18247
3ac5933082c4 Link all libstorage.la dependencies into the library itself instead.
Timo Sirainen <tss@iki.fi>
parents: 18239
diff changeset
2664 LIBDOVECOT_STORAGE="$LIBDOVECOT_STORAGE_DEPS"
17801
3675d156b309 Install libdovecot-dsync.so library, which can be used separately.
Timo Sirainen <tss@iki.fi>
parents: 17664
diff changeset
2665 LIBDOVECOT_DSYNC='$(top_builddir)/src/doveadm/dsync/libdovecot-dsync.la'
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2666 LIBDOVECOT_SQL='$(top_builddir)/src/lib-sql/libsql.la'
19509
9e4b2b433540 configure: Minor cleanup - avoid code duplication.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 19508
diff changeset
2667 LIBDOVECOT_COMPRESS='$(top_builddir)/src/lib-compression/libcompression.la'
19508
9f1eea96a350 dovecot-config: Fixed setting LIBDOVECOT_LIBFTS[_DEPS]
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 19482
diff changeset
2668 LIBDOVECOT_LIBFTS='$(top_builddir)/src/lib-fts/libfts.la'
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2669 AC_SUBST(LIBDOVECOT)
20067
7811ce869375 lib-dovecot: Avoid duplication of listing *.la in both Makefile.am and configure
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20065
diff changeset
2670 AC_SUBST(LIBDOVECOT_LA_LIBS)
10091
6a1c96577476 Makefiles: Separated LIBDOVECOT and LIBDOVECOT_DEPS.
Timo Sirainen <tss@iki.fi>
parents: 10052
diff changeset
2671 AC_SUBST(LIBDOVECOT_DEPS)
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2672 AC_SUBST(LIBDOVECOT_STORAGE)
14285
e540404debb7 Makefile: Link with SSL_LIBS whenever linking libssl_iostream.la
Timo Sirainen <tss@iki.fi>
parents: 14261
diff changeset
2673 AC_SUBST(LIBDOVECOT_STORAGE_DEPS)
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2674 AC_SUBST(LIBDOVECOT_LOGIN)
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2675 AC_SUBST(LIBDOVECOT_SQL)
14739
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
2676 AC_SUBST(LIBDOVECOT_COMPRESS)
17801
3675d156b309 Install libdovecot-dsync.so library, which can be used separately.
Timo Sirainen <tss@iki.fi>
parents: 17664
diff changeset
2677 AC_SUBST(LIBDOVECOT_DSYNC)
11186
1319fa7a7266 lib-lda is now an installed shared library.
Timo Sirainen <tss@iki.fi>
parents: 11120
diff changeset
2678 AC_SUBST(LIBDOVECOT_LDA)
19997
ebf926e29527 configure: Add lib-ldap
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 19518
diff changeset
2679 AC_SUBST(LIBDOVECOT_LDAP)
19378
ea447bc283e1 dovecot-config: Added LIBFTS.
Teemu Huovila <teemu.huovila@dovecot.fi>
parents: 19279
diff changeset
2680 AC_SUBST(LIBDOVECOT_LIBFTS)
ea447bc283e1 dovecot-config: Added LIBFTS.
Teemu Huovila <teemu.huovila@dovecot.fi>
parents: 19279
diff changeset
2681 AC_SUBST(LIBDOVECOT_LIBFTS_DEPS)
9104
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2682
c6d306772f4e Added configure --without-shared-libs to link built binaries against static libraries.
Timo Sirainen <tss@iki.fi>
parents: 9092
diff changeset
2683 dnl **
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2684 dnl ** SQL drivers
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2685 dnl **
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2686
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2687 build_pgsql=no
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2688 build_mysql=no
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2689 build_sqlite=no
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2690 build_cassandra=no
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2691 for driver in $sql_drivers; do
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2692 if test "$driver" = "pgsql"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2693 AC_DEFINE(BUILD_PGSQL,, [Built-in PostgreSQL support])
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2694 build_pgsql=yes
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2695 elif test "$driver" = "mysql"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2696 AC_DEFINE(BUILD_MYSQL,, [Built-in MySQL support])
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2697 build_mysql=yes
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2698 elif test "$driver" = "sqlite"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2699 AC_DEFINE(BUILD_SQLITE,, [Built-in SQLite support])
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2700 build_sqlite=yes
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2701 elif test "$driver" = "cassandra"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2702 AC_DEFINE(BUILD_CASSANDRA,, [Built-in Cassandra support])
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2703 build_cassandra=yes
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2704 fi
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2705 done
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2706 if test $build_pgsql = no; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2707 not_sql_drivers="$not_sql_drivers pgsql"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2708 fi
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2709 if test $build_mysql = no; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2710 not_sql_drivers="$not_sql_drivers mysql"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2711 fi
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2712 if test $build_sqlite = no; then
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2713 not_sql_drivers="$not_sql_drivers sqlite"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
2714 fi
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2715 if test $build_cassandra = no; then
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2716 not_sql_drivers="$not_sql_drivers cassandra"
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2717 fi
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2718
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2719 AC_SUBST(sql_drivers)
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2720 AM_CONDITIONAL(BUILD_PGSQL, test "$build_pgsql" = "yes")
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2721 AM_CONDITIONAL(BUILD_MYSQL, test "$build_mysql" = "yes")
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
2722 AM_CONDITIONAL(BUILD_SQLITE, test "$build_sqlite" = "yes")
18640
3725c601dbaf lib-sql: Added support for Cassandra CQL as lib-sql backend.
Timo Sirainen <tss@iki.fi>
parents: 18621
diff changeset
2723 AM_CONDITIONAL(BUILD_CASSANDRA, test "$build_cassandra" = "yes")
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
2724 AM_CONDITIONAL(SQL_PLUGINS, test "$want_sql" = "plugin")
3943
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2725
cbe5c6772e0d Added support for dynamically building SQL drivers.
Timo Sirainen <tss@iki.fi>
parents: 3934
diff changeset
2726 dnl **
3969
884da753caba If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents: 3948
diff changeset
2727 dnl ** Plugins
884da753caba If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents: 3948
diff changeset
2728 dnl **
884da753caba If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents: 3948
diff changeset
2729
14739
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
2730 COMPRESS_LIBS=
8090
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2731 if test "$want_zlib" != "no"; then
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2732 AC_CHECK_HEADER(zlib.h, [
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2733 have_zlib=yes
14739
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
2734 have_compress_lib=yes
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2735 AC_DEFINE(HAVE_ZLIB,, [Define if you have zlib library])
14739
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
2736 COMPRESS_LIBS="$COMPRESS_LIBS -lz"
8090
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2737 ], [
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2738 if test "$want_zlib" = "yes"; then
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2739 AC_ERROR([Can't build with zlib support: zlib.h not found])
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2740 fi
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2741 ])
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2742 fi
3969
884da753caba If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents: 3948
diff changeset
2743
8090
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2744 if test "$want_bzlib" != "no"; then
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2745 AC_CHECK_HEADER(bzlib.h, [
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2746 AC_CHECK_LIB(bz2, BZ2_bzdopen, [
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2747 have_bzlib=yes
14739
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
2748 have_compress_lib=yes
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2749 AC_DEFINE(HAVE_BZLIB,, [Define if you have bzlib library])
14739
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
2750 COMPRESS_LIBS="$COMPRESS_LIBS -lbz2"
8090
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2751 ], [
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2752 if test "$want_bzlib" = "yes"; then
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2753 AC_ERROR([Can't build with bzlib support: libbz2 not found])
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2754 fi
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2755 ])
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2756 ], [
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2757 if test "$want_bzlib" = "yes"; then
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2758 AC_ERROR([Can't build with bzlib support: bzlib.h not found])
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2759 fi
8046
8afc9ddd723e Check that libbz2 has correct functions. Old versions had different names.
Timo Sirainen <tss@iki.fi>
parents: 8022
diff changeset
2760 ])
8090
75b1f16cba72 Added --with-zlib and --with-bzlib configure options.
Timo Sirainen <tss@iki.fi>
parents: 8076
diff changeset
2761 fi
17028
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2762
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2763 if test "$want_lzma" != "no"; then
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2764 AC_CHECK_HEADER(lzma.h, [
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2765 AC_CHECK_LIB(lzma, lzma_stream_decoder, [
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2766 have_lzma=yes
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2767 have_compress_lib=yes
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2768 AC_DEFINE(HAVE_LZMA,, [Define if you have lzma library])
17028
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2769 COMPRESS_LIBS="$COMPRESS_LIBS -llzma"
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2770 ], [
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2771 if test "$want_lzma" = "yes"; then
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2772 AC_ERROR([Can't build with lzma support: liblzma not found])
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2773 fi
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2774 ])
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2775 ], [
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2776 if test "$want_lzma" = "yes"; then
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2777 AC_ERROR([Can't build with lzma support: lzma.h not found])
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2778 fi
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2779 ])
81e486aacbc7 lib-compression: Added support for liblzma (xz)
Timo Sirainen <tss@iki.fi>
parents: 17000
diff changeset
2780 fi
14739
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
2781 AC_SUBST(COMPRESS_LIBS)
17104
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2782
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2783 if test "$want_lz4" != "no"; then
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2784 AC_CHECK_HEADER(lz4.h, [
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2785 AC_CHECK_LIB(lz4, LZ4_compress, [
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2786 have_lz4=yes
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2787 have_compress_lib=yes
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2788 AC_DEFINE(HAVE_LZ4,, [Define if you have lz4 library])
17104
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2789 COMPRESS_LIBS="$COMPRESS_LIBS -llz4"
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2790 ], [
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2791 if test "$want_lz4" = "yes"; then
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2792 AC_ERROR([Can't build with lz4 support: liblz4 not found])
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2793 fi
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2794 ])
21359
3ebc6467c1a9 lib-compression: use LZ4_compress_default if can
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
parents: 21343
diff changeset
2795 AC_CHECK_LIB(lz4, LZ4_compress_default, [
3ebc6467c1a9 lib-compression: use LZ4_compress_default if can
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
parents: 21343
diff changeset
2796 AC_DEFINE(HAVE_LZ4_COMPRESS_DEFAULT,,
3ebc6467c1a9 lib-compression: use LZ4_compress_default if can
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
parents: 21343
diff changeset
2797 [Define if you have LZ4_compress_default])
3ebc6467c1a9 lib-compression: use LZ4_compress_default if can
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
parents: 21343
diff changeset
2798 ], [
3ebc6467c1a9 lib-compression: use LZ4_compress_default if can
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
parents: 21343
diff changeset
2799 ])
17104
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2800 ], [
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2801 if test "$want_lz4" = "yes"; then
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2802 AC_ERROR([Can't build with lz4 support: lz4.h not found])
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2803 fi
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2804 ])
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2805 fi
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2806 AC_SUBST(COMPRESS_LIBS)
fb4a0a84da50 lib-compression: Added initial support for LZ4
Timo Sirainen <tss@iki.fi>
parents: 17084
diff changeset
2807
14739
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
2808 AM_CONDITIONAL(BUILD_ZLIB_PLUGIN, test "$have_compress_lib" = "yes")
7981
bb9d3aabcb61 zlib plugin supports now bzip2 also.
Timo Sirainen <tss@iki.fi>
parents: 7958
diff changeset
2809
6177
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2810 RPCGEN=${RPCGEN-rpcgen}
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2811 if ! $RPCGEN -c /dev/null > /dev/null; then
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2812 RPCGEN=
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2813 fi
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2814 AC_SUBST(RPCGEN)
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2815
6159
078d9dde99c8 Support for rquota with NFS mounts. Patch by HTK NetCommunication Oy.
Timo Sirainen <tss@iki.fi>
parents: 6111
diff changeset
2816 have_rquota=no
6177
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2817 if test -f /usr/include/rpcsvc/rquota.x && test -n "$RPCGEN"; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2818 AC_DEFINE(HAVE_RQUOTA,, [Define if you wish to retrieve quota of NFS mounted mailboxes])
6159
078d9dde99c8 Support for rquota with NFS mounts. Patch by HTK NetCommunication Oy.
Timo Sirainen <tss@iki.fi>
parents: 6111
diff changeset
2819 have_rquota=yes
6177
abec53314897 Build rquota_xdr.c with rpcgen from rquota.x.
Timo Sirainen <tss@iki.fi>
parents: 6159
diff changeset
2820 fi
6159
078d9dde99c8 Support for rquota with NFS mounts. Patch by HTK NetCommunication Oy.
Timo Sirainen <tss@iki.fi>
parents: 6111
diff changeset
2821 AM_CONDITIONAL(HAVE_RQUOTA, test "$have_rquota" = "yes")
078d9dde99c8 Support for rquota with NFS mounts. Patch by HTK NetCommunication Oy.
Timo Sirainen <tss@iki.fi>
parents: 6111
diff changeset
2822
15894
b3f890c4a41c quota-fs: Support NetBSD 6.0 libquota.
Timo Sirainen <tss@iki.fi>
parents: 15880
diff changeset
2823 QUOTA_LIBS=""
b3f890c4a41c quota-fs: Support NetBSD 6.0 libquota.
Timo Sirainen <tss@iki.fi>
parents: 15880
diff changeset
2824 AC_SEARCH_LIBS(quota_open, quota, [
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2825 AC_DEFINE(HAVE_QUOTA_OPEN,, [Define if you have quota_open()])
15894
b3f890c4a41c quota-fs: Support NetBSD 6.0 libquota.
Timo Sirainen <tss@iki.fi>
parents: 15880
diff changeset
2826 QUOTA_LIBS="-lquota"
b3f890c4a41c quota-fs: Support NetBSD 6.0 libquota.
Timo Sirainen <tss@iki.fi>
parents: 15880
diff changeset
2827 ])
b3f890c4a41c quota-fs: Support NetBSD 6.0 libquota.
Timo Sirainen <tss@iki.fi>
parents: 15880
diff changeset
2828 AC_SUBST(QUOTA_LIBS)
b3f890c4a41c quota-fs: Support NetBSD 6.0 libquota.
Timo Sirainen <tss@iki.fi>
parents: 15880
diff changeset
2829
13305
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2830 dnl
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2831 dnl ** Full text search
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2832 dnl
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2833
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2834 fts=" squat"
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2835 not_fts=""
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2836
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2837 have_solr=no
7990
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
2838 if test "$want_solr" != "no"; then
15755
b9b8286fd9fd fts-solr: Use built-in lib-http instead of libcurl. Removed libcurl dependency.
Stephan Bosch <stephan@rename-it.nl>
parents: 15665
diff changeset
2839 dnl need libexpat
b9b8286fd9fd fts-solr: Use built-in lib-http instead of libcurl. Removed libcurl dependency.
Stephan Bosch <stephan@rename-it.nl>
parents: 15665
diff changeset
2840 AC_CHECK_LIB(expat, XML_Parse, [
b9b8286fd9fd fts-solr: Use built-in lib-http instead of libcurl. Removed libcurl dependency.
Stephan Bosch <stephan@rename-it.nl>
parents: 15665
diff changeset
2841 AC_CHECK_HEADER(expat.h, [
b9b8286fd9fd fts-solr: Use built-in lib-http instead of libcurl. Removed libcurl dependency.
Stephan Bosch <stephan@rename-it.nl>
parents: 15665
diff changeset
2842 have_solr=yes
b9b8286fd9fd fts-solr: Use built-in lib-http instead of libcurl. Removed libcurl dependency.
Stephan Bosch <stephan@rename-it.nl>
parents: 15665
diff changeset
2843 fts="$fts solr"
7990
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
2844 ], [
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
2845 if test $want_solr = yes; then
15755
b9b8286fd9fd fts-solr: Use built-in lib-http instead of libcurl. Removed libcurl dependency.
Stephan Bosch <stephan@rename-it.nl>
parents: 15665
diff changeset
2846 AC_ERROR([Can't build with Solr support: expat.h not found])
7990
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
2847 fi
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
2848 ])
15755
b9b8286fd9fd fts-solr: Use built-in lib-http instead of libcurl. Removed libcurl dependency.
Stephan Bosch <stephan@rename-it.nl>
parents: 15665
diff changeset
2849 ], [
7990
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
2850 if test $want_solr = yes; then
15755
b9b8286fd9fd fts-solr: Use built-in lib-http instead of libcurl. Removed libcurl dependency.
Stephan Bosch <stephan@rename-it.nl>
parents: 15665
diff changeset
2851 AC_ERROR([Can't build with Solr support: libexpat not found])
7990
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
2852 fi
15755
b9b8286fd9fd fts-solr: Use built-in lib-http instead of libcurl. Removed libcurl dependency.
Stephan Bosch <stephan@rename-it.nl>
parents: 15665
diff changeset
2853 ])
7990
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
2854 fi
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
2855 AM_CONDITIONAL(BUILD_SOLR, test "$have_solr" = "yes")
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
2856
13305
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2857 have_lucene=no
13186
b099ac847f86 fts-lucene: Added initial support for language detection and stemming.
Timo Sirainen <tss@iki.fi>
parents: 13114
diff changeset
2858 if test "$want_lucene" = "yes"; then
15498
af5265e74b9e configure: Use pkg-config with clucene if available.
Timo Sirainen <tss@iki.fi>
parents: 15493
diff changeset
2859 PKG_CHECK_MODULES(CLUCENE, libclucene-core,, [
af5265e74b9e configure: Use pkg-config with clucene if available.
Timo Sirainen <tss@iki.fi>
parents: 15493
diff changeset
2860 # no pkg-config file for clucene. fallback to defaults.
af5265e74b9e configure: Use pkg-config with clucene if available.
Timo Sirainen <tss@iki.fi>
parents: 15493
diff changeset
2861 # FIXME: we should verify here that this actually works..
af5265e74b9e configure: Use pkg-config with clucene if available.
Timo Sirainen <tss@iki.fi>
parents: 15493
diff changeset
2862 CLUCENE_LIBS="-lclucene-shared -lclucene-core"
af5265e74b9e configure: Use pkg-config with clucene if available.
Timo Sirainen <tss@iki.fi>
parents: 15493
diff changeset
2863 ])
13305
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2864 have_lucene=yes
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2865 fts="$fts lucene"
13186
b099ac847f86 fts-lucene: Added initial support for language detection and stemming.
Timo Sirainen <tss@iki.fi>
parents: 13114
diff changeset
2866 fi
18412
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2867
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2868 if test $want_stemmer != no; then
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2869 AC_CHECK_LIB(stemmer, sb_stemmer_new, [
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2870 have_fts_stemmer=yes
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2871 AC_DEFINE(HAVE_FTS_STEMMER,, [Define if you want stemming support for FTS])
18412
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2872 ], [
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2873 if test $want_stemmer = yes; then
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2874 AC_ERROR([Can't build with stemmer support: libstemmer not found])
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2875 fi
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2876 ])
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2877 fi
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2878 AM_CONDITIONAL(BUILD_FTS_STEMMER, test "$have_fts_stemmer" = "yes")
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2879
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2880 if test $want_textcat != no; then
18413
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2881 if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists libexttextcat 2>/dev/null; then
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2882 PKG_CHECK_MODULES(LIBEXTTEXTCAT, libexttextcat)
18417
cf04173f3f69 lib-fts: Fixed default textcat datadir paths.
Timo Sirainen <tss@iki.fi>
parents: 18416
diff changeset
2883 TEXTCAT_DATADIR=`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2884 AC_DEFINE(HAVE_FTS_EXTTEXTCAT,, [Define if you want exttextcat support for FTS])
18416
b93306938a88 configure: Fixed linking with libexttextcat when it was found via pkg-config
Timo Sirainen <tss@iki.fi>
parents: 18414
diff changeset
2885 have_fts_exttextcat=yes
18418
e06740c8515a configure: Added Debian Wheezy workaround for finding textcat.h
Timo Sirainen <tss@iki.fi>
parents: 18417
diff changeset
2886 # Debian Wheezy workaround - LIBEXTTEXTCAT_CFLAGS include path is wrong:
e06740c8515a configure: Added Debian Wheezy workaround for finding textcat.h
Timo Sirainen <tss@iki.fi>
parents: 18417
diff changeset
2887 AC_CHECK_HEADERS(libexttextcat/textcat.h)
18413
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2888 else
18412
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2889 AC_CHECK_LIB(exttextcat, special_textcat_Init, [
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2890 have_fts_exttextcat=yes
18413
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2891 AC_CHECK_HEADERS(libexttextcat/textcat.h)
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2892 LIBEXTTEXTCAT_LIBS=-lexttextcat
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2893 AC_DEFINE(HAVE_FTS_EXTTEXTCAT,, [Define if you want exttextcat support for FTS])
18417
cf04173f3f69 lib-fts: Fixed default textcat datadir paths.
Timo Sirainen <tss@iki.fi>
parents: 18416
diff changeset
2894 TEXTCAT_DATADIR="/usr/share/libexttextcat"
18413
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2895 AC_SUBST(LIBEXTTEXTCAT_LIBS)
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2896 ], [
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2897 AC_CHECK_LIB(textcat, special_textcat_Init, [
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2898 have_fts_textcat=yes
18417
cf04173f3f69 lib-fts: Fixed default textcat datadir paths.
Timo Sirainen <tss@iki.fi>
parents: 18416
diff changeset
2899 TEXTCAT_DATADIR="/usr/share/libtextcat"
18413
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2900 AC_CHECK_HEADERS(libtextcat/textcat.h)
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2901 ])
18412
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2902 ])
18413
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2903 if test $want_textcat = yes && test "$have_fts_exttextcat" != yes && test "$have_fts_textcat" != yes; then
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2904 AC_ERROR([Can't build with textcat support: libtextcat or libexttextcat not found])
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2905 fi
68c5e0db61db configure: Fixed/improved finding and using libexttextcat.
Timo Sirainen <tss@iki.fi>
parents: 18412
diff changeset
2906 fi
18419
56228757382d configure: Fixed building without textcat.
Timo Sirainen <tss@iki.fi>
parents: 18418
diff changeset
2907 if test "$have_fts_exttextcat" = yes || test "$have_fts_textcat" = yes; then
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2908 AC_DEFINE(HAVE_FTS_TEXTCAT,, [Define if you want textcat support for FTS])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2909 AC_DEFINE_UNQUOTED(TEXTCAT_DATADIR, "$TEXTCAT_DATADIR", [Points to textcat pkgdatadir containing the language files])
18412
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2910 fi
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2911 fi
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2912 AM_CONDITIONAL(BUILD_FTS_TEXTCAT, test "$have_fts_textcat" = "yes")
1c516f905152 configure: Stemmer and textcat checks are now done even if CLucene isn't used.
Timo Sirainen <tss@iki.fi>
parents: 18396
diff changeset
2913 AM_CONDITIONAL(BUILD_FTS_EXTTEXTCAT, test "$have_fts_exttextcat" = "yes")
13186
b099ac847f86 fts-lucene: Added initial support for language detection and stemming.
Timo Sirainen <tss@iki.fi>
parents: 13114
diff changeset
2914
18439
b179bbd226e5 configure: s/normalizer/libicu/ since we it could be used for something else as well.
Timo Sirainen <tss@iki.fi>
parents: 18426
diff changeset
2915 if test "$want_icu" != "no"; then
18414
81e5b977e5c5 Initial import for lib-fts.
Timo Sirainen <tss@iki.fi>
parents: 18413
diff changeset
2916 if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists icu-i18n 2>/dev/null; then
18439
b179bbd226e5 configure: s/normalizer/libicu/ since we it could be used for something else as well.
Timo Sirainen <tss@iki.fi>
parents: 18426
diff changeset
2917 PKG_CHECK_MODULES(LIBICU, icu-i18n)
b179bbd226e5 configure: s/normalizer/libicu/ since we it could be used for something else as well.
Timo Sirainen <tss@iki.fi>
parents: 18426
diff changeset
2918 have_icu=yes
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2919 AC_DEFINE(HAVE_LIBICU,, [Define if you want ICU normalization support for FTS])
18439
b179bbd226e5 configure: s/normalizer/libicu/ since we it could be used for something else as well.
Timo Sirainen <tss@iki.fi>
parents: 18426
diff changeset
2920 elif test "$want_icu" = "yes"; then
b179bbd226e5 configure: s/normalizer/libicu/ since we it could be used for something else as well.
Timo Sirainen <tss@iki.fi>
parents: 18426
diff changeset
2921 AC_ERROR([Can't build with libicu support: libicu-i18n not found])
18414
81e5b977e5c5 Initial import for lib-fts.
Timo Sirainen <tss@iki.fi>
parents: 18413
diff changeset
2922 fi
81e5b977e5c5 Initial import for lib-fts.
Timo Sirainen <tss@iki.fi>
parents: 18413
diff changeset
2923 fi
18439
b179bbd226e5 configure: s/normalizer/libicu/ since we it could be used for something else as well.
Timo Sirainen <tss@iki.fi>
parents: 18426
diff changeset
2924 AM_CONDITIONAL(BUILD_LIBICU, test "$have_icu" = "yes")
18414
81e5b977e5c5 Initial import for lib-fts.
Timo Sirainen <tss@iki.fi>
parents: 18413
diff changeset
2925
22444
280d78e7fec8 apparmor: Add apparmor plugin
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21861
diff changeset
2926 DOVECOT_WANT_APPARMOR
280d78e7fec8 apparmor: Add apparmor plugin
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21861
diff changeset
2927
22447
7bc2a582673e apparmor: Add apparmor plugin
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 22444
diff changeset
2928 DOVECOT_WANT_APPARMOR
7bc2a582673e apparmor: Add apparmor plugin
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 22444
diff changeset
2929
13305
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2930 if test $have_lucene = no; then
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2931 not_fts="$not_fts lucene"
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2932 fi
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2933 if test $have_solr = no; then
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2934 not_fts="$not_fts solr"
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2935 fi
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
2936
3969
884da753caba If zlib.h isn't found, don't try to build the zlib plugin.
Timo Sirainen <tss@iki.fi>
parents: 3948
diff changeset
2937 dnl **
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents: 8601
diff changeset
2938 dnl ** Settings
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents: 8601
diff changeset
2939 dnl **
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents: 8601
diff changeset
2940
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents: 8601
diff changeset
2941 dnl get a list of setting .[ch] files, but list .h files first
15204
c30673b5ec1b config: Don't include lib-master/*.c files in all-settings.c
Timo Sirainen <tss@iki.fi>
parents: 15199
diff changeset
2942 FILES1=`find $srcdir/src -name '*settings.[[ch]]'|grep "$srcdir/src/lib-" | sed 's/^\(.*\)\(.\)$/\2 \1\2/' | grep -v 'lib-master.*c$' | sort -r | sed s/^..//`
10336
e18645b47984 config: Allow settings plugins to specify also new default services.
Timo Sirainen <tss@iki.fi>
parents: 10295
diff changeset
2943 FILES2=`find $srcdir/src -name '*settings.[[ch]]'|grep -v "$srcdir/src/lib-" | sed 's/^\(.*\)\(.\)$/\2 \1\2/' | grep -v all-settings | sort -r | sed s/^..//`
10702
dc6cf5f10602 configure: If libwrap isn't used, don't add its service to doveconf.
Timo Sirainen <tss@iki.fi>
parents: 10700
diff changeset
2944 SETTING_FILES=`echo $FILES1 $FILES2 | sed -e s,$srcdir/src,./src,g -e 's,./src,$(top_srcdir)/src,g'`
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents: 8601
diff changeset
2945 AC_SUBST(SETTING_FILES)
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents: 8601
diff changeset
2946
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents: 8601
diff changeset
2947 dnl **
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2948 dnl ** capabilities
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2949 dnl **
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2950
12235
b63b6ad01448 configure: Added IDLE to banner CAPABILITY to make Blackberry happy.
Timo Sirainen <tss@iki.fi>
parents: 12231
diff changeset
2951 dnl IDLE doesn't really belong to banner. It's there just to make Blackberries
b63b6ad01448 configure: Added IDLE to banner CAPABILITY to make Blackberry happy.
Timo Sirainen <tss@iki.fi>
parents: 12231
diff changeset
2952 dnl happy, because otherwise BIS server disables push email.
b63b6ad01448 configure: Added IDLE to banner CAPABILITY to make Blackberry happy.
Timo Sirainen <tss@iki.fi>
parents: 12231
diff changeset
2953 capability_banner="IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE"
18533
18b71db74d31 imap: Don't advertise SPECIAL-USE if there are no such mailboxes configured.
Timo Sirainen <tss@iki.fi>
parents: 18510
diff changeset
2954 capability="$capability_banner SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE"
18690
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2955 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability", [IMAP capabilities])
a2c3a0f671a6 configure: Use consistent quotation for AC_DEFINEs as per autoconf recommendations.
Matti Hamalainen <ccr@tnsp.org>
parents: 18682
diff changeset
2956 AC_DEFINE_UNQUOTED(CAPABILITY_BANNER_STRING, "$capability_banner", [IMAP capabilities advertised in banner])
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2957
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
2958 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
13666
3ecd119bd63b configure: Use libtool's -no-undefined flag instead of attempting it ourself.
Timo Sirainen <tss@iki.fi>
parents: 13554
diff changeset
2959 NOPLUGIN_LDFLAGS="-no-undefined"
12893
0be58f3930b2 Use -Wl,--as-needed -Wl,--no-undefined GNU ld flags for non-plugins.
Timo Sirainen <tss@iki.fi>
parents: 12887
diff changeset
2960 if test "$with_gnu_ld" = yes; then
13666
3ecd119bd63b configure: Use libtool's -no-undefined flag instead of attempting it ourself.
Timo Sirainen <tss@iki.fi>
parents: 13554
diff changeset
2961 NOPLUGIN_LDFLAGS="$NOPLUGIN_LDFLAGS -Wl,--as-needed"
12893
0be58f3930b2 Use -Wl,--as-needed -Wl,--no-undefined GNU ld flags for non-plugins.
Timo Sirainen <tss@iki.fi>
parents: 12887
diff changeset
2962 fi
13666
3ecd119bd63b configure: Use libtool's -no-undefined flag instead of attempting it ourself.
Timo Sirainen <tss@iki.fi>
parents: 13554
diff changeset
2963 LDFLAGS="\$(NOPLUGIN_LDFLAGS) $LDFLAGS"
3ecd119bd63b configure: Use libtool's -no-undefined flag instead of attempting it ourself.
Timo Sirainen <tss@iki.fi>
parents: 13554
diff changeset
2964 AC_SUBST(NOPLUGIN_LDFLAGS)
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
2965
20935
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20785
diff changeset
2966 DC_CC_WRAPPER
15205
b0c7d2f8a185 --without-shared-libs: Link Dovecot libraries with --whole-archive flag for binaries.
Timo Sirainen <tss@iki.fi>
parents: 15204
diff changeset
2967
7297
2cda05620383 Added support for autoconf versions older than 2.59c.
Timo Sirainen <tss@iki.fi>
parents: 7285
diff changeset
2968 if test "$docdir" = ""; then
2cda05620383 Added support for autoconf versions older than 2.59c.
Timo Sirainen <tss@iki.fi>
parents: 7285
diff changeset
2969 dnl docdir supported only by autoconf v2.59c and later
7298
86af79a203d7 Base docdir to datadir instead of datarootdir which doesn't exist in old
Timo Sirainen <tss@iki.fi>
parents: 7297
diff changeset
2970 docdir='${datadir}/doc/${PACKAGE_TARNAME}'
7297
2cda05620383 Added support for autoconf versions older than 2.59c.
Timo Sirainen <tss@iki.fi>
parents: 7285
diff changeset
2971 fi
2cda05620383 Added support for autoconf versions older than 2.59c.
Timo Sirainen <tss@iki.fi>
parents: 7285
diff changeset
2972 AC_SUBST(docdir)
2cda05620383 Added support for autoconf versions older than 2.59c.
Timo Sirainen <tss@iki.fi>
parents: 7285
diff changeset
2973
18239
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 18131
diff changeset
2974 DC_DOVECOT_TEST_WRAPPER
10014
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2975 AC_SUBST(abs_top_builddir)
e7f8f15f1c4c configure: Use cache for more checks.
Timo Sirainen <tss@iki.fi>
parents: 10001
diff changeset
2976
3782
c67f77647a6e Added kqueue notification support. Patch by Vaclav Haisman
Timo Sirainen <tss@iki.fi>
parents: 3780
diff changeset
2977 AC_CONFIG_HEADERS([config.h])
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
2978 AC_CONFIG_FILES([
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2979 Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2980 doc/Makefile
11644
be2b7d2901a0 doc: added manual pages
Pascal Volk <user@localhost.localdomain.org>
parents: 11530
diff changeset
2981 doc/man/Makefile
5441
9d36800df1ae Added documentation to doc/wiki/. autogen.sh downloads them from dovecot.org
Timo Sirainen <tss@iki.fi>
parents: 5375
diff changeset
2982 doc/wiki/Makefile
9842
e95135898a3c Split dovecot-example.conf to multiple files. Also it's now installed under docdir.
Timo Sirainen <tss@iki.fi>
parents: 9812
diff changeset
2983 doc/example-config/Makefile
e95135898a3c Split dovecot-example.conf to multiple files. Also it's now installed under docdir.
Timo Sirainen <tss@iki.fi>
parents: 9812
diff changeset
2984 doc/example-config/conf.d/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2985 src/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2986 src/lib/Makefile
2754
3c3ac12be307 Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
Timo Sirainen <tss@iki.fi>
parents: 2717
diff changeset
2987 src/lib-sql/Makefile
1702
43815588dd6b Moved client side code for auth process handling to lib-auth. Some other login process cleanups.
Timo Sirainen <tss@iki.fi>
parents: 1694
diff changeset
2988 src/lib-auth/Makefile
568
f2aa58c2afd0 SEARCH CHARSET support. Currently we do it through iconv() and only ASCII
Timo Sirainen <tss@iki.fi>
parents: 550
diff changeset
2989 src/lib-charset/Makefile
14739
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
2990 src/lib-compression/Makefile
20215
389c5094c2a8 lib-dcrypt: Initial implementation
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20095
diff changeset
2991 src/lib-dcrypt/Makefile
3737
d67092398377 Added dictionary API and implementation for SQL. It's meant for looking and
Timo Sirainen <tss@iki.fi>
parents: 3720
diff changeset
2992 src/lib-dict/Makefile
20065
50d86fbcfd28 Split parts of lib-dict into lib-dict-extra.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20037
diff changeset
2993 src/lib-dict-extra/Makefile
10615
8f9fc7fa7c73 Added dns-client service and library for doing async dns lookups.
Timo Sirainen <tss@iki.fi>
parents: 10600
diff changeset
2994 src/lib-dns/Makefile
12309
e3fe87b855ef Added lib-fs for simple filesystem accessing. Implemented POSIX, SiS and SiS-queue backends.
Timo Sirainen <tss@iki.fi>
parents: 12235
diff changeset
2995 src/lib-fs/Makefile
18414
81e5b977e5c5 Initial import for lib-fts.
Timo Sirainen <tss@iki.fi>
parents: 18413
diff changeset
2996 src/lib-fts/Makefile
15195
70305d850220 Adds HTTP URL parse support.
Stephan Bosch <stephan@rename-it.nl>
parents: 15167
diff changeset
2997 src/lib-http/Makefile
21575
f6d27a985066 lib-oauth2: Add support library for OAUTH2
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21531
diff changeset
2998 src/lib-oauth2/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2999 src/lib-imap/Makefile
14591
07e6ca397a72 Created lib-imap-storage for IMAP-specific functionality that uses lib-storage.
Stephan Bosch <stephan@rename-it.nl>
parents: 14576
diff changeset
3000 src/lib-imap-storage/Makefile
13554
743ebecc1224 Moved imapc-client into its own lib-imap-client library.
Timo Sirainen <tss@iki.fi>
parents: 13516
diff changeset
3001 src/lib-imap-client/Makefile
15066
d419aac7ab31 Added support for IMAP URLAUTH and URLAUTH=BINARY extensions
Stephan Bosch <stephan@rename-it.nl>
parents: 15005
diff changeset
3002 src/lib-imap-urlauth/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3003 src/lib-index/Makefile
9092
e4832f128738 Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents: 9091
diff changeset
3004 src/lib-lda/Makefile
19997
ebf926e29527 configure: Add lib-ldap
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 19518
diff changeset
3005 src/lib-ldap/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3006 src/lib-mail/Makefile
9059
94ecf8a8ed68 Added lib-master and mail-storage-service code that makes it easier to build new Dovecot binaries.
Timo Sirainen <tss@iki.fi>
parents: 9017
diff changeset
3007 src/lib-master/Makefile
2377
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents: 2369
diff changeset
3008 src/lib-ntlm/Makefile
20785
3c8e6a9835d8 lib-program-client: Add program-client from pigeonhole
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20623
diff changeset
3009 src/lib-program-client/Makefile
4798
c04189d77a59 Added OTP and S/KEY authentication mechanisms. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 4736
diff changeset
3010 src/lib-otp/Makefile
9017
1b586a2fee8b Build libdovecot.so and libdovecot-storage.so.
Timo Sirainen <tss@iki.fi>
parents: 9016
diff changeset
3011 src/lib-dovecot/Makefile
16486
1cbff0a8a849 Added initial libsasl for implementing client side SASL library.
Timo Sirainen <tss@iki.fi>
parents: 16377
diff changeset
3012 src/lib-sasl/Makefile
1058
3b8fb7bf7ecc Moved settings parsing to lib-settings.
Timo Sirainen <tss@iki.fi>
parents: 1057
diff changeset
3013 src/lib-settings/Makefile
21372
73f614573fb6 lib-lda: Moved LMTP client to lib-smtp.
Stephan Bosch <stephan.bosch@dovecot.fi>
parents: 21371
diff changeset
3014 src/lib-smtp/Makefile
12616
bd23d4e10fa1 Added lib-ssl-iostream for handling SSL connections more easily.
Timo Sirainen <tss@iki.fi>
parents: 12580
diff changeset
3015 src/lib-ssl-iostream/Makefile
18292
a9952ceeac61 stats process/plugin redesign to be more modular.
Timo Sirainen <tss@iki.fi>
parents: 18248
diff changeset
3016 src/lib-stats/Makefile
9258
665ea7a8d26e Tests are now run on "make check". Added initial tests for lib-index.
Timo Sirainen <tss@iki.fi>
parents: 9246
diff changeset
3017 src/lib-test/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3018 src/lib-storage/Makefile
4808
93bc9770f938 Initial code for separation of mailbox accessing and directory layout
Timo Sirainen <tss@iki.fi>
parents: 4798
diff changeset
3019 src/lib-storage/list/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3020 src/lib-storage/index/Makefile
12580
7dd1e45721ae Added initial implementation of "imapc" storage.
Timo Sirainen <tss@iki.fi>
parents: 12576
diff changeset
3021 src/lib-storage/index/imapc/Makefile
13880
d4c909d2306f lib-storage: Added initial support for pop3c backend.
Timo Sirainen <tss@iki.fi>
parents: 13875
diff changeset
3022 src/lib-storage/index/pop3c/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3023 src/lib-storage/index/maildir/Makefile
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3024 src/lib-storage/index/mbox/Makefile
9977
0bb321c347ae Split dbox (single-dbox) and mdbox (multi-dbox) into separate storage backends.
Timo Sirainen <tss@iki.fi>
parents: 9973
diff changeset
3025 src/lib-storage/index/dbox-common/Makefile
0bb321c347ae Split dbox (single-dbox) and mdbox (multi-dbox) into separate storage backends.
Timo Sirainen <tss@iki.fi>
parents: 9973
diff changeset
3026 src/lib-storage/index/dbox-multi/Makefile
0bb321c347ae Split dbox (single-dbox) and mdbox (multi-dbox) into separate storage backends.
Timo Sirainen <tss@iki.fi>
parents: 9973
diff changeset
3027 src/lib-storage/index/dbox-single/Makefile
5458
daca7ed634c0 Added a simple cydir mail storage backend. It trusts index files completely:
Timo Sirainen <tss@iki.fi>
parents: 5456
diff changeset
3028 src/lib-storage/index/cydir/Makefile
6748
d712370dfd14 Added raw storage for opening single-mail files/streams as mailboxes.
Timo Sirainen <tss@iki.fi>
parents: 6734
diff changeset
3029 src/lib-storage/index/raw/Makefile
8173
6dd0c6755afe Added initial support for shared mailboxes. Listing isn't supported yet.
Timo Sirainen <tss@iki.fi>
parents: 8161
diff changeset
3030 src/lib-storage/index/shared/Makefile
761
d3bd41a56309 First implementation of SORT extension. String comparing still not up to
Timo Sirainen <tss@iki.fi>
parents: 755
diff changeset
3031 src/lib-storage/register/Makefile
9235
2e2b957f1cca Implemented anvil service, which is used to implement mail_max_userip_connections.
Timo Sirainen <tss@iki.fi>
parents: 9204
diff changeset
3032 src/anvil/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3033 src/auth/Makefile
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents: 8601
diff changeset
3034 src/config/Makefile
10001
a02c1d9df1bf Moved doveadm to a separate directory and made it a bit more easily extensible.
Timo Sirainen <tss@iki.fi>
parents: 9985
diff changeset
3035 src/doveadm/Makefile
13875
4c827134997f Merged dsync into "doveadm dsync".
Timo Sirainen <tss@iki.fi>
parents: 13866
diff changeset
3036 src/doveadm/dsync/Makefile
9092
e4832f128738 Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents: 9091
diff changeset
3037 src/lda/Makefile
9159
6324a79d3ee1 Initial commit for v2.0 master rewrite. Several features are still missing.
Timo Sirainen <tss@iki.fi>
parents: 9158
diff changeset
3038 src/log/Makefile
9121
a957a6be4af5 Initial implementation of LMTP server. Master process doesn't yet execute it though.
Timo Sirainen <tss@iki.fi>
parents: 9104
diff changeset
3039 src/lmtp/Makefile
3779
e87a8db60d25 Added --with-docs parameter to specify if documentation should be installed.
Timo Sirainen <tss@iki.fi>
parents: 3762
diff changeset
3040 src/dict/Makefile
11321
5f350b5ff6d9 Added initial implementation of a director process (for NFS users).
Timo Sirainen <tss@iki.fi>
parents: 11274
diff changeset
3041 src/director/Makefile
10615
8f9fc7fa7c73 Added dns-client service and library for doing async dns lookups.
Timo Sirainen <tss@iki.fi>
parents: 10600
diff changeset
3042 src/dns/Makefile
13084
0faaceb2f83c Added "indexer" service, which uses worker processes to perform queued mailbox indexing.
Timo Sirainen <tss@iki.fi>
parents: 13072
diff changeset
3043 src/indexer/Makefile
13048
9127a988acb8 configure: Added missing ipc
Timo Sirainen <tss@iki.fi>
parents: 13025
diff changeset
3044 src/ipc/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3045 src/imap/Makefile
18996
64c73e6bd397 Added imap-hibernate process for gathering IDLEing imap processes.
Timo Sirainen <tss@iki.fi>
parents: 18980
diff changeset
3046 src/imap-hibernate/Makefile
1049
c41787e8c3f4 Moved common login process code to login-common, created pop3-login.
Timo Sirainen <tss@iki.fi>
parents: 1043
diff changeset
3047 src/imap-login/Makefile
15066
d419aac7ab31 Added support for IMAP URLAUTH and URLAUTH=BINARY extensions
Stephan Bosch <stephan@rename-it.nl>
parents: 15005
diff changeset
3048 src/imap-urlauth/Makefile
1049
c41787e8c3f4 Moved common login process code to login-common, created pop3-login.
Timo Sirainen <tss@iki.fi>
parents: 1043
diff changeset
3049 src/login-common/Makefile
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3050 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
3051 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
3052 src/pop3-login/Makefile
14261
14ff849dc266 Initial implementation of dsync-based replication.
Timo Sirainen <tss@iki.fi>
parents: 14244
diff changeset
3053 src/replication/Makefile
14ff849dc266 Initial implementation of dsync-based replication.
Timo Sirainen <tss@iki.fi>
parents: 14244
diff changeset
3054 src/replication/aggregator/Makefile
14ff849dc266 Initial implementation of dsync-based replication.
Timo Sirainen <tss@iki.fi>
parents: 14244
diff changeset
3055 src/replication/replicator/Makefile
9985
ea36bad4d9da Added ssl-params binary that login process uses to read SSL parameters.
Timo Sirainen <tss@iki.fi>
parents: 9977
diff changeset
3056 src/ssl-params/Makefile
13294
c51fbe64eae1 Initial implementation of statistics gathering daemon and plugins to feed it.
Timo Sirainen <tss@iki.fi>
parents: 13283
diff changeset
3057 src/stats/Makefile
1694
0fae24674a9a Separated rawlog into it's own binary.
Timo Sirainen <tss@iki.fi>
parents: 1669
diff changeset
3058 src/util/Makefile
3738
732b62dc1976 Added beginnings of plugin infrastructure. TODO: These could be optionally
Timo Sirainen <tss@iki.fi>
parents: 3737
diff changeset
3059 src/plugins/Makefile
4082
dcee3dadef51 Added acl.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4068
diff changeset
3060 src/plugins/acl/Makefile
8418
29b1ec15880a Added IMAP ACL commands with ability to modify ACLs.
Timo Sirainen <tss@iki.fi>
parents: 8398
diff changeset
3061 src/plugins/imap-acl/Makefile
8295
f40ebb033a1b Added autocreate plugin.
Timo Sirainen <tss@iki.fi>
parents: 8248
diff changeset
3062 src/plugins/autocreate/Makefile
20315
21366617ffe2 ldap: Fix cyclic dependency
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20216
diff changeset
3063 src/plugins/dict-ldap/Makefile
4523
99699cf9df43 Initial import of expire plugin code. Seems to work with at least one user. :)
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4517
diff changeset
3064 src/plugins/expire/Makefile
18620
7799886e017a Moved fs-compress to a separate plugin directory.
Timo Sirainen <tss@iki.fi>
parents: 18533
diff changeset
3065 src/plugins/fs-compress/Makefile
4609
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents: 4599
diff changeset
3066 src/plugins/fts/Makefile
4621
446646de0c4a --with-lucene now enables lucene full text search indexing. Note that using
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
3067 src/plugins/fts-lucene/Makefile
7990
662172573fe1 Initial code to support Apache Solr (Lucene indexing server).
Timo Sirainen <tss@iki.fi>
parents: 7983
diff changeset
3068 src/plugins/fts-solr/Makefile
4855
5bc593f1a8f6 Added "squat" full text search indexer backend. Its name and basic ideas
Timo Sirainen <tss@iki.fi>
parents: 4840
diff changeset
3069 src/plugins/fts-squat/Makefile
17664
122d512248e7 last-login plugin: Added missing configure and Makefile entries.
Timo Sirainen <tss@iki.fi>
parents: 17455
diff changeset
3070 src/plugins/last-login/Makefile
4913
dea1c8fa53f4 Added lazy expunge plugin.
Timo Sirainen <timo.sirainen@movial.fi>
parents: 4862
diff changeset
3071 src/plugins/lazy-expunge/Makefile
8297
0d1bd98a6387 Added listescape plugin.
Timo Sirainen <tss@iki.fi>
parents: 8295
diff changeset
3072 src/plugins/listescape/Makefile
17000
84ccfa053bcd Added mail-filter plugin.
Timo Sirainen <tss@iki.fi>
parents: 16987
diff changeset
3073 src/plugins/mail-filter/Makefile
5034
1b28e0434d85 Added mail_log plugin to log various mail operations. Currently it logs mail
Timo Sirainen <tss@iki.fi>
parents: 5009
diff changeset
3074 src/plugins/mail-log/Makefile
15137
f5bb9f6b304d Added mailbox-alias plugin.
Timo Sirainen <tss@iki.fi>
parents: 14989
diff changeset
3075 src/plugins/mailbox-alias/Makefile
9812
f751c23561f9 Added a notify plugin that can be used as a generic event catching framework by other plugins.
Timo Sirainen <tss@iki.fi>
parents: 9749
diff changeset
3076 src/plugins/notify/Makefile
22502
fc335480acb3 notify-status: Add notify-status plugin
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 22447
diff changeset
3077 src/plugins/notify-status/Makefile
19189
1afdeb1cae62 Added push-notification plugin
Michael M Slusarz <michael.slusarz@dovecot.fi>
parents: 19038
diff changeset
3078 src/plugins/push-notification/Makefile
14398
78317179b4af Added pop3-migration plugin for getting POP3 UIDLs from POP3 server.
Timo Sirainen <tss@iki.fi>
parents: 14357
diff changeset
3079 src/plugins/pop3-migration/Makefile
3738
732b62dc1976 Added beginnings of plugin infrastructure. TODO: These could be optionally
Timo Sirainen <tss@iki.fi>
parents: 3737
diff changeset
3080 src/plugins/quota/Makefile
18668
f5749f22276b Added quota-clone plugin.
Timo Sirainen <tss@iki.fi>
parents: 18657
diff changeset
3081 src/plugins/quota-clone/Makefile
3738
732b62dc1976 Added beginnings of plugin infrastructure. TODO: These could be optionally
Timo Sirainen <tss@iki.fi>
parents: 3737
diff changeset
3082 src/plugins/imap-quota/Makefile
14261
14ff849dc266 Initial implementation of dsync-based replication.
Timo Sirainen <tss@iki.fi>
parents: 14244
diff changeset
3083 src/plugins/replication/Makefile
12446
7446b066fc75 Replaced broken mbox-snarf plugin with a more generic snarf plugin.
Timo Sirainen <tss@iki.fi>
parents: 12443
diff changeset
3084 src/plugins/snarf/Makefile
13294
c51fbe64eae1 Initial implementation of statistics gathering daemon and plugins to feed it.
Timo Sirainen <tss@iki.fi>
parents: 13283
diff changeset
3085 src/plugins/stats/Makefile
c51fbe64eae1 Initial implementation of statistics gathering daemon and plugins to feed it.
Timo Sirainen <tss@iki.fi>
parents: 13283
diff changeset
3086 src/plugins/imap-stats/Makefile
3738
732b62dc1976 Added beginnings of plugin infrastructure. TODO: These could be optionally
Timo Sirainen <tss@iki.fi>
parents: 3737
diff changeset
3087 src/plugins/trash/Makefile
7663
8fc919084252 Added initial support for virtual mailboxes.
Timo Sirainen <tss@iki.fi>
parents: 7391
diff changeset
3088 src/plugins/virtual/Makefile
20392
596b61c6a86c Added welcome plugin.
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20315
diff changeset
3089 src/plugins/welcome/Makefile
3800
68e7519ebd90 Added zlib plugin
Timo Sirainen <tss@iki.fi>
parents: 3786
diff changeset
3090 src/plugins/zlib/Makefile
10699
29f5567e0a9a Added imap-zlib plugin for enabling COMPRESS=DEFLATE extension.
Timo Sirainen <tss@iki.fi>
parents: 10647
diff changeset
3091 src/plugins/imap-zlib/Makefile
21233
fa9a9c236232 mail-crypt: Add mail-crypt plugin
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21143
diff changeset
3092 src/plugins/mail-crypt/Makefile
21861
e57b7745e081 var-expand-crypt: Encryption/decryption support for var-expand
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21705
diff changeset
3093 src/plugins/var-expand-crypt/Makefile
22444
280d78e7fec8 apparmor: Add apparmor plugin
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 21861
diff changeset
3094 src/plugins/apparmor/Makefile
1418
c36d18766a35 0.99.9.1 released. Added redhat spec file.
Timo Sirainen <tss@iki.fi>
parents: 1410
diff changeset
3095 stamp.h
4343
407e6c620d70 dovecot-config now contains module_dir
Timo Sirainen <tss@iki.fi>
parents: 4300
diff changeset
3096 dovecot-config.in])
1096
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
3097
2796
fb7f862194b5 Upgrades to autoconf 2.5 and automake >1.4.
Timo Sirainen <tss@iki.fi>
parents: 2784
diff changeset
3098 AC_OUTPUT
1096
2ea48622afbc Building in separate directory didn't work
Timo Sirainen <tss@iki.fi>
parents: 1089
diff changeset
3099
8517
451e3cf38290 configure: Handle --with-*=* consistently and give better error messages.
Timo Sirainen <tss@iki.fi>
parents: 8489
diff changeset
3100 if test "$want_sql" = "plugin"; then
6194
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
3101 sql_drivers="$sql_drivers (plugins)"
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
3102 fi
0d86bb9cf286 Added --enable-sql-plugins to build SQL drivers as plugins. Based on patch
Timo Sirainen <tss@iki.fi>
parents: 6177
diff changeset
3103
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3104 not_passdb=`echo "$not_passdb"|sed 's/ / -/g'`
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3105 not_userdb=`echo "$not_userdb"|sed 's/ / -/g'`
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3106 not_sql_drivers=`echo "$not_sql_drivers"|sed 's/ / -/g'`
13305
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
3107 not_fts=`echo "$not_fts"|sed 's/ / -/g'`
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3108
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3109 echo
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3110 echo "Install prefix . : $prefix"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3111 echo "File offsets ... : ${offt_bits}bit"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3112 echo "I/O polling .... : $ioloop"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3113 echo "I/O notifys .... : $have_notify"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3114 echo "SSL ............ : $have_ssl"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3115 echo "GSSAPI ......... : $have_gssapi"
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3116 echo "passdbs ........ :$passdb"
20623
d961f2a542d7 configure: Fix dcrypt build
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20496
diff changeset
3117 echo "dcrypt ..........: $build_dcrypt_openssl"
20496
bb728a4cbbde dcrypt: Fix linkage into libdovecot.so
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20493
diff changeset
3118
9410
ab69375b8422 configure: If all passdb/userdb/sql drivers are compiled, don't print an empty line for them.
Timo Sirainen <tss@iki.fi>
parents: 9329
diff changeset
3119 if test "$not_passdb" != ""; then
ab69375b8422 configure: If all passdb/userdb/sql drivers are compiled, don't print an empty line for them.
Timo Sirainen <tss@iki.fi>
parents: 9329
diff changeset
3120 echo " :$not_passdb"
ab69375b8422 configure: If all passdb/userdb/sql drivers are compiled, don't print an empty line for them.
Timo Sirainen <tss@iki.fi>
parents: 9329
diff changeset
3121 fi
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3122 echo "userdbs ........ :$userdb"
9410
ab69375b8422 configure: If all passdb/userdb/sql drivers are compiled, don't print an empty line for them.
Timo Sirainen <tss@iki.fi>
parents: 9329
diff changeset
3123 if test "$not_userdb" != ""; then
ab69375b8422 configure: If all passdb/userdb/sql drivers are compiled, don't print an empty line for them.
Timo Sirainen <tss@iki.fi>
parents: 9329
diff changeset
3124 echo " :$not_userdb"
ab69375b8422 configure: If all passdb/userdb/sql drivers are compiled, don't print an empty line for them.
Timo Sirainen <tss@iki.fi>
parents: 9329
diff changeset
3125 fi
9246
df8b1ae676fe configure: Show also list of disabled passdbs/userdbs/sql drivers.
Timo Sirainen <tss@iki.fi>
parents: 9245
diff changeset
3126 echo "SQL drivers .... :$sql_drivers"
9410
ab69375b8422 configure: If all passdb/userdb/sql drivers are compiled, don't print an empty line for them.
Timo Sirainen <tss@iki.fi>
parents: 9329
diff changeset
3127 if test "$not_sql_drivers" != ""; then
ab69375b8422 configure: If all passdb/userdb/sql drivers are compiled, don't print an empty line for them.
Timo Sirainen <tss@iki.fi>
parents: 9329
diff changeset
3128 echo " :$not_sql_drivers"
ab69375b8422 configure: If all passdb/userdb/sql drivers are compiled, don't print an empty line for them.
Timo Sirainen <tss@iki.fi>
parents: 9329
diff changeset
3129 fi
13305
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
3130 echo "Full text search :$fts"
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
3131 if test "$not_fts" != ""; then
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
3132 echo " :$not_fts"
57aeda3d94ad configure: Added --with-stemmer and output which fts backends are compiled.
Timo Sirainen <tss@iki.fi>
parents: 13294
diff changeset
3133 fi