dovecot-1.3: Added configure --without-shared-libs to link built...

dovecot at dovecot.org dovecot at dovecot.org
Tue Apr 14 20:10:19 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.3/rev/c6d306772f4e
changeset: 9104:c6d306772f4e
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Apr 14 13:09:21 2009 -0400
description:
Added configure --without-shared-libs to link built binaries against static libraries.
The libraries are still built and installed, so this is mainly useful for
making life easier for developers.

diffstat:

18 files changed, 98 insertions(+), 68 deletions(-)
configure.in                      |   26 ++++++++++++++++++++++++++
src/auth/Makefile.am              |    8 ++++----
src/config/Makefile.am            |    3 ++-
src/dict/Makefile.am              |    5 +++--
src/imap-login/Makefile.am        |    4 ++--
src/imap/Makefile.am              |    8 +++-----
src/lda/Makefile.am               |    6 +++---
src/lib-dovecot/Makefile.am       |    8 ++++----
src/lib-storage/Makefile.am       |   16 ++++++++++------
src/login-common/Makefile.am      |   12 +++++++++---
src/master/Makefile.am            |    4 ++--
src/plugins/convert/Makefile.am   |    5 +++--
src/plugins/expire/Makefile.am    |    8 ++++----
src/plugins/fts-squat/Makefile.am |    4 ++--
src/pop3-login/Makefile.am        |    4 ++--
src/pop3/Makefile.am              |    7 +++----
src/tests/Makefile.am             |    6 +++---
src/util/Makefile.am              |   32 +++++++++++++-------------------

diffs (truncated from 454 to 300 lines):

diff -r 5c12eac2c3ca -r c6d306772f4e configure.in
--- a/configure.in	Mon Apr 13 20:15:14 2009 -0400
+++ b/configure.in	Tue Apr 14 13:09:21 2009 -0400
@@ -45,6 +45,12 @@ AC_ARG_ENABLE(asserts,
 	if test x$enableval = xno; then
 		AC_DEFINE(DISABLE_ASSERTS,, Disable asserts)
 	fi)
