]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Provide a mean to ``AC_PREREQ'' for M4sugar, M4sh and Autotest.
authorAkim Demaille <akim@epita.fr>
Mon, 27 Aug 2001 07:08:56 +0000 (07:08 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 27 Aug 2001 07:08:56 +0000 (07:08 +0000)
* lib/autoconf/version.in: Remove.
* lib/m4sugar/version.in: New.
* lib/m4sugar/m4sugar.m4 (m4_acversion, m4_version_prereq): New.
Adjust callers.
* bin/autoupdate.in: Distinguish M4sugar vs. Autoconf macros by
the name of the directory they're in, instead of the filename,
since version.m4 is now in m4sugar, but m4_acversion must not be
classified as an Autoconf macro.
($input_m4): Don't qualify the path to m4sugar.
Rather, pass autoconf_dir to m4.
* tests/Makefile.am (testsuite): Remove -I top_srcdir, unneeded.
* tests/suite.at: Require 2.52c.

17 files changed:
ChangeLog
bin/autoupdate.in
lib/autoconf/.cvsignore
lib/autoconf/Makefile.am
lib/autoconf/Makefile.in
lib/autoconf/autoconf.m4
lib/autoconf/general.m4
lib/autotest/Makefile.in
lib/autotest/autotest.m4
lib/m4sugar/.cvsignore
lib/m4sugar/Makefile.am
lib/m4sugar/Makefile.in
lib/m4sugar/m4sugar.m4
lib/m4sugar/version.in [moved from lib/autoconf/version.in with 80% similarity]
tests/Makefile.am
tests/Makefile.in
tests/suite.at

index a44136f058922b85c915c36392398604b6bc3d46..eb6f92c04ade5b6fbe418a35b927fd48338b74e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2001-08-27  Akim Demaille  <akim@epita.fr>
+
+       Provide a mean to ``AC_PREREQ'' for M4sugar, M4sh and Autotest.
+
+       * lib/autoconf/version.in: Remove.
+       * lib/m4sugar/version.in: New.
+       * lib/m4sugar/m4sugar.m4 (m4_acversion, m4_version_prereq): New.
+       Adjust callers.
+       * bin/autoupdate.in: Distinguish M4sugar vs. Autoconf macros by
+       the name of the directory they're in, instead of the filename,
+       since version.m4 is now in m4sugar, but m4_acversion must not be
+       classified as an Autoconf macro.
+       ($input_m4): Don't qualify the path to m4sugar.
+       Rather, pass autoconf_dir to m4.
+       * tests/Makefile.am (testsuite): Remove -I top_srcdir, unneeded.
+       * tests/suite.at: Require 2.52c.
+
+       
 2001-08-27  Akim Demaille  <akim@epita.fr>
 
        testsuite.log should include config.log.
index 4914777224b398253d00f33093813d0e00d769c8..0646f781f6bd746d9bf960ed47e68f81ad267a04 100644 (file)
@@ -123,7 +123,7 @@ sub parse_args ()
   if (! @ARGV)
     {
       my $configure_ac = find_configure_ac;
-      die 'no input file'
+      die "$me: no input file\n"
        unless $configure_ac;
       push @ARGV, $configure_ac;
     }
@@ -177,14 +177,16 @@ while (<MACROS>)
   {
     chomp;
     /^(AC|AU):(.*):([^:]*)$/ or next;
-    my $filename = basename ($2);
+    # ../lib/m4sugar/m4sugar.m4  -> m4sugar
+    # ../lib/autoconf/general.m4 -> autoconf
+    my $set = basename (dirname ($2));
     if ($1 eq "AC")
       {
-       $ac_macros{$3} = $filename;
+       $ac_macros{$3} = $set;
       }
     else
       {
-       $au_macros{$3} = $filename;
+       $au_macros{$3} = $set;
       }
   }
 close MACROS
@@ -219,7 +221,7 @@ open DISABLE_M4, ">$tmp/disable.m4"
 foreach (sort keys %ac_macros)
   {
     print AC_M4      "_au_define([$_], [[\$0(\$\@)]])\n"
-      unless $ac_macros{$_} eq "m4sugar.m4";
+      unless $ac_macros{$_} eq 'm4sugar';
     print DISABLE_M4 "_au_undefine([$_])\n";
   }
 close DISABLE_M4
@@ -293,7 +295,7 @@ foreach my $file (@ARGV)
 
       # Enable the m4 builtins, m4sugar and the autoquoting AC macros.
       _au_include([$tmp/m4.m4])
-      _au_include([$autoconf_dir/m4sugar/m4sugar.m4])
+      _au_include([m4sugar/m4sugar.m4])
       _au_include([$tmp/ac.m4])
 
       _au_divert(0)])
