]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dovecot-config: Added DOVECOT_INSTALLED parameter.
authorTimo Sirainen <tss@iki.fi>
Fri, 13 Feb 2015 12:35:54 +0000 (14:35 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 13 Feb 2015 12:35:54 +0000 (14:35 +0200)
Also added dovecot_installed_moduledir to dovecot.m4

These can be used by external plugins to access some headers and libraries
that don't already have existing DOVECOT_* parameters in dovecot-config.

Makefile.am
dovecot.m4

index 307c3ac61147f39fa0c26809f07cf428b2f81a13..9e77dc581cf228f36f9517c726fc7012f56a701d 100644 (file)
@@ -37,7 +37,7 @@ noop:
 dovecot-config: dovecot-config.in Makefile
        old=`pwd` && cd $(top_builddir) && abs_builddir=`pwd` && cd $$old && \
        cd $(top_srcdir) && abs_srcdir=`pwd` && cd $$old && \
-       cat dovecot-config.in | sed \
+       (echo "DOVECOT_INSTALLED=no"; cat dovecot-config.in | sed \
        -e "s|\$$(top_builddir)|$$abs_builddir|g" \
        -e "s|\$$(incdir)|$$abs_srcdir|g" \
        -e "s|\$$(LIBICONV)|$(LIBICONV)|g" \
@@ -47,7 +47,7 @@ dovecot-config: dovecot-config.in Makefile
        -e "s|^\(dovecot_pkglibexecdir\)=|\1=$(libexecdir)/dovecot|" \
        -e "s|^\(dovecot_docdir\)=|\1=$(docdir)|" \
        -e "s|^\(dovecot_moduledir\)=|\1=$(moduledir)|" \
-       > dovecot-config
+       > dovecot-config
 
 if HAVE_SYSTEMD
 %.service: %.service.in
@@ -64,6 +64,7 @@ install-exec-hook:
        $(mkdir_p) $(DESTDIR)$(pkglibdir); \
        grep -v '^LIBDOVECOT_.*_INCLUDE' dovecot-config | \
        grep -v '^LIBDOVECOT.*_DEPS' | sed \
+       -e "s|^\(DOVECOT_INSTALLED\)=.*$$|\1=yes|" \
        -e "s|^\(LIBDOVECOT\)=.*$$|\1='-L$(pkglibdir) -ldovecot'|" \
        -e "s|^\(LIBDOVECOT_LOGIN\)=.*$$|\1='-ldovecot-login $(SSL_LIBS)'|" \
        -e "s|^\(LIBDOVECOT_SQL\)=.*$$|\1=-ldovecot-sql|" \
index 144090e8666403b2c2c967a10ffad6c5fe0b03cc..2bb22c797a451aa676cf6cf86b8754c594e1b111 100644 (file)
@@ -6,7 +6,7 @@
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 13
+# serial 14
 
 AC_DEFUN([DC_DOVECOT_MODULEDIR],[
        AC_ARG_WITH(moduledir,
@@ -104,6 +104,8 @@ AC_DEFUN([DC_DOVECOT],[
        eval `grep -i '^dovecot_[[a-z_]]*=' "$dovecotdir"/dovecot-config`
        eval `grep '^LIBDOVECOT[[A-Z_]]*=' "$dovecotdir"/dovecot-config`
 
+       dovecot_installed_moduledir="$dovecot_moduledir"
+
        if test "$use_install_dirs" = "no"; then
                # the main purpose of these is to fix make distcheck for plugins
                # other than that, they don't really make much sense
@@ -114,12 +116,14 @@ AC_DEFUN([DC_DOVECOT],[
                dovecot_moduledir='$(moduledir)'
        fi
 
-       AX_SUBST_L([DISTCHECK_CONFIGURE_FLAGS], [dovecotdir], [dovecot_moduledir], [dovecot_pkgincludedir], [dovecot_pkglibexecdir], [dovecot_pkglibdir], [dovecot_docdir])
-       AX_SUBST_L([DOVECOT_CFLAGS], [DOVECOT_LIBS], [DOVECOT_SSL_LIBS], [DOVECOT_SQL_LIBS], [DOVECOT_COMPRESS_LIBS])
+       AX_SUBST_L([DISTCHECK_CONFIGURE_FLAGS], [dovecotdir], [dovecot_moduledir], [dovecot_installed_moduledir], [dovecot_pkgincludedir], [dovecot_pkglibexecdir], [dovecot_pkglibdir], [dovecot_docdir])
+       AX_SUBST_L([DOVECOT_INSTALLED], [DOVECOT_CFLAGS], [DOVECOT_LIBS], [DOVECOT_SSL_LIBS], [DOVECOT_SQL_LIBS], [DOVECOT_COMPRESS_LIBS])
        AX_SUBST_L([LIBDOVECOT], [LIBDOVECOT_LOGIN], [LIBDOVECOT_SQL], [LIBDOVECOT_SSL], [LIBDOVECOT_COMPRESS], [LIBDOVECOT_LDA], [LIBDOVECOT_STORAGE], [LIBDOVECOT_DSYNC])
        AX_SUBST_L([LIBDOVECOT_DEPS], [LIBDOVECOT_LOGIN_DEPS], [LIBDOVECOT_SQL_DEPS], [LIBDOVECOT_SSL_DEPS], [LIBDOVECOT_COMPRESS_DEPS], [LIBDOVECOT_LDA_DEPS], [LIBDOVECOT_STORAGE_DEPS], [LIBDOVECOT_DSYNC_DEPS])
        AX_SUBST_L([LIBDOVECOT_INCLUDE], [LIBDOVECOT_LDA_INCLUDE], [LIBDOVECOT_DOVEADM_INCLUDE], [LIBDOVECOT_SERVICE_INCLUDE], [LIBDOVECOT_STORAGE_INCLUDE], [LIBDOVECOT_LOGIN_INCLUDE], [LIBDOVECOT_CONFIG_INCLUDE], [LIBDOVECOT_IMAP_INCLUDE], [LIBDOVECOT_DSYNC_INCLUDE], [LIBDOVECOT_IMAPC_INCLUDE], [LIBDOVECOT_FTS_INCLUDE], [LIBDOVECOT_NOTIFY_INCLUDE])
 
+       AM_CONDITIONAL(DOVECOT_INSTALLED, test "$DOVECOT_INSTALLED" = "yes")
+
        DC_PLUGIN_DEPS
        DC_DOVECOT_TEST_WRAPPER
 ])