From 4218eaa02528aa5bf4eaf035c2cb2b9f4dfe3d2f Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 14 Nov 2001 19:53:25 +0000 Subject: [PATCH] Some patches from Marc Espie that make autoconf 2.52 work with the updated /usr/bin/m4. (Turn off some GNU m4 checks, and go back to non-frozen source files.) --- gnu/dist/autoconf/Makefile.in | 3 ++- gnu/dist/autoconf/acgeneral.m4 | 7 +++---- gnu/dist/autoconf/autoconf.in | 21 +++------------------ gnu/dist/autoconf/autoupdate.in | 4 ++-- gnu/dist/autoconf/configure | 19 ------------------- 5 files changed, 10 insertions(+), 44 deletions(-) diff --git a/gnu/dist/autoconf/Makefile.in b/gnu/dist/autoconf/Makefile.in index b44da2357ba0..dec0decb0480 100644 --- a/gnu/dist/autoconf/Makefile.in +++ b/gnu/dist/autoconf/Makefile.in @@ -89,7 +89,7 @@ m4sources = m4sugar.m4 m4sh.m4 $(srcdir)/acversion.m4 distpkgdataDATA = acfunctions acheaders acidentifiers acmakevars acprograms aclibraries $(m4sources) -nodistpkgdataDATA = autoconf.m4f +nodistpkgdataDATA = pkgdata_DATA = $(distpkgdataDATA) $(nodistpkgdataDATA) @@ -176,6 +176,7 @@ install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) @list='$(pkgdata_DATA)'; for p in $$list; do \ + p=`basename $$p`; \ if test -f $(srcdir)/$$p; then \ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p"; \ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p; \ diff --git a/gnu/dist/autoconf/acgeneral.m4 b/gnu/dist/autoconf/acgeneral.m4 index 732bbb0863cf..299771a2bb7f 100644 --- a/gnu/dist/autoconf/acgeneral.m4 +++ b/gnu/dist/autoconf/acgeneral.m4 @@ -413,12 +413,11 @@ m4_define([AC_FOREACH], # | column 2 | # column 0 column 26 # +m4_define([AC_PadLeft], + [m4_if(m4_eval([$1] > [$2]),1,[[ ]AC_PadLeft([$1]-1,[$2])])]) m4_define([AC_HELP_STRING], [m4_pushdef([AC_Prefix], m4_default([$3], [ ]))dnl -m4_pushdef([AC_Prefix_Format], - [ %-]m4_eval(m4_len(AC_Prefix) - 3)[s ])dnl [ %-23s ] -m4_text_wrap([$2], AC_Prefix, m4_format(AC_Prefix_Format, [$1]))dnl -m4_popdef([AC_Prefix_Format])dnl +m4_text_wrap([$2], AC_Prefix, [ $1]AC_PadLeft(m4_len(AC_Prefix),m4_len([$1])+2))dnl m4_popdef([AC_Prefix])dnl ]) diff --git a/gnu/dist/autoconf/autoconf.in b/gnu/dist/autoconf/autoconf.in index 75d94c9e1733..b56dbd462cd7 100644 --- a/gnu/dist/autoconf/autoconf.in +++ b/gnu/dist/autoconf/autoconf.in @@ -99,21 +99,6 @@ ac_LF_and_DOT=`echo; echo .` case "$M4" in [\\/]* | ?:[\\/]*) test -f "$M4" || M4=m4 ;; esac -# Some non-GNU m4's don't reject the --help option, so give them /dev/null. -case `$M4 --help &1` in -*reload-state*);; -*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;; -esac - -# Set some high recursion limit as the default limit, 250, has already -# been hit with AC_OUTPUT. -case " $M4 " in - *" --nesting-limit"* | *" -L"* ) - # Don't override the user's choice - ;; - *) M4="$M4 --nesting-limit=1024" - ;; -esac # Find a good AWK. @@ -279,7 +264,7 @@ test -f "$autoconf_dir/acsite.m4" && acsite_m4="$autoconf_dir/acsite.m4" test -f "$localdir/aclocal.m4" && aclocal_m4="$localdir/aclocal.m4" m4_common="-I $autoconf_dir -I $localdir -Dm4_tmpdir=$tmp" m4_prefiles=" $autoconf_dir/autoconf.m4 $acsite_m4 $aclocal_m4" -m4f_prefiles="--reload-state=$autoconf_dir/autoconf.m4f $acsite_m4 $aclocal_m4" +m4f_prefiles=$m4_prefiles run_m4="$M4 $m4_common" # Find the input file. @@ -749,8 +734,8 @@ EOF # traces in stderr. This is too fragile, as it results in # unexpected data in the output. autoheader has been fragile to # this. - $verbose "$me: running $run_m4_trace $trace_prefiles $infile -o $tmp/traces" >&2 - $run_m4_trace $trace_prefiles $infile -o $tmp/traces >/dev/null || + $verbose "$me: running $run_m4_trace -o $tmp/traces $trace_prefiles $infile" >&2 + $run_m4_trace -o $tmp/traces $trace_prefiles $infile >/dev/null || { echo "$me: tracing failed" >&2 (exit 1); exit 1 diff --git a/gnu/dist/autoconf/autoupdate.in b/gnu/dist/autoconf/autoupdate.in index 7cc362a8f2ac..8a42c69494bc 100644 --- a/gnu/dist/autoconf/autoupdate.in +++ b/gnu/dist/autoconf/autoupdate.in @@ -204,8 +204,8 @@ sub parse_args () sub find_slaves () { # Some non-GNU m4's don't reject the --help option, so give them /dev/null. - die "Autoconf requires GNU m4 1.4 or later\n" - if system "$m4 --help &1 | fgrep reload-state >/dev/null"; +# die "Autoconf requires GNU m4 1.4 or later\n" +# if system "$m4 --help &1 | fgrep reload-state >/dev/null"; # autoconf. (my $dir = $0) =~ s,[^\\/]*$,,; diff --git a/gnu/dist/autoconf/configure b/gnu/dist/autoconf/configure index d463d499be2d..c40ba83b75d1 100755 --- a/gnu/dist/autoconf/configure +++ b/gnu/dist/autoconf/configure @@ -1192,25 +1192,6 @@ fi done test -n "$M4" || M4="m4" -echo "$as_me:1195: checking whether m4 supports frozen files" >&5 -echo $ECHO_N "checking whether m4 supports frozen files... $ECHO_C" >&6 -if test "${ac_cv_prog_gnu_m4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_gnu_m4=no -if test x"$M4" != x; then - case `$M4 --help < /dev/null 2>&1` in - *reload-state*) ac_cv_prog_gnu_m4=yes ;; - esac -fi -fi -echo "$as_me:1207: result: $ac_cv_prog_gnu_m4" >&5 -echo "${ECHO_T}$ac_cv_prog_gnu_m4" >&6 -if test x"$ac_cv_prog_gnu_m4" != xyes; then - { { echo "$as_me:1210: error: GNU m4 1.4 is required" >&5 -echo "$as_me: error: GNU m4 1.4 is required" >&2;} - { (exit 1); exit 1; }; } -fi # This is needed because Automake does not seem to realize there is # a AC-SUBST inside AC-PROG-GNU-M4. Grmph!