export CC and CXX when they are required.
* tests/ansi3.test, tests/ansi5.test, tests/ccnoco.test,
tests/cond4.test, tests/cond16.test, tests/cond18.test,
tests/cond19.test, tests/depcomp2.test, tests/depend2.test,
tests/lex3.test, tests/pr87.test, tests/pr220.test,
tests/substref.test, tests/target-cflags.test, tests/yacc4.test,
tests/yaccvpath.test: Require gcc. Don't pass CC=gcc to
configure.
* tests/subobj9.test: Require g++.
+2002-06-18 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * tests/defs (required): Handle `gcc' and `g++'; automatically
+ export CC and CXX when they are required.
+ * tests/ansi3.test, tests/ansi5.test, tests/ccnoco.test,
+ tests/cond4.test, tests/cond16.test, tests/cond18.test,
+ tests/cond19.test, tests/depcomp2.test, tests/depend2.test,
+ tests/lex3.test, tests/pr87.test, tests/pr220.test,
+ tests/substref.test, tests/target-cflags.test, tests/yacc4.test,
+ tests/yaccvpath.test: Require gcc. Don't pass CC=gcc to
+ configure.
+ * tests/subobj9.test: Require g++.
+
2002-06-18 Alexandre Duret-Lutz <duret_g@epita.fr>
* tests/defs (required): Handle `GNUmake'.
# Actual test of ansi2knr functionality. Relies on existence
# of working gcc.
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
}
END
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
# Test for ansi2knr in another directory.
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
}
END
-(gcc -v) > /dev/null 2>&1 || exit 77
-
set -e
$ACLOCAL
# Test to make sure we can compile when the compiler doesn't
# understand `-c -o'.
+required=gcc
. $srcdir/defs || exit 1
cat > configure.1 << 'END'
}
END
-gcc -v || exit 77
-
cat > Mycomp << 'END'
#!/bin/sh
# Test for bug in conditionals in SOURCES with variable substitution references.
# Report from Richard Boulton
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
END
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
$AUTOCONF
$AUTOMAKE -a
-CC='gcc' ./configure
+./configure
val=`$MAKE -s echorule`;
echo $val
# Regression test for substitution references to conditional variables.
# Report from Richard Boulton
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
cat > configure.in << 'END'
bin_PROGRAMS = helldl
END
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
$AUTOCONF
$AUTOMAKE -a
-CC='gcc' ./configure
+./configure
val=`$MAKE --no-print-directory echorule`;
echo $val
# Regression test for substitution references to conditional variables.
# Report from Richard Boulton
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
cat > configure.in << 'END'
bin_PROGRAMS = helldl
END
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
$AUTOCONF
$AUTOMAKE -a
-CONDITION1=true CONDITION2=true CC='gcc' ./configure
+CONDITION1=true CONDITION2=true ./configure
vala=`$MAKE --no-print-directory echorule`;
-CONDITION1=true CONDITION2=false CC='gcc' ./configure
+CONDITION1=true CONDITION2=false ./configure
valb=`$MAKE --no-print-directory echorule`;
-CONDITION1=false CONDITION2=true CC='gcc' ./configure
+CONDITION1=false CONDITION2=true ./configure
valc=`$MAKE --no-print-directory echorule`;
-CONDITION1=false CONDITION2=false CC='gcc' ./configure
+CONDITION1=false CONDITION2=false ./configure
vald=`$MAKE --no-print-directory echorule`;
echo $vala
# Another sources-in-conditional test. Report from Tim Goodwin.
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
cat > configure.in << 'END'
test "`grep '^@TWO_FALSE@' Makefile.in | wc -l`" -eq 0 || exit 1
$AUTOCONF || exit 1
-(gcc -v) > /dev/null 2>&1 || exit 77
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
-CC='gcc' CONDITION1=true CONDITION2=true ./configure || exit 1
+CONDITION1=true CONDITION2=true ./configure || exit 1
msgtt=`$MAKE --no-print-directory echo-objects`
-CC='gcc' CONDITION1=true CONDITION2=false ./configure || exit 1
+CONDITION1=true CONDITION2=false ./configure || exit 1
msgtf=`$MAKE --no-print-directory echo-objects`
-CC='gcc' CONDITION1=false CONDITION2=true ./configure || exit 1
+CONDITION1=false CONDITION2=true ./configure || exit 1
msgft=`$MAKE --no-print-directory echo-objects`
-CC='gcc' CONDITION1=false CONDITION2=false ./configure || exit 1
+CONDITION1=false CONDITION2=false ./configure || exit 1
msgff=`$MAKE --no-print-directory echo-objects`
echo $msgtt
echo "$me: running $MAKE --version"
( $MAKE --version ) || exit 77
;;
+ gcc)
+ # When gcc is required, export `CC=gcc' so that ./configure
+ # always use it. This is important only when the user
+ # has defined CC in his environment, otherwise ./configure will
+ # prefer gcc to other compilers.
+ CC=gcc
+ export CC
+ echo "$me: running $CC --version"
+ ( $CC --version ) || exit 77
+ ;;
+ g++)
+ CXX=g++
+ export CXX
+ echo "$me: running $CXX --version"
+ ( $CXX --version ) || exit 77
+ ;;
# Generic case: the tool must support --version.
*)
echo "$me: running $tool --version"
( $tool --version ) || exit 77
;;
esac
+ # Additional variables to define if some $tool is required.
+ case $tool in
+ gcc)
+ ;;
+ esac
done
fi
# Test to make sure that depcomp is not used when it's not installed
# From Pavel Roskin.
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
: > subdir/foo.c
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
# --disable-dependency-tracking.
# Report from Robert Boehne
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
}
END
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
set -e
$ACLOCAL
CFLAGS=
export CFLAGS
-CC='gcc' ./configure --disable-dependency-tracking
+./configure --disable-dependency-tracking
$MAKE
# Test associated with PR 19.
# From Matthew D. Langston.
-required=GNUmake
+required='GNUmake gcc gzip'
. $srcdir/defs || exit 1
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
-# Likewise for gzip.
-(gzip --version) > /dev/null 2>&1 || exit 77
-
cat > configure.in << 'END'
AC_INIT
dnl Prevent automake from looking in .. and ../..
#! /bin/sh
# Test for PR automake/220.
-
+
required=gcc
. $srcdir/defs || exit 1
cd build
# configure should fail since we've done something invalid.
-CC='gcc' ../configure && exit 1
+../configure && exit 1
exit 0
# Test for PR automake/87.
# Require GNU make for `make distcheck'
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
subdirs="foo bar"
AC_OUTPUT(Makefile `echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`)
EOF
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
done) < foo/Makefile.in || exit 1
cd build \
- && CC='gcc' ../configure \
+ && ../configure \
&& $MAKE distcheck || exit 1
# Test of subdir objects with C++.
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
}
END
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
$ACLOCAL \
&& $AUTOCONF \
&& $AUTOMAKE -a \
- && CC='gcc' ./configure \
+ && ./configure \
&& ANSI2KNR=./ansi2knr U=_ $MAKE -e SHELL=/bin/sh \
&& ./hello
# Test for PR 312.
-required='libtoolize gcc'
+required='libtoolize g++'
. $srcdir/defs || exit 1
cat > configure.in << 'END'
$AUTOCONF
$AUTOMAKE -a
-./configure CXX=gcc
+./configure
$MAKE
$MAKE distcheck
# null.
# Report from Richard Boulton
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
bin_PROGRAMS = helldl
END
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
# Test to make sure target specific CFLAGS work
# Assar Westerlund <assar@sics.se>
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
cat > configure.in << 'END'
#endif
END
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
set -e
$ACLOCAL
# Some simple tests of ylwrap functionality.
+required=gcc
. $srcdir/defs || exit 1
-# Likewise for some other tools.
-(gcc -v) > /dev/null 2>&1 || exit 77
(bison -V) > /dev/null 2>&1 || exit 77
cat > configure.in << 'END'
# to be distributed is up to date.
# Require GNU make for `make distdir'
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
-# Likewise for some other tools.
-(gcc -v) > /dev/null 2>&1 || exit 77
(bison -V) > /dev/null 2>&1 || exit 77
cat > configure.in << 'END'