]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* autoconf.in ($AWK): Remove, no longer used.
authorAkim Demaille <akim@epita.fr>
Wed, 1 Aug 2001 13:56:52 +0000 (13:56 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 1 Aug 2001 13:56:52 +0000 (13:56 +0000)
* test/tools.at: Use AT_CHECK_AUTOCONF.
(AWK portability): Remove, for autoconf no longer uses AWK.
(Syntax of the Perl scripts): New.
* configure.ac: autoconf no longer needs an AWK with a good
regexp engine.
Use a static test on AC_PACKAGE_VERSION.
* autom4te.in (&up_to_date_p): Output depends on the arguments.
* lib/autoconf/Makefile.am: Ship version.m4, maintainer file.
* tests/atconfig.in (PERL): New.

ChangeLog
README
autoconf.in
autom4te.in
bin/autoconf.in
bin/autom4te.in
configure.ac
lib/autoconf/Makefile.am
lib/autoconf/Makefile.in
tests/atconfig.in
tests/tools.at

index 9992c1fd427d2e5569f8011194f7556ab33a7115..43a4c5e4557f38461e32bdb503fe479ed08efeac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2001-08-01  Akim Demaille  <akim@epita.fr>
+
+       * autoconf.in ($AWK): Remove, no longer used.
+       * test/tools.at: Use AT_CHECK_AUTOCONF.
+       (AWK portability): Remove, for autoconf no longer uses AWK.
+       (Syntax of the Perl scripts): New.
+       * configure.ac: autoconf no longer needs an AWK with a good
+       regexp engine.
+       Use a static test on AC_PACKAGE_VERSION.
+       * autom4te.in (&up_to_date_p): Output depends on the arguments.
+       * lib/autoconf/Makefile.am: Ship version.m4, maintainer file.
+       * tests/atconfig.in (PERL): New.
+
 2001-08-01  Akim Demaille  <akim@epita.fr>
 
        * lib/autoconf/lang.m4 (AC_LANG(C), AC_LANG_C, _AC_LANG_ABBREV(C))
diff --git a/README b/README
index 345a9876e73fa5e34222b83f281d1fd10c246dd3..8d723dcb9e487a317728624d1761a550e9ad0e64 100644 (file)
--- a/README
+++ b/README
@@ -10,16 +10,12 @@ configuration script for a package from a template file that lists the
 operating system features that the package can use, in the form of M4
 macro calls.
 
-Producing configuration scripts using Autoconf requires GNU M4.  You
-must install GNU M4 (version 1.4 or later) before configuring
-Autoconf, so that Autoconf's configure script can find it.  The
-configuration scripts produced by Autoconf are self-contained, so
-their users do not need to have Autoconf (or GNU M4).
-
-Some optional utilities that come with Autoconf (autoscan and
-autoupdate) use Perl 5.5.  However, it is not required in order to use
-the main Autoconf programs.  If it is not present, the affected
-Autoconf utilities will not be installed.
+Producing configuration scripts using Autoconf requires GNU M4 and
+Perl.  You must install GNU M4 (version 1.4 or later) and Perl (5.005
+or later) before configuring Autoconf, so that Autoconf's configure
+script can find them.  The configuration scripts produced by Autoconf
+are self-contained, so their users do not need to have Autoconf (or
+GNU M4, Perl etc.).
 
 The file INSTALL should be distributed with packages that use
 Autoconf-generated configure scripts and Makefiles that conform to the
@@ -28,7 +24,7 @@ of the package, where to report bugs, and a pointer to INSTALL for
 instructions on compilation and installation.  This removes the need
 to maintain many similar sets of installation instructions.
 
-Be sure to read BUGS (especially if this Autoconf is not an official
+Be sure to read BUGS (especially if this version is not an official
 release) and INSTALL.
 
 Mail suggestions to autoconf@gnu.org, report bugs on
index fcddb8b567d147b646bfcfa9f9068ccf2589581a..0027f1fcd8e05379fbd0d7bbc0da1ab5e7349d7f 100644 (file)
@@ -119,15 +119,6 @@ case " $M4 " in
 esac
 
 
-# Find a good AWK.
-: ${AWK=@AWK@}
-if echo xfoo | $AWK '/foo|^bar$/ { print }' | grep xfoo >/dev/null; then :; else
-  echo "$me: the regex engine of $AWK is too broken to be used" >&2
-  echo "$me: you might want to install GNU AWK" >&2
-  exit 1
-fi
-
-
 # We test "$dir/autom4te" in case we are in the build tree, in which case
 # the names are not transformed yet.
 for autom4te in "$AUTOM4TE" \
index e179a35f4c6c2481dba33b25c832f53266b9d52f..bee933ad3fbaa06b3e5117b4fe4c2cac6a6db8e5 100644 (file)
@@ -128,9 +128,12 @@ sub request
     {
       if (! exists ${$obj->macro}{$_})
         {
+         # FIXME: This is too rough an approximation: we should have
+         # a means to select only M4 builtins, but @m4_builtins is not
+         # visible here.
          s/^m4_//;
          ${$obj->macro}{$_} = 1;
-          ${$obj->macro}{"m4_$_"} = 1;
+         ${$obj->macro}{"m4_$_"} = 1;
           $obj->valid (0);
        }
     }
@@ -234,7 +237,7 @@ my $tmp;
 my @required_trace =
   (
    # We need `include' to find the dependencies.
-   'include',
+   'include', 'm4_include',
    # These are wanted by autoheader.
    'AC_CONFIG_HEADERS',
    'AH_OUTPUT',
@@ -668,10 +671,10 @@ sub trace_requests
       $macro =~ s/^m4_//;
       # See &handle_traces for an explanation for this paragraph.
       if (grep /^$macro$/, @m4_builtins)
-       {
-         $res{$macro} = 1;
-         $res{"m4_$macro"} = 1;
-       }
+       {
+         $res{$macro} = 1;
+         $res{"m4_$macro"} = 1;
+       }
     }
 
   return %res;
@@ -966,10 +969,9 @@ sub up_to_date_p ($$)
   handle_traces ($req, "$tmp/dependencies",('include' => '$1'));
   my $mtime = (stat ($file))[9];
   my $deps = new IO::File ("$tmp/dependencies");
-  while ($_ = $deps->getline)
+  push @dep, map { chomp; find_file ($_) } $deps->getlines;
+  foreach (@dep)
     {
-      chop;
-      $_ = find_file ($_);
       verbose "$file depends on $_";
       if ($mtime < (stat ($_))[9])
        {
index fcddb8b567d147b646bfcfa9f9068ccf2589581a..0027f1fcd8e05379fbd0d7bbc0da1ab5e7349d7f 100644 (file)
@@ -119,15 +119,6 @@ case " $M4 " in
 esac
 
 
-# Find a good AWK.
-: ${AWK=@AWK@}
-if echo xfoo | $AWK '/foo|^bar$/ { print }' | grep xfoo >/dev/null; then :; else
-  echo "$me: the regex engine of $AWK is too broken to be used" >&2
-  echo "$me: you might want to install GNU AWK" >&2
-  exit 1
-fi
-
-
 # We test "$dir/autom4te" in case we are in the build tree, in which case
 # the names are not transformed yet.
 for autom4te in "$AUTOM4TE" \
index e179a35f4c6c2481dba33b25c832f53266b9d52f..bee933ad3fbaa06b3e5117b4fe4c2cac6a6db8e5 100644 (file)
@@ -128,9 +128,12 @@ sub request
     {
       if (! exists ${$obj->macro}{$_})
         {
+         # FIXME: This is too rough an approximation: we should have
+         # a means to select only M4 builtins, but @m4_builtins is not
+         # visible here.
          s/^m4_//;
          ${$obj->macro}{$_} = 1;
-          ${$obj->macro}{"m4_$_"} = 1;
+         ${$obj->macro}{"m4_$_"} = 1;
           $obj->valid (0);
        }
     }
@@ -234,7 +237,7 @@ my $tmp;
 my @required_trace =
   (
    # We need `include' to find the dependencies.
-   'include',
+   'include', 'm4_include',
    # These are wanted by autoheader.
    'AC_CONFIG_HEADERS',
    'AH_OUTPUT',
@@ -668,10 +671,10 @@ sub trace_requests
       $macro =~ s/^m4_//;
       # See &handle_traces for an explanation for this paragraph.
       if (grep /^$macro$/, @m4_builtins)
-       {
-         $res{$macro} = 1;
-         $res{"m4_$macro"} = 1;
-       }
+       {
+         $res{$macro} = 1;
+         $res{"m4_$macro"} = 1;
+       }
     }
 
   return %res;
@@ -966,10 +969,9 @@ sub up_to_date_p ($$)
   handle_traces ($req, "$tmp/dependencies",('include' => '$1'));
   my $mtime = (stat ($file))[9];
   my $deps = new IO::File ("$tmp/dependencies");
-  while ($_ = $deps->getline)
+  push @dep, map { chomp; find_file ($_) } $deps->getlines;
+  foreach (@dep)
     {
-      chop;
-      $_ = find_file ($_);
       verbose "$file depends on $_";
       if ($mtime < (stat ($_))[9])
        {
index 5dcbb70727d424c972ad1237e675352619791a17..a76084f6c75dcf1e72cbe000f44228d09dc31887 100644 (file)
@@ -22,13 +22,8 @@ fi
 # a AC-SUBST inside AC-PROG-GNU-M4.  Grmph!
 AC_SUBST(M4)
 
-# `autoconf' and `ifnames' use AWK.  And we need decent RE support.
+# `ifnames' uses AWK.
 AC_PROG_AWK
-# Some AWK fail
-if echo xfoo | $AWK '/foo|^bar$/ { print }' | grep xfoo >/dev/null; then :; else
-  AC_MSG_ERROR([the regex engine of $AWK is too broken to be used
-                you might want to install GNU AWK])
-fi
 
 # Generating man pages.
 AM_MISSING_PROG(HELP2MAN, help2man)
@@ -39,6 +34,9 @@ AC_SUBST(PERL)dnl
 if test "$PERL" = no; then
   AC_MSG_ERROR([perl is not found])
 fi
+$PERL -e 'require 5.005;' || {
+   AC_MSG_ERROR([perl 5.005 or better is required])
+}
 
 AC_PROG_INSTALL
 
@@ -55,11 +53,9 @@ AC_CONFIG_FILES(Makefile m4/Makefile man/Makefile doc/Makefile config/Makefile
                 tests/Makefile tests/atconfig)
 
 AC_OUTPUT
-
 # Report the state of this version of Autoconf if this is a beta.
-case AC_PACKAGE_VERSION in
-  *[[a-z]]*)
-    cat <<EOF
+m4_match(m4_defn([AC_PACKAGE_VERSION]),  [[a-z]],
+[    cat <<EOF
 
 You are about to use an experimental version of Autoconf.  Be sure to
 read the relevant mailing lists, most importantly <autoconf@gnu.org>.
@@ -68,5 +64,5 @@ Below you will find information on the status of this version of Autoconf.
 
 
 EOF
-    sed -n '/^\* Status/,$p' $srcdir/BUGS;;
-esac
+    sed -n '/^\* Status/,$p' $srcdir/BUGS
+])
index ff536ec8d75bef4a0fca05b059d996253e7fb2a8..4e220c71426f6c235e44d9290cad0312c5dc2b85 100644 (file)
@@ -9,7 +9,7 @@ nodistautoconflibdir = $(pkgdatadir)/autoconf
 # The order matters: we need version.m4 to build autoconf.m4f.
 nodistautoconflib_DATA = version.m4 autoconf.m4f
 
-EXTRA_DIST = $(distautoconflib_DATA) version.in
+EXTRA_DIST = $(distautoconflib_DATA) version.in version.m4
 
 ## version.m4.  ##
 
index 07f40bdc60011726fdb04dbb7eca30a43d9ea26d..e572097afd0743ce793ee7c4c09ef478bfe92af9 100644 (file)
@@ -73,7 +73,7 @@ nodistautoconflibdir = $(pkgdatadir)/autoconf
 # The order matters: we need version.m4 to build autoconf.m4f.
 nodistautoconflib_DATA = version.m4 autoconf.m4f
 
-EXTRA_DIST = $(distautoconflib_DATA) version.in
+EXTRA_DIST = $(distautoconflib_DATA) version.in version.m4
 
 SUFFIXES = .m4 .m4f
 M4_INCLUDES = --include $(srcdir)                --include $(top_builddir)/lib                --include $(top_srcdir)/lib
index 4a6e9cc90b9dca37f37bd2f3843579f4f23f8578..b94de6f6e7837f41a8db971d513077a47258a856 100644 (file)
@@ -63,8 +63,9 @@ AUTOTEST_PATH='@AUTOTEST_PATH@'
 SHELL=${CONFIG_SHELL-'@SHELL@'}
 PATH_SEPARATOR='@PATH_SEPARATOR@'
 
-# We need GNU m4.
+# We need GNU m4, and Perl.
 M4='@M4@'
+PERL='@PERL@'
 
 # Be sure to use the non installed Perl modules.
 # We need no special protection for the subtools (e.g., autoheader runs
index 319bcbf19aeca9129b0eadfe4f720757b1e308e0..72818cb18e3152f5af79612013b598b7dabac222 100644 (file)
@@ -2,9 +2,9 @@
 
 AT_BANNER([Executables (autoheader, autoupdate...).])
 
-## -------------------------------------------------------- ##
-## Check that the shell scripts are syntactically correct.  ##
-## -------------------------------------------------------- ##
+## ----------------------------- ##
+## Syntax of the shell scripts.  ##
+## ----------------------------- ##
 
 # We use `/bin/sh -n script' to check that there are no syntax errors
 # in the scripts.  Although incredible, there are /bin/sh that go into
@@ -26,7 +26,7 @@ AT_BANNER([Executables (autoheader, autoupdate...).])
 # So before using `/bin/sh -n' to check our scripts, we first check
 # that `/bin/sh -n' is not broken to death.
 
-AT_SETUP([Syntax of the scripts])
+AT_SETUP([Syntax of the shell scripts])
 
 # A script that never returns.  We don't care that it never returns,
 # broken /bin/sh loop equally with `false', but it makes it easier to
@@ -69,29 +69,36 @@ AT_CLEANUP
 
 
 
+## ---------------------------- ##
+## Syntax of the Perl scripts.  ##
+## ---------------------------- ##
+
+AT_SETUP([Syntax of the Perl scripts])
+
+# Perl says things like:
+# | % perl -c ./autom4te
+# | ./autom4te syntax OK
+# Ignore it, it might change between releases.
+AT_CHECK([$PERL -c ../autom4te],   0, [], [ignore])
+AT_CHECK([$PERL -c ../autoupdate], 0, [], [ignore])
+
+AT_CLEANUP
+
+
+
 ## ----------------- ##
 ## AWK portability.  ##
 ## ----------------- ##
 
 AT_SETUP([AWK portability])
 
-AT_DATA([configure.ac],
-[])
-
 # Skip if we don't have GNU Awk.
 AT_CHECK([gawk --version || exit 77], 0, ignore, ignore)
 
-# Generation of the script.
-AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir ../lib -l $at_srcdir], 0,
-         [], [])
-# Tracing.
-AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir ../lib -l $at_srcdir -t AC_INIT], 0,
-         ignore, [])
 # Syntax correctness of ifnames.
-AT_CHECK([AWK='gawk --posix' ifnames /dev/null], 0,
-         [], [])
+AT_CHECK([AWK='gawk --posix' ifnames /dev/null])
 
-AT_CLEANUP(configure)
+AT_CLEANUP
 
 
 
@@ -118,7 +125,7 @@ TRACE1(foo, [active], TRACE1(active, [active]))
 ]])
 
 # Several --traces.
