[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-22-g8925778

Michael Adam obnox at samba.org
Fri Jun 19 19:18:15 GMT 2009


The branch, master has been updated
       via  8925778a61bc26e898d948ee445eb4f9781924de (commit)
       via  23c7eccc27d2263c069522a1f67e549882490040 (commit)
       via  bd70351b9493c2b3a057e47f5a393408234bdd8c (commit)
       via  e3c7720bfd199751fc8ed4a9f111a4ab72aae8b0 (commit)
       via  5ceda58b8dc27bef915128c23f3e9e4a2886b998 (commit)
       via  ec154a1d81dd2e71ec9fec7ed8abd1329153048e (commit)
      from  7930f15f5dce0dd72b354f903a758b03988371b8 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8925778a61bc26e898d948ee445eb4f9781924de
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 19 21:04:06 2009 +0200

    s3: fix make test with external libtalloc or libtdb.
    
    This skips the talloctort and tdbtorture tests when the
    corresponding binaries are not present.
    There might be more clever ways of detecting wether samba
    has been linked with internal or external libraries, but
    as a first approximation, this seems valid.
    
    Michael

commit 23c7eccc27d2263c069522a1f67e549882490040
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 19 20:31:33 2009 +0200

    s3:build: build talloctort only when using the internal liballoc
    
    Fixes the build with the external libtalloc.
    And is the reasonable thing to do anyways.
    
    Michael

commit bd70351b9493c2b3a057e47f5a393408234bdd8c
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 19 19:45:58 2009 +0200

    s3:build: build the tdb tools only when using the internal libtdb
    
    This fixes the build when internal libtdb is used.
    
    Michael

commit e3c7720bfd199751fc8ed4a9f111a4ab72aae8b0
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 19 19:27:02 2009 +0200

    s3:build: remove LIBTDB_OBJ from TDBTORTURE_OBJ collection
    
    tdbtorture is linked with LIBTDB_LIBS, which is whatever
    configure has determined to be (-ltdb or LIBTDB_OBJ ...).
    
    Michael

commit 5ceda58b8dc27bef915128c23f3e9e4a2886b998
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 19 19:02:04 2009 +0200

    s3:build: check for availability of external libtdb and use it if available
    
    Link internal libtalloc statiaclly if extenal libtalloc is not found
    or does not have appropriate version.
    
    Michael

commit ec154a1d81dd2e71ec9fec7ed8abd1329153048e
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 17 18:20:30 2009 +0200

    s3:build: link libtalloc statically if using internal libtalloc
    
    Michael

-----------------------------------------------------------------------

Summary of changes:
 source3/Makefile.in                   |   23 ++++++++----
 source3/configure.in                  |   65 ++++++++++++++++++++++++---------
 source3/script/tests/test_local_s3.sh |   17 +++++++--
 3 files changed, 75 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 5d03886..a6c918e 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -83,6 +83,13 @@ LIBLUA_LIBS=@LIBLUA_LIBS@
 LIBSMBCLIENT_LIBS=@LIBSMBCLIENT_LIBS@
 LIBSMBSHAREMODES_LIBS=@LIBSMBSHAREMODES_LIBS@
 
+TALLOCTORT = @TALLOCTORT@
+
+TDBBACKUP = @TDBBACKUP@
+TDBTOOL = @TDBTOOL@
+TDBDUMP = @TDBDUMP@
+TDBTORTURE = @TDBTORTURE@
+
 INSTALLCMD=@INSTALL@
 INSTALLLIBCMD_SH=@INSTALLLIBCMD_SH@
 INSTALLLIBCMD_A=@INSTALLLIBCMD_A@
@@ -201,9 +208,9 @@ ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@
 
 BIN_PROGS1 = bin/smbclient at EXEEXT@ bin/net at EXEEXT@ bin/smbspool at EXEEXT@ \
 	bin/testparm at EXEEXT@ bin/smbstatus at EXEEXT@ bin/smbget at EXEEXT@
-BIN_PROGS2 = bin/smbcontrol at EXEEXT@ bin/smbtree at EXEEXT@ bin/tdbbackup at EXEEXT@ \
-	bin/nmblookup at EXEEXT@ bin/pdbedit at EXEEXT@ bin/tdbdump at EXEEXT@ \
-	bin/tdbtool at EXEEXT@
+BIN_PROGS2 = bin/smbcontrol at EXEEXT@ bin/smbtree at EXEEXT@ $(TDBBACKUP) \
+	bin/nmblookup at EXEEXT@ bin/pdbedit at EXEEXT@ $(TDBDUMP) \
+	$(TDBTOOL)
 BIN_PROGS3 = bin/smbpasswd at EXEEXT@ bin/rpcclient at EXEEXT@ bin/smbcacls at EXEEXT@ \
 	bin/profiles at EXEEXT@ bin/ntlm_auth at EXEEXT@ bin/sharesec at EXEEXT@ \
 	bin/smbcquotas at EXEEXT@ bin/eventlogadm at EXEEXT@
@@ -213,15 +220,15 @@ BIN_PROGS4 = bin/ldbedit at EXEEXT@ bin/ldbsearch at EXEEXT@ bin/ldbadd at EXEEXT@ \
 TORTURE_PROGS = bin/smbtorture at EXEEXT@ bin/msgtest at EXEEXT@ \
 	bin/masktest at EXEEXT@ bin/locktest at EXEEXT@ \
 	bin/locktest2 at EXEEXT@ bin/nsstest at EXEEXT@ bin/vfstest at EXEEXT@ \
-	bin/pdbtest at EXEEXT@ bin/talloctort at EXEEXT@ bin/replacetort at EXEEXT@ \
-	bin/tdbtorture at EXEEXT@ \
+	bin/pdbtest at EXEEXT@ $(TALLOCTORT) bin/replacetort at EXEEXT@ \
+	$(TDBTORTURE) \
 	bin/smbconftort at EXEEXT@ bin/vlp at EXEEXT@
 
 BIN_PROGS = @EXTRA_BIN_PROGS@ \
 	$(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) $(BIN_PROGS4) 
 
 EVERYTHING_PROGS = bin/debug2html at EXEEXT@ bin/smbfilter at EXEEXT@ \
-	bin/talloctort at EXEEXT@ bin/replacetort at EXEEXT@ \
+	$(TALLOCTORT) bin/replacetort at EXEEXT@ \
 	bin/log2pcap at EXEEXT@ \
 	bin/vlp at EXEEXT@ bin/smbiconv at EXEEXT@ \
 	bin/dbwrap_tool at EXEEXT@
@@ -1203,7 +1210,7 @@ TDBTOOL_OBJ = @tdbdir@/tools/tdbtool.o $(LIBREPLACE_OBJ) \
 TDBDUMP_OBJ = @tdbdir@/tools/tdbdump.o $(LIBREPLACE_OBJ) \
 	$(SOCKET_WRAPPER_OBJ)
 
-TDBTORTURE_OBJ = @tdbdir@/tools/tdbtorture.o $(LIBTDB_OBJ) \
+TDBTORTURE_OBJ = @tdbdir@/tools/tdbtorture.o $(LIBREPLACE_OBJ) \
 	$(SOCKET_WRAPPER_OBJ)
 
 
@@ -1287,7 +1294,7 @@ eventlogadm: SHOWFLAGS bin/eventlogadm at EXEEXT@
 
 sharesec: SHOWFLAGS bin/sharesec at EXEEXT@
 
-talloctort : SHOWFLAGS bin/talloctort at EXEEXT@
+talloctort : SHOWFLAGS $(TALLOCTORT)
 
 replacetort : SHOWFLAGS bin/replacetort at EXEEXT@
 
diff --git a/source3/configure.in b/source3/configure.in
index 8af3da9..82a83a3 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -33,26 +33,9 @@ done
 AC_SUBST(LIBTEVENT_OBJ0)
 LIBS="${LIBS} ${TEVENT_LIBS}"
 
-# TODO: These should come from m4_include(lib/tdb/libtdb.m4)
-# but currently this fails: things have to get merged from s4.
-tdbdir="../lib/tdb"
-AC_SUBST(tdbdir)
-TDB_CFLAGS="-I${srcdir-.}/$tdbdir/include"
-AC_SUBST(TDB_CFLAGS)
-
-LIBTDB_OBJ0=""
-for o in common/tdb.o common/dump.o common/transaction.o common/error.o \
-	     common/traverse.o common/freelist.o common/freelistcheck.o \
-		 common/io.o common/lock.o common/open.o; 
-do 
-	LIBTDB_OBJ0="$LIBTDB_OBJ0 $tdbdir/$o"
-done
-
-AC_SUBST(LIBTDB_OBJ0)
 SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include  -I. -I${srcdir-.}"
 SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
 SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
-SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}"
 SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns"
 SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
 SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
