summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-05 23:32:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:18 -0500
commit1bd0211698df34ab3ec41cfd962d144be88e724b (patch)
treec29525c1bf708c516a5bd8475d36e44f7fd7b4f8
parent328a02e1acee35459afe7fde0259f69382de4aa5 (diff)
downloadsamba-1bd0211698df34ab3ec41cfd962d144be88e724b.tar.gz
samba-1bd0211698df34ab3ec41cfd962d144be88e724b.tar.bz2
samba-1bd0211698df34ab3ec41cfd962d144be88e724b.zip
r18108: move tdb to use the same build methods
(This used to be commit 05521650c622c933a742b833dc38b7e9b32836be)
-rw-r--r--source4/lib/tdb/Makefile.in4
-rw-r--r--source4/lib/tdb/configure.ac2
-rw-r--r--source4/lib/tdb/libtdb.m4 (renamed from source4/lib/tdb/config.m4)14
3 files changed, 16 insertions, 4 deletions
diff --git a/source4/lib/tdb/Makefile.in b/source4/lib/tdb/Makefile.in
index e68f7eb8c3..1e5884a968 100644
--- a/source4/lib/tdb/Makefile.in
+++ b/source4/lib/tdb/Makefile.in
@@ -15,9 +15,7 @@ builddir = @builddir@
CFLAGS = -I$(srcdir)/include -Iinclude @CFLAGS@
PROGS = bin/tdbtool bin/tdbtorture
-TDB_OBJ = common/tdb.o common/dump.o common/io.o common/lock.o \
- common/open.o common/traverse.o common/freelist.o common/error.o \
- common/transaction.o
+TDB_OBJ = @TDBOBJ@
DIRS = lib bin common tools examples
diff --git a/source4/lib/tdb/configure.ac b/source4/lib/tdb/configure.ac
index bf221a0322..0943bbeeb8 100644
--- a/source4/lib/tdb/configure.ac
+++ b/source4/lib/tdb/configure.ac
@@ -11,5 +11,5 @@ AC_CHECK_SIZEOF(off_t,cross)
AC_CHECK_SIZEOF(size_t,cross)
AC_CHECK_SIZEOF(ssize_t,cross)
AC_FUNC_MMAP
-m4_include(config.m4)
+m4_include(libtdb.m4)
AC_OUTPUT(Makefile tdb.pc)
diff --git a/source4/lib/tdb/config.m4 b/source4/lib/tdb/libtdb.m4
index cb0801795c..f2d604a840 100644
--- a/source4/lib/tdb/config.m4
+++ b/source4/lib/tdb/libtdb.m4
@@ -1,3 +1,17 @@
+dnl find the tdb sources. This is meant to work both for
+dnl tdb standalone builds, and builds of packages using tdb
+tdbdir=""
+for d in "$srcdir" "$srcdir/lib/tdb" "$srcdir/tdb" "$srcdir/../tdb"; do
+ if test -f "$d/common/tdb.c"; then
+ tdbdir="$d"
+ AC_SUBST(tdbdir)
+ break;
+ fi
+done
+TDBOBJ="common/tdb.o common/dump.o common/transaction.o common/error.o common/traverse.o"
+TDBOBJ="$TDBOBJ common/freelist.o common/io.o common/lock.o common/open.o"
+AC_SUBST(TDBOBJ)
+
AC_CHECK_FUNCS(mmap pread pwrite getpagesize utime)
AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h)