+
+AC_ARG_WITH(shared-libs,
+[  --with-shared-libs      Link binaries using shared Dovecot libraries (default)],
+	want_shared_libs=$withval,
+	want_shared_libs=yes)
+AM_CONDITIONAL(BUILD_SHARED_LIBS, test "$want_shared_libs" = "yes")
 
 AC_ARG_WITH(mem-align,
 [  --with-mem-align=BYTES  Set the memory alignment (default: 8)],
@@ -2217,6 +2223,26 @@ AC_DEFINE_UNQUOTED(MAIL_STORAGES, "$mail
 AC_DEFINE_UNQUOTED(MAIL_STORAGES, "$mail_storages", List of compiled in mail storages)
 
 dnl **
+dnl ** Shared libraries usage
+dnl **
+
+if test "$want_shared_libs" = "yes"; then
+  LIBDOVECOT='$(top_builddir)/src/lib-dovecot/libdovecot.la'
+  LIBDOVECOT_STORAGE='$(top_builddir)/src/lib-storage/libdovecot-storage.la'
+  LIBDOVECOT_LOGIN='$(top_builddir)/src/login-common/libdovecot-login.la'
+else
+  LIBDOVECOT='$(top_builddir)/src/lib-settings/libsettings.la $(top_builddir)/src/lib-dict/libdict.la $(top_builddir)/src/lib-imap/libimap.la $(top_builddir)/src/lib-mail/libmail.la $(top_builddir)/src/lib-auth/libauth.la $(top_builddir)/src/lib-charset/libcharset.la $(top_builddir)/src/lib-master/libmaster.la $(top_builddir)/src/lib/liblib.la $(LIBICONV)'
+  LIBDOVECOT_STORAGE_BASE='$(top_builddir)/src/lib-storage/libstorage.la $(top_builddir)/src/lib-storage/register/libstorage_register.la $(top_builddir)/src/lib-storage/list/libstorage_list.la $(top_builddir)/src/lib-storage/index/libstorage_index.la $(top_builddir)/src/lib-index/libindex.la'
+  LIBDOVECOT_STORAGE="$LINKED_STORAGE_LIBS $LIBDOVECOT_STORAGE_BASE"
+  LIBDOVECOT_LOGIN='$(top_builddir)/src/login-common/liblogin.la'
+fi
+LIBDOVECOT_SQL='$(top_builddir)/src/lib-sql/libsql.la'
+AC_SUBST(LIBDOVECOT)
+AC_SUBST(LIBDOVECOT_STORAGE)
+AC_SUBST(LIBDOVECOT_LOGIN)
+AC_SUBST(LIBDOVECOT_SQL)
+
+dnl **
 dnl ** SQL drivers
 dnl **
 
diff -r 5c12eac2c3ca -r c6d306772f4e src/auth/Makefile.am
--- a/src/auth/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/auth/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -41,8 +41,9 @@ dovecot_auth_LDADD = \
 	libpassword.a \
 	../lib-ntlm/libntlm.a \
 	../lib-otp/libotp.a \
-	../lib-sql/libsql.la \
-	../lib-dovecot/libdovecot.la \
+	$(LIBDOVECOT_SQL) \
+	$(LIBDOVECOT) \
+	$(MODULE_LIBS) \
 	$(AUTH_LIBS)
 
 ldap_sources = db-ldap.c passdb-ldap.c userdb-ldap.c
@@ -155,8 +156,7 @@ else
   noinst_HEADERS = $(headers)
 endif
 
-checkpassword_reply_LDADD = \
-	../lib-dovecot/libdovecot.la
+checkpassword_reply_LDADD = $(LIBDOVECOT)
 
 checkpassword_reply_sources = \
 	checkpassword-reply.c
diff -r 5c12eac2c3ca -r c6d306772f4e src/config/Makefile.am
--- a/src/config/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/config/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -10,7 +10,8 @@ AM_CPPFLAGS = \
 	-DSSLDIR=\""$(ssldir)\""
 
 doveconf_LDADD = \
-	../lib-dovecot/libdovecot.la \
+	$(LIBDOVECOT) \
+	$(MODULE_LIBS) \
 	$(RAND_LIBS)
 
 doveconf_SOURCES = \
diff -r 5c12eac2c3ca -r c6d306772f4e src/dict/Makefile.am
--- a/src/dict/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/dict/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -13,11 +13,12 @@ dict_LDFLAGS = -export-dynamic
 
 libs = \
 	../lib-dict/libdict_backend.a \
-	../lib-sql/libsql.la \
-	../lib-dovecot/libdovecot.la
+	$(LIBDOVECOT_SQL) \
+	$(LIBDOVECOT)
 
 dict_LDADD = \
 	$(libs) \
+	$(MODULE_LIBS) \
 	$(DICT_LIBS) \
 	$(SQL_LIBS)
 
diff -r 5c12eac2c3ca -r c6d306772f4e src/imap-login/Makefile.am
--- a/src/imap-login/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/imap-login/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -9,8 +9,8 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/src/login-common
 
 imap_login_LDADD = \
-	../login-common/libdovecot-login.la \
-	../lib-dovecot/libdovecot.la
+	$(LIBDOVECOT_LOGIN) \
+	$(LIBDOVECOT)
 
 imap_login_SOURCES = \
 	client.c \
diff -r 5c12eac2c3ca -r c6d306772f4e src/imap/Makefile.am
--- a/src/imap/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/imap/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -15,12 +15,10 @@ imap_LDFLAGS = -export-dynamic
 imap_LDFLAGS = -export-dynamic
 
 libs = \
-	../lib-storage/libdovecot-storage.la \
-	../lib-dovecot/libdovecot.la
+	$(LIBDOVECOT_STORAGE) \
+	$(LIBDOVECOT)
 
-imap_LDADD = \
-	$(libs)
-
+imap_LDADD = $(libs) $(MODULE_LIBS)
 imap_DEPENDENCIES = $(libs)
 
 cmds = \
diff -r 5c12eac2c3ca -r c6d306772f4e src/lda/Makefile.am
--- a/src/lda/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/lda/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -19,10 +19,10 @@ dovecot_lda_LDFLAGS = -export-dynamic
 
 libs = \
 	../lib-lda/liblda.a \
-	../lib-storage/libdovecot-storage.la \
-	../lib-dovecot/libdovecot.la
+	$(LIBDOVECOT_STORAGE) \
+	$(LIBDOVECOT)
 
-dovecot_lda_LDADD = $(libs)
+dovecot_lda_LDADD = $(libs) $(MODULE_LIBS)
 
 dovecot_lda_DEPENDENCIES = $(libs)
 
diff -r 5c12eac2c3ca -r c6d306772f4e src/lib-dovecot/Makefile.am
--- a/src/lib-dovecot/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/lib-dovecot/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -1,7 +1,3 @@ pkglib_LTLIBRARIES = libdovecot.la
-pkglib_LTLIBRARIES = libdovecot.la
-
-libdovecot_la_SOURCES = 
-
 libs = \
 	../lib-settings/libsettings.la \
 	../lib-dict/libdict.la \
@@ -12,6 +8,10 @@ libs = \
 	../lib-master/libmaster.la \
 	../lib/liblib.la
 
+pkglib_LTLIBRARIES = libdovecot.la
+
+libdovecot_la_SOURCES = 
+
 libdovecot_la_LIBADD = \
 	$(libs) \
 	$(MODULE_LIBS) \
diff -r 5c12eac2c3ca -r c6d306772f4e src/lib-storage/Makefile.am
--- a/src/lib-storage/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/lib-storage/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -1,6 +1,6 @@ SUBDIRS = list index register
 SUBDIRS = list index register
 
-pkglib_LTLIBRARIES = libdovecot-storage.la
+noinst_LTLIBRARIES = libstorage.la
 
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/src/lib \
@@ -14,7 +14,7 @@ AM_CPPFLAGS = \
 	-DPKG_RUNDIR=\""$(rundir)"\" \
 	-DMODULEDIR=\""$(moduledir)"\"
 
-libdovecot_storage_la_SOURCES = \
+libstorage_la_SOURCES = \
 	mail.c \
 	mail-copy.c \
 	mail-error.c \
@@ -36,10 +36,8 @@ libs = \
 	index/libstorage_index.la \
 	register/libstorage_register.la	
 
-libdovecot_storage_la_LIBADD = $(libs)
-libdovecot_storage_la_DEPENDENCIES = $(libs)
-
-libdovecot_storage_la_LDFLAGS = -export-dynamic
+libstorage_la_LIBADD = $(libs)
+libstorage_la_DEPENDENCIES = $(libs)
 
 headers = \
 	mail-copy.h \
@@ -59,6 +57,12 @@ headers = \
 	mailbox-tree.h \
 	mailbox-uidvalidity.h
 
+pkglib_LTLIBRARIES = libdovecot-storage.la
+libdovecot_storage_la_SOURCES = 
+libdovecot_storage_la_LIBADD = libstorage.la
+libdovecot_storage_la_DEPENDENCIES = libstorage.la
+libdovecot_storage_la_LDFLAGS = -export-dynamic
+
 if INSTALL_HEADERS
   pkginc_libdir=$(pkgincludedir)/src/lib-storage
   pkginc_lib_HEADERS = $(headers)
diff -r 5c12eac2c3ca -r c6d306772f4e src/login-common/Makefile.am
--- a/src/login-common/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/login-common/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -1,4 +1,4 @@ pkglib_LTLIBRARIES = libdovecot-login.la
-pkglib_LTLIBRARIES = libdovecot-login.la
+noinst_LTLIBRARIES = liblogin.la
 
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/src/lib \
@@ -9,7 +9,7 @@ AM_CPPFLAGS = \
 	-DSBINDIR=\""$(sbindir)"\" \
 	-DSSLDIR=\""$(ssldir)\""
 
-libdovecot_login_la_SOURCES = \
+liblogin_la_SOURCES = \
 	client-common.c \
 	login-proxy.c \
 	login-settings.c \
@@ -20,7 +20,7 @@ libdovecot_login_la_SOURCES = \
 	ssl-proxy-gnutls.c \
 	ssl-proxy-openssl.c
 
-libdovecot_login_la_LIBADD = \
+liblogin_la_LIBADD = \
 	$(SSL_LIBS)
 
 noinst_HEADERS = \
@@ -31,3 +31,9 @@ noinst_HEADERS = \
 	master.h \
 	sasl-server.h \
 	ssl-proxy.h
+
+pkglib_LTLIBRARIES = libdovecot-login.la
+libdovecot_login_la_SOURCES = 
+libdovecot_login_la_LIBADD = liblogin.la
+libdovecot_login_la_DEPENDENCIES = liblogin.la
+libdovecot_login_la_LDFLAGS = -export-dynamic
diff -r 5c12eac2c3ca -r c6d306772f4e src/master/Makefile.am
--- a/src/master/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/master/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -16,7 +16,7 @@ AM_CPPFLAGS = \
 
 dovecot_LDADD = \
 	$(LIBCAP) \
-	../lib-dovecot/libdovecot.la
+	$(LIBDOVECOT)
 
 dovecot_SOURCES = \
 	auth-process.c \
@@ -57,6 +57,6 @@ ssl_build_param_SOURCES = \
 	ssl-init-gnutls.c
 
 ssl_build_param_LDADD = \
-	../lib-dovecot/libdovecot.la \
+	$(LIBDOVECOT) \
 	$(SSL_LIBS)
 
diff -r 5c12eac2c3ca -r c6d306772f4e src/plugins/convert/Makefile.am
--- a/src/plugins/convert/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/plugins/convert/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -30,10 +30,11 @@ common_objects = \
 	convert-storage.lo
 
 libs = \
-	$(top_builddir)/src/lib-storage/libdovecot-storage.la \
-	$(top_builddir)/src/lib-dovecot/libdovecot.la
+	$(LIBDOVECOT_STORAGE) \
+	$(LIBDOVECOT)
 
 convert_tool_LDADD = \
+	$(MODULE_LIBS) \
 	$(common_objects) \
 	$(libs)
 
diff -r 5c12eac2c3ca -r c6d306772f4e src/plugins/expire/Makefile.am
--- a/src/plugins/expire/Makefile.am	Mon Apr 13 20:15:14 2009 -0400
+++ b/src/plugins/expire/Makefile.am	Tue Apr 14 13:09:21 2009 -0400
@@ -32,9 +32,9 @@ expire_tool_SOURCES = \
 	expire-tool.c
 
 libs = \
-	$(top_builddir)/src/lib-storage/libdovecot-storage.la \
-	$(top_builddir)/src/lib-dovecot/libdovecot.la


More information about the dovecot-cvs mailing list