annotate dovecot.m4 @ 17177:45dd96eb4139

dovecot.m4: Minor message improvement.
author Timo Sirainen <tss@iki.fi>
date Thu, 27 Mar 2014 14:57:44 +0100
parents cd3482684bd2
children 3675d156b309
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
17177
45dd96eb4139 dovecot.m4: Minor message improvement.
Timo Sirainen <tss@iki.fi>
parents: 16141
diff changeset
9 # serial 12
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
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
34 # 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
35 AC_DEFUN([AX_SUBST_L],[
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
36 m4_foreach([__var__], [$@], [AC_SUBST(__var__)])
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
37 ])
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
38
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
39 AC_DEFUN([DC_DOVECOT],[
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
40 AC_ARG_WITH(dovecot,
10756
ae23a1a94376 dovecot.m4: Don't use any AS_*() macros.
Timo Sirainen <tss@iki.fi>
parents: 10755
diff changeset
41 [ --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
42 [ dovecotdir="$withval" ], [
912c132337ed dovecot.m4: Default dovecotdir to $prefix/lib/dovecot/
Timo Sirainen <tss@iki.fi>
parents: 10753
diff changeset
43 dc_prefix=$prefix
912c132337ed dovecot.m4: Default dovecotdir to $prefix/lib/dovecot/
Timo Sirainen <tss@iki.fi>
parents: 10753
diff changeset
44 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
45 dovecotdir="$dc_prefix/lib/dovecot"
912c132337ed dovecot.m4: Default dovecotdir to $prefix/lib/dovecot/
Timo Sirainen <tss@iki.fi>
parents: 10753
diff changeset
46 ]
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
47 )
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
48
14730
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
49 AC_ARG_WITH(dovecot-install-dirs,
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
50 [AC_HELP_STRING([--with-dovecot-install-dirs],
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
51 [Use install directories configured for Dovecot (default)])],
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
52 if test x$withval = xno; then
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
53 use_install_dirs=no
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
54 else
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
55 use_install_dirs=yes
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
56 fi,
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
57 use_install_dirs=yes)
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
58
17177
45dd96eb4139 dovecot.m4: Minor message improvement.
Timo Sirainen <tss@iki.fi>
parents: 16141
diff changeset
59 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
60 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
61 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
62 else
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
63 AC_MSG_RESULT([not found])
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
64 AC_MSG_NOTICE([])
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
65 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
66 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
67 fi
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
68
14730
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
69 old=`pwd`
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
70 cd $dovecotdir
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
71 abs_dovecotdir=`pwd`
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
72 cd $old
16141
cd3482684bd2 dovecot.m4: Reverted last change with added comments.
Timo Sirainen <tss@iki.fi>
parents: 16138
diff changeset
73 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
74
12717
816a6e69d4b5 dovecot-config, dovecot.m4: Export SQL_LIBS as DOVECOT_SQL_LIBS
Timo Sirainen <tss@iki.fi>
parents: 12092
diff changeset
75 eval `grep -i '^dovecot_[[a-z_]]*=' "$dovecotdir"/dovecot-config`
11844
b8c4316a5d40 dovecot.m4: Don't use grep -e, it's not standard.
Timo Sirainen <tss@iki.fi>
parents: 11699
diff changeset
76 eval `grep '^LIBDOVECOT[[A-Z_]]*=' "$dovecotdir"/dovecot-config`
14730
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
77
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
78 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
79 # 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
80 # 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
81 dovecot_pkgincludedir='$(pkgincludedir)'
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
82 dovecot_pkglibdir='$(pkglibdir)'
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
83 dovecot_pkglibexecdir='$(libexecdir)/dovecot'
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
84 dovecot_docdir='$(docdir)'
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
85 dovecot_moduledir='$(moduledir)'
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
86 fi
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
87
73ce16df6b16 dovecot.m4: Updates from Pigeonhole
Timo Sirainen <tss@iki.fi>
parents: 14729
diff changeset
88 AX_SUBST_L([DISTCHECK_CONFIGURE_FLAGS], [dovecotdir], [dovecot_moduledir], [dovecot_pkgincludedir], [dovecot_pkglibexecdir], [dovecot_pkglibdir], [dovecot_docdir])
14739
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14732
diff changeset
89 AX_SUBST_L([DOVECOT_CFLAGS], [DOVECOT_LIBS], [DOVECOT_SSL_LIBS], [DOVECOT_SQL_LIBS], [DOVECOT_COMPRESS_LIBS])
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14732
diff changeset
90 AX_SUBST_L([LIBDOVECOT], [LIBDOVECOT_LOGIN], [LIBDOVECOT_SQL], [LIBDOVECOT_SSL], [LIBDOVECOT_COMPRESS], [LIBDOVECOT_LDA], [LIBDOVECOT_STORAGE])
378ba560ea9f Moved zlib/bzlib code to lib-compression library.
Timo Sirainen <tss@iki.fi>
parents: 14732
diff changeset
91 AX_SUBST_L([LIBDOVECOT_DEPS], [LIBDOVECOT_LOGIN_DEPS], [LIBDOVECOT_SQL_DEPS], [LIBDOVECOT_SSL_DEPS], [LIBDOVECOT_COMPRESS_DEPS], [LIBDOVECOT_LDA_DEPS], [LIBDOVECOT_STORAGE_DEPS])
14910
85b22a4af8d4 dovecot-config: Added LIBDOVECOT_DOVEADM_INCLUDE
Timo Sirainen <tss@iki.fi>
parents: 14739
diff changeset
92 AX_SUBST_L([LIBDOVECOT_INCLUDE], [LIBDOVECOT_LDA_INCLUDE], [LIBDOVECOT_DOVEADM_INCLUDE], [LIBDOVECOT_SERVICE_INCLUDE], [LIBDOVECOT_STORAGE_INCLUDE], [LIBDOVECOT_LOGIN_INCLUDE], [LIBDOVECOT_CONFIG_INCLUDE], [LIBDOVECOT_IMAP_INCLUDE])
10753
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
93
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
94 DC_PLUGIN_DEPS
80a11f8650a4 Added dovecot.m4 file that external plugins can use.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
95 ])