-AT_CHECK([autoconf --autoconf-dir ../lib -l $at_srcdir -t TRACE1 -t TRACE2], 0,
+AT_CHECK_AUTOCONF([-t TRACE1 -t TRACE2], 0,
 [[configure.ac:4:TRACE1:foo:bar:baz
 configure.ac:4:TRACE2:bar:baz
 configure.ac:5:TRACE1:bar:baz
@@ -134,7 +141,7 @@ configure.ac:7:TRACE2:active::ACTIVE
 ]])
 
 # Several line requests.
-AT_CHECK([[autoconf --autoconf-dir ../lib -l $at_srcdir -t TRACE1:'
+AT_CHECK_AUTOCONF([[-t TRACE1:'
 [$1], [$2], [$3].']], 0,
 [[
 [foo], [bar], [baz].
@@ -151,7 +158,7 @@ AT_CHECK([[autoconf --autoconf-dir ../lib -l $at_srcdir -t TRACE1:'
 ]])
 
 # ${sep}@.
-AT_CHECK([autoconf --autoconf-dir ../lib -l $at_srcdir -t TRACE2:'${)===(}@'], 0,
+AT_CHECK_AUTOCONF([-t TRACE2:'${)===(}@'], 0,
 [[[bar])===([baz]
 [baz]
 [])===([baz]
@@ -171,8 +178,7 @@ AT_DATA(configure.ac,
 [[define([active], [ACTIVE])
 ]])
 
-AT_CHECK([[autoconf --autoconf-dir ../lib -l $at_srcdir -t define |
-            sed -n '$p']],
+AT_CHECK_AUTOCONF([[-t define | sed -n '$p']],
          0,
 [[configure.ac:1:define:active:ACTIVE
 ]])
@@ -181,7 +187,7 @@ AT_CHECK([[autoconf --autoconf-dir ../lib -l $at_srcdir -t define |
 # dive into obscure feature interaction...
 # Note that using `-i' means we need the *.m4 files, not the *.m4f files,
 # hence we need srcdir, not builddir.
-AT_CHECK([[autoconf --autoconf-dir $at_top_srcdir/lib -l $at_srcdir -t define:'$1' -i|
+AT_CHECK_AUTOCONF([[--autoconf-dir $at_top_srcdir/lib -t define:'$1' -i|
             sed -n '$p']],
          0,
 [[active
@@ -212,7 +218,7 @@ AS_FOO
 _AS_BAR
 ]])
 
-AT_CHECK([autoconf --autoconf-dir ../lib -l $at_srcdir], 1, [], [stderr])
+AT_CHECK_AUTOCONF([], 1, [], [stderr])
 # The output of autoconf is not deterministic here because it
 # uses `for (ind in array)'.  So be sure to have a unique representation.
 AT_CHECK([sort stderr], 0,
@@ -253,7 +259,7 @@ BAC_DEFINE
 It would be very bad if Autoconf forgot to expand [AC_]OUTPUT!
 ]])
 
-AT_CHECK([autoconf --autoconf-dir ../lib -l $at_srcdir], 1, [], [stderr])
+AT_CHECK_AUTOCONF([], 1, [], [stderr])
 # The output of autoconf is not deterministic here because it
 # uses `for (ind in array)'.  So be sure to have a unique representation.
 AT_CHECK([sort stderr], 0,