]> arthur.barton.de Git - netatalk.git/commitdiff
New configure option --with-tdb
authorRalph Boehme <sloowfranklin@gmail.com>
Thu, 17 Oct 2013 12:36:44 +0000 (14:36 +0200)
committerRalph Boehme <sloowfranklin@gmail.com>
Sat, 24 Aug 2013 19:25:28 +0000 (21:25 +0200)
NEWS
configure.ac
include/atalk/tdb.h
libatalk/Makefile.am
libatalk/cnid/tdb/Makefile.am
macros/netatalk.m4
macros/summary.m4

diff --git a/NEWS b/NEWS
index 4760eda2e09d848adf81dd9668b9b885d767ebaa..f9d88e2789eaa6878f86294d87f673c182adeef3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,8 @@ Changes in 3.0.6
 * FIX: Disable Kerberos UAM if AFP service principal name can't be
        evaluated. Fixes bug #531.
 * FIX: Fix handling of large number of volumes. Bug #527.
+* NEW: Configure option --with-tbd which can be used to disable the
+       use of the bundled tdb and use a system installed version.
 
 Changes in 3.0.5
 ================
index 90f10fec28828e9eb6c1e8b94a647a98b20f97f2..6f56cdc3e85b6e4d90eed5d4b9d563247016e8a5 100644 (file)
@@ -182,6 +182,9 @@ AC_NETATALK_SENDFILE
 dnl Check whether bundled libevent shall not be used
 AC_NETATALK_LIBEVENT
 
+dnl Check whether bundled tdb shall be used
+AC_NETATALK_TDB
+
 dnl libatalk API checks
 AC_DEVELOPER
 
index 789649a1a6ded108932ddd9d90f52b0be10a4b14..b13ee350a2fe1c79071f658dc3d57c57d4865980 100644 (file)
@@ -1,5 +1,8 @@
-#ifndef __TDB_H__
-#define __TDB_H__
+#ifndef USE_BUILTIN_TDB
+#  include <tdb.h>
+#else
+#  ifndef __TDB_H__
+#    define __TDB_H__
 
 /* 
    Unix SMB/CIFS implementation.
@@ -174,4 +177,5 @@ extern TDB_DATA tdb_null;
 }
 #endif
 
-#endif /* tdb.h */
+#  endif /* tdb.h */
+#endif /* USE_BUILTIN_TDB */
index 06e869a332e97583d5052a33acfb787a929494de..62f1af30c9f23d65c9d149831cf62607d9f70926 100644 (file)
@@ -34,7 +34,7 @@ VERSION_INFO = 6:0:0
 #   3.0.4           5:0:0
 #   3.0.5           6:0:0
 
-SUBDIRS = acl adouble bstring compat cnid dsi iniparser tdb util unicode vfs
+SUBDIRS = acl adouble bstring compat cnid dsi iniparser util unicode vfs
 
 lib_LTLIBRARIES = libatalk.la
 
@@ -52,7 +52,6 @@ libatalk_la_LIBADD  = \
        compat/libcompat.la     \
        dsi/libdsi.la           \
        iniparser/libiniparser.la \
-       tdb/libtdb.la       \
        unicode/libunicode.la \
        util/libutil.la         \
        vfs/libvfs.la
@@ -65,13 +64,18 @@ libatalk_la_DEPENDENCIES = \
        compat/libcompat.la     \
        dsi/libdsi.la           \
        iniparser/libiniparser.la \
-       tdb/libtdb.la       \
        unicode/libunicode.la \
        util/libutil.la         \
        vfs/libvfs.la
 
 libatalk_la_LDFLAGS = -version-info $(VERSION_INFO)
 
+if USE_BUILTIN_TDB
+SUBDIRS += tdb
+libatalk_la_LIBADD += tdb/libtdb.la
+libatalk_la_DEPENDENCIES += tdb/libtdb.la
+endif
+
 if DEVELOPER
 all-local: .libs/libatalk.so
        @$(top_srcdir)/abigen.sh .libs/libatalk.so > libatalk.abi.tmp
index 58a4f7225215aa33208a19eeeeabd2d2b9172b72..93c289aa5faa53a633f09916f1d4807f592bd42c 100644 (file)
@@ -14,4 +14,7 @@ libcnid_tdb_la_SOURCES = cnid_tdb_add.c \
                         cnid_tdb_update.c \
                         cnid_tdb.h
 
+libcnid_tdb_la_CFLAGS = @TDB_CFLAGS@
+libcnid_tdb_la_LIBADD = @TDB_LIBS@
+
 EXTRA_DIST = README cnid_tdb_nextid.c
index 27c30322dcd248e870e21321d6999e0d0073fefb..be0fb3a6a2af22a294b62ece9308e883f3c676af 100644 (file)
@@ -156,6 +156,31 @@ AC_DEFUN([AC_NETATALK_LIBEVENT], [
     AM_CONDITIONAL(USE_BUILTIN_LIBEVENT, test x"$use_bundled_libevent" = x"yes")
 ])
 
+dnl Whether to disable bundled tdb
+AC_DEFUN([AC_NETATALK_TDB], [
+    AC_ARG_WITH(
+        tdb,
+        [AS_HELP_STRING([--with-tdb],[whether to use the bundled tdb (default: yes)])],
+        use_bundled_tdb=$withval,
+        use_bundled_tdb=yes
+    )
+    AC_MSG_CHECKING([whether to use bundled tdb])
+    AC_MSG_RESULT([$use_bundled_tdb])
+
+    if test x"$use_bundled_tdb" = x"yes" ; then
+        AC_DEFINE(USE_BUILTIN_TDB, 1, [Use internal tbd])
+    else
+        if test -z "$TDB_LIBS" ; then
+            PKG_CHECK_MODULES(TDB, tdb, , [AC_MSG_ERROR([couldn't find tdb with pkg-config])])
+        fi
+        use_bundled_tdb=no
+    fi        
+
+    AC_SUBST(TDB_CFLAGS)
+    AC_SUBST(TDB_LIBS)
+    AM_CONDITIONAL(USE_BUILTIN_TDB, test x"$use_bundled_tdb" = x"yes")
+])
+
 dnl Filesystem Hierarchy Standard (FHS) compatibility
 AC_DEFUN([AC_NETATALK_FHS], [
 AC_MSG_CHECKING([whether to use Filesystem Hierarchy Standard (FHS) compatibility])
index 0f8193fbf109f7a3782ea29b614e496edd3c6eb7..810c896613267920b99faccba5b1c9a5de3bcce9 100644 (file)
@@ -142,4 +142,12 @@ AC_DEFUN([AC_NETATALK_LIBS_SUMMARY], [
                AC_MSG_RESULT([        LIBS   = $LIBEVENT_CFLAGS])
                AC_MSG_RESULT([        CFLAGS = $LIBEVENT_LDFLAGS])
     fi
+
+    AC_MSG_RESULT([    TDB:])
+    if test x"$use_bundled_tdb" = x"yes"; then
+               AC_MSG_RESULT([        bundled])
+    else
+               AC_MSG_RESULT([        LIBS   = $TDB_LIBS])
+               AC_MSG_RESULT([        CFLAGS = $TDB_CFLAGS])
+    fi
 ])