@@ -4736,6 +4719,7 @@ fi
 if test "x$enable_external_libtalloc" = xno
 then
 	m4_include(../lib/talloc/libtalloc.m4)
+	LINK_LIBTALLOC=STATIC
 	SMB_LIBRARY(talloc, 1)
 	LIBTALLOC_OBJ0=""
 	for obj in ${TALLOC_OBJ}; do
@@ -4743,9 +4727,54 @@ then
 	done
 	SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}"
 	AC_SUBST(LIBTALLOC_OBJ0)
+
+	TALLOCTORT="bin/talloctort\$(EXEEXT)"
+	AC_SUBST(TALLOCTORT)
+fi
+
+
+AC_ARG_ENABLE(external_libtdb,
+	[AS_HELP_STRING([--enable-external-libtdb],
+		[Enable external tdb [default=auto]])],
+		[ enable_external_libtalloc=$enableval ],
+		[ enable_external_libtalloc=auto ])
+
+if test "x$enable_external_libtdb" != xno
+then
+	PKG_CHECK_MODULES(LIBTDB, tdb >= 1.1.4,
+		[ enable_external_libtdb=yes ],
+		[
+		if test x$enable_external_libtdb = xyes; then
+			AC_MSG_ERROR([Unable to find libtdb])
+		else
+			enable_external_libtdb=no
+		fi
+		])
+fi
+
+AC_SUBST(LIBTDB_OBJ0)
+if test "x$enable_external_libtdb" = xno
+then
+	m4_include(../lib/tdb/libtdb.m4)
+	LINK_LIBTDB=STATIC
+	SMB_LIBRARY(tdb, 1)
+	LIBTDB_OBJ0=""
+	for obj in ${TDB_OBJ}; do
+		LIBTDB_OBJ0="${LIBTDB_OBJ0} ${tdbdir}/${obj}"
+	done
+	AC_SUBST(LIBTDB_OBJ0)
+	SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}"
+
+	TDBBACKUP="bin/tdbbackup\$(EXEEXT)"
+	AC_SUBST(TDBBACKUP)
+	TDBDUMP="bin/tdbdump\$(EXEEXT)"
+	AC_SUBST(TDBDUMP)
+	TDBTOOL="bin/tdbtool\$(EXEEXT)"
+	AC_SUBST(TDBTOOL)
+	TDBTORTURE="bin/tdbtorture\$(EXEEXT)"
+	AC_SUBST(TDBTORTURE)
 fi
 
