dovecot-2.0-sieve: Added support for fully compiling against ins...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Sat Jan 2 14:39:45 EET 2010


details:   http://hg.rename-it.nl/dovecot-2.0-sieve/rev/97df72aa1ed6
changeset: 1170:97df72aa1ed6
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Sat Jan 02 13:39:38 2010 +0100
description:
Added support for fully compiling against installed Dovecot libraries.

diffstat:

 Makefile.am                                                  |   9 -
 configure.in                                                 |  82 +++++++++++-----
 src/Makefile.am                                              |  10 +-
 src/lib-sieve-tool/Makefile.am                               |  10 +-
 src/lib-sieve/Makefile.am                                    |  14 +--
 src/lib-sieve/plugins/body/Makefile.am                       |   5 +-
 src/lib-sieve/plugins/comparator-i-ascii-numeric/Makefile.am |   5 +-
 src/lib-sieve/plugins/copy/Makefile.am                       |   5 +-
 src/lib-sieve/plugins/date/Makefile.am                       |   5 +-
 src/lib-sieve/plugins/enotify/Makefile.am                    |   5 +-
 src/lib-sieve/plugins/environment/Makefile.am                |   5 +-
 src/lib-sieve/plugins/include/Makefile.am                    |   5 +-
 src/lib-sieve/plugins/mailbox/Makefile.am                    |   5 +-
 src/lib-sieve/plugins/notify/Makefile.am                     |   5 +-
 src/lib-sieve/plugins/regex/Makefile.am                      |   5 +-
 src/lib-sieve/plugins/relational/Makefile.am                 |   5 +-
 src/lib-sieve/plugins/spamvirustest/Makefile.am              |   5 +-
 src/lib-sieve/plugins/subaddress/Makefile.am                 |   5 +-
 src/lib-sieve/plugins/vacation/Makefile.am                   |   5 +-
 src/lib-sieve/plugins/variables/Makefile.am                  |   5 +-
 src/plugins/lda-sieve/Makefile.am                            |   8 +-
 src/sieve-tools/Makefile.am                                  |  16 +--
 src/testsuite/Makefile.am                                    |  15 +--
 23 files changed, 86 insertions(+), 153 deletions(-)

diffs (truncated from 513 to 300 lines):

diff -r bd745cd4761b -r 97df72aa1ed6 Makefile.am
--- a/Makefile.am	Sat Jan 02 02:56:45 2010 +0100
+++ b/Makefile.am	Sat Jan 02 13:39:38 2010 +0100
@@ -100,18 +100,9 @@
 	tests/deprecated/notify/execute.svtest \
 	tests/deprecated/notify/denotify.svtest
 
-if HAVE_DOVECOT_LIBS
-
 $(test_cases):
 	@$(TEST_BIN) $@
 
 .PHONY: $(test_cases)
 
 test: $(test_cases)
-
-else
-
-test:
-	@echo "Cannot compile or execute the testsuite without the Dovecot sources."
-
-endif	
diff -r bd745cd4761b -r 97df72aa1ed6 configure.in
--- a/configure.in	Sat Jan 02 02:56:45 2010 +0100
+++ b/configure.in	Sat Jan 02 13:39:38 2010 +0100
@@ -41,15 +41,11 @@
 
 if test -d "$dovecotdir/src"; then
   # compiling against sources
-  have_dovecot_libs=yes
+  have_dovecot_sources=yes
 else
   # compiling against installed headers
-  echo "WARNING: Cannot build Sieve commandline tools without the compiled"
-  echo "         Dovecot sources. Compiling against headers will only build"
-  echo "         the Sieve plugin." 
-  have_dovecot_libs=no
+  have_dovecot_sources=no
 fi
-AM_CONDITIONAL(HAVE_DOVECOT_LIBS, test "$have_dovecot_libs" = "yes")
 
 # Extensions under development
 #
@@ -83,16 +79,6 @@
     want_headers=no)
 AM_CONDITIONAL(INSTALL_HEADERS, test "$want_headers" = "yes")
 
