Skip to content

Commit

Permalink
Split parts of lib-dict into lib-dict-extra.
Browse files Browse the repository at this point in the history
Otherwise there's a circular dependency because lib-dict/dict-fs.c depends
on lib-fs, while lib-fs/fs-dict.c depends on lib-dict. This becomes a problem
when compiling --without-shared-libs, although for some reason it works for
me while linking the Dovecot core, but not when linking external plugins.
  • Loading branch information
sirainen committed Apr 26, 2016
1 parent cfb90f1 commit bfbb24b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 6 deletions.
3 changes: 2 additions & 1 deletion configure.ac
Expand Up @@ -2523,7 +2523,7 @@ if test "$want_shared_libs" = "yes"; then
LIBDOVECOT_LOGIN='$(top_builddir)/src/login-common/libdovecot-login.la'
LIBDOVECOT_LDA='$(top_builddir)/src/lib-lda/libdovecot-lda.la'
else
LIBDOVECOT_DEPS='$(top_builddir)/src/lib-master/libmaster.la $(top_builddir)/src/lib-settings/libsettings.la $(top_builddir)/src/lib-stats/libstats.la $(top_builddir)/src/lib-http/libhttp.la $(top_builddir)/src/lib-dict/libdict.la $(top_builddir)/src/lib-dns/libdns.la $(top_builddir)/src/lib-fs/libfs.la $(top_builddir)/src/lib-imap/libimap.la $(top_builddir)/src/lib-mail/libmail.la $(top_builddir)/src/lib-sasl/libsasl.la $(top_builddir)/src/lib-auth/libauth.la $(top_builddir)/src/lib-charset/libcharset.la $(top_builddir)/src/lib-ssl-iostream/libssl_iostream.la $(top_builddir)/src/lib-test/libtest.la $(top_builddir)/src/lib/liblib.la'
LIBDOVECOT_DEPS='$(top_builddir)/src/lib-dict-extra/libdict_extra.la $(top_builddir)/src/lib-master/libmaster.la $(top_builddir)/src/lib-settings/libsettings.la $(top_builddir)/src/lib-stats/libstats.la $(top_builddir)/src/lib-http/libhttp.la $(top_builddir)/src/lib-fs/libfs.la $(top_builddir)/src/lib-dict/libdict.la $(top_builddir)/src/lib-dns/libdns.la $(top_builddir)/src/lib-imap/libimap.la $(top_builddir)/src/lib-mail/libmail.la $(top_builddir)/src/lib-sasl/libsasl.la $(top_builddir)/src/lib-auth/libauth.la $(top_builddir)/src/lib-charset/libcharset.la $(top_builddir)/src/lib-ssl-iostream/libssl_iostream.la $(top_builddir)/src/lib-test/libtest.la $(top_builddir)/src/lib/liblib.la'
LIBDOVECOT="$LIBDOVECOT_DEPS \$(LIBICONV) \$(MODULE_LIBS)"
LIBDOVECOT_STORAGE_DEPS='$(top_builddir)/src/lib-storage/libstorage.la'
LIBDOVECOT_LOGIN='$(top_builddir)/src/login-common/liblogin.la'
Expand Down Expand Up @@ -2859,6 +2859,7 @@ src/lib-auth/Makefile
src/lib-charset/Makefile
src/lib-compression/Makefile
src/lib-dict/Makefile
src/lib-dict-extra/Makefile
src/lib-dns/Makefile
src/lib-fs/Makefile
src/lib-fts/Makefile
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.am
Expand Up @@ -23,6 +23,7 @@ LIBDOVECOT_SUBDIRS = \

SUBDIRS = \
$(LIBDOVECOT_SUBDIRS) \
lib-dict-extra \
lib-dovecot \
lib-fts \
lib-imap-client \
Expand Down
14 changes: 14 additions & 0 deletions src/lib-dict-extra/Makefile.am
@@ -0,0 +1,14 @@
noinst_LTLIBRARIES = libdict_extra.la

dict_drivers = @dict_drivers@

AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib-dict \
-I$(top_srcdir)/src/lib-fs \
-I$(top_srcdir)/src/lib-settings \
$(SQL_CFLAGS)

libdict_extra_la_SOURCES = \
dict-fs.c \
dict-register.c
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions src/lib-dict/Makefile.am
@@ -1,12 +1,9 @@
noinst_LTLIBRARIES = libdict.la
noinst_LIBRARIES = libdict_backend.a

dict_drivers = @dict_drivers@

AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib-test \
-I$(top_srcdir)/src/lib-fs \
-I$(top_srcdir)/src/lib-ldap \
-I$(top_srcdir)/src/lib-sql \
-I$(top_srcdir)/src/lib-settings \
Expand All @@ -16,11 +13,9 @@ base_sources = \
dict.c \
dict-client.c \
dict-file.c \
dict-fs.c \
dict-memcached.c \
dict-memcached-ascii.c \
dict-redis.c \
dict-register.c \
dict-transaction-memory.c

libdict_la_SOURCES = \
Expand Down
1 change: 1 addition & 0 deletions src/lib-dovecot/Makefile.am
@@ -1,6 +1,7 @@
# when adding libraries, update LIBDOVECOT also in configure.in
libs = \
../lib-master/libmaster.la \
../lib-dict-extra/libdict_extra.la \
../lib-fs/libfs.la \
../lib-settings/libsettings.la \
../lib-stats/libstats.la \
Expand Down

0 comments on commit bfbb24b

Please sign in to comment.