From c922e57ae472908850e88e4dab0e12a2a3b7f6ff Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan@rename-it.nl>
Date: Tue, 11 Nov 2008 00:34:31 +0100
Subject: [PATCH] Re-enabled support for compiling against Dovecot headers.

---
 configure.in    | 7 ++++---
 src/Makefile.am | 6 +++++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/configure.in b/configure.in
index d4954805d..5e39a346f 100644
--- a/configure.in
+++ b/configure.in
@@ -42,9 +42,10 @@ if test -d "$dovecotdir/src"; then
   have_dovecot_libs=yes
 else
   # compiling against installed headers
-  echo 
-  echo "Cannot compile against the installed headers only."
-  AC_MSG_ERROR([dovecot-source not found]);
+  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
 fi
 AM_CONDITIONAL(HAVE_DOVECOT_LIBS, test "$have_dovecot_libs" = "yes")
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 6cefe1d78..6389f2132 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,2 +1,6 @@
-SUBDIRS = lib-sieve lib-sieve-tool sieve-tools plugins testsuite
+if HAVE_DOVECOT_LIBS
+LIB_DEPEND_DIRS=lib-sieve-tool sieve-tools testsuite
+endif
+
+SUBDIRS = lib-sieve plugins $(LIB_DEPEND_DIRS)
 
-- 
GitLab