-AC_ARG_ENABLE(header-install,
-[  --enable-header-install Install development headers],
-    if test x$enableval = xno; then
-        want_headers=no
-    else
-        want_headers=yes
-    fi,
-    want_headers=no)
-AM_CONDITIONAL(INSTALL_HEADERS, test "$want_headers" = "yes")
-
 AC_ARG_ENABLE(valgrind,
 [AC_HELP_STRING([--enable-valgrind], [Enable Valgrind memory leak checks in testsuite [default=no]])],
     if test x$enableval = xno || test x$enableval = xauto; then
@@ -106,29 +92,73 @@
 dnl replace relative ../ paths in the file with full paths
 eval `cat $dovecotdir/dovecot-config|sed 's,\$(top_builddir)/,$dovecotdir/,g'`
 
-if test $have_dovecot_libs = yes; then
+if test $have_dovecot_sources = yes; then
   dovecot_incdir="$dovecotdir"
+  dovecot_libdir="$dovecotdir"
+
+  dovecot_pkgincludedir='$(includedir)/dovecot'
+  dovecot_pkglibdir='$(libdir)/dovecot'
+
+  LIBDOVECOT='$(dovecot_libdir)/src/lib-dovecot/libdovecot.la'
+  LIBDOVECOT_STORAGE='$(dovecot_libdir)/src/lib-storage/libdovecot-storage.la'
+
+  SIEVE_DOVECOT_INCLUDE=' \
+    -I$(dovecot_incdir) \
+    -I$(dovecot_incdir)/src/lib \
+    -I$(dovecot_incdir)/src/lib-mail \
+    -I$(dovecot_incdir)/src/lib-storage'
+
+  SIEVE_LIB_DOVECOT_INCLUDE=${SIEVE_DOVECOT_INCLUDE}' \
+    -I$(dovecot_incdir)/src/lib-imap \
+    -I$(dovecot_incdir)/src/lib-master'
+
+  SIEVE_LDA_DOVECOT_INCLUDE=${SIEVE_DOVECOT_INCLUDE}' \
+    -I$(dovecot_incdir)/src/lib-dict \
+    -I$(dovecot_incdir)/src/lib-lda \
+    -I$(dovecot_incdir)/src/lda'
+
+  SIEVE_TOOL_DOVECOT_INCLUDE=${SIEVE_DOVECOT_INCLUDE}' \
+    -I$(dovecot_incdir)/src/lib-settings \
+    -I$(dovecot_incdir)/src/lib-imap \
+    -I$(dovecot_incdir)/src/lib-index \
+    -I$(dovecot_incdir)/src/lib-master \
+    -I$(dovecot_incdir)/src/lib-storage/index \
+    -I$(dovecot_incdir)/src/lib-storage/index/raw'
+else
+  dovecot_libdir="$dovecotdir"
+  
+  dovecot_pkgincludedir='$(dovecot_incdir)'
+  dovecot_pkglibdir='$(dovecotdir)'
+
+  LIBDOVECOT='$(dovecot_libdir)/libdovecot.la'
+  LIBDOVECOT_STORAGE='$(dovecot_libdir)/libdovecot-storage.la'
+
+  SIEVE_DOVECOT_INCLUDE='-I$(dovecot_incdir)'
+  SIEVE_LIB_DOVECOT_INCLUDE=${SIEVE_DOVECOT_INCLUDE}
+  SIEVE_LDA_DOVECOT_INCLUDE=${SIEVE_DOVECOT_INCLUDE}
+  SIEVE_TOOL_DOVECOT_INCLUDE=${SIEVE_DOVECOT_INCLUDE}
 fi
 
-AC_SUBST(STORAGE_LIBS)
+dovecot_pkglibexecdir='$(libexecdir)/dovecot'
+dovecot_docdir='$(datadir)/doc/dovecot'
+
 AC_SUBST(LIBICONV)
 AC_SUBST(RAND_LIBS)
 AC_SUBST(MODULE_LIBS)
 AC_SUBST(dovecot_incdir)
+AC_SUBST(dovecot_libdir)
 AC_SUBST(moduledir)
-
-dovecot_pkgincludedir='$(includedir)/dovecot'
 AC_SUBST(dovecot_pkgincludedir)
-
-dovecot_pkglibexecdir='$(libexecdir)/dovecot'
-dovecot_pkglibdir='$(libdir)/dovecot'
-dovecot_pkgincludedir='$(includedir)/dovecot'
-dovecot_docdir='$(datadir)/doc/dovecot'
 AC_SUBST(dovecot_pkglibexecdir)
 AC_SUBST(dovecot_pkglibdir)
-AC_SUBST(dovecot_pkgincludedir)
 AC_SUBST(dovecot_docdir)
 
+AC_SUBST(LIBDOVECOT)
+AC_SUBST(LIBDOVECOT_STORAGE)
+AC_SUBST(SIEVE_LDA_DOVECOT_INCLUDE)
+AC_SUBST(SIEVE_LIB_DOVECOT_INCLUDE)
+AC_SUBST(SIEVE_TOOL_DOVECOT_INCLUDE)
+
 AC_CONFIG_FILES([
 Makefile
 doc/Makefile
diff -r bd745cd4761b -r 97df72aa1ed6 src/Makefile.am
--- a/src/Makefile.am	Sat Jan 02 02:56:45 2010 +0100
+++ b/src/Makefile.am	Sat Jan 02 13:39:38 2010 +0100
@@ -1,6 +1,8 @@
-if HAVE_DOVECOT_LIBS
-LIB_DEPEND_DIRS=lib-sieve-tool sieve-tools testsuite
-endif
 
-SUBDIRS = lib-sieve plugins $(LIB_DEPEND_DIRS)
+SUBDIRS = \
+	lib-sieve \
+	plugins \
+	lib-sieve-tool \
+	sieve-tools \
+	testsuite
 
diff -r bd745cd4761b -r 97df72aa1ed6 src/lib-sieve-tool/Makefile.am
--- a/src/lib-sieve-tool/Makefile.am	Sat Jan 02 02:56:45 2010 +0100
+++ b/src/lib-sieve-tool/Makefile.am	Sat Jan 02 13:39:38 2010 +0100
@@ -2,15 +2,7 @@
 
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/src/lib-sieve \
-	-I$(dovecot_incdir) \
-	-I$(dovecot_incdir)/src/lib \
-	-I$(dovecot_incdir)/src/lib-mail \
-	-I$(dovecot_incdir)/src/lib-master \
-	-I$(dovecot_incdir)/src/lib-settings \
-	-I$(dovecot_incdir)/src/lib-index \
-	-I$(dovecot_incdir)/src/lib-storage \
-	-I$(dovecot_incdir)/src/lib-storage/index \
-	-I$(dovecot_incdir)/src/lib-storage/index/raw
+	$(SIEVE_TOOL_DOVECOT_INCLUDE)
 
 libsieve_tool_la_SOURCES = \
 	sieve-tool.c \
diff -r bd745cd4761b -r 97df72aa1ed6 src/lib-sieve/Makefile.am
--- a/src/lib-sieve/Makefile.am	Sat Jan 02 02:56:45 2010 +0100
+++ b/src/lib-sieve/Makefile.am	Sat Jan 02 13:39:38 2010 +0100
@@ -3,12 +3,7 @@
 dovecot_pkglib_LTLIBRARIES = libdovecot-sieve.la
 
 AM_CPPFLAGS = \
-	-I$(dovecot_incdir) \
-	-I$(dovecot_incdir)/src/lib \
-	-I$(dovecot_incdir)/src/lib-mail \
-	-I$(dovecot_incdir)/src/lib-storage \
-	-I$(dovecot_incdir)/src/lib-imap \
-	-I$(dovecot_incdir)/src/lib-master \
+	$(SIEVE_LIB_DOVECOT_INCLUDE) \
 	-DMODULEDIR=\""$(moduledir)"\"
 
 tests = \
@@ -149,10 +144,3 @@
 else
   noinst_HEADERS = $(headers)
 endif
-
-if INSTALL_HEADERS
-  pkginc_libdir=$(dovecot_pkgincludedir)/sieve
-  pkginc_lib_HEADERS = $(headers)
-else
-  noinst_HEADERS = $(headers)
-endif
diff -r bd745cd4761b -r 97df72aa1ed6 src/lib-sieve/plugins/body/Makefile.am
--- a/src/lib-sieve/plugins/body/Makefile.am	Sat Jan 02 02:56:45 2010 +0100
+++ b/src/lib-sieve/plugins/body/Makefile.am	Sat Jan 02 13:39:38 2010 +0100
@@ -2,10 +2,7 @@
 
 AM_CPPFLAGS = \
 	-I../../ \
-	-I$(dovecot_incdir) \
-	-I$(dovecot_incdir)/src/lib \
-	-I$(dovecot_incdir)/src/lib-mail \
-	-I$(dovecot_incdir)/src/lib-storage 
+	$(SIEVE_LIB_DOVECOT_INCLUDE)
 
 tsts = \
 	tst-body.c
diff -r bd745cd4761b -r 97df72aa1ed6 src/lib-sieve/plugins/comparator-i-ascii-numeric/Makefile.am
--- a/src/lib-sieve/plugins/comparator-i-ascii-numeric/Makefile.am	Sat Jan 02 02:56:45 2010 +0100
+++ b/src/lib-sieve/plugins/comparator-i-ascii-numeric/Makefile.am	Sat Jan 02 13:39:38 2010 +0100
@@ -2,10 +2,7 @@
 
 AM_CPPFLAGS = \
 	-I../../ \
-	-I$(dovecot_incdir) \
-	-I$(dovecot_incdir)/src/lib \
-	-I$(dovecot_incdir)/src/lib-mail \
-	-I$(dovecot_incdir)/src/lib-storage 
+	$(SIEVE_LIB_DOVECOT_INCLUDE)
 
 libsieve_ext_comparator_i_ascii_numeric_la_SOURCES = \
 	ext-cmp-i-ascii-numeric.c
diff -r bd745cd4761b -r 97df72aa1ed6 src/lib-sieve/plugins/copy/Makefile.am
--- a/src/lib-sieve/plugins/copy/Makefile.am	Sat Jan 02 02:56:45 2010 +0100
+++ b/src/lib-sieve/plugins/copy/Makefile.am	Sat Jan 02 13:39:38 2010 +0100
@@ -2,10 +2,7 @@
 
 AM_CPPFLAGS = \
 	-I../../ \
-	-I$(dovecot_incdir) \
-	-I$(dovecot_incdir)/src/lib \
-	-I$(dovecot_incdir)/src/lib-mail \
-	-I$(dovecot_incdir)/src/lib-storage 
+	$(SIEVE_LIB_DOVECOT_INCLUDE)
 
 libsieve_ext_copy_la_SOURCES = \
 	ext-copy.c
diff -r bd745cd4761b -r 97df72aa1ed6 src/lib-sieve/plugins/date/Makefile.am
--- a/src/lib-sieve/plugins/date/Makefile.am	Sat Jan 02 02:56:45 2010 +0100
+++ b/src/lib-sieve/plugins/date/Makefile.am	Sat Jan 02 13:39:38 2010 +0100
@@ -2,10 +2,7 @@
 
 AM_CPPFLAGS = \
 	-I../../ \
-	-I$(dovecot_incdir) \
-	-I$(dovecot_incdir)/src/lib \
-	-I$(dovecot_incdir)/src/lib-mail \
-	-I$(dovecot_incdir)/src/lib-storage 
+	$(SIEVE_LIB_DOVECOT_INCLUDE)
 
 tests = \
 	tst-date.c
diff -r bd745cd4761b -r 97df72aa1ed6 src/lib-sieve/plugins/enotify/Makefile.am
--- a/src/lib-sieve/plugins/enotify/Makefile.am	Sat Jan 02 02:56:45 2010 +0100
+++ b/src/lib-sieve/plugins/enotify/Makefile.am	Sat Jan 02 13:39:38 2010 +0100
@@ -3,10 +3,7 @@
 AM_CPPFLAGS = \
 	-I../../ \
 	-I../variables \
-	-I$(dovecot_incdir) \
-	-I$(dovecot_incdir)/src/lib \
-	-I$(dovecot_incdir)/src/lib-mail \
-	-I$(dovecot_incdir)/src/lib-storage 
+	$(SIEVE_LIB_DOVECOT_INCLUDE)
 
 commands = \
 	cmd-notify.c
diff -r bd745cd4761b -r 97df72aa1ed6 src/lib-sieve/plugins/environment/Makefile.am
--- a/src/lib-sieve/plugins/environment/Makefile.am	Sat Jan 02 02:56:45 2010 +0100
+++ b/src/lib-sieve/plugins/environment/Makefile.am	Sat Jan 02 13:39:38 2010 +0100
@@ -2,10 +2,7 @@
 
 AM_CPPFLAGS = \
 	-I../../ \
-	-I$(dovecot_incdir) \
-	-I$(dovecot_incdir)/src/lib \
-	-I$(dovecot_incdir)/src/lib-mail \
-	-I$(dovecot_incdir)/src/lib-storage 
+	$(SIEVE_LIB_DOVECOT_INCLUDE)
 
 tests = \
 	tst-environment.c
diff -r bd745cd4761b -r 97df72aa1ed6 src/lib-sieve/plugins/include/Makefile.am
--- a/src/lib-sieve/plugins/include/Makefile.am	Sat Jan 02 02:56:45 2010 +0100


More information about the dovecot-cvs mailing list