@@ -362,11 +364,11 @@ EOF
     # Now ask m4 to perform the update.
     if ("$file" eq "$tmp/stdin")
        {
-        xsystem ("$m4 $tmp/input.m4");
+        xsystem ("$m4 -I $autoconf_dir $tmp/input.m4");
        }
     else
        {
-        xsystem ("$m4 $tmp/input.m4 >$tmp/updated");
+        xsystem ("$m4 -I $autoconf_dir $tmp/input.m4 >$tmp/updated");
         if (compare ("$tmp/updated", "$file") == 0)
           {
             # File didn't change, so don't update its mod time.
index 8ee0a62789ee2bb8382b5cdca2ce5e22eba451c3..5c7f2d5bef46c81e3330f787e4ab893ad6dd9eb1 100644 (file)
@@ -1,3 +1,2 @@
 Makefile
-version.m4
 *.m4f
index e5751bcfdf604f797cf2b24b439d10c34ba47549..1bfaa35b0583712817b1aaeea79d4adde0d94682 100644 (file)
@@ -23,22 +23,10 @@ distautoconflib_DATA = autoconf.m4 \
                       lang.m4 c.m4 fortran.m4 \
                        functions.m4 headers.m4 types.m4 libs.m4 programs.m4
 nodistautoconflibdir = $(pkgdatadir)/autoconf
-# The order matters: we need version.m4 to build autoconf.m4f.
-nodistautoconflib_DATA = version.m4 autoconf.m4f
+nodistautoconflib_DATA = autoconf.m4f
 
-EXTRA_DIST = $(distautoconflib_DATA) version.in version.m4
+EXTRA_DIST = $(distautoconflib_DATA)
 
-## version.m4.  ##
-
-# - version.m4 needs to be updated only once, since it depends on
-#   configure.ac, not on the results of a 'configure' run.
-# - It is guaranteed (with GNU Make) that when the version in configure.ac
-#   is changed, version.m4 is built only after the new version number is
-#   propagated to the Makefile.  (Libtool uses the same guarantee.)
-
-$(srcdir)/version.m4: $(srcdir)/version.in $(top_srcdir)/configure.ac
-       sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/version.in >version.tm4
-       mv version.tm4 $(srcdir)/version.m4
 
 
 ## --------------- ##
index 535432e760d84daaec4fc1d419638ef045a5f034..4f2f10430251f7cc63950f4378e94a546bda22b6 100644 (file)
@@ -70,10 +70,9 @@ distautoconflibdir = $(pkgdatadir)/autoconf
 distautoconflib_DATA = autoconf.m4                        general.m4 oldnames.m4 specific.m4                  lang.m4 c.m4 fortran.m4                        functions.m4 headers.m4 types.m4 libs.m4 programs.m4
 
 nodistautoconflibdir = $(pkgdatadir)/autoconf
-# The order matters: we need version.m4 to build autoconf.m4f.
-nodistautoconflib_DATA = version.m4 autoconf.m4f
+nodistautoconflib_DATA = autoconf.m4f
 
-EXTRA_DIST = $(distautoconflib_DATA) version.in version.m4
+EXTRA_DIST = $(distautoconflib_DATA)
 
 TAGS_FILES = $(distautoconflib_DATA)
 
@@ -270,16 +269,6 @@ distclean-generic clean-generic maintainer-clean-generic clean \
 mostlyclean distclean maintainer-clean
 
 
-# - version.m4 needs to be updated only once, since it depends on
-#   configure.ac, not on the results of a 'configure' run.
-# - It is guaranteed (with GNU Make) that when the version in configure.ac
-#   is changed, version.m4 is built only after the new version number is
-#   propagated to the Makefile.  (Libtool uses the same guarantee.)
-
-$(srcdir)/version.m4: $(srcdir)/version.in $(top_srcdir)/configure.ac
-       sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/version.in >version.tm4
-       mv version.tm4 $(srcdir)/version.m4
-
 check-local:
        if (cd $(srcdir) && \
            egrep '^_?EOF' $(distautoconflib_DATA)) >eof.log; then \
index 4e87d9c759c814099bd6d3c355928d6c951c42bd..8f154f2c63821ec9eff29b6acd6dab35f10b2b30 100644 (file)
@@ -1,4 +1,4 @@
-changequote()changequote([, ])include(m4sugar/m4sh.m4)#      -*- Autoconf -*-
+divert(-1)#                                                -*- Autoconf -*-
 # This file is part of Autoconf.
 # Driver that loads the Autoconf macro files.
 # Copyright 1994, 1999, 2000, 2001 Free Software Foundation, Inc.
@@ -51,7 +51,9 @@ changequote()changequote([, ])include(m4sugar/m4sh.m4)#      -*- Autoconf -*-
 # yet when Autoconf is frozen.
 # Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.
 
-m4_include([autoconf/version.m4])
+changequote()
+changequote([, ])
+include([m4sugar/m4sh.m4])
 m4_include([autoconf/general.m4])
 m4_include([autoconf/programs.m4])
 m4_include([autoconf/lang.m4])
index 2c4110a4708fc7a6ac3472da555abae429b57016..203fc29c454a29b31cf9a0a3d647e3afc1fcb288 100644 (file)
@@ -509,24 +509,21 @@ m4_define([AC_REVISION],
 # Update this `AC_PREREQ' statement to require the current version of
 # Autoconf.  But fail if ever this autoupdate is too old.
 #
-# Note that `m4_defn([AC_ACVERSION])' below are expanded before calling
+# Note that `m4_defn([m4_acversion])' below are expanded before calling
 # `AU_DEFUN', i.e., it is hard coded.  Otherwise it would be quite
-# complex for autoupdate to import the value of `AC_ACVERSION'.  We
-# could `AU_DEFUN' `AC_ACVERSION', but this would replace all its
+# complex for autoupdate to import the value of `m4_acversion'.  We
+# could `AU_DEFUN' `m4_acversion', but this would replace all its
 # occurrences with the current version of Autoconf, which is certainly
-# not what mean the user.
+# not what meant the user.
 AU_DEFUN([AC_PREREQ],
-[m4_if(m4_version_compare(]m4_defn([AC_ACVERSION])[, [$1]), -1,
-    [m4_fatal([Autoconf version $1 or higher is required for this script])])dnl
-[AC_PREREQ(]]m4_defn([AC_ACVERSION])[[)]])
+[m4_version_prereq([$1])[]dnl
+[AC_PREREQ(]]m4_defn([m4_acversion])[[)]])
 
 
 # AC_PREREQ(VERSION)
 # ------------------
 # Complain and exit if the Autoconf version is less than VERSION.
-m4_define([AC_PREREQ],
-[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1,
-     [AC_FATAL([Autoconf version $1 or higher is required for this script])])])
+m4_copy([m4_version_prereq], [AC_PREREQ])
 
 
 
@@ -548,7 +545,7 @@ m4_define([AC_PREREQ],
 m4_define([_AC_INIT_NOTICE],
 [m4_divert_text([HEADER-COMMENT],
 [@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by Autoconf AC_ACVERSION[]dnl
+@%:@ Generated by Autoconf m4_acversion[]dnl
 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
 
 m4_ifset([AC_PACKAGE_BUGREPORT],
@@ -1256,7 +1253,7 @@ m4_ifset([AC_PACKAGE_STRING],
                          [dnl
 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-generated by GNU Autoconf AC_ACVERSION])])
+generated by GNU Autoconf m4_acversion])])
 m4_divert_text([VERSION_END],
 [_ACEOF
   exit 0
@@ -1277,7 +1274,7 @@ running configure, to aid debugging if configure makes a mistake.
 
 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
-generated by GNU Autoconf AC_ACVERSION.  Invocation command line was
+generated by GNU Autoconf m4_acversion.  Invocation command line was
 
   $ $[0] $[@]
 
@@ -3225,7 +3222,7 @@ cat >&AS_MESSAGE_LOG_FD <<_CSEOF
 
 This file was extended by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
-generated by GNU Autoconf AC_ACVERSION.  Invocation command line was
+generated by GNU Autoconf m4_acversion.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -3302,7 +3299,7 @@ cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by [$]0, generated by GNU Autoconf AC_ACVERSION,
+configured by [$]0, generated by GNU Autoconf m4_acversion,
   with options \\"`echo "$ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`\\"
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
index 234b1e852dad69831da01356a4af1cdb4630c477..f76e723e42da8ddd9a1643fd4f4808b1aa2e9ace 100644 (file)
@@ -68,7 +68,7 @@ VERSION = @VERSION@
 
 autotestlibdir = $(pkgdatadir)/autotest
 
-autotestlib_DATA = general.m4
+autotestlib_DATA = autotest.m4 general.m4
 
 EXTRA_DIST = $(autotestlib_DATA)
 
index 406fbd032e87ee384e4db1094c50a4bbbf19f633..993e8abdba57f0db8d4238dd4c2cc4c9e2ede9cf 100644 (file)
@@ -47,5 +47,5 @@ divert(-1)#                                           -*- Autoconf -*-
 
 changequote()
 changequote([, ])
-include(m4sugar/m4sh.m4)
-m4_include(autotest/general.m4)
+include([m4sugar/m4sh.m4])
+m4_include([autotest/general.m4])
index f3c7a7c5da68804a1bdf391127ba34aed33c3cca..7ec6695c89067bfd3564ec57a850f422882fe6ce 100644 (file)
@@ -1 +1,2 @@
 Makefile
+version.m4
index 5be9986edab2b89ac9b427bc3028a766ba1999f7..38a3fde54bb492cb47a020b8512a0e875d1ad7f7 100644 (file)
@@ -1,10 +1,28 @@
 ## Process this file with automake to create Makefile.in
 
-m4sugarlibdir = $(pkgdatadir)/m4sugar
+distm4sugarlibdir = $(pkgdatadir)/m4sugar
+# We ship version.m4 so that it's in src.  `autoconf' wants all the sources
+# at the same place...
+distm4sugarlib_DATA = version.m4 m4sugar.m4 m4sh.m4
+
+EXTRA_DIST = $(distm4sugarlib_DATA) version.in
+
+
+## ------------ ##
+## version.m4.  ##
+## ------------ ##
+
+# - version.m4 needs to be updated only once, since it depends on
+#   configure.ac, not on the results of a 'configure' run.
+# - It is guaranteed (with GNU Make) that when the version in configure.ac
+#   is changed, version.m4 is built only after the new version number is
+#   propagated to the Makefile.  (Libtool uses the same guarantee.)
+
+$(srcdir)/version.m4: $(srcdir)/version.in $(top_srcdir)/configure.ac
+       sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/version.in >version.tm4
+       mv version.tm4 $(srcdir)/version.m4
 
-m4sugarlib_DATA = m4sugar.m4 m4sh.m4
 
-EXTRA_DIST = $(m4sugarlib_DATA)
 
 
 ## --------------- ##
@@ -23,7 +41,7 @@ ETAGS_ARGS = --lang=none \
 
 check-local:
        if (cd $(srcdir) && \
-           egrep '^_?EOF' $(m4sugarlib_DATA)) >eof.log; then \
+           egrep '^_?EOF' $(distm4sugarlib_DATA)) >eof.log; then \
          echo "ERROR: user EOF tags were used:" >&2; \
          sed "s,^,$*.m4: ," <eof.log >&2; \
          echo >&2; \
index 4c263d95cc6b2b3b8402bdc11899727cad801b72..65f6dae6c35e3b84519a924de4d8f224001c6775 100644 (file)
@@ -66,11 +66,12 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PERL = @PERL@
 VERSION = @VERSION@
 
-m4sugarlibdir = $(pkgdatadir)/m4sugar
+distm4sugarlibdir = $(pkgdatadir)/m4sugar
+# We ship version.m4 so that it's in src.  `autoconf' wants all the sources
+# at the same place...
+distm4sugarlib_DATA = version.m4 m4sugar.m4 m4sh.m4
 
-m4sugarlib_DATA = m4sugar.m4 m4sh.m4
-
-EXTRA_DIST = $(m4sugarlib_DATA)
+EXTRA_DIST = $(distm4sugarlib_DATA) version.in
 
 TAGS_FILES = $(m4sugarlib_DATA)
 
@@ -78,7 +79,7 @@ ETAGS_ARGS = --lang=none   --regex='/\(A[CU]_DEFUN\|m4_\(defun\|define\)\|define
 
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_CLEAN_FILES = 
-DATA =  $(m4sugarlib_DATA)
+DATA =  $(distm4sugarlib_DATA)
 
 DIST_COMMON =  Makefile.am Makefile.in
 
@@ -97,23 +98,23 @@ Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
          && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
 
-install-m4sugarlibDATA: $(m4sugarlib_DATA)
+install-distm4sugarlibDATA: $(distm4sugarlib_DATA)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(m4sugarlibdir)
-       @list='$(m4sugarlib_DATA)'; for p in $$list; do \
+       $(mkinstalldirs) $(DESTDIR)$(distm4sugarlibdir)
+       @list='$(distm4sugarlib_DATA)'; for p in $$list; do \
          if test -f $(srcdir)/$$p; then \
-           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(m4sugarlibdir)/$$p"; \
-           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(m4sugarlibdir)/$$p; \
+           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(distm4sugarlibdir)/$$p"; \
+           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(distm4sugarlibdir)/$$p; \
          else if test -f $$p; then \
-           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(m4sugarlibdir)/$$p"; \
-           $(INSTALL_DATA) $$p $(DESTDIR)$(m4sugarlibdir)/$$p; \
+           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(distm4sugarlibdir)/$$p"; \
+           $(INSTALL_DATA) $$p $(DESTDIR)$(distm4sugarlibdir)/$$p; \
          fi; fi; \
        done
 
-uninstall-m4sugarlibDATA:
+uninstall-distm4sugarlibDATA:
        @$(NORMAL_UNINSTALL)
-       list='$(m4sugarlib_DATA)'; for p in $$list; do \
-         rm -f $(DESTDIR)$(m4sugarlibdir)/$$p; \
+       list='$(distm4sugarlib_DATA)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(distm4sugarlibdir)/$$p; \
        done
 
 tags: TAGS
@@ -177,20 +178,20 @@ installcheck: installcheck-am
 install-exec-am:
 install-exec: install-exec-am
 
-install-data-am: install-m4sugarlibDATA
+install-data-am: install-distm4sugarlibDATA
 install-data: install-data-am
 
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 install: install-am
-uninstall-am: uninstall-m4sugarlibDATA
+uninstall-am: uninstall-distm4sugarlibDATA
 uninstall: uninstall-am
 all-am: Makefile $(DATA)
 all-redirect: all-am
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
 installdirs:
-       $(mkinstalldirs)  $(DESTDIR)$(m4sugarlibdir)
+       $(mkinstalldirs)  $(DESTDIR)$(distm4sugarlibdir)
 
 
 mostlyclean-generic:
@@ -221,7 +222,7 @@ maintainer-clean-am:  maintainer-clean-tags maintainer-clean-generic \
 
 maintainer-clean: maintainer-clean-am
 
-.PHONY: uninstall-m4sugarlibDATA install-m4sugarlibDATA tags \
+.PHONY: uninstall-distm4sugarlibDATA install-distm4sugarlibDATA tags \
 mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
 distdir info-am info dvi-am dvi check-local check check-am \
 installcheck-am installcheck install-exec-am install-exec \
@@ -231,9 +232,19 @@ distclean-generic clean-generic maintainer-clean-generic clean \
 mostlyclean distclean maintainer-clean
 
 
+# - version.m4 needs to be updated only once, since it depends on
+#   configure.ac, not on the results of a 'configure' run.
+# - It is guaranteed (with GNU Make) that when the version in configure.ac
+#   is changed, version.m4 is built only after the new version number is
+#   propagated to the Makefile.  (Libtool uses the same guarantee.)
+
+$(srcdir)/version.m4: $(srcdir)/version.in $(top_srcdir)/configure.ac
+       sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/version.in >version.tm4
+       mv version.tm4 $(srcdir)/version.m4
+
 check-local:
        if (cd $(srcdir) && \
-           egrep '^_?EOF' $(m4sugarlib_DATA)) >eof.log; then \
+           egrep '^_?EOF' $(distm4sugarlib_DATA)) >eof.log; then \
          echo "ERROR: user EOF tags were used:" >&2; \
          sed "s,^,$*.m4: ," <eof.log >&2; \
          echo >&2; \
index 4d1cd7ee037c5a97d6896e80a85fedd557833a32..6a8bddb117d7442b933a40c62b08671189e2a0bf 100644 (file)
@@ -1696,6 +1696,22 @@ m4_define([m4_version_compare],
              (m4_split(m4_version_unletter([$2]), [\.])))])
 
 
