summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--README18
-rw-r--r--autoconf.in9
-rw-r--r--autom4te.in20
-rw-r--r--bin/autoconf.in9
-rw-r--r--bin/autom4te.in20
-rw-r--r--configure.ac20
-rw-r--r--lib/autoconf/Makefile.am2
-rw-r--r--lib/autoconf/Makefile.in2
-rw-r--r--tests/atconfig.in3
-rw-r--r--tests/tools.at54
11 files changed, 84 insertions, 86 deletions
diff --git a/ChangeLog b/ChangeLog
index 9992c1fd..43a4c5e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
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))
(AC_LANG(C++), AC_LANG_CPLUSPLUS, _AC_LANG_ABBREV(C++))
(AC_LANG_SOURCE(C), AC_LANG_PROGRAM(C), AC_LANG_CALL(C))
diff --git a/README b/README
index 345a9876..8d723dcb 100644
--- 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
diff --git a/autoconf.in b/autoconf.in
index fcddb8b5..0027f1fc 100644
--- a/autoconf.in
+++ b/autoconf.in
@@ -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" \
diff --git a/autom4te.in b/autom4te.in
index e179a35f..bee933ad 100644
--- a/autom4te.in
+++ b/autom4te.in
@@ -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])
{
diff --git a/bin/autoconf.in b/bin/autoconf.in
index fcddb8b5..0027f1fc 100644
--- a/bin/autoconf.in
+++ b/bin/autoconf.in
@@ -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" \
diff --git a/bin/autom4te.in b/bin/autom4te.in
index e179a35f..bee933ad 100644
--- a/bin/autom4te.in
+++ b/bin/autom4te.in
@@ -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])
{
diff --git a/configure.ac b/configure.ac
index 5dcbb707..a76084f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
+])
diff --git a/lib/autoconf/Makefile.am b/lib/autoconf/Makefile.am
index ff536ec8..4e220c71 100644
--- a/lib/autoconf/Makefile.am
+++ b/lib/autoconf/Makefile.am
@@ -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. ##
diff --git a/lib/autoconf/Makefile.in b/lib/autoconf/Makefile.in
index 07f40bdc..e572097a 100644
--- a/lib/autoconf/Makefile.in
+++ b/lib/autoconf/Makefile.in
@@ -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
diff --git a/tests/atconfig.in b/tests/atconfig.in
index 4a6e9cc9..b94de6f6 100644
--- a/tests/atconfig.in
+++ b/tests/atconfig.in
@@ -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
diff --git a/tests/tools.at b/tests/tools.at
index 319bcbf1..72818cb1 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -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,