1
AC_INIT([Dovecot ManageSieve], [0.11.9], [dovecot@dovecot.org], [dovecot-1.2-managesieve])
2
AC_CONFIG_SRCDIR([src])
4
AC_CONFIG_HEADERS([dummy-config.h dmanagesieve-config.h])
6
AC_DEFINE_UNQUOTED(MANAGESIEVE_NAME, "$PACKAGE_NAME",
7
[Define to the full name of this Sieve implementation.])
8
AC_DEFINE_UNQUOTED(MANAGESIEVE_VERSION, "$PACKAGE_VERSION",
9
[Define to the version of this Sieve implementation.])
11
AM_INIT_AUTOMAKE([no-define foreign])
20
[ --with-dovecot[=DIR] Dovecot base directory (../)],
21
dovecotdir="$withval",
25
AC_ARG_WITH(dovecot-sieve,
26
[ --with-dovecot-sieve[=DIR] Dovecot-sieve plugin base directory (../)],
27
dovecot_sievedir="$withval",
28
dovecot_sievedir=../dovecot-sieve-1.1
36
dovecot_sievedir=`pwd`
39
AC_SUBST(dovecot_sievedir)
41
if ! test -f "$dovecotdir/dovecot-config"; then
43
echo "dovecot-config not found from $dovecotdir, use --with-dovecot=PATH"
44
echo "to give path to compiled Dovecot sources or to a directory with the"
45
echo "installed dovecot-config file."
46
AC_MSG_ERROR([dovecot-config not found])
49
if test -d "$dovecotdir/src"; then
50
# compiling against sources
53
# compiling against installed headers
56
AM_CONDITIONAL(HAVE_DOVECOT_LIBS, test "$have_dovecot_libs" = "yes")
58
if test -f "$dovecot_sievedir/src/sieve-cmu.c"; then
59
# compiling against old cmu sieve plugin
60
echo "compiling against old dovecot-sieve plugin."
61
SIEVE_PLUGIN_TOP=$dovecot_sievedir
62
SIEVE_PLUGIN_INCLUDE=$top/src/lib-cmusieve
63
SIEVE_PLUGIN_LIB=$top/src/lib-cmusieve/libsieve_cmu.la
64
have_old_sieve_plugin=yes
66
if test -f "$dovecot_sievedir/src/lib-sieve/sieve.c"; then
67
# compiling against native dovecot sieve plugin
68
echo "compiling against new dovecot-sieve plugin."
69
SIEVE_PLUGIN_TOP=$dovecot_sievedir
70
SIEVE_PLUGIN_INCLUDE=$dovecot_sievedir/src/lib-sieve
71
SIEVE_PLUGIN_LIB=$dovecot_sievedir/src/lib-sieve/libsieve.la
72
have_old_sieve_plugin=no
75
echo "Dovecot Sieve implementation not found from $dovecot_sievedir, "
76
echo "use --with-dovecot-sieve=PATH to give path to compiled Dovecot Sieve sources."
77
AC_MSG_ERROR([dovecot-sieve not found])
80
AM_CONDITIONAL(HAVE_OLD_SIEVE_PLUGIN, test "$have_old_sieve_plugin" = "yes")
82
dnl replace relative ../ paths in the file with full paths
83
eval `cat $dovecotdir/dovecot-config|sed 's,\$(top_builddir)/,$dovecotdir/,g'`
85
if test $have_dovecot_libs = yes; then
86
dovecot_incdir="$dovecotdir"
89
AC_SUBST(STORAGE_LIBS)
94
AC_SUBST(dovecot_incdir)
97
AC_SUBST(SIEVE_PLUGIN_TOP)
98
AC_SUBST(SIEVE_PLUGIN_INCLUDE)
99
AC_SUBST(SIEVE_PLUGIN_LIB)
104
src/lib-sievestorage/Makefile
105
src/lib-managesieve/Makefile
106
src/managesieve/Makefile
107
src/managesieve-login/Makefile
108
src/lib-cmusieve/Makefile