File: dovecot-pigeonhole.m4

package info (click to toggle)
dovecot 1:2.3.4.1-5+deb10u1~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 46,880 kB
  • sloc: ansic: 499,137; makefile: 7,352; sh: 5,592; cpp: 1,555; perl: 303; python: 73; xml: 44; pascal: 27
file content (62 lines) | stat: -rw-r--r-- 1,895 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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)
])