annotate dovecot.m4 @ 22664:fea53c2725c0

director: Fix director_max_parallel_moves/kicks type Should be uint, not time.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 09 Nov 2017 12:24:16 +0200
parents 02762bd30721
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1 # dovecot.m4 - Check presence of dovecot -*-Autoconf-*-
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2 #
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3 # Copyright (C) 2010 Dennis Schridde
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4 #
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5 # This file is free software; the authors give
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6 # unlimited permission to copy and/or distribute it, with or without
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
7 # modifications, as long as this notice is preserved.
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
8
20936
9f2b885776a1 dovecot-config: Added dovecot_statedir
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20935
diff changeset
9 # serial 25
12092
711b5f193f04 dovecot.m4: Added --with-moduledir and export dovecotdir
Timo Sirainen <tss@iki.fi>
parents: 11844
diff changeset
10
711b5f193f04 dovecot.m4: Added --with-moduledir and export dovecotdir
Timo Sirainen <tss@iki.fi>
parents: 11844
diff changeset
11 AC_DEFUN([DC_DOVECOT_MODULEDIR],[
711b5f193f04 dovecot.m4: Added --with-moduledir and export dovecotdir
Timo Sirainen <tss@iki.fi>
parents: 11844
diff changeset
12 AC_ARG_WITH(moduledir,
711b5f193f04 dovecot.m4: Added --with-moduledir and export dovecotdir
Timo Sirainen <tss@iki.fi>
parents: 11844
diff changeset
13 [ --with-moduledir=DIR Base directory for dynamically loadable modules],
711b5f193f04 dovecot.m4: Added --with-moduledir and export dovecotdir
Timo Sirainen <tss@iki.fi>
parents: 11844
diff changeset
14 moduledir="$withval",
711b5f193f04 dovecot.m4: Added --with-moduledir and export dovecotdir
Timo Sirainen <tss@iki.fi>
parents: 11844
diff changeset
15 moduledir=$libdir/dovecot
711b5f193f04 dovecot.m4: Added --with-moduledir and export dovecotdir
Timo Sirainen <tss@iki.fi>
parents: 11844
diff changeset
16 )
711b5f193f04 dovecot.m4: Added --with-moduledir and export dovecotdir
Timo Sirainen <tss@iki.fi>
parents: 11844
diff changeset
17 AC_SUBST(moduledir)
711b5f193f04 dovecot.m4: Added --with-moduledir and export dovecotdir
Timo Sirainen <tss@iki.fi>
parents: 11844
diff changeset
18 ])
11154
9188fc60d615 dovecot.m4: Added serial number.
Timo Sirainen <tss@iki.fi>
parents: 11114
diff changeset
19
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
20 AC_DEFUN([DC_PLUGIN_DEPS],[
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
21 _plugin_deps=yes
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
22 AC_MSG_CHECKING([whether OS supports plugin dependencies])
10756
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
23 case "$host_os" in
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
24 darwin*)
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
25 # OSX loads the plugins twice, which breaks stuff
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
26 _plugin_deps=no
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
27 ;;
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
28 esac
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
29 AC_MSG_RESULT([$_plugin_deps])
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
30 AM_CONDITIONAL([DOVECOT_PLUGIN_DEPS], [test "x$_plugin_deps" = "xyes"])
10756
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
31 unset _plugin_deps
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
32 ])
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
33
18239
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
34 AC_DEFUN([DC_DOVECOT_TEST_WRAPPER],[
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
35 AC_CHECK_PROG(VALGRIND, valgrind, yes, no)
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
36 if test $VALGRIND = yes; then
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
37 cat > run-test.sh <<EOF
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
38 #!/bin/sh
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
39 top_srcdir=\$[1]
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
40 shift
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
41
21239
02762bd30721 dovecot.m4: Add NOUNDEF option to run-test.sh
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20937
diff changeset
42 if test "\$NOUNDEF" != ""; then
02762bd30721 dovecot.m4: Add NOUNDEF option to run-test.sh
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20937
diff changeset
43 noundef="--undef-value-errors=no"
02762bd30721 dovecot.m4: Add NOUNDEF option to run-test.sh
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20937
diff changeset
44 else
02762bd30721 dovecot.m4: Add NOUNDEF option to run-test.sh
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20937
diff changeset
45 noundef=""
02762bd30721 dovecot.m4: Add NOUNDEF option to run-test.sh
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20937
diff changeset
46 fi
02762bd30721 dovecot.m4: Add NOUNDEF option to run-test.sh
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20937
diff changeset
47
18756
2dd8308f5d57 dovecot.m4: If NOVALGRIND environment is set, don't run tests via valgrind in "make check"
Timo Sirainen <tss@iki.fi>
parents: 18246
diff changeset
48 if test "\$NOVALGRIND" != ""; then
18757
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
49 \$[*]
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
50 ret=\$?
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
51 else
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
52 trap "rm -f test.out.\$\$" 0 1 2 3 15
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
53 supp_path="\$top_srcdir/run-test-valgrind.supp"
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
54 if test -r "\$supp_path"; then
21239
02762bd30721 dovecot.m4: Add NOUNDEF option to run-test.sh
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20937
diff changeset
55 valgrind -q --trace-children=yes --leak-check=full --suppressions="\$supp_path" --log-file=test.out.\$\$ \$noundef \$[*]
18757
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
56 else
21239
02762bd30721 dovecot.m4: Add NOUNDEF option to run-test.sh
Aki Tuomi <aki.tuomi@dovecot.fi>
parents: 20937
diff changeset
57 valgrind -q --trace-children=yes --leak-check=full --log-file=test.out.\$\$ \$noundef \$[*]
18757
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
58 fi
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
59 ret=\$?
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
60 if test -s test.out.\$\$; then
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
61 cat test.out.\$\$
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
62 ret=1
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
63 fi
18756
2dd8308f5d57 dovecot.m4: If NOVALGRIND environment is set, don't run tests via valgrind in "make check"
Timo Sirainen <tss@iki.fi>
parents: 18246
diff changeset
64 fi
18757
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
65 if test \$ret != 0; then
5e523f0bbdf8 dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Timo Sirainen <tss@iki.fi>
parents: 18756
diff changeset
66 echo "Failed to run: \$[*]" >&2
18239
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
67 fi
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
68 exit \$ret
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
69 EOF
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
70 RUN_TEST='$(SHELL) $(top_builddir)/run-test.sh $(top_srcdir)'
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
71 else
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
72 RUN_TEST=''
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
73 fi
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
74 AC_SUBST(RUN_TEST)
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
75 ])
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
76
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
77 # Substitute every var in the given comma seperated list
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
78 AC_DEFUN([AX_SUBST_L],[
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
79 m4_foreach([__var__], [$@], [AC_SUBST(__var__)])
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
80 ])
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
81
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
82 AC_DEFUN([DC_DOVECOT],[
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
83 AC_ARG_WITH(dovecot,
10756
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
84 [ --with-dovecot=DIR Dovecot base directory],
10755
912c132337ed dovecot.m4: Default dovecotdir to $prefix/lib/dovecot/
Timo Sirainen <tss@iki.fi>
parents: 10753
diff changeset
85 [ dovecotdir="$withval" ], [
912c132337ed dovecot.m4: Default dovecotdir to $prefix/lib/dovecot/
Timo Sirainen <tss@iki.fi>
parents: 10753
diff changeset
86 dc_prefix=$prefix
912c132337ed dovecot.m4: Default dovecotdir to $prefix/lib/dovecot/
Timo Sirainen <tss@iki.fi>
parents: 10753
diff changeset
87 test "x$dc_prefix" = xNONE && dc_prefix=$ac_default_prefix
912c132337ed dovecot.m4: Default dovecotdir to $prefix/lib/dovecot/
Timo Sirainen <tss@iki.fi>
parents: 10753
diff changeset
88 dovecotdir="$dc_prefix/lib/dovecot"
912c132337ed dovecot.m4: Default dovecotdir to $prefix/lib/dovecot/
Timo Sirainen <tss@iki.fi>
parents: 10753
diff changeset
89 ]
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
90 )
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
91
14730
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
92 AC_ARG_WITH(dovecot-install-dirs,
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
93 [AC_HELP_STRING([--with-dovecot-install-dirs],
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
94 [Use install directories configured for Dovecot (default)])],
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
95 if test x$withval = xno; then
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
96 use_install_dirs=no
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
97 else
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
98 use_install_dirs=yes
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
99 fi,
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
100 use_install_dirs=yes)
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
101
17177
45dd96eb4139 dovecot.m4: Minor message improvement.
Timo Sirainen <tss@iki.fi>
parents: 16141
diff changeset
102 AC_MSG_CHECKING([for "$dovecotdir/dovecot-config"])
10756
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
103 if test -f "$dovecotdir/dovecot-config"; then
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
104 AC_MSG_RESULT([$dovecotdir/dovecot-config])
10756
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
105 else
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
106 AC_MSG_RESULT([not found])
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
107 AC_MSG_NOTICE([])
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
108 AC_MSG_NOTICE([Use --with-dovecot=DIR to provide the path to the dovecot-config file.])
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
109 AC_MSG_ERROR([dovecot-config not found])
10756
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
110 fi
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
111
14730
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
112 old=`pwd`
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
113 cd $dovecotdir
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
114 abs_dovecotdir=`pwd`
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
115 cd $old
16141
cd3482684bd2 dovecot.m4: Reverted last change with added comments.
Timo Sirainen <tss@iki.fi>
parents: 16138
diff changeset
116 DISTCHECK_CONFIGURE_FLAGS="--with-dovecot=$abs_dovecotdir --without-dovecot-install-dirs"
14730
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
117
12717
816a6e69d4b5 dovecot-config, dovecot.m4: Export SQL_LIBS as DOVECOT_SQL_LIBS
Timo Sirainen <tss@iki.fi>
parents: 12092
diff changeset
118 eval `grep -i '^dovecot_[[a-z_]]*=' "$dovecotdir"/dovecot-config`
19571
a6cd5382373f dovecot-config: Added LIBDOVECOT_{AUTH/POP3/IMAP_LOGIN}_INCLUDE
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 19378
diff changeset
119 eval `grep '^LIBDOVECOT[[A-Z0-9_]]*=' "$dovecotdir"/dovecot-config`
14730
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
120
18246
16c21c12e21f dovecot-config: Added DOVECOT_INSTALLED parameter.
Timo Sirainen <tss@iki.fi>
parents: 18245
diff changeset
121 dovecot_installed_moduledir="$dovecot_moduledir"
16c21c12e21f dovecot-config: Added DOVECOT_INSTALLED parameter.
Timo Sirainen <tss@iki.fi>
parents: 18245
diff changeset
122
14730
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
123 if test "$use_install_dirs" = "no"; then
16141
cd3482684bd2 dovecot.m4: Reverted last change with added comments.
Timo Sirainen <tss@iki.fi>
parents: 16138
diff changeset
124 # the main purpose of these is to fix make distcheck for plugins
cd3482684bd2 dovecot.m4: Reverted last change with added comments.
Timo Sirainen <tss@iki.fi>
parents: 16138
diff changeset
125 # other than that, they don't really make much sense
14730
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
126 dovecot_pkgincludedir='$(pkgincludedir)'
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
127 dovecot_pkglibdir='$(pkglibdir)'
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
128 dovecot_pkglibexecdir='$(libexecdir)/dovecot'
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
129 dovecot_docdir='$(docdir)'
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
130 dovecot_moduledir='$(moduledir)'
20936
9f2b885776a1 dovecot-config: Added dovecot_statedir
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20935
diff changeset
131 dovecot_statedir='$(statedir)'
14730
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
132 fi
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
133
20936
9f2b885776a1 dovecot-config: Added dovecot_statedir
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20935
diff changeset
134 AX_SUBST_L([DISTCHECK_CONFIGURE_FLAGS], [dovecotdir], [dovecot_moduledir], [dovecot_installed_moduledir], [dovecot_pkgincludedir], [dovecot_pkglibexecdir], [dovecot_pkglibdir], [dovecot_docdir], [dovecot_statedir])
20937
8fdca7a268e0 dovecot.m4: Added DOVECOT_BINARY_LDFLAGS for future compatibility
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20936
diff changeset
135 AX_SUBST_L([DOVECOT_INSTALLED], [DOVECOT_CFLAGS], [DOVECOT_LIBS], [DOVECOT_SSL_LIBS], [DOVECOT_SQL_LIBS], [DOVECOT_COMPRESS_LIBS], [DOVECOT_BINARY_CFLAGS], [DOVECOT_BINARY_LDFLAGS])
19378
ea447bc283e1 dovecot-config: Added LIBFTS.
Teemu Huovila <teemu.huovila@dovecot.fi>
parents: 19368
diff changeset
136 AX_SUBST_L([LIBDOVECOT], [LIBDOVECOT_LOGIN], [LIBDOVECOT_SQL], [LIBDOVECOT_SSL], [LIBDOVECOT_COMPRESS], [LIBDOVECOT_LDA], [LIBDOVECOT_STORAGE], [LIBDOVECOT_DSYNC], [LIBDOVECOT_LIBFTS])
ea447bc283e1 dovecot-config: Added LIBFTS.
Teemu Huovila <teemu.huovila@dovecot.fi>
parents: 19368
diff changeset
137 AX_SUBST_L([LIBDOVECOT_DEPS], [LIBDOVECOT_LOGIN_DEPS], [LIBDOVECOT_SQL_DEPS], [LIBDOVECOT_SSL_DEPS], [LIBDOVECOT_COMPRESS_DEPS], [LIBDOVECOT_LDA_DEPS], [LIBDOVECOT_STORAGE_DEPS], [LIBDOVECOT_DSYNC_DEPS], [LIBDOVECOT_LIBFTS_DEPS])
20934
187ecbcb19e4 Added LIBDOVECOT_PUSH_NOTIFICATION_INCLUDE to dovecot.m4.
Stephan Bosch <stephan@rename-it.nl>
parents: 20263
diff changeset
138 AX_SUBST_L([LIBDOVECOT_INCLUDE], [LIBDOVECOT_LDA_INCLUDE], [LIBDOVECOT_AUTH_INCLUDE], [LIBDOVECOT_DOVEADM_INCLUDE], [LIBDOVECOT_SERVICE_INCLUDE], [LIBDOVECOT_STORAGE_INCLUDE], [LIBDOVECOT_LOGIN_INCLUDE], [LIBDOVECOT_SQL_INCLUDE])
187ecbcb19e4 Added LIBDOVECOT_PUSH_NOTIFICATION_INCLUDE to dovecot.m4.
Stephan Bosch <stephan@rename-it.nl>
parents: 20263
diff changeset
139 AX_SUBST_L([LIBDOVECOT_IMAP_LOGIN_INCLUDE], [LIBDOVECOT_CONFIG_INCLUDE], [LIBDOVECOT_IMAP_INCLUDE], [LIBDOVECOT_POP3_INCLUDE], [LIBDOVECOT_DSYNC_INCLUDE], [LIBDOVECOT_IMAPC_INCLUDE], [LIBDOVECOT_FTS_INCLUDE])
187ecbcb19e4 Added LIBDOVECOT_PUSH_NOTIFICATION_INCLUDE to dovecot.m4.
Stephan Bosch <stephan@rename-it.nl>
parents: 20263
diff changeset
140 AX_SUBST_L([LIBDOVECOT_NOTIFY_INCLUDE], [LIBDOVECOT_PUSH_NOTIFICATION_INCLUDE], [LIBDOVECOT_ACL_INCLUDE], [LIBDOVECOT_LIBFTS_INCLUDE])
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
141
18246
16c21c12e21f dovecot-config: Added DOVECOT_INSTALLED parameter.
Timo Sirainen <tss@iki.fi>
parents: 18245
diff changeset
142 AM_CONDITIONAL(DOVECOT_INSTALLED, test "$DOVECOT_INSTALLED" = "yes")
16c21c12e21f dovecot-config: Added DOVECOT_INSTALLED parameter.
Timo Sirainen <tss@iki.fi>
parents: 18245
diff changeset
143
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
144 DC_PLUGIN_DEPS
18239
d938a49c2045 dovecot.m4: External plugins can now more easily run their tests via Valgrind.
Timo Sirainen <tss@iki.fi>
parents: 17801
diff changeset
145 DC_DOVECOT_TEST_WRAPPER
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
146 ])
20935
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
147
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
148 AC_DEFUN([DC_CC_WRAPPER],[
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
149 if test "$want_shared_libs" != "yes"; then
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
150 # want_shared_libs=no is for internal use. the liblib.la check is for plugins
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
151 if test "$want_shared_libs" = "no" || echo "$LIBDOVECOT" | grep "/liblib.la" > /dev/null; then
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
152 if test "$with_gnu_ld" = yes; then
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
153 # libtool can't handle using whole-archive flags, so we need to do this
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
154 # with a CC wrapper.. shouldn't be much of a problem, since most people
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
155 # are building with shared libs.
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
156 cat > cc-wrapper.sh <<EOF
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
157 #!/bin/sh
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
158
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
159 if echo "\$[*]" | grep -- -ldl > /dev/null; then
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
160 # the binary uses plugins. make sure we include everything from .a libs
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
161 exec $CC -Wl,--whole-archive \$[*] -Wl,--no-whole-archive
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
162 else
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
163 exec $CC \$[*]
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
164 fi
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
165 EOF
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
166 chmod +x cc-wrapper.sh
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
167 CC=`pwd`/cc-wrapper.sh
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
168 fi
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
169 fi
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
170 fi
6339a2e61a01 Moved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 20934
diff changeset
171 ])