From 9b10009938612ff8796ffdda0d666ef9060ba534 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 5 Sep 2006 11:34:43 +0000 Subject: r18076: convert talloc to the new libreplace system (This used to be commit 968a4e97cfa6585b06f0c5e64d746715a1297461) --- source4/lib/talloc/Makefile.in | 8 ++++---- source4/lib/talloc/autogen.sh | 5 +++-- source4/lib/talloc/config.m4 | 13 +++++++++++++ source4/lib/talloc/configure.ac | 4 +++- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/source4/lib/talloc/Makefile.in b/source4/lib/talloc/Makefile.in index b9e4d398f4..847ac6fc56 100644 --- a/source4/lib/talloc/Makefile.in +++ b/source4/lib/talloc/Makefile.in @@ -6,18 +6,18 @@ exec_prefix = @exec_prefix@ includedir = @includedir@ libdir = @libdir@ mandir = @mandir@ -VPATH = @srcdir@ +VPATH = @srcdir@:@libreplacedir@ srcdir = @srcdir@ builddir = @builddir@ XSLTPROC = @XSLTPROC@ INSTALLCMD = @INSTALL@ CC = @CC@ -CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H= -I$(srcdir) -I. +CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H= -I. -I@srcdir@ -I@libreplacedir@ EXTRA_TARGETS = @DOC_TARGET@ .SUFFIXES: .c .o .3 .3.xml .xml .html -LIBOBJ = talloc.o +LIBOBJ = @TALLOCOBJ@ @LIBREPLACEOBJ@ all: libtalloc.a testsuite $(EXTRA_TARGETS) @@ -46,7 +46,7 @@ doc: talloc.3 talloc.3.html -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< clean: - rm -f *~ *.o libtalloc.a testsuite *.gc?? talloc.3 talloc.3.html + rm -f *~ $(LIBOBJ) libtalloc.a testsuite *.gc?? talloc.3 talloc.3.html test: testsuite ./testsuite diff --git a/source4/lib/talloc/autogen.sh b/source4/lib/talloc/autogen.sh index e118019a39..1ebdb211d9 100755 --- a/source4/lib/talloc/autogen.sh +++ b/source4/lib/talloc/autogen.sh @@ -1,7 +1,8 @@ #!/bin/sh -autoconf || exit 1 -autoheader || exit 1 +IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace" +autoconf $IPATHS || exit 1 +autoheader $IPATHS || exit 1 echo "Now run ./configure and then make." exit 0 diff --git a/source4/lib/talloc/config.m4 b/source4/lib/talloc/config.m4 index 0286bde6c2..e5eccb3a22 100644 --- a/source4/lib/talloc/config.m4 +++ b/source4/lib/talloc/config.m4 @@ -1,3 +1,16 @@ +dnl find the talloc sources. This is meant to work both for +dnl talloc standalone builds, and builds of packages using talloc +tallocdir="" +for d in "$srcdir" "$srcdir/lib/talloc" "$srcdir/talloc" "$srcdir/../talloc"; do + if test -f "$d/talloc.c"; then + tallocdir="$d" + AC_SUBST(tallocdir) + break; + fi +done +TALLOCOBJ="talloc.o" +AC_SUBST(TALLOCOBJ) + AC_CHECK_HEADERS(stdarg.h vararg.h) dnl VA_COPY diff --git a/source4/lib/talloc/configure.ac b/source4/lib/talloc/configure.ac index 253992cb1a..59b9e4470a 100644 --- a/source4/lib/talloc/configure.ac +++ b/source4/lib/talloc/configure.ac @@ -13,7 +13,9 @@ if test -n "$XSLTPROC"; then DOC_TARGET=doc fi AC_SUBST(DOC_TARGET) -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADER(talloc_config.h) AC_SYS_LARGEFILE sinclude(config.m4) + +sinclude(libreplace.m4) AC_OUTPUT(Makefile talloc.pc) -- cgit