summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/Makefile.in2
-rw-r--r--tests/ChangeLog6
-rwxr-xr-xtests/ansi3.test4
-rwxr-xr-xtests/cond9.test4
-rw-r--r--tests/defs11
-rwxr-xr-xtests/install2.test4
-rwxr-xr-xtests/pr19.test4
-rwxr-xr-xtests/pr87.test4
-rwxr-xr-xtests/pr9.test4
-rwxr-xr-xtests/subobj3.test4
-rwxr-xr-xtests/target-cflags.test4
11 files changed, 33 insertions, 18 deletions
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 621663589..22efe7c0d 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 a21498de2..b836f37b5 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-26 Akim Demaille <akim@epita.fr>
+
+ * 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 <proski@gnu.org>
* makevars.test: Disable shell tracing.
diff --git a/tests/ansi3.test b/tests/ansi3.test
index de75390f1..858b00949 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 504323cbd..ebe419c6a 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 4a6824db8..11f2f8ffc 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 4bd438fe7..9980e119f 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 8c13873f2..1798404d5 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 0fa892a87..0db44d399 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 5e44d64b6..735a3ae12 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 64af1264c..bfd36ebbc 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 fd412fdef..4179a55fa 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) \