* configure.in: Test for Autoconf >= 2.52.
authorAlexandre Duret-Lutz <adl@gnu.org>
Wed, 26 Dec 2001 08:22:06 +0000 (08:22 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Wed, 26 Dec 2001 08:22:06 +0000 (08:22 +0000)
* 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.

39 files changed:
ChangeLog
Makefile.in
aclocal.m4
configure
configure.in
tests/ansi3.test
tests/ansi5.test
tests/ccnoco.test
tests/cond16.test
tests/cond18.test
tests/cond19.test
tests/cond20.test
tests/cond4.test
tests/cond9.test
tests/confsub.test
tests/defs
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/pr87.test
tests/pr9.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

index 5b02041..e3859e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2001-12-26  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * 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  <duret_g@epita.fr>
 
        * configure.in: Bump version to 1.5c.
index 939f5c2..a18b882 100644 (file)
@@ -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
index aa2ba69..6310518 100644 (file)
@@ -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); }])
+
index 915605c..d2322e1 100755 (executable)
--- 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;;
index c8e4392..5366186 100644 (file)
@@ -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])
 
index 46e40d4..cb06620 100755 (executable)
@@ -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
 
index 1e0d082..f4c88e2 100755 (executable)
@@ -48,8 +48,6 @@ main (int argc, char *argv[])
 }
 END
 
-$needs_autoconf
-
 (gcc -v) > /dev/null 2>&1 || exit 77
 
 set -e
index 08bdaea..ef0cfc6 100755 (executable)
@@ -39,7 +39,6 @@ int main ()
 }
 END
 
-$needs_autoconf
 gcc -v || exit 77
 
 cat > Mycomp << 'END'
index 20be630..43e4a68 100755 (executable)
@@ -32,7 +32,6 @@ echorule:
 
 END
 
-$needs_autoconf
 (gcc -v) > /dev/null 2>&1 || exit 77
 
 # Ignore user CFLAGS.
index 9d5496b..fe1e9a7 100755 (executable)
@@ -38,7 +38,6 @@ echorule:
 bin_PROGRAMS = helldl
 END
 
-$needs_autoconf
 (gcc -v) > /dev/null 2>&1 || exit 77
 
 # Ignore user CFLAGS.
index fb86c14..95826fc 100755 (executable)
@@ -40,7 +40,6 @@ echorule:
 bin_PROGRAMS = helldl
 END
 
-$needs_autoconf
 (gcc -v) > /dev/null 2>&1 || exit 77
 
 # Ignore user CFLAGS.
index 6c17c11..ed5b901 100755 (executable)
@@ -28,8 +28,6 @@ helldl_SOURCES = $(var2)
 bin_PROGRAMS = helldl
 END
 
-$needs_autoconf
-
 set -e
 
 $ACLOCAL
index c7cf043..7b99288 100755 (executable)
@@ -30,8 +30,6 @@ echo-objects:
        @echo $(targ_OBJECTS)
 END
 
-$needs_autoconf
-
 $ACLOCAL || exit 1
 $AUTOMAKE || exit 1
 
index aeca07a..80636bc 100755 (executable)
@@ -22,8 +22,6 @@ echo-something:
        echo '$(this)'
 END
 
-$needs_autoconf
-
 $ACLOCAL \
   && $AUTOCONF \
   && $AUTOMAKE -a \
index 28ec3e3..4796965 100755 (executable)
@@ -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)
index 4dc6e2f..3694490 100644 (file)
@@ -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"
index e9771b6..04c53e7 100755 (executable)
@@ -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
 
index 85f1b7b..b658d8b 100755 (executable)
@@ -5,9 +5,6 @@
 
 . $srcdir/defs || exit 1
 
-# Fail gracefully if no autoconf.
-$needs_autoconf
-
 rm -f configure.in
 
 mkdir config
index 1cae3ea..41d547d 100755 (executable)
@@ -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
 
index 7971292..3f21d4e 100755 (executable)
@@ -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
index 350d58f..3b3b27f 100755 (executable)
@@ -22,8 +22,6 @@ END
 
 set -e
 
-$needs_autoconf
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
index aa84681..58f7b99 100755 (executable)
@@ -5,9 +5,6 @@
 
 . $srcdir/defs || exit 1
 
-# Fail gracefully if no autoconf.
-$needs_autoconf
-
 echo AC_OUTPUT >> configure.in
 
 cat > Makefile.am << 'END'
index 1d5d608..82ada88 100755 (executable)
@@ -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
 
index f5af316..9133b4a 100755 (executable)
@@ -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
 
index 23037f7..6cd372d 100755 (executable)
@@ -14,7 +14,6 @@ END
 
 : > Makefile.am
 
-$needs_autoconf
 $needs_gnu_make
 
 set -e
index caf1a2c..888f340 100755 (executable)
@@ -3,9 +3,6 @@
 
 . $srcdir/defs || exit 1
 
-# Fail gracefully if no autoconf.
-$needs_autoconf
-
 cat >> configure.in <<'EOF'
 AC_OUTPUT
 EOF
index accf5e1..07a2c97 100755 (executable)
@@ -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
 
index d143fc3..afc4551 100755 (executable)
@@ -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
 
index f46b4ef..f25e683 100755 (executable)
@@ -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)
index 9e7b571..df7d69f 100755 (executable)
@@ -29,8 +29,6 @@ END
 
 set -e
 
-$needs_autoconf
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
index 742fd0f..d86d5fc 100755 (executable)
@@ -6,9 +6,6 @@
 
 . $srcdir/defs || exit 1
 
-# Fail gracefully if no autoconf.
-$needs_autoconf
-
 set -e
 
 mkdir lib
index 5113e8b..97b7f6a 100755 (executable)
@@ -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
 
index e2303a3..301c303 100755 (executable)
@@ -24,8 +24,6 @@ mkdir generic
 
 set -e
 
-$needs_autoconf
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
index 1044d80..f9423e2 100755 (executable)
@@ -34,8 +34,6 @@ END
 
 set -e
 
-$needs_autoconf
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
index 1c022f9..8dc7bca 100755 (executable)
@@ -30,7 +30,6 @@ echorule:
 bin_PROGRAMS = helldl
 END
 
-$needs_autoconf
 (gcc -v) > /dev/null 2>&1 || exit 77
 
 # Ignore user CFLAGS.
index 06643b8..f2e5256 100755 (executable)
@@ -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
 
index 1c9345e..95daef1 100755 (executable)
@@ -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
index 3c9a6f3..2989697 100755 (executable)
@@ -6,7 +6,6 @@
 . $srcdir/defs || exit 1
 
 $needs_gnu_make
-$needs_autoconf
 
 cat > configure.in << 'END'
 AC_INIT
index 04041fe..df3f6b2 100755 (executable)
@@ -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