[SCM] Samba Shared Repository - branch master updated

Björn Jacke bjacke at samba.org
Fri Aug 13 06:59:06 MDT 2010


The branch, master has been updated
       via  5390bae... tdb: add TDB_DEPS variable filled with required libraries
      from  37177f1... s3-build: pointless to link in libads and dcutils into smbcacls.

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


- Log -----------------------------------------------------------------
commit 5390baeb6b97acbfde89bdb6a2c678a516a0e360
Author: Björn Jacke <bj at sernet.de>
Date:   Fri Aug 13 14:53:22 2010 +0200

    tdb: add TDB_DEPS variable filled with required libraries
    
    This is required for Solaris, which needs to link in librt to make use of
    fdatasync().

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

Summary of changes:
 lib/replace/libreplace.m4 |    8 +++++++-
 lib/tdb/Makefile.in       |    3 ++-
 lib/tdb/libtdb.m4         |    6 ++++++
 lib/tdb/tdb.mk            |   12 ++++++------
 source3/Makefile.in       |    3 ++-
 source3/configure.in      |    1 +
 6 files changed, 24 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index 6da209d..2303641 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -108,7 +108,13 @@ AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror strerro
 AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
 AC_CHECK_FUNCS(waitpid wait4 strlcpy strlcat initgroups memmove strdup)
 AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp dup2 dprintf vdprintf)
