From fafa8c3e47497a9f399e9ca52a7e6a904f1fb9f6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 14 Sep 2006 18:46:10 +0000 Subject: r18535: move the AC_CANONICAL_HOST and host specific flag tests into libreplace. This should fix the standalone build of tdb on HPUX, where we need to blacklist mmap. Unfortunately this requires that we have a copy of config.guess and config.sub in each of our project subdirectories. I tried to find a way to use something like AC_CONFIG_AUX_DIR($libreplacedir) and just put config.{guess,sub} in the lib/replace/ directory, but I couldn't figure out how to do that in a way that kept autoconf happy for each of our separate builds. Any autoconf guru out there see a way to do this? (This used to be commit 823cd3ab35456769dcefee17bdaca21f01ba0f63) --- source4/lib/replace/libreplace.m4 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'source4/lib/replace/libreplace.m4') diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4 index 53655e6544..1d82c00b2b 100644 --- a/source4/lib/replace/libreplace.m4 +++ b/source4/lib/replace/libreplace.m4 @@ -1,3 +1,26 @@ +AC_DEFUN_ONCE(AC_LIBREPLACE_LOCATION_CHECKS, +[ +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="" +for d in "$srcdir" "$srcdir/lib/replace" "$srcdir/libreplace" "$srcdir/../libreplace" "$srcdir/../replace"; do + if test -f "$d/replace.c"; then + libreplacedir="$d" + AC_SUBST(libreplacedir) + break; + fi +done +LIBREPLACEOBJ="replace.o" +AC_SUBST(LIBREPLACEOBJ) + +AC_CANONICAL_HOST + +echo "LIBREPLACE_LOCATION_CHECKS: END" +]) dnl end AC_LIBREPLACE_LOCATION_CHECKS + + AC_DEFUN_ONCE(AC_LIBREPLACE_BROKEN_CHECKS, [ echo "LIBREPLACE_BROKEN_CHECKS: START" @@ -298,6 +321,7 @@ AC_DEFUN_ONCE(AC__LIBREPLACE_ALL_CHECKS_END, m4_define(AC_LIBREPLACE_ALL_CHECKS, [ AC__LIBREPLACE_ALL_CHECKS_START +AC_LIBREPLACE_LOCATION_CHECKS AC_LIBREPLACE_CC_CHECKS AC_LIBREPLACE_BROKEN_CHECKS AC__LIBREPLACE_ALL_CHECKS_END -- cgit