+# m4_acversion
+# ------------
+m4_include([m4sugar/version.m4])
+
+
+# m4_version_prereq(VERSION, [IF-OK], [IF-NOT = FAIL])
+# ----------------------------------------------------
+# Check this Autoconf version against VERSION.
+m4_define([m4_version_prereq],
+[m4_if(m4_version_compare(m4_defn([m4_acversion]), [$1]), -1,
+       [m4_default([$3],
+                   [m4_fatal([Autoconf version $1 or higher is required])])],
+       [$2])[]dnl
+])
+
+
 
 ## ------------------- ##
 ## 12. File handling.  ##
similarity index 80%
rename from lib/autoconf/version.in
rename to lib/m4sugar/version.in
index c396d2e20334f98f0ed7347c14ddbf8856c373d3..91fbf3c76662b7e96ef96c467cf37fd9432afecf 100644 (file)
@@ -2,4 +2,4 @@
 # Version of Autoconf.
 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
 
-m4_define([AC_ACVERSION], [@VERSION@])
+m4_define([m4_acversion], [@VERSION@])
index 6a240a61ca2514f357f90b7ca2341173f36c568b..8d4e2a3f7ca69cdbdc0232552123152ca0c26d30 100644 (file)
@@ -50,8 +50,7 @@ testsuite: $(top_srcdir)/lib/m4sugar/m4sugar.m4 \
            $(top_srcdir)/lib/autotest/general.m4 \
           atspecific.m4 \
            $(SUITE)
