+2006-04-24 Devashish Sharma <sdevashish@novell.com>
+
+ * configure.in : Added a configure time switch to support dynamic
+ linking with libdb. The default is static linking and by using the
+ switch --with-libdb=prefix dynamic linking with libdb can be
+ enabled.
+ Patch by Ross Burton <ross@burtonini.com>
+
2006-04-18 Jeffrey Stedfast <fejj@novell.com>
* configure.in: Added the Mail Directory configure info.
* libedataserver/e-data-server-util.c: The fixed Win32 versions of
g_rename() and g_stat() have been in GLib since GLib 2.8.5, so
- let's drop them from here.
+let's drop them from here.
2006-02-24 Chenthill Palanisamy <pchenthill@novell.com>
AUTOMAKE_OPTIONS = 1.6
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
-SUBDIRS = libdb win32 libedataserver servers camel addressbook calendar libedataserverui src docs art po
+if ! WITH_LIBDB
+LIBDB = libdb
+endif
+
+SUBDIRS = $(LIBDB) win32 libedataserver servers camel addressbook calendar libedataserverui src docs art po
DIST_SUBDIRS= win32 libedataserver servers camel addressbook calendar libedataserverui src docs art po
changelogs = \
-I$(top_builddir) \
-I$(top_srcdir)/addressbook \
-I$(top_builddir)/addressbook \
- -I$(top_srcdir)/libdb/dist \
+ $(DB_CFLAGS) \
$(EVOLUTION_ADDRESSBOOK_CFLAGS)
extension_LTLIBRARIES = libebookbackendfile.la
$(top_builddir)/addressbook/libebook/libebook-1.2.la \
$(top_builddir)/addressbook/libedata-book/libedata-book-1.2.la \
$(top_builddir)/libedataserver/libedataserver-1.2.la \
- $(top_builddir)/libdb/dist/libdb-4.1.la \
+ $(DB_LIBS) \
$(EVOLUTION_ADDRESSBOOK_LIBS)
libebookbackendfile_la_LDFLAGS = \
[AC_MSG_ERROR([No regex library found])])])
AC_SUBST(REGEX_LIBS)
+dnl **************************************************
+dnl * libdb checking
+dnl **************************************************
+
+AC_ARG_WITH(libdb, AC_HELP_STRING([--with-libdb],[Prefix where libdb is installed]), dynamic_libdb=yes, dynamic_libdb=no)
+if test "x${dynamic_libdb}" = "xyes"; then
+ DB_CFLAGS="-I$withval/include"
+ DB_LIBS="-L$withval/lib -ldb"
+
+ AC_MSG_CHECKING([Berkeley DB])
+ save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
+ save_libs=$LIBS; LIBS="$DB_LIBS"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <db.h>]],
+ [db_create(NULL, NULL, 0)])],
+ AC_MSG_RESULT(yes),
+ AC_MSG_ERROR(cannot find libdb))
+ CFLAGS=$save_cflags
+ LIBS=$save_libs
+
+ msg_libdb="dynamically linked"
+else
+ DB_CFLAGS="-I\$(top_srcdir)/libdb/dist"
+ DB_LIBS="\$(top_builddir)/libdb/dist/libdb-4.1.la"
+ AC_MSG_NOTICE(Using local libdb)
+ msg_libdb="statically linked to local copy"
+fi
+AM_CONDITIONAL(WITH_LIBDB, test "x$dynamic_libdb" != "xno")
+AC_SUBST(DB_CFLAGS)
+AC_SUBST(DB_LIBS)
+
+
dnl ******************************
dnl iconv checking
dnl ******************************
export privincludedir
export privdatadir
AC_CONFIG_SUBDIRS(calendar/libical)
-AC_CONFIG_SUBDIRS(libdb/dist)
-
+if test $dynamic_libdb = no; then
+ AC_CONFIG_SUBDIRS(libdb/dist)
+fi
AC_OUTPUT([
Makefile
evolution-data-server-zip
SSL support: $msg_ssl
SMIME support: $msg_smime
IPv6 support: $msg_ipv6
+ Berkeley DB: $msg_libdb
Exchange support: $msg_exchange
Dot Locking: $msg_dot
File Locking: $msg_file
INCLUDES = \
-I$(top_srcdir) \
-DG_LOG_DOMAIN=\"e-data-server\" \
- -I$(top_srcdir)/libdb/dist \
+ $(DB_CFLAGS) \
-DE_DATA_SERVER_PREFIX=\"$(prefix)\" \
-DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
-DE_DATA_SERVER_EXTENSIONDIR=\"$(extensiondir)\" \
libedataserver_1_2_la_LIBADD = \
$(E_DATA_SERVER_LIBS) \
$(ICONV_LIBS) \
- $(top_builddir)/libdb/dist/libdb-4.1.la \
+ $(DB_LIBS) \
$(SOCKET_LIBS)
libedataserver_1_2_la_LDFLAGS = \