This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Plan: Wednesday
On 22 Aug 2001 16:41:09 +0200, Akim Demaille wrote:
> This is what I would advise. It *has* to be done by Sh, M4 cannot.
The following test script tests for Akim's updated AM_CONDITIONAL
macro..
#!/bin/sh
# Test for PR automake/220.
. $srcdir/defs || exit 1
cat > Makefile.am <<EOF
EOF
cat >configure.ac <<EOF
AC_INIT
AM_INIT_AUTOMAKE(nonesuch,nonesuch)
AM_CONDITIONAL([FOO], [true])
if false; then
AM_CONDITIONAL([BAR], [true])
fi
AC_OUTPUT(Makefile)
EOF
# Fail gracefully if no autoconf.
$needs_autoconf
rm configure.in
# Likewise for gcc.
(gcc -v) > /dev/null 2>&1 || exit 77
touch README NEWS AUTHORS ChangeLog
mkdir build
# We use gcc and not gcc -traditional as the latter fails on some
# Linux boxes (Red Hat 5.1 in particular).
$ACLOCAL \
&& $AUTOCONF \
&& $AUTOMAKE -a || exit 1
# we expect a error from the configure script.
cd build \
&& CC='gcc' ../configure || exit 0
# No error, the test failed
exit 1