summaryrefslogtreecommitdiffstats
path: root/pigeonhole/dovecot-pigeonhole.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
commitf7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch)
treea3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /pigeonhole/dovecot-pigeonhole.m4
parentInitial commit. (diff)
downloaddovecot-upstream.tar.xz
dovecot-upstream.zip
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pigeonhole/dovecot-pigeonhole.m4')
-rw-r--r--pigeonhole/dovecot-pigeonhole.m462
1 files changed, 62 insertions, 0 deletions
diff --git a/pigeonhole/dovecot-pigeonhole.m4 b/pigeonhole/dovecot-pigeonhole.m4
new file mode 100644
index 0000000..1ccff82
--- /dev/null
+++ b/pigeonhole/dovecot-pigeonhole.m4
@@ -0,0 +1,62 @@
+# pigeonhole.m4 - Check presence of pigeonhole -*-Autoconf-*-
+#.
+
+# serial 5
+
+AC_DEFUN([DC_PIGEONHOLE],[
+ AC_ARG_WITH(pigeonhole,
+ [ --with-pigeonhole=DIR Pigeonhole base directory],
+ pigeonholedir="$withval",
+ [
+ pg_prefix=$prefix
+ test "x$pg_prefix" = xNONE && pg_prefix=$ac_default_prefix
+ pigeonholedir="$pg_prefix/include/dovecot/sieve"
+ ]
+ )
+
+ AC_MSG_CHECKING([for pigeonhole in "$pigeonholedir"])
+
+ top=`pwd`
+ cd $pigeonholedir
+ pigeonholedir=`pwd`
+ cd $top
+ AC_SUBST(pigeonholedir)
+
+ PIGEONHOLE_TESTSUITE=
+ if test -f "$pigeonholedir/src/lib-sieve/sieve.h"; then
+ AC_MSG_RESULT([found])
+ pigeonhole_incdir="$pigeonholedir"
+ LIBSIEVE_INCLUDE='\
+ -I$(pigeonhole_incdir) \
+ -I$(pigeonhole_incdir)/src/lib-sieve \
+ -I$(pigeonhole_incdir)/src/lib-sieve/util \
+ -I$(pigeonhole_incdir)/src/lib-sieve/plugins/copy \
+ -I$(pigeonhole_incdir)/src/lib-sieve/plugins/enotify \
+ -I$(pigeonhole_incdir)/src/lib-sieve/plugins/imap4flags \
+ -I$(pigeonhole_incdir)/src/lib-sieve/plugins/mailbox \
+ -I$(pigeonhole_incdir)/src/lib-sieve/plugins/variables'
+ PIGEONHOLE_TESTSUITE="${pigeonholedir}/src/testsuite/testsuite"
+ elif test -f "$pigeonholedir/sieve.h"; then
+ AC_MSG_RESULT([found])
+ pigeonhole_incdir="$pigeonholedir"
+ LIBSIEVE_INCLUDE='-I$(pigeonhole_incdir)'
+ else
+ AC_MSG_RESULT([not found])
+ AC_MSG_NOTICE([
+ Pigeonhole Sieve headers not found from $pigeonholedir and they
+ are not installed in the Dovecot include path, use --with-pigeonhole=PATH
+ to give path to Pigeonhole sources or installed headers.])
+ AC_MSG_ERROR([pigeonhole not found])
+ fi
+
+ DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-pigeonhole=$pigeonholedir"
+
+ AM_CONDITIONAL(PIGEONHOLE_TESTSUITE_AVAILABLE, ! test -z "$PIGEONHOLE_TESTSUITE")
+
+ pigeonhole_incdir="$pigeonholedir"
+
+ AC_SUBST(pigeonhole_incdir)
+
+ AC_SUBST(LIBSIEVE_INCLUDE)
+ AC_SUBST(PIGEONHOLE_TESTSUITE)
+])