-AC_CHECK_FUNCS(isatty chown lchown link readlink symlink realpath fdatasync)
+AC_CHECK_FUNCS(isatty chown lchown link readlink symlink realpath)
+AC_CHECK_FUNCS(fdatasync,,[
+	# if we didn't find it, look in librt (Solaris hides it there...)
+	AC_CHECK_LIB(rt, fdatasync,
+		[libreplace_cv_HAVE_FDATASYNC_IN_LIBRT=yes
+		AC_DEFINE(HAVE_FDATASYNC, 1, Define to 1 if there is support for fdatasync)])
+])
 AC_CHECK_FUNCS(get_current_dir_name)
 AC_HAVE_DECL(setresuid, [#include <unistd.h>])
 AC_HAVE_DECL(setresgid, [#include <unistd.h>])
diff --git a/lib/tdb/Makefile.in b/lib/tdb/Makefile.in
index dc22ee3..f12a27a 100644
--- a/lib/tdb/Makefile.in
+++ b/lib/tdb/Makefile.in
@@ -35,6 +35,7 @@ tdbdir = @tdbdir@
 EXTRA_TARGETS = @DOC_TARGET@
 
 TDB_OBJ = @TDB_OBJ@ @LIBREPLACEOBJ@
+TDB_DEPS = @TDB_DEPS@
 
 SONAMEFLAG = @SONAMEFLAG@
 VERSIONSCRIPT = @VERSIONSCRIPT@
@@ -51,7 +52,7 @@ all:: showflags dirs $(PROGS) $(TDB_SOLIB) libtdb.a $(PYTHON_BUILD_TARGET) $(EXT
 
 install:: all
 $(TDB_SOLIB): $(TDB_OBJ)
-	$(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) $(VERSIONSCRIPT) $(EXPORTSFILE) $(SONAMEFLAG)$(TDB_SONAME)
+	$(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) $(VERSIONSCRIPT) $(EXPORTSFILE) $(TDB_DEPS) $(SONAMEFLAG)$(TDB_SONAME)
 
 shared-build: all
 	${INSTALLCMD} -d $(sharedbuilddir)/lib
diff --git a/lib/tdb/libtdb.m4 b/lib/tdb/libtdb.m4
index feae1c2..fb8913a 100644
--- a/lib/tdb/libtdb.m4
+++ b/lib/tdb/libtdb.m4
@@ -20,6 +20,12 @@ AC_SUBST(LIBREPLACEOBJ)
 TDB_LIBS=""
 AC_SUBST(TDB_LIBS)
 
+TDB_DEPS=""
+if test x$libreplace_cv_HAVE_FDATASYNC_IN_LIBRT = xyes ; then
+	TDB_DEPS="$TDB_DEPS -lrt"
+fi
+AC_SUBST(TDB_DEPS)
+
 TDB_CFLAGS="-I$tdbdir/include"
 AC_SUBST(TDB_CFLAGS)
 
diff --git a/lib/tdb/tdb.mk b/lib/tdb/tdb.mk
index ecc6f9f..0dcd419 100644
--- a/lib/tdb/tdb.mk
+++ b/lib/tdb/tdb.mk
@@ -12,19 +12,19 @@ TDB_STLIB = libtdb.a
 TDB_LIB = $(TDB_STLIB) 
 
 bin/tdbtest$(EXEEXT): tools/tdbtest.o $(TDB_LIB)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm $(TDB_DEPS)
 
 bin/tdbtool$(EXEEXT): tools/tdbtool.o $(TDB_LIB)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb $(TDB_DEPS)
 
 bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(TDB_LIB)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb $(TDB_DEPS)
 
 bin/tdbdump$(EXEEXT): tools/tdbdump.o $(TDB_LIB)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb $(TDB_DEPS)
 
 bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(TDB_LIB)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb $(TDB_DEPS)
 
 test:: abi_checks
 
@@ -48,7 +48,7 @@ pytdb.o: $(tdbdir)/pytdb.c
 	$(CC) $(PICFLAG) -c $(tdbdir)/pytdb.c $(CFLAGS) `$(PYTHON_CONFIG) --cflags`
 
 tdb.$(SHLIBEXT): libtdb.$(SHLIBEXT) pytdb.o
-	$(SHLD) $(SHLD_FLAGS) -o $@ pytdb.o -L. -ltdb `$(PYTHON_CONFIG) --ldflags`
+	$(SHLD) $(SHLD_FLAGS) -o $@ pytdb.o -L. -ltdb `$(PYTHON_CONFIG) --ldflags` $(TDB_DEPS)
 
 install:: installdirs installbin installheaders installlibs \
 		  $(PYTHON_INSTALL_TARGET) installdocs
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 4b3e6cb..3599114 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -83,6 +83,7 @@ LIBTALLOC_LIBS=@LIBTALLOC_LIBS@
 LIBREPLACE_LIBS=@LIBREPLACE_LIBS@
 LIBTDB=@LIBTDB_STATIC@ @LIBTDB_SHARED@
 LIBTDB_LIBS=@LIBTDB_LIBS@
+TDB_DEPS=@TDB_DEPS@
 LIBNETAPI=@LIBNETAPI_STATIC@ @LIBNETAPI_SHARED@
 LIBNETAPI_LIBS=@LIBNETAPI_LIBS@
 LIBSMBCLIENT_LIBS=@LIBSMBCLIENT_LIBS@
@@ -1992,7 +1993,7 @@ $(LIBTDB_SYMS): $(LIBTDB_HEADERS)
 
 $(LIBTDB_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBTDB_OBJ) $(LIBTDB_SYMS)
 	@echo Linking shared library $@
-	@$(SHLD_DSO) $(LIBTDB_OBJ) $(LIBREPLACE_LIBS) \
+	@$(SHLD_DSO) $(LIBTDB_OBJ) $(LIBREPLACE_LIBS) $(TDB_DEPS) \
 		@SONAMEFLAG@`basename $@`
 
 $(LIBTDB_SHARED_TARGET): $(LIBTDB_SHARED_TARGET_SONAME)
diff --git a/source3/configure.in b/source3/configure.in
index 0023fe2..6b73671 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2137,6 +2137,7 @@ then
 	LINK_LIBTDB=STATIC
 	SMB_LIBRARY(tdb, 1)
 	LIBTDB_OBJ0=""
+	LIBTDB_LIBS="$LIBTDB_LIBS $TDB_DEPS"
 	for obj in ${TDB_OBJ}; do
 		LIBTDB_OBJ0="${LIBTDB_OBJ0} ${tdbdir}/${obj}"
 	done


-- 
Samba Shared Repository


More information about the samba-cvs mailing list