2006-05-11 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ * tests/ansi10.test: Use AC_PROG_CC_STDC. Fix test that
+ ac_cv_prog_cc_stdc isn't just used by Automake code in
+ `configure'.
+ * tests/ansi6.test, tests/ansi7.test: Likewise.
+ * tests/ansi9.test: Likewise. Do not override by setting
+ $U and $(ANSI2KNR) at `make' time; that will be fragile.
+ * tests/libobj8.test: Use AC_PROG_CC_STDC.
+ * tests/subobj3.test: Likewise. Use `set -e'.
+
* lib/install-sh: Initialize IFS, so field splitting isn't
turned off later.
* lib/mkinstalldirs: Likewise.
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
cat >> configure.in << 'END'
AC_PROG_CC
+AC_PROG_CC_STDC
AM_C_PROTOTYPES
AC_PROG_RANLIB
AC_LIBOBJ([hello])
$AUTOMAKE -a
# Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
-grep ac_cv_prog_cc_stdc configure
+test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
./configure ac_cv_prog_cc_stdc=no
$MAKE
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
AC_INIT(ansi6, 1.0)
AM_INIT_AUTOMAKE
AC_PROG_CC
+AC_PROG_CC_STDC
AM_C_PROTOTYPES
AC_EXEEXT
AC_OBJEXT
$AUTOMAKE -a
# Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
-grep ac_cv_prog_cc_stdc configure
+test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
./configure ac_cv_prog_cc_stdc=no
$MAKE
AC_INIT(ansi6, 1.0)
AM_INIT_AUTOMAKE
AC_PROG_CC
+AC_PROG_CC_STDC
AM_PROG_CC_C_O
AM_C_PROTOTYPES
AC_EXEEXT
$AUTOMAKE -a
# Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
-grep ac_cv_prog_cc_stdc configure
+test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
./configure ac_cv_prog_cc_stdc=no
$MAKE
loadavg_SOURCES = loadavg.c
loadavg_CFLAGS = -DTEST
sub_sub_SOURCES = sub/sub.c
-# Force ansi2knr's use, regardless of the compiler.
-U=_
-ANSI2KNR=./ansi2knr
END
cat > loadavg.c << 'END'
$AUTOMAKE --add-missing -Wno-override
$FGREP 'loadavg-loadavg$U.o: loadavg$U.c' Makefile.in
-# The following rule should not exists, because the
+# The following rule should not exist, because the
# default .o.c: inference rule is enough.
$FGREP 'sub/sub$U.o: sub/sub$U.c' Makefile.in && exit 1
-./configure
+# Force ansi2knr's use, regardless of the compiler.
+./configure ac_cv_prog_cc_stdc=no
$MAKE sub/sub_.c
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
AC_PROG_CC
+AC_PROG_CC_STDC
AC_PROG_RANLIB
AC_REPLACE_FUNCS(basename dirname strsignal)
AM_C_PROTOTYPES
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
# Foundation, Inc.
#
# This file is part of GNU Automake.
required=gcc
. ./defs || exit 1
+set -e
+
cat > configure.in << 'END'
AC_INIT(sub/hello.c)
dnl Prevent automake from looking in .. and ../..
AC_CONFIG_AUX_DIR(.)
AM_INIT_AUTOMAKE(hello,0.23)
AC_PROG_CC
+AC_PROG_CC_STDC
AM_PROG_CC_C_O
AM_C_PROTOTYPES
AC_OUTPUT(Makefile)
# 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 \
- && ./configure \
- && ANSI2KNR=./ansi2knr U=_ $MAKE -e \
- && ./hello
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+ANSI2KNR=./ansi2knr U=_ $MAKE -e
+./hello