]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* tests/ansi10.test: Use AC_PROG_CC_STDC. Fix test that
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 11 May 2006 17:29:34 +0000 (17:29 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 11 May 2006 17:29:34 +0000 (17:29 +0000)
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'.

ChangeLog
tests/ansi10.test
tests/ansi6.test
tests/ansi7.test
tests/ansi9.test
tests/libobj8.test
tests/subobj3.test

index c828a4ea815e5a7ec2c583a73a38a62a3bd70e00..e7718d5ebf47e9ead5dc787d0286235d04d46717 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 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.
index 342df84b3ad3f71f62e9f74bbb8719b9967b6b14..5b3ea9ea213fffe51b6a73db3ff208281edad231 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -27,6 +27,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AC_PROG_CC_STDC
 AM_C_PROTOTYPES
 AC_PROG_RANLIB
 AC_LIBOBJ([hello])
@@ -62,7 +63,7 @@ $AUTOCONF
 $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
index 8420a3967cd18c8d95502fe8f65ca59f3451c0a1..bb55ae4b802f4ea2de554e0ca9bded4ac337c3d8 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -28,6 +28,7 @@ cat > configure.in << 'END'
 AC_INIT(ansi6, 1.0)
 AM_INIT_AUTOMAKE
 AC_PROG_CC
+AC_PROG_CC_STDC
 AM_C_PROTOTYPES
 AC_EXEEXT
 AC_OBJEXT
@@ -70,7 +71,7 @@ $AUTOCONF
 $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
index 8eaa7e65720494546cfbc4fd8bd5d16838d5a5fb..82cfcbb4cdc4dcee64fe1efae258d25c10f4cee3 100755 (executable)
@@ -29,6 +29,7 @@ cat > configure.in << 'END'
 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
@@ -72,7 +73,7 @@ $AUTOCONF
 $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
index d9f8bbd82418f54430ce8b67cc795ce0ba940da0..916d0001c51c181fc319ec8796cbd63b4a89f3dc 100755 (executable)
@@ -40,9 +40,6 @@ noinst_PROGRAMS = loadavg sub/sub
 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'
@@ -61,8 +58,9 @@ $AUTOCONF
 $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
index 4a97fa6720b0db40a26b35160e72d10d808a9b9b..c46db8acbd9bb2e41172bfd9d121a14b02bc5689 100755 (executable)
@@ -1,5 +1,5 @@
 #! /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.
 #
@@ -27,6 +27,7 @@ cat > configure.in << 'END'
 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
index 34dc56476153b84a2b26695b3e9b55c00feeed2c..aeda8de4b7af9d7fd3891896d679c7aa52a7d1a2 100755 (executable)
@@ -1,5 +1,5 @@
 #! /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)
@@ -58,9 +61,9 @@ export CFLAGS
 
 # 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