dovecot-2.0-pigeonhole: Started using dovecot.m4 for linking aga...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Wed Apr 14 23:05:23 EEST 2010
details: http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/6271458836d8
changeset: 1255:6271458836d8
user: Stephan Bosch <stephan at rename-it.nl>
date: Wed Apr 14 22:05:15 2010 +0200
description:
Started using dovecot.m4 for linking against Dovecot (patch by Timo Sirainen).
diffstat:
.hgignore | 5 +++++
Makefile.am | 2 ++
configure.in | 41 ++++-------------------------------------
m4/dovecot.m4 | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 73 insertions(+), 37 deletions(-)
diffs (156 lines):
diff -r 09342ba10357 -r 6271458836d8 .hgignore
--- a/.hgignore Wed Apr 14 21:48:01 2010 +0200
+++ b/.hgignore Wed Apr 14 22:05:15 2010 +0200
@@ -33,6 +33,11 @@
ChangeLog
Makefile
Makefile.in
+m4/libtool.m4
+m4/ltoptions.m4
+m4/ltsugar.m4
+m4/ltversion.m4
+m4/lt~obsolete.m4
*~
*.o
diff -r 09342ba10357 -r 6271458836d8 Makefile.am
--- a/Makefile.am Wed Apr 14 21:48:01 2010 +0200
+++ b/Makefile.am Wed Apr 14 22:05:15 2010 +0200
@@ -1,5 +1,7 @@
SUBDIRS = src doc
+ACLOCAL_AMFLAGS = -I m4 --install
+
EXTRA_DIST = \
tests \
examples \
diff -r 09342ba10357 -r 6271458836d8 configure.in
--- a/configure.in Wed Apr 14 21:48:01 2010 +0200
+++ b/configure.in Wed Apr 14 22:05:15 2010 +0200
@@ -1,5 +1,6 @@
AC_INIT([Pigeonhole], [0.2.UNSTABLE], [dovecot at dovecot.org], [dovecot-2.0-pigeonhole])
AC_CONFIG_SRCDIR([src])
+AC_CONFIG_MACRO_DIR([m4])
# Autoheader is not needed and does more harm than good for this package. However, it is
# tightly integrated in autoconf/automake and therefore it is difficult not to use it. As
@@ -20,10 +21,9 @@
AC_PROG_CPP
AC_PROG_LIBTOOL
-AC_ARG_WITH(dovecot,
-[AC_HELP_STRING([--with-dovecot=DIR], [Dovecot base directory [../dovecot]])],
- dovecotdir="$withval"
-)
+DC_DOVECOT
+LIBDOVECOT_INCLUDE="$LIBDOVECOT_INCLUDE $LIBDOVECOT_STORAGE_INCLUDE"
+AC_SUBST(LIBDOVECOT_INCLUDE)
# Extensions under development
#
@@ -78,39 +78,6 @@
want_managesieve=yes)
AM_CONDITIONAL(BUILD_MANAGESIEVE, test "$want_managesieve" = "yes")
-if test "$dovecotdir" = ""; then
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- dovecotdir=$prefix/lib/dovecot
-fi
-if ! test -f "$dovecotdir/dovecot-config"; then
- echo
- echo "dovecot-config not found from $dovecotdir, use --with-dovecot=PATH"
- echo "to give path to compiled Dovecot sources or to a directory with the"
- echo "installed dovecot-config file."
- AC_MSG_ERROR([dovecot-config not found])
-fi
-eval `cat $dovecotdir/dovecot-config`
-
-AC_SUBST(dovecot_moduledir)
-AC_SUBST(dovecot_pkgincludedir)
-AC_SUBST(dovecot_pkglibexecdir)
-AC_SUBST(dovecot_pkglibdir)
-AC_SUBST(dovecot_docdir)
-
-AC_SUBST(LIBDOVECOT)
-AC_SUBST(LIBDOVECOT_STORAGE)
-AC_SUBST(LIBDOVECOT_LOGIN)
-
-AC_SUBST(LIBDOVECOT_DEPS)
-AC_SUBST(LIBDOVECOT_STORAGE_DEPS)
-AC_SUBST(LIBDOVECOT_LOGIN_DEPS)
-
-LIBDOVECOT_INCLUDE="$LIBDOVECOT_INCLUDE $LIBDOVECOT_STORAGE_INCLUDE"
-AC_SUBST(LIBDOVECOT_INCLUDE)
-AC_SUBST(LIBDOVECOT_LDA_INCLUDE)
-AC_SUBST(LIBDOVECOT_SERVICE_INCLUDE)
-AC_SUBST(LIBDOVECOT_LOGIN_INCLUDE)
-
AC_CONFIG_FILES([
Makefile
doc/Makefile
diff -r 09342ba10357 -r 6271458836d8 m4/dovecot.m4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/dovecot.m4 Wed Apr 14 22:05:15 2010 +0200
@@ -0,0 +1,62 @@
+# dovecot.m4 - Check presence of dovecot -*-Autoconf-*-
+#
+# Copyright (C) 2010 Dennis Schridde
+#
+# This file is free software; the authors give
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 1
+
+AC_DEFUN([DC_PLUGIN_DEPS],[
+ _plugin_deps=yes
+ AC_MSG_CHECKING([whether OS supports plugin dependencies])
+ case "$host_os" in
+ darwin*)
+ # OSX loads the plugins twice, which breaks stuff
+ _plugin_deps=no
+ ;;
+ esac
+ AC_MSG_RESULT([$_plugin_deps])
+ AM_CONDITIONAL([DOVECOT_PLUGIN_DEPS], [test "x$_plugin_deps" = "xyes"])
+ unset _plugin_deps
+])
+
+# Substitute every var in the given comma seperated list
+AC_DEFUN([AX_SUBST_L],[
+ m4_foreach([__var__], [$@], [AC_SUBST(__var__)])
+])
+
+AC_DEFUN([DC_DOVECOT],[
+ AC_ARG_WITH(dovecot,
+ [ --with-dovecot=DIR Dovecot base directory],
+ [ dovecotdir="$withval" ], [
+ dc_prefix=$prefix
+ test "x$dc_prefix" = xNONE && dc_prefix=$ac_default_prefix
+ dovecotdir="$dc_prefix/lib/dovecot"
+ ]
+ )
+
+ AC_MSG_CHECKING([for dovecot-config in "$dovecotdir"])
+ if test -f "$dovecotdir/dovecot-config"; then
+ AC_MSG_RESULT([$dovecotdir/dovecot-config])
+ else
+ AC_MSG_RESULT([not found])
+ AC_MSG_NOTICE([])
+ AC_MSG_NOTICE([Use --with-dovecot=DIR to provide the path to the dovecot-config file.])
+ AC_MSG_ERROR([dovecot-config not found])
+ fi
+
+ eval `grep \
+ -e ^dovecot_[[a-z]]*= \
+ -e ^DOVECOT_[[A-Z_]]*= \
+ -e ^LIBDOVECOT[[A-Z_]]*= \
+ "$dovecotdir"/dovecot-config`
+ AX_SUBST_L([dovecot_moduledir], [dovecot_pkgincludedir], [dovecot_pkglibexecdir], [dovecot_pkglibdir], [dovecot_docdir])
+ AX_SUBST_L([DOVECOT_CFLAGS], [DOVECOT_LIBS], [DOVECOT_SSL_LIBS])
+ AX_SUBST_L([LIBDOVECOT], [LIBDOVECOT_LOGIN], [LIBDOVECOT_SQL], [LIBDOVECOT_STORAGE])
+ AX_SUBST_L([LIBDOVECOT_DEPS], [LIBDOVECOT_LOGIN_DEPS], [LIBDOVECOT_SQL_DEPS], [LIBDOVECOT_STORAGE_DEPS])
+ AX_SUBST_L([LIBDOVECOT_INCLUDE], [LIBDOVECOT_LDA_INCLUDE], [LIBDOVECOT_SERVICE_INCLUDE], [LIBDOVECOT_STORAGE_INCLUDE], [LIBDOVECOT_LOGIN_INCLUDE])
+
+ DC_PLUGIN_DEPS
+])
More information about the dovecot-cvs
mailing list