-SMB_LIBRARY(tdb, 1)
 SMB_LIBRARY(netapi, 0)
 SMB_LIBRARY(smbclient, 0)
 SMB_LIBRARY(smbsharemodes, 0)
diff --git a/source3/script/tests/test_local_s3.sh b/source3/script/tests/test_local_s3.sh
index 1840779..0c94871 100755
--- a/source3/script/tests/test_local_s3.sh
+++ b/source3/script/tests/test_local_s3.sh
@@ -16,14 +16,23 @@ incdir=`dirname $0`
 
 failed=0
 
-testit "talloctort" $VALGRIND $BINDIR/talloctort || \
-    failed=`expr $failed + 1`
+
+if test -x bin/talloctort ; then
+	testit "talloctort" $VALGRIND $BINDIR/talloctort || \
+		failed=`expr $failed + 1`
+else
+	echo "Skipping talloctort"
+fi
 
 testit "replacetort" $VALGRIND $BINDIR/replacetort || \
     failed=`expr $failed + 1`
 
-testit "tdbtorture" $VALGRIND $BINDIR/tdbtorture || \
-    failed=`expr $failed + 1`
+if test -x bin/tdbtorture ; then
+	testit "tdbtorture" $VALGRIND $BINDIR/tdbtorture || \
+		failed=`expr $failed + 1`
+else
+	echo "Skipping tdbtorture"
+fi
 
 testit "smbconftort" $VALGRIND $BINDIR/smbconftort $CONFIGURATION || \
 	failed=`expr $failed + 1`


-- 
Samba Shared Repository


More information about the samba-cvs mailing list