-       $(AUTOM4TE) \
-         -I $(srcdir) -I $(top_srcdir) -I $(top_srcdir)/lib \
+       $(AUTOM4TE) -I $(srcdir) -I $(top_srcdir)/lib \
          autotest/autotest.m4 suite.at -o $@.tmp
        chmod +x $@.tmp
        mv $@.tmp $@
index 35ff0853dc1dc55936b7c8f6fb4b96993ace8414..8c5301eecf98b0f50a1bddb99781662c2d2ed496 100644 (file)
@@ -202,12 +202,12 @@ check-local: atconfig atlocal testsuite
        $(SHELL) testsuite
 testsuite: $(top_srcdir)/lib/m4sugar/m4sugar.m4 \
           $(top_srcdir)/lib/m4sugar/m4sh.m4 \
+           $(top_srcdir)/lib/autotest/autotest.m4 \
            $(top_srcdir)/lib/autotest/general.m4 \
           atspecific.m4 \
            $(SUITE)
-       $(AUTOM4TE) \
-         -I $(srcdir) -I $(top_srcdir) -I $(top_srcdir)/lib \
-         atspecific.m4 suite.at -o $@.tmp
+       $(AUTOM4TE) -I $(srcdir) -I $(top_srcdir)/lib \
+         autotest/autotest.m4 suite.at -o $@.tmp
        chmod +x $@.tmp
        mv $@.tmp $@
 
index aa55d1b1295d35038ed331e22dca10254dfab6d0..2e0fad9707d0f32742cb7dfcb1709acf0c80e62f 100644 (file)
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
+# We need a very up to date version of Autotest, more recent than that
+# needed by configure.ac.
+m4_version_prereq([2.52c])
+
 # Macros specialized for Autoconf testing.
 m4_include([atspecific.m4])