diff configure.in @ 9104:c6d306772f4e HEAD

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.
author Timo Sirainen <tss@iki.fi>
date Tue, 14 Apr 2009 13:09:21 -0400
parents e4832f128738
children a957a6be4af5
line wrap: on
line diff
--- a/configure.in	Mon Apr 13 20:15:14 2009 -0400
+++ b/configure.in	Tue Apr 14 13:09:21 2009 -0400
@@ -46,6 +46,12 @@
 		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)],
 	mem_align=$withval,
@@ -2217,6 +2223,26 @@
 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 **