From: Ralf Wildenhues Date: Thu, 11 May 2006 17:29:34 +0000 (+0000) Subject: * tests/ansi10.test: Use AC_PROG_CC_STDC. Fix test that X-Git-Tag: Release-1-9b~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4d0be1204c3007b9f56b8b66496526f941e2ae3;p=thirdparty%2Fautomake.git * 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'. --- diff --git a/ChangeLog b/ChangeLog index c828a4ea8..e7718d5eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2006-05-11 Ralf Wildenhues + * 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. diff --git a/tests/ansi10.test b/tests/ansi10.test index 342df84b3..5b3ea9ea2 100755 --- a/tests/ansi10.test +++ b/tests/ansi10.test @@ -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 diff --git a/tests/ansi6.test b/tests/ansi6.test index 8420a3967..bb55ae4b8 100755 --- a/tests/ansi6.test +++ b/tests/ansi6.test @@ -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 diff --git a/tests/ansi7.test b/tests/ansi7.test index 8eaa7e657..82cfcbb4c 100755 --- a/tests/ansi7.test +++ b/tests/ansi7.test @@ -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 diff --git a/tests/ansi9.test b/tests/ansi9.test index d9f8bbd82..916d0001c 100755 --- a/tests/ansi9.test +++ b/tests/ansi9.test @@ -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 diff --git a/tests/libobj8.test b/tests/libobj8.test index 4a97fa672..c46db8acb 100755 --- a/tests/libobj8.test +++ b/tests/libobj8.test @@ -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 diff --git a/tests/subobj3.test b/tests/subobj3.test index 34dc56476..aeda8de4b 100755 --- a/tests/subobj3.test +++ b/tests/subobj3.test @@ -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. @@ -24,12 +24,15 @@ 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