diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-09-21 02:32:19 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-09-21 02:32:19 +0200 |
commit | 442d31c7f699628a603ee3bef3831441b43afb69 (patch) | |
tree | de39e7e9bcc74f45ec521d663bb4321e19afb1f8 /lib | |
parent | f63c83deef52afcbe27c1664031a5eed009f3a44 (diff) | |
parent | 0e2928f94651c53d653a3ad83bbda5608b4d4c24 (diff) | |
download | samba-442d31c7f699628a603ee3bef3831441b43afb69.tar.gz samba-442d31c7f699628a603ee3bef3831441b43afb69.tar.bz2 samba-442d31c7f699628a603ee3bef3831441b43afb69.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba into noejs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/replace/Makefile.in | 13 | ||||
-rw-r--r-- | lib/replace/build_macros.m4 | 14 | ||||
-rw-r--r-- | lib/replace/configure.ac | 3 | ||||
-rw-r--r-- | lib/replace/libreplace.m4 | 4 | ||||
-rw-r--r-- | lib/replace/test/testsuite.c | 3 | ||||
-rw-r--r-- | lib/talloc/Makefile.in | 10 | ||||
-rw-r--r-- | lib/talloc/build_macros.m4 | 14 | ||||
-rw-r--r-- | lib/talloc/configure.ac | 3 | ||||
-rw-r--r-- | lib/talloc/talloc.mk | 4 | ||||
-rw-r--r-- | lib/tdb/Makefile.in | 11 | ||||
-rw-r--r-- | lib/tdb/build_macros.m4 | 14 | ||||
-rw-r--r-- | lib/tdb/configure.ac | 4 | ||||
-rw-r--r-- | lib/tdb/include/tdb.h | 1 |
13 files changed, 90 insertions, 8 deletions
diff --git a/lib/replace/Makefile.in b/lib/replace/Makefile.in index c989835a8d..c889a0e457 100644 --- a/lib/replace/Makefile.in +++ b/lib/replace/Makefile.in @@ -9,7 +9,8 @@ libdir = @libdir@ VPATH = @libreplacedir@ srcdir = @srcdir@ builddir = @builddir@ -INSTALL = @INSTALL@ +sharedbuilddir = @sharedbuilddir@ +INSTALLCMD = @INSTALL@ LIBS = @LIBS@ .PHONY: test all showflags install installcheck clean distclean realdistclean @@ -29,8 +30,14 @@ showflags: @echo ' LIBS = $(LIBS)' install: all - mkdir -p $(libdir) - $(INSTALL) libreplace.a $(libdir) + ${INSTALLCMD} -d $(libdir) + ${INSTALLCMD} -m 644 libreplace.a $(libdir) + +shared-build: all + ${INSTALLCMD} -d $(sharedbuilddir)/include + ${INSTALLCMD} -m 644 replace.h $(sharedbuilddir)/include + ${INSTALLCMD} -d $(sharedbuilddir)/lib + ${INSTALLCMD} -m 644 libreplace.a $(sharedbuilddir)/lib libreplace.a: $(OBJS) ar -rcsv $@ $(OBJS) diff --git a/lib/replace/build_macros.m4 b/lib/replace/build_macros.m4 new file mode 100644 index 0000000000..c036668cd1 --- /dev/null +++ b/lib/replace/build_macros.m4 @@ -0,0 +1,14 @@ +AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR, + [ AC_ARG_WITH([shared-build-dir], + [AC_HELP_STRING([--with-shared-build-dir=DIR], + [temporary build directory where libraries are installed [$srcdir/sharedbuild]])]) + + sharedbuilddir="$srcdir/sharedbuild" + if test x"$with_shared_build_dir" != x; then + sharedbuilddir=$with_shared_build_dir + CFLAGS="$CFLAGS -I$with_shared_build_dir/include" + LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib" + fi + AC_SUBST(sharedbuilddir) + ]) + diff --git a/lib/replace/configure.ac b/lib/replace/configure.ac index 81997e09b7..0361825a02 100644 --- a/lib/replace/configure.ac +++ b/lib/replace/configure.ac @@ -22,6 +22,9 @@ if test "$ac_cv_prog_gcc" = yes; then CFLAGS="$CFLAGS -Wno-format-y2k" fi +m4_include(build_macros.m4) +BUILD_WITH_SHARED_BUILD_DIR + LIBS="${LIBREPLACE_NETWORK_LIBS}" AC_SUBST(LIBS) diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4 index dc7d88e6e1..e563acfd79 100644 --- a/lib/replace/libreplace.m4 +++ b/lib/replace/libreplace.m4 @@ -5,7 +5,7 @@ echo "LIBREPLACE_LOCATION_CHECKS: START" dnl find the libreplace sources. This is meant to work both for dnl libreplace standalone builds, and builds of packages using libreplace libreplacedir="" -libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace" +libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace" for d in $libreplacepaths; do if test -f "$d/replace.c"; then libreplacedir="$d" @@ -34,7 +34,7 @@ echo "LIBREPLACE_BROKEN_CHECKS: START" dnl find the libreplace sources. This is meant to work both for dnl libreplace standalone builds, and builds of packages using libreplace libreplacedir="" -libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace" +libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace" for d in $libreplacepaths; do if test -f "$d/replace.c"; then libreplacedir="$d" diff --git a/lib/replace/test/testsuite.c b/lib/replace/test/testsuite.c index 1e8290906e..dcb05fbbf4 100644 --- a/lib/replace/test/testsuite.c +++ b/lib/replace/test/testsuite.c @@ -1069,7 +1069,8 @@ bool torture_local_replace(struct torture_context *ctx) return ret; } -#if _SAMBA_BUILD_<4 +#if _SAMBA_BUILD_>3 +#else int main(void) { bool ret = torture_local_replace(NULL); diff --git a/lib/talloc/Makefile.in b/lib/talloc/Makefile.in index 07b8fd4ff0..c28693e2db 100644 --- a/lib/talloc/Makefile.in +++ b/lib/talloc/Makefile.in @@ -9,6 +9,7 @@ mandir = @mandir@ VPATH = @srcdir@:@libreplacedir@ srcdir = @srcdir@ builddir = @builddir@ +sharedbuilddir = @sharedbuilddir@ XSLTPROC = @XSLTPROC@ INSTALLCMD = @INSTALL@ CC = @CC@ @@ -31,6 +32,15 @@ include $(tallocdir)/talloc.mk $(TALLOC_SOLIB): $(LIBOBJ) $(SHLD) $(SHLD_FLAGS) -o $@ $(LIBOBJ) @SONAMEFLAG@$(TALLOC_SONAME) +shared-build: all + ${INSTALLCMD} -d $(sharedbuilddir)/lib + ${INSTALLCMD} -m 644 libtalloc.a $(sharedbuilddir)/lib + ${INSTALLCMD} -m 755 $(TALLOC_SOLIB) $(sharedbuilddir)/lib + ln -sf $(TALLOC_SOLIB) $(sharedbuilddir)/lib/$(TALLOC_SONAME) + ln -sf $(TALLOC_SOLIB) $(sharedbuilddir)/lib/libtalloc.so + ${INSTALLCMD} -d $(sharedbuilddir)/include + ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(sharedbuilddir)/include + check: test installcheck:: test install diff --git a/lib/talloc/build_macros.m4 b/lib/talloc/build_macros.m4 new file mode 100644 index 0000000000..c036668cd1 --- /dev/null +++ b/lib/talloc/build_macros.m4 @@ -0,0 +1,14 @@ +AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR, + [ AC_ARG_WITH([shared-build-dir], + [AC_HELP_STRING([--with-shared-build-dir=DIR], + [temporary build directory where libraries are installed [$srcdir/sharedbuild]])]) + + sharedbuilddir="$srcdir/sharedbuild" + if test x"$with_shared_build_dir" != x; then + sharedbuilddir=$with_shared_build_dir + CFLAGS="$CFLAGS -I$with_shared_build_dir/include" + LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib" + fi + AC_SUBST(sharedbuilddir) + ]) + diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac index 4719aa04b5..d2538f9222 100644 --- a/lib/talloc/configure.ac +++ b/lib/talloc/configure.ac @@ -21,4 +21,7 @@ AC_LD_SONAMEFLAG AC_LIBREPLACE_SHLD AC_LIBREPLACE_SHLD_FLAGS +m4_include(build_macros.m4) +BUILD_WITH_SHARED_BUILD_DIR + AC_OUTPUT(Makefile talloc.pc) diff --git a/lib/talloc/talloc.mk b/lib/talloc/talloc.mk index e1fe88c84b..23331b6365 100644 --- a/lib/talloc/talloc.mk +++ b/lib/talloc/talloc.mk @@ -22,8 +22,8 @@ install:: all ${INSTALLCMD} -m 644 talloc.pc $(DESTDIR)$(libdir)/pkgconfig if [ -f talloc.3 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man3; fi if [ -f talloc.3 ];then ${INSTALLCMD} -m 644 talloc.3 $(DESTDIR)$(mandir)/man3; fi - which swig >/dev/null 2>&1 && ${INSTALLCMD} -d $(DESTDIR)`swig -swiglib` || true - which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)`swig -swiglib` || true + which swig >/dev/null 2>&1 && ${INSTALLCMD} -d $(DESTDIR)$(prefix)`swig -swiglib` || true + which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)$(prefix)`swig -swiglib` || true doc:: talloc.3 talloc.3.html diff --git a/lib/tdb/Makefile.in b/lib/tdb/Makefile.in index 090bb6e2dc..9915d88264 100644 --- a/lib/tdb/Makefile.in +++ b/lib/tdb/Makefile.in @@ -12,6 +12,8 @@ libdir = @libdir@ VPATH = @srcdir@:@libreplacedir@ srcdir = @srcdir@ builddir = @builddir@ +sharedbuilddir = @sharedbuilddir@ +INSTALLCMD = @INSTALL@ CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude CFLAGS = $(CPPFLAGS) @CFLAGS@ LDFLAGS = @LDFLAGS@ @@ -43,6 +45,15 @@ install:: all $(TDB_SOLIB): $(TDB_OBJ) $(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) @SONAMEFLAG@$(TDB_SONAME) +shared-build: all + ${INSTALLCMD} -d $(sharedbuilddir)/lib + ${INSTALLCMD} -m 644 libtdb.a $(sharedbuilddir)/lib + ${INSTALLCMD} -m 755 $(TDB_SOLIB) $(sharedbuilddir)/lib + ln -sf $(TDB_SOLIB) $(sharedbuilddir)/lib/$(TDB_SONAME) + ln -sf $(TDB_SOLIB) $(sharedbuilddir)/lib/libtdb.so + ${INSTALLCMD} -d $(sharedbuilddir)/include + ${INSTALLCMD} -m 644 $(srcdir)/include/tdb.h $(sharedbuilddir)/include + check: test test:: $(PYTHON_CHECK_TARGET) diff --git a/lib/tdb/build_macros.m4 b/lib/tdb/build_macros.m4 new file mode 100644 index 0000000000..c036668cd1 --- /dev/null +++ b/lib/tdb/build_macros.m4 @@ -0,0 +1,14 @@ +AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR, + [ AC_ARG_WITH([shared-build-dir], + [AC_HELP_STRING([--with-shared-build-dir=DIR], + [temporary build directory where libraries are installed [$srcdir/sharedbuild]])]) + + sharedbuilddir="$srcdir/sharedbuild" + if test x"$with_shared_build_dir" != x; then + sharedbuilddir=$with_shared_build_dir + CFLAGS="$CFLAGS -I$with_shared_build_dir/include" + LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib" + fi + AC_SUBST(sharedbuilddir) + ]) + diff --git a/lib/tdb/configure.ac b/lib/tdb/configure.ac index eaf70d30b4..4bf2e98e8f 100644 --- a/lib/tdb/configure.ac +++ b/lib/tdb/configure.ac @@ -27,4 +27,8 @@ if test -z "$PYTHON_CONFIG"; then PYTHON_INSTALL_TARGET="" PYTHON_CHECK_TARGET="" fi + +m4_include(build_macros.m4) +BUILD_WITH_SHARED_BUILD_DIR + AC_OUTPUT(Makefile tdb.pc) diff --git a/lib/tdb/include/tdb.h b/lib/tdb/include/tdb.h index 0008085de5..c41c9941f0 100644 --- a/lib/tdb/include/tdb.h +++ b/lib/tdb/include/tdb.h @@ -30,6 +30,7 @@ extern "C" { #endif +#include "signal.h" /* flags to tdb_store() */ #define TDB_REPLACE 1 /* Unused */ |