From 4d3f6adb5ad09b9cd1fa69ce61efb13deee19b9d Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 26 Jan 2001 14:21:37 +0000 Subject: [PATCH] * m4/depend.m4 (AM_DEPENDENCIES): Don't leave `AC_PROG_CC' etc. in clear. * m4/init.m4: Likewise. * m4/sanity.m4: s/conftestfile/conftest.file/. --- m4/Makefile.in | 2 -- tests/ChangeLog | 6 ++++++ tests/ansi3.test | 4 ++-- tests/cond9.test | 4 ++-- tests/defs | 11 +++++++++++ tests/install2.test | 4 ++-- tests/pr19.test | 4 ++-- tests/pr87.test | 4 ++-- tests/pr9.test | 4 ++-- tests/subobj3.test | 4 ++-- tests/target-cflags.test | 4 ++-- 11 files changed, 33 insertions(+), 18 deletions(-) diff --git a/m4/Makefile.in b/m4/Makefile.in index 62166358..22efe7c0 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -61,8 +61,6 @@ POST_UNINSTALL = : AMDEP = @AMDEP@ AMTAR = @AMTAR@ AWK = @AWK@ -CC = @CC@ -CXX = @CXX@ DEPDIR = @DEPDIR@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ diff --git a/tests/ChangeLog b/tests/ChangeLog index a21498de..b836f37b 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,9 @@ +2001-01-26 Akim Demaille + + * defs (AUTOCONF, has_autoconf, needs_autoconf): New. + * ansi3.test, cond9.test, depacl2.test, install2.test, pr19.test, + * pr87.test, pr9.test, subobj3.test, target-cflags.test: Use them. + 2001-01-25 Pavel Roskin * makevars.test: Disable shell tracing. diff --git a/tests/ansi3.test b/tests/ansi3.test index de75390f..858b0094 100755 --- a/tests/ansi3.test +++ b/tests/ansi3.test @@ -29,7 +29,7 @@ main (int argc, char *argv[]) END # Fail gracefully if no autoconf. -(autoconf --version) > /dev/null 2>&1 || exit 0 +$needs_autoconf # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 0 @@ -37,7 +37,7 @@ END # We use gcc and not gcc -traditional as the latter fails on some # Linux boxes (Red Hat 5.1 in particular). $ACLOCAL \ - && autoconf \ + && $AUTOCONF \ && $AUTOMAKE -a \ && CC='gcc' ./configure \ && $MAKE ANSI2KNR=./ansi2knr U=_ \ diff --git a/tests/cond9.test b/tests/cond9.test index 504323cb..ebe419c6 100755 --- a/tests/cond9.test +++ b/tests/cond9.test @@ -22,10 +22,10 @@ echo-something: echo '$(this)' END -(autoconf --version) > /dev/null 2>&1 || exit 77 +$needs_autoconf $ACLOCAL \ - && autoconf \ + && $AUTOCONF \ && $AUTOMAKE -a \ && ./configure \ && $MAKE echo-something | grep interesting > /dev/null diff --git a/tests/defs b/tests/defs index 4a6824db..11f2f8ff 100644 --- a/tests/defs +++ b/tests/defs @@ -54,6 +54,17 @@ test -z "$PERL" && PERL=perl # User can set MAKE to choose which make to use. Must use GNU make. test -z "$MAKE" && MAKE=make +# User can set which tools from Autoconf to use. +test -z "$AUTOCONF" && AUTOCONF=autoconf +if ($AUTOCONF --version) >/dev/null 2>&1; then + has_autoconf=: + needs_autoconf=: +else + has_autoconf=false + needs_autoconf='exit 77' +fi + + echo "=== Running test $0" # See how Automake should be run. We put --foreign as the default diff --git a/tests/install2.test b/tests/install2.test index 4bd438fe..9980e119 100755 --- a/tests/install2.test +++ b/tests/install2.test @@ -21,13 +21,13 @@ END rm -f install-sh mkinstalldirs missing # Fail gracefully if no autoconf. -(autoconf --version) > /dev/null 2>&1 || exit 0 +$needs_autoconf # Likewise for gzip. (gzip --version) > /dev/null 2>&1 || exit 0 $ACLOCAL || exit 1 -autoconf || exit 1 +$AUTOCONF || exit 1 $AUTOMAKE -a || exit 1 chmod 000 Makefile.am diff --git a/tests/pr19.test b/tests/pr19.test index 8c13873f..1798404d 100755 --- a/tests/pr19.test +++ b/tests/pr19.test @@ -34,7 +34,7 @@ rm -f install-sh missing mkinstalldirs depcomp echo %% > foo.l # Fail gracefully if no autoconf. -(autoconf --version) > /dev/null 2>&1 || exit 0 +$needs_autoconf # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 0 @@ -43,7 +43,7 @@ echo %% > foo.l (gzip --version) > /dev/null 2>&1 || exit 0 $ACLOCAL || exit 1 -autoconf || exit 1 +$AUTOCONF || exit 1 $AUTOMAKE -a || exit 1 CC=gcc ./configure || exit 1 $MAKE || exit 1 diff --git a/tests/pr87.test b/tests/pr87.test index 0fa892a8..0db44d39 100755 --- a/tests/pr87.test +++ b/tests/pr87.test @@ -27,7 +27,7 @@ AC_OUTPUT(Makefile `echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`) EOF # Fail gracefully if no autoconf. -(autoconf --version) > /dev/null 2>&1 || exit 0 +$needs_autoconf # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 0 @@ -41,7 +41,7 @@ rm missing install-sh mkinstalldirs # We use gcc and not gcc -traditional as the latter fails on some # Linux boxes (Red Hat 5.1 in particular). $ACLOCAL \ - && autoconf \ + && $AUTOCONF \ && $AUTOMAKE -a \ && cd build \ && CC='gcc' ../configure \ diff --git a/tests/pr9.test b/tests/pr9.test index 5e44d64b..735a3ae1 100755 --- a/tests/pr9.test +++ b/tests/pr9.test @@ -20,14 +20,14 @@ rm -f install-sh missing mkinstalldirs depcomp mkdir support # Fail gracefully if no autoconf. -(autoconf --version) > /dev/null 2>&1 || exit 0 +$needs_autoconf # Likewise for gzip. (gzip --version) > /dev/null 2>&1 || exit 0 $ACLOCAL || exit 1 -autoconf || exit 1 +$AUTOCONF || exit 1 $AUTOMAKE -a -c || exit 1 ./configure || exit 1 $MAKE || exit 1 diff --git a/tests/subobj3.test b/tests/subobj3.test index 64af1264..bfd36ebb 100755 --- a/tests/subobj3.test +++ b/tests/subobj3.test @@ -37,7 +37,7 @@ main (int argc, char *argv[]) END # Fail gracefully if no autoconf. -(autoconf --version) > /dev/null 2>&1 || exit 0 +$needs_autoconf # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 0 @@ -45,7 +45,7 @@ END # We use gcc and not gcc -traditional as the latter fails on some # Linux boxes (Red Hat 5.1 in particular). $ACLOCAL \ - && autoconf \ + && $AUTOCONF \ && $AUTOMAKE -a \ && CC='gcc' ./configure \ && $MAKE ANSI2KNR=./ansi2knr U=_ \ diff --git a/tests/target-cflags.test b/tests/target-cflags.test index fd412fde..4179a55f 100755 --- a/tests/target-cflags.test +++ b/tests/target-cflags.test @@ -38,13 +38,13 @@ int main(void) END # Fail gracefully if no autoconf. -(autoconf --version) > /dev/null 2>&1 || exit 0 +$needs_autoconf # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 0 $ACLOCAL \ - && autoconf \ + && $AUTOCONF \ && $AUTOMAKE -a \ && mkdir obj \ && (cd obj && ../configure && $MAKE && ./foo && ./bar) \ -- 2.43.5