From 3ce013406cd51d923714b7189c49a2d7f4623c51 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 26 Dec 2001 08:22:06 +0000 Subject: [PATCH] * configure.in: Test for Autoconf >= 2.52. * tests/defs (needs_autoconf, has_autoconf): Delete definition. * tests/ansi3.test, tests/ansi5.test, tests/ccnoco.test, tests/cond4.test, tests/cond9.test, tests/cond16.test, tests/cond18.test, tests/cond19.test, tests/cond20.test, tests/confsub.test, tests/depcomp2.test, tests/depdist.test, tests/depend2.test, tests/dirname.test, tests/distname.test, tests/extra5.test, tests/install2.test, tests/lex3.test, tests/make.test, tests/nobase.test, tests/pr9.test, tests/pr87.test, tests/stamph2.test, tests/subdir5.test, tests/subdirbuiltsources.test, tests/subobj3.test, tests/subobj5.test, tests/subobj6.test, tests/substref.test, tests/target-cflags.test, tests/yacc4.test, tests/yacc7.test, tests/yaccvpath.test: Do not use $needs_autoconf. --- ChangeLog | 17 +++++++++++++++++ Makefile.in | 2 +- aclocal.m4 | 28 ++++++++++++++++++++++++++++ configure | 26 +++++++++++++++++++------- configure.in | 6 ++++++ tests/ansi3.test | 3 --- tests/ansi5.test | 2 -- tests/ccnoco.test | 1 - tests/cond16.test | 1 - tests/cond18.test | 1 - tests/cond19.test | 1 - tests/cond20.test | 2 -- tests/cond4.test | 2 -- tests/cond9.test | 2 -- tests/confsub.test | 3 --- tests/defs | 7 ------- tests/depcomp2.test | 3 --- tests/depdist.test | 3 --- tests/depend2.test | 3 --- tests/dirname.test | 3 --- tests/distname.test | 2 -- tests/extra5.test | 3 --- tests/install2.test | 3 --- tests/lex3.test | 3 --- tests/make.test | 1 - tests/nobase.test | 3 --- tests/pr87.test | 3 --- tests/pr9.test | 3 --- tests/stamph2.test | 3 --- tests/subdir5.test | 2 -- tests/subdirbuiltsources.test | 3 --- tests/subobj3.test | 3 --- tests/subobj5.test | 2 -- tests/subobj6.test | 2 -- tests/substref.test | 1 - tests/target-cflags.test | 3 --- tests/yacc4.test | 2 -- tests/yacc7.test | 1 - tests/yaccvpath.test | 2 -- 39 files changed, 71 insertions(+), 90 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b02041..e3859e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2001-12-26 Alexandre Duret-Lutz + + * configure.in: Test for Autoconf >= 2.52. + * tests/defs (needs_autoconf, has_autoconf): Delete definition. + * tests/ansi3.test, tests/ansi5.test, tests/ccnoco.test, + tests/cond4.test, tests/cond9.test, tests/cond16.test, + tests/cond18.test, tests/cond19.test, tests/cond20.test, + tests/confsub.test, tests/depcomp2.test, tests/depdist.test, + tests/depend2.test, tests/dirname.test, tests/distname.test, + tests/extra5.test, tests/install2.test, tests/lex3.test, + tests/make.test, tests/nobase.test, tests/pr9.test, + tests/pr87.test, tests/stamph2.test, tests/subdir5.test, + tests/subdirbuiltsources.test, tests/subobj3.test, + tests/subobj5.test, tests/subobj6.test, tests/substref.test, + tests/target-cflags.test, tests/yacc4.test, tests/yacc7.test, + tests/yaccvpath.test: Do not use $needs_autoconf. + 2001-12-14 Alexandre Duret-Lutz * configure.in: Bump version to 1.5c. diff --git a/Makefile.in b/Makefile.in index 939f5c2..a18b882 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.5b from Makefile.am. +# Makefile.in generated by automake 1.5c from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 diff --git a/aclocal.m4 b/aclocal.m4 index aa2ba69..6310518 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -644,3 +644,31 @@ else $1_FALSE= fi]) +# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*- + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + diff --git a/configure b/configure index 915605c..d2322e1 100755 --- a/configure +++ b/configure @@ -1260,6 +1260,18 @@ echo "$as_me: error: perl 5.005 or better is required" >&2;} { (exit 1); exit 1; }; } } +echo 'AC''_PREREQ(2.52)' > conftest.ac +{ echo "$as_me:$LINENO: eval $AUTOCONF -o /dev/null conftest.ac" >&5 + (eval $AUTOCONF -o /dev/null conftest.ac) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || { + { { echo "$as_me:1269: error: Autoconf 2.52 or better is required" >&5 +echo "$as_me: error: Autoconf 2.52 or better is required" >&2;} + { (exit 1); exit 1; }; } +} +rm conftest.ac + ac_config_files="$ac_config_files automake" ac_config_files="$ac_config_files aclocal" @@ -1374,7 +1386,7 @@ rm -f confdef2opt.sed : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:1377: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:1389: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -1542,7 +1554,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:1545: error: ambiguous option: $1 + { { echo "$as_me:1557: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -1561,7 +1573,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:1564: error: unrecognized option: $1 + -*) { { echo "$as_me:1576: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -1604,7 +1616,7 @@ do "lib/am/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/am/Makefile" ;; "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - *) { { echo "$as_me:1607: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:1619: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -1818,7 +1830,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:1821: creating $ac_file" >&5 + { echo "$as_me:1833: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -1836,7 +1848,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:1839: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:1851: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -1849,7 +1861,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:1852: error: cannot find input file: $f" >&5 + { { echo "$as_me:1864: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; diff --git a/configure.in b/configure.in index c8e4392..5366186 100644 --- a/configure.in +++ b/configure.in @@ -39,6 +39,12 @@ $PERL -e 'require 5.005;' || { AC_MSG_ERROR([perl 5.005 or better is required]) } +echo 'AC''_PREREQ(2.52)' > conftest.ac +AM_RUN_LOG([eval $AUTOCONF -o /dev/null conftest.ac]) || { + AC_MSG_ERROR([Autoconf 2.52 or better is required]) +} +rm conftest.ac + AC_CONFIG_FILES([automake], [chmod +x automake]) AC_CONFIG_FILES([aclocal], [chmod +x aclocal]) diff --git a/tests/ansi3.test b/tests/ansi3.test index 46e40d4..cb06620 100755 --- a/tests/ansi3.test +++ b/tests/ansi3.test @@ -28,9 +28,6 @@ main (int argc, char *argv[]) } END -# Fail gracefully if no autoconf. -$needs_autoconf - # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 77 diff --git a/tests/ansi5.test b/tests/ansi5.test index 1e0d082..f4c88e2 100755 --- a/tests/ansi5.test +++ b/tests/ansi5.test @@ -48,8 +48,6 @@ main (int argc, char *argv[]) } END -$needs_autoconf - (gcc -v) > /dev/null 2>&1 || exit 77 set -e diff --git a/tests/ccnoco.test b/tests/ccnoco.test index 08bdaea..ef0cfc6 100755 --- a/tests/ccnoco.test +++ b/tests/ccnoco.test @@ -39,7 +39,6 @@ int main () } END -$needs_autoconf gcc -v || exit 77 cat > Mycomp << 'END' diff --git a/tests/cond16.test b/tests/cond16.test index 20be630..43e4a68 100755 --- a/tests/cond16.test +++ b/tests/cond16.test @@ -32,7 +32,6 @@ echorule: END -$needs_autoconf (gcc -v) > /dev/null 2>&1 || exit 77 # Ignore user CFLAGS. diff --git a/tests/cond18.test b/tests/cond18.test index 9d5496b..fe1e9a7 100755 --- a/tests/cond18.test +++ b/tests/cond18.test @@ -38,7 +38,6 @@ echorule: bin_PROGRAMS = helldl END -$needs_autoconf (gcc -v) > /dev/null 2>&1 || exit 77 # Ignore user CFLAGS. diff --git a/tests/cond19.test b/tests/cond19.test index fb86c14..95826fc 100755 --- a/tests/cond19.test +++ b/tests/cond19.test @@ -40,7 +40,6 @@ echorule: bin_PROGRAMS = helldl END -$needs_autoconf (gcc -v) > /dev/null 2>&1 || exit 77 # Ignore user CFLAGS. diff --git a/tests/cond20.test b/tests/cond20.test index 6c17c11..ed5b901 100755 --- a/tests/cond20.test +++ b/tests/cond20.test @@ -28,8 +28,6 @@ helldl_SOURCES = $(var2) bin_PROGRAMS = helldl END -$needs_autoconf - set -e $ACLOCAL diff --git a/tests/cond4.test b/tests/cond4.test index c7cf043..7b99288 100755 --- a/tests/cond4.test +++ b/tests/cond4.test @@ -30,8 +30,6 @@ echo-objects: @echo $(targ_OBJECTS) END -$needs_autoconf - $ACLOCAL || exit 1 $AUTOMAKE || exit 1 diff --git a/tests/cond9.test b/tests/cond9.test index aeca07a..80636bc 100755 --- a/tests/cond9.test +++ b/tests/cond9.test @@ -22,8 +22,6 @@ echo-something: echo '$(this)' END -$needs_autoconf - $ACLOCAL \ && $AUTOCONF \ && $AUTOMAKE -a \ diff --git a/tests/confsub.test b/tests/confsub.test index 28ec3e3..4796965 100755 --- a/tests/confsub.test +++ b/tests/confsub.test @@ -5,9 +5,6 @@ . $srcdir/defs || exit 1 -# Fail gracefully if no autoconf. -$needs_autoconf - cat > configure.in << 'END' AC_INIT AM_INIT_AUTOMAKE(nonesuch, nonesuch) diff --git a/tests/defs b/tests/defs index 4dc6e2f..3694490 100644 --- a/tests/defs +++ b/tests/defs @@ -82,13 +82,6 @@ fi # User can set which tools from Autoconf to use. test -z "$AUTOCONF" && AUTOCONF=autoconf -if ($AUTOCONF --version) >/dev/null 2>&1; then - has_autoconf=: - needs_autoconf=: -else - has_autoconf=false - needs_autoconf='exit 77' -fi echo "=== Running test $0" diff --git a/tests/depcomp2.test b/tests/depcomp2.test index e9771b6..04c53e7 100755 --- a/tests/depcomp2.test +++ b/tests/depcomp2.test @@ -26,9 +26,6 @@ END : > subdir/foo.c -# Fail gracefully if no autoconf. -$needs_autoconf - # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 77 diff --git a/tests/depdist.test b/tests/depdist.test index 85f1b7b..b658d8b 100755 --- a/tests/depdist.test +++ b/tests/depdist.test @@ -5,9 +5,6 @@ . $srcdir/defs || exit 1 -# Fail gracefully if no autoconf. -$needs_autoconf - rm -f configure.in mkdir config diff --git a/tests/depend2.test b/tests/depend2.test index 1cae3ea..41d547d 100755 --- a/tests/depend2.test +++ b/tests/depend2.test @@ -31,9 +31,6 @@ main (int argc, char *argv[]) } END -# Fail gracefully if no autoconf. -$needs_autoconf - # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 77 diff --git a/tests/dirname.test b/tests/dirname.test index 7971292..3f21d4e 100755 --- a/tests/dirname.test +++ b/tests/dirname.test @@ -15,9 +15,6 @@ echo "6 / = _AM_DIRNAME([/])" echo "7 /file = _AM_DIRNAME([/file])" END -# Fail gracefully if no autoconf. -$needs_autoconf - $ACLOCAL || exit 1 # fail gracefully if autoconf didn't support support our regexps anyhow $AUTOCONF || exit 77 diff --git a/tests/distname.test b/tests/distname.test index 350d58f..3b3b27f 100755 --- a/tests/distname.test +++ b/tests/distname.test @@ -22,8 +22,6 @@ END set -e -$needs_autoconf - $ACLOCAL $AUTOCONF $AUTOMAKE --include-deps --copy --add-missing diff --git a/tests/extra5.test b/tests/extra5.test index aa84681..58f7b99 100755 --- a/tests/extra5.test +++ b/tests/extra5.test @@ -5,9 +5,6 @@ . $srcdir/defs || exit 1 -# Fail gracefully if no autoconf. -$needs_autoconf - echo AC_OUTPUT >> configure.in cat > Makefile.am << 'END' diff --git a/tests/install2.test b/tests/install2.test index 1d5d608..82ada88 100755 --- a/tests/install2.test +++ b/tests/install2.test @@ -17,9 +17,6 @@ cat > Makefile.am << 'END' SUBDIRS = . END -# Fail gracefully if no autoconf. -$needs_autoconf - # Likewise for gzip. (gzip --version) > /dev/null 2>&1 || exit 77 diff --git a/tests/lex3.test b/tests/lex3.test index f5af316..9133b4a 100755 --- a/tests/lex3.test +++ b/tests/lex3.test @@ -5,9 +5,6 @@ . $srcdir/defs || exit 1 -# Fail gracefully if no autoconf. -$needs_autoconf - # Likewise for GNU Make (we need VPATH support for `make distcheck'). $needs_gnu_make diff --git a/tests/make.test b/tests/make.test index 23037f7..6cd372d 100755 --- a/tests/make.test +++ b/tests/make.test @@ -14,7 +14,6 @@ END : > Makefile.am -$needs_autoconf $needs_gnu_make set -e diff --git a/tests/nobase.test b/tests/nobase.test index caf1a2c..888f340 100755 --- a/tests/nobase.test +++ b/tests/nobase.test @@ -3,9 +3,6 @@ . $srcdir/defs || exit 1 -# Fail gracefully if no autoconf. -$needs_autoconf - cat >> configure.in <<'EOF' AC_OUTPUT EOF diff --git a/tests/pr87.test b/tests/pr87.test index accf5e1..07a2c97 100755 --- a/tests/pr87.test +++ b/tests/pr87.test @@ -26,9 +26,6 @@ AC_PROG_CC AC_OUTPUT(Makefile `echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`) EOF -# Fail gracefully if no autoconf. -$needs_autoconf - # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 77 diff --git a/tests/pr9.test b/tests/pr9.test index d143fc3..afc4551 100755 --- a/tests/pr9.test +++ b/tests/pr9.test @@ -15,9 +15,6 @@ END mkdir support -# Fail gracefully if no autoconf. -$needs_autoconf - # Likewise for gzip. (gzip --version) > /dev/null 2>&1 || exit 77 diff --git a/tests/stamph2.test b/tests/stamph2.test index f46b4ef..f25e683 100755 --- a/tests/stamph2.test +++ b/tests/stamph2.test @@ -3,9 +3,6 @@ # Make sure stamp-h* files are created where we expect . $srcdir/defs || exit 1 -# Fail gracefully if no autoconf. -$needs_autoconf - cat > configure.in << END AC_INIT(Makefile.am) AM_INIT_AUTOMAKE($me, 1.0) diff --git a/tests/subdir5.test b/tests/subdir5.test index 9e7b571..df7d69f 100755 --- a/tests/subdir5.test +++ b/tests/subdir5.test @@ -29,8 +29,6 @@ END set -e -$needs_autoconf - $ACLOCAL $AUTOCONF $AUTOMAKE --include-deps --copy --add-missing diff --git a/tests/subdirbuiltsources.test b/tests/subdirbuiltsources.test index 742fd0f..d86d5fc 100755 --- a/tests/subdirbuiltsources.test +++ b/tests/subdirbuiltsources.test @@ -6,9 +6,6 @@ . $srcdir/defs || exit 1 -# Fail gracefully if no autoconf. -$needs_autoconf - set -e mkdir lib diff --git a/tests/subobj3.test b/tests/subobj3.test index 5113e8b..97b7f6a 100755 --- a/tests/subobj3.test +++ b/tests/subobj3.test @@ -32,9 +32,6 @@ main (int argc, char *argv[]) } END -# Fail gracefully if no autoconf. -$needs_autoconf - # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 77 diff --git a/tests/subobj5.test b/tests/subobj5.test index e2303a3..301c303 100755 --- a/tests/subobj5.test +++ b/tests/subobj5.test @@ -24,8 +24,6 @@ mkdir generic set -e -$needs_autoconf - $ACLOCAL $AUTOCONF $AUTOMAKE --include-deps --copy --add-missing diff --git a/tests/subobj6.test b/tests/subobj6.test index 1044d80..f9423e2 100755 --- a/tests/subobj6.test +++ b/tests/subobj6.test @@ -34,8 +34,6 @@ END set -e -$needs_autoconf - $ACLOCAL $AUTOCONF $AUTOMAKE --include-deps --copy --add-missing diff --git a/tests/substref.test b/tests/substref.test index 1c022f9..8dc7bca 100755 --- a/tests/substref.test +++ b/tests/substref.test @@ -30,7 +30,6 @@ echorule: bin_PROGRAMS = helldl END -$needs_autoconf (gcc -v) > /dev/null 2>&1 || exit 77 # Ignore user CFLAGS. diff --git a/tests/target-cflags.test b/tests/target-cflags.test index 06643b8..f2e5256 100755 --- a/tests/target-cflags.test +++ b/tests/target-cflags.test @@ -37,9 +37,6 @@ int main(void) #endif END -# Fail gracefully if no autoconf. -$needs_autoconf - # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 77 diff --git a/tests/yacc4.test b/tests/yacc4.test index 1c9345e..95daef1 100755 --- a/tests/yacc4.test +++ b/tests/yacc4.test @@ -4,8 +4,6 @@ . $srcdir/defs || exit 1 -# Fail gracefully if no autoconf. -$needs_autoconf # Likewise for some other tools. (gcc -v) > /dev/null 2>&1 || exit 77 (bison -V) > /dev/null 2>&1 || exit 77 diff --git a/tests/yacc7.test b/tests/yacc7.test index 3c9a6f3..2989697 100755 --- a/tests/yacc7.test +++ b/tests/yacc7.test @@ -6,7 +6,6 @@ . $srcdir/defs || exit 1 $needs_gnu_make -$needs_autoconf cat > configure.in << 'END' AC_INIT diff --git a/tests/yaccvpath.test b/tests/yaccvpath.test index 04041fe..df3f6b2 100755 --- a/tests/yaccvpath.test +++ b/tests/yaccvpath.test @@ -8,8 +8,6 @@ . $srcdir/defs || exit 1 -# Fail gracefully if no autoconf. -$needs_autoconf # Likewise for some other tools. (gcc -v) > /dev/null 2>&1 || exit 77 (bison -V) > /dev/null 2>&1 || exit 77 -- 2.7.4