Skip to content
Snippets Groups Projects
Commit 909e7e83 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

Simplified package configuration with respect to linking against Dovecot (patch by Timo Sirainen).

parent 7cb7df25
No related branches found
No related tags found
No related merge requests found
......@@ -39,14 +39,6 @@ if ! test -f "$dovecotdir/dovecot-config"; then
AC_MSG_ERROR([dovecot-config not found])
fi
if test -d "$dovecotdir/src"; then
# compiling against sources
have_dovecot_sources=yes
else
# compiling against installed headers
have_dovecot_sources=no
fi
# Extensions under development
#
......@@ -100,50 +92,9 @@ AC_ARG_WITH(managesieve,
want_managesieve=yes)
AM_CONDITIONAL(BUILD_MANAGESIEVE, test "$want_managesieve" = "yes")
dnl replace relative ../ paths in the file with full paths
eval `cat $dovecotdir/dovecot-config|sed 's,\$(top_builddir)/,$dovecotdir/,g'`
if test $have_dovecot_sources = yes; then
dovecot_incdir="$dovecotdir"
dovecot_libdir="$dovecotdir"
dovecot_pkgincludedir='$(includedir)/dovecot'
dovecot_pkglibdir='$(libdir)/dovecot'
LIBDOVECOT='$(dovecot_libdir)/src/lib-dovecot/libdovecot.la'
LIBDOVECOT_STORAGE='$(dovecot_libdir)/src/lib-storage/libdovecot-storage.la'
LIBDOVECOT_LOGIN='$(dovecot_libdir)/src/login-common/libdovecot-login.la'
LIBDOVECOT_INCLUDE='-I$(dovecot_incdir) -I$(dovecot_incdir)/src/lib -I$(dovecot_incdir)/src/lib-dict -I$(dovecot_incdir)/src/lib-mail -I$(dovecot_incdir)/src/lib-storage -I$(dovecot_incdir)/src/lib-imap -I$(dovecot_incdir)/src/lib-charset'
LIBDOVECOT_LDA_INCLUDE='-I$(dovecot_incdir)/src/lib-lda -I$(dovecot_incdir)/src/lda'
LIBDOVECOT_SERVICE_INCLUDE='-I$(dovecot_incdir)/src/lib-master -I$(dovecot_incdir)/src/lib-settings'
LIBDOVECOT_STORAGE_INCLUDE='-I$(dovecot_incdir)/src/lib-index -I$(dovecot_incdir)/src/lib-storage/index -I$(dovecot_incdir)/src/lib-storage/index/raw'
LIBDOVECOT_LOGIN_INCLUDE='-I$(dovecot_incdir)/src/lib-auth -I$(dovecot_incdir)/src/login-common'
else
dovecot_libdir="$dovecotdir"
dovecot_pkgincludedir='$(dovecot_incdir)'
dovecot_pkglibdir='$(dovecotdir)'
LIBDOVECOT='$(dovecot_libdir)/libdovecot.la'
LIBDOVECOT_STORAGE='$(dovecot_libdir)/libdovecot-storage.la'
LIBDOVECOT_LOGIN='$(dovecot_libdir)/libdovecot-login.la'
LIBDOVECOT_INCLUDE='-I$(dovecot_incdir)'
LIBDOVECOT_LDA_INCLUDE=''
LIBDOVECOT_SERVICE_INCLUDE=''
LIBDOVECOT_STORAGE_INCLUDE=''
LIBDOVECOT_LOGIN_INCLUDE=''
fi
dovecot_pkglibexecdir='$(libexecdir)/dovecot'
dovecot_docdir='$(datadir)/doc/dovecot'
eval `cat $dovecotdir/dovecot-config`
AC_SUBST(LIBICONV)
AC_SUBST(RAND_LIBS)
AC_SUBST(MODULE_LIBS)
AC_SUBST(dovecot_incdir)
AC_SUBST(dovecot_libdir)
AC_SUBST(moduledir)
AC_SUBST(dovecot_pkgincludedir)
AC_SUBST(dovecot_pkglibexecdir)
......
......@@ -3,10 +3,8 @@ noinst_LTLIBRARIES = libsieve_ext_enotify_mailto.la
AM_CPPFLAGS = \
-I../ \
-I../../../ \
-I$(dovecot_incdir) \
-I$(dovecot_incdir)/src/lib \
-I$(dovecot_incdir)/src/lib-mail \
-I$(dovecot_incdir)/src/lib-storage
$(LIBDOVECOT_INCLUDE) \
$(LIBDOVECOT_STORAGE_INCLUDE)
libsieve_ext_enotify_mailto_la_SOURCES = \
uri-mailto.c \
......
......@@ -21,10 +21,12 @@ libs = \
$(LIBDOVECOT) \
./debug/libsieve_ext_debug.la
libs_ldadd = $(libs) $(MODULE_LIBS)
# Sieve Compile Tool
sievec_LDFLAGS = -export-dynamic
sievec_LDADD = $(libs)
sievec_LDADD = $(libs_ldadd)
sievec_DEPENDENCIES = $(libs)
sievec_SOURCES = \
......@@ -33,7 +35,7 @@ sievec_SOURCES = \
# Sieve Dump Tool
sieved_LDFLAGS = -export-dynamic
sieved_LDADD = $(libs)
sieved_LDADD = $(libs_ldadd)
sieved_DEPENDENCIES = $(libs)
sieved_SOURCES = \
......@@ -42,7 +44,7 @@ sieved_SOURCES = \
# Sieve Test Tool
sieve_test_LDFLAGS = -export-dynamic
sieve_test_LDADD = $(libs)
sieve_test_LDADD = $(libs_ldadd)
sieve_test_DEPENDENCIES = $(libs)
sieve_test_SOURCES = \
......@@ -53,7 +55,7 @@ sieve_test_SOURCES = \
# Sieve Filter Tool
sieve_filter_LDFLAGS = -export-dynamic
sieve_filter_LDADD = $(libs)
sieve_filter_LDADD = $(libs_ldadd)
sieve_filter_DEPENDENCIES = $(libs)
sieve_filter_SOURCES = \
......
......@@ -15,7 +15,7 @@ libs = \
$(LIBDOVECOT_STORAGE) \
$(LIBDOVECOT)
testsuite_LDADD = $(libs)
testsuite_LDADD = $(libs) $(MODULE_LIBS)
testsuite_DEPENDENCIES = $(libs)
commands = \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.