]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): No INIT-CMDS in
authorAkim Demaille <akim@epita.fr>
Tue, 18 Sep 2001 09:03:18 +0000 (09:03 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 18 Sep 2001 09:03:18 +0000 (09:03 +0000)
the AC_CONFIG_COMMANDS invocation.
This also solves the name clash problems.
Don't set the package's ID.
* lib/m4sugar/Makefile.am (version.m4): Revamp.
No longer to be shipped.
(version.in): Remove.
* lib/m4sugar/m4sugar.m4, lib/autoconf/general.m4,
* lib/autoconf/status.m4: Adjust.
Use `m4_PACKAGE_STRING'.
* lib/autotest/general.m4 (AT_INIT): N-th signature change: now
the only optional argument is the name of the test suite.
Expect `package.m4' to define the package signature.
* lib/autom4te.in (Autotest): Add `package.m4?'.
* tests/Makefile.am (package.m4): New.
* tests/suite.at: ifnames is a victim.

15 files changed:
ChangeLog
lib/autoconf/Makefile.am
lib/autoconf/Makefile.in
lib/autoconf/autotest.m4
lib/autoconf/general.m4
lib/autoconf/status.m4
lib/autom4te.in
lib/autotest/general.m4
lib/m4sugar/Makefile.am
lib/m4sugar/Makefile.in
lib/m4sugar/m4sugar.m4
lib/m4sugar/version.in [deleted file]
tests/Makefile.am
tests/Makefile.in
tests/suite.at

index c1c6e116c58ad3e374f0349798de569887c34661..f19cb65b59a627834f2f610b0282a04eb9934de3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2001-09-18  Akim Demaille  <akim@epita.fr>
+
+       * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): No INIT-CMDS in
+       the AC_CONFIG_COMMANDS invocation.
+       This also solves the name clash problems.
+       Don't set the package's ID.
+       * lib/m4sugar/Makefile.am (version.m4): Revamp.
+       No longer to be shipped.
+       (version.in): Remove.
+       * lib/m4sugar/m4sugar.m4, lib/autoconf/general.m4,
+       * lib/autoconf/status.m4: Adjust.
+       Use `m4_PACKAGE_STRING'.
+       * lib/autotest/general.m4 (AT_INIT): N-th signature change: now
+       the only optional argument is the name of the test suite.
+       Expect `package.m4' to define the package signature.
+       * lib/autom4te.in (Autotest): Add `package.m4?'.
+       * tests/Makefile.am (package.m4): New.
+       * tests/suite.at: ifnames is a victim.
+
 2001-09-18  Akim Demaille  <akim@epita.fr>
 
        * lib/autom4te.in (Autoconf): Preselect AM_CONDITIONAL,
index 688674e5edb18c5bd5ef1f0260bfe254c3119079..7b0fad348753873a9e9590661d47f17502263857 100644 (file)
@@ -109,7 +109,7 @@ M4_INCLUDES =  --include $(srcdir) \
 # the dependencies...
 srclibdir = $(top_srcdir)/lib
 autoconf.m4f: $(srclibdir)/m4sugar/m4sugar.m4  \
-              $(srclibdir)/m4sugar/version.m4  \
+              ../m4sugar/version.m4    \
               $(srclibdir)/m4sugar/m4sh.m4     \
               $(srclibdir)/autoconf/autoconf.m4        \
               $(srclibdir)/autoconf/general.m4 \
index 52bff4aa599acb542fdcab998e09c5af59a843a7..ebde46933dd3c110d16a63a916b2e7ff3aca6024 100644 (file)
@@ -329,7 +329,7 @@ check-local:
          rm -f freeze.log; \
        fi
 autoconf.m4f: $(srclibdir)/m4sugar/m4sugar.m4  \
-              $(srclibdir)/m4sugar/version.m4  \
+              ../m4sugar/version.m4    \
               $(srclibdir)/m4sugar/m4sh.m4     \
               $(srclibdir)/autoconf/autoconf.m4        \
               $(srclibdir)/autoconf/general.m4 \
index 085fe5208e27d504c41c779ba69de41556bc67dc..22fda540fd65220b270dd6e5f3c939bc6358fc9c 100644 (file)
 AC_DEFUN([AC_CONFIG_TESTDIR],
 [AC_CONFIG_COMMANDS([$1/atconfig],
 [# Do not use _ACEOF as we are being dumped into config.status via
-# an _ACEOF-heredoe.
+# an _ACEOF-heredoc.
 cat >$1/atconfig <<ATEOF
 @%:@ Configurable variable values for building test suites.
 @%:@ Generated by $[0]
 @%:@ Copyright 2000, 2001 Free Software Foundation, Inc.
 
-at_package_name='$at_package_name'
-at_package_version='$at_package_version'
-at_package_string='$at_package_string'
-at_bugreport='$at_bugreport'
-
 at_testdir='$1'
 srcdir='$ac_srcdir'
 top_srcdir='$ac_top_srcdir'
@@ -79,15 +74,8 @@ top_builddir='$ac_top_builddir'
 
 AUTOTEST_PATH='m4_default([$2], [$1])'
 
-SHELL=\${CONFIG_SHELL-'$at_shell'}
+SHELL=\${CONFIG_SHELL-'$SHELL'}
 ATEOF
-],
-[at_package_name='$PACKAGE_NAME'
-at_package_version='$PACKAGE_VERSION'
-at_package_string='$PACKAGE_STRING'
-at_bugreport='$PACKAGE_BUGREPORT'
-
-at_shell='$SHELL'
 ])
 
 if test -f $srcdir/$1/atlocal.in; then
index 07a3df1610d30d1a51757a955f1895b2a200b4e5..bc2728b1c502377409b1f989026cf4b42c345550 100644 (file)
@@ -386,15 +386,15 @@ 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([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 `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 meant the user.
+# Note that `m4_defn([m4_PACKAGE_VERSION])' 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
+# `m4_PACKAGE_VERSION'.  We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
+# this would replace all its occurrences with the current version of
+# Autoconf, which is certainly not what meant the user.
 AU_DEFUN([AC_PREREQ],
 [m4_version_prereq([$1])[]dnl
-[AC_PREREQ(]]m4_defn([m4_acversion])[[)]])
+[AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
 
 
 # AC_PREREQ(VERSION)
@@ -422,7 +422,7 @@ m4_copy([m4_version_prereq], [AC_PREREQ])
 m4_define([_AC_INIT_NOTICE],
 [m4_divert_text([HEADER-COMMENT],
 [@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by Autoconf m4_acversion[]dnl
+@%:@ Generated by m4_PACKAGE_STRING[]dnl
 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
 
 m4_ifset([AC_PACKAGE_BUGREPORT],
@@ -1120,7 +1120,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 m4_acversion])])
+generated by m4_PACKAGE_STRING])])
 m4_divert_text([VERSION_END],
 [_ACEOF
   exit 0
@@ -1141,7 +1141,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 m4_acversion.  Invocation command line was
+generated by m4_PACKAGE_STRING.  Invocation command line was
 
   $ $[0] $[@]
 
index 321abe1c4cace02174d41b244d61d3ff7d7c9d4f..08947994f7dca4316693fc23bc3331a013d3b9d7 100644 (file)
@@ -1233,7 +1233,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 m4_acversion.  Invocation command line was
+generated by m4_PACKAGE_STRING.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -1311,7 +1311,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 m4_acversion,
+configured by $[0], generated by m4_PACKAGE_STRING,
   with options \\"`echo "$ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`\\"
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
index 94d93d43911b663bdf0e10344752d5e37e22b66c..b8277021da6a57737522f2f8441ab31dbcee305b 100644 (file)
@@ -113,6 +113,7 @@ begin-language: "Autotest"
 # patterns: *.at
 args: --include @datadir@
 args: autotest/autotest.m4
+args: package.m4?
 args: --mode 777
 args: --warning syntax
 end-language: "Autotest"
index a38a6f7830a03cf49020b227e6c1c175f23588a4..c7a9bdb22ac4b1ddb565435c5436b68d07372da6 100644 (file)
@@ -84,12 +84,14 @@ m4_define([AT_LINE],
 [m4_patsubst(__file__, [^\(.*/\)*\(.*\)], [[\2]]):__line__])
 
 
-# AT_INIT([TESTSUITE-NAME], [BUG-REPORT])
-# ---------------------------------------
+# AT_INIT([TESTSUITE-NAME])
+# -------------------------
 # Begin test suite.
 m4_define([AT_INIT],
 [AS_INIT
 m4_pattern_forbid([^_?AT_])
+m4_define([AT_TESTSUITE_NAME],
+          m4_defn([PACKAGE_STRING])[ test suite]m4_ifval([$1], [: $1])[.])
 m4_define([AT_ordinal], 0)
 m4_define([AT_banner_ordinal], 0)
 m4_define([AT_data_files], [stdout expout at-* stderr experr])
@@ -103,10 +105,6 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # How were we run?
 at_cli_args=${1+"$[@]"}
 
-# Who are we?
-at_testsuite_name='$1'
-at_bugreport='$2'
-
 # Load the config file.
 for at_file in atconfig atlocal
 do
@@ -149,13 +147,7 @@ while test $[@%:@] -gt 0; do
         ;;
 
     --version)
-        if test -n "$at_package_string"; then
-          echo "$as_me ($at_package_string)"
-          echo "Embedded test suite."
-        else
-          echo "$as_me ($at_testsuite_name)"
-          echo "Stand-alone test suite."
-        fi
+        echo "$as_me (PACKAGE_STRING)"
         exit 0
         ;;
 
@@ -286,7 +278,7 @@ _ATEOF
              if ($[4]) printf "      %s\n", $[4] } ';;
   esac
   echo
-  echo "Report bugs to <$at_bugreport>."
+  echo "Report bugs to <PACKAGE_BUGREPORT>."
   exit 0
 fi
 
@@ -369,17 +361,9 @@ else
 fi
 
 # Banners and logs.
-if test -n "$at_package_string"; then
-  AS_BOX([$at_package_string test suite.])
-else
-  AS_BOX([$at_testsuite_name test suite.])
-fi
+AS_BOX(m4_defn([AT_TESTSUITE_NAME]))
 {
-  if test -n "$at_package_string"; then
-    AS_BOX([Embedded $at_package_string test suite.])
-  else
-    AS_BOX([$at_testsuite_name test suite.])
-  fi
+  AS_BOX(m4_defn([AT_TESTSUITE_NAME]))
   echo
 
   echo "$as_me: command line was:"
@@ -473,7 +457,7 @@ m4_divert([TAIL])[]dnl
         sed "s/^ */$as_me: warning: /" <<_ATEOF
         A failure happened in a test group before any test could be
         run. This means that test suite is improperly designed.  Please
-        report this failure to <$at_bugreport>.
+        report this failure to <PACKAGE_BUGREPORT>.
 _ATEOF
        echo "$at_setup_line" >at-check-line
       fi
@@ -583,8 +567,8 @@ elif test $at_debug = false; then
   AS_BOX([$as_me.log is created.])
 
   echo
-  echo "Please send \`$as_me.log' to <$at_bugreport>, along with all"
-  echo "information you think might help."
+  echo "Please send \`$as_me.log' to <PACKAGE_BUGREPORT>,"
+  echo "along with all information you think might help."
   exit 1
 fi
 
index 6b9177a572a76e7bf25282c320f466d7640d9b15..9ed378c50601fddb57d22c2ea39328f6c10c736e 100644 (file)
@@ -1,28 +1,25 @@
 ## Process this file with automake to create Makefile.in
 
 m4sugarlibdir = $(pkgdatadir)/m4sugar
-# We ship version.m4 so that it's in src.  `autoconf' wants all the sources
-# at the same place...
-dist_m4sugarlib_DATA = version.m4 m4sugar.m4 m4sh.m4
-
-EXTRA_DIST = version.in
-
+dist_m4sugarlib_DATA = m4sugar.m4 m4sh.m4
+nodist_m4sugarlib_DATA = version.m4
 
 ## ------------ ##
 ## 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
-
-
+version.m4: $(top_srcdir)/configure.ac
+       {                                       \
+         echo '# This file is part of -*- Autoconf -*-.'; \
+         echo '# Version of Autoconf.'; \
+         echo '# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.'; \
+         echo ;\
+         echo 'm4_define([m4_PACKAGE_NAME],      [@PACKAGE_NAME@])'; \
+         echo 'm4_define([m4_PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])'; \
+         echo 'm4_define([m4_PACKAGE_VERSION],   [@PACKAGE_VERSION@])'; \
+         echo 'm4_define([m4_PACKAGE_STRING],    [@PACKAGE_STRING@])'; \
+         echo 'm4_define([m4_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+       } >version.m4
 
 
 ## --------------- ##
index a6e629d6dc02652a4220020626d7cbf933558e33..83f43749cb193a759f8eb5ffa0c895789d7255f9 100644 (file)
@@ -64,11 +64,8 @@ PERL = @PERL@
 VERSION = @VERSION@
 
 m4sugarlibdir = $(pkgdatadir)/m4sugar
-# We ship version.m4 so that it's in src.  `autoconf' wants all the sources
-# at the same place...
-dist_m4sugarlib_DATA = version.m4 m4sugar.m4 m4sh.m4
-
-EXTRA_DIST = version.in
+dist_m4sugarlib_DATA = m4sugar.m4 m4sh.m4
+nodist_m4sugarlib_DATA = version.m4
 
 TAGS_FILES = $(dist_m4sugarlib_DATA)
 
@@ -79,7 +76,7 @@ subdir = lib/m4sugar
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_CLEAN_FILES =
 DIST_SOURCES =
-DATA = $(dist_m4sugarlib_DATA)
+DATA = $(dist_m4sugarlib_DATA) $(nodist_m4sugarlib_DATA)
 
 DIST_COMMON = $(dist_m4sugarlib_DATA) Makefile.am Makefile.in
 all: all-am
@@ -110,6 +107,23 @@ uninstall-dist_m4sugarlibDATA:
          echo " rm -f $(DESTDIR)$(m4sugarlibdir)/$$f"; \
          rm -f $(DESTDIR)$(m4sugarlibdir)/$$f; \
        done
+install-nodist_m4sugarlibDATA: $(nodist_m4sugarlib_DATA)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(m4sugarlibdir)
+       @list='$(nodist_m4sugarlib_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(m4sugarlibdir)/$$f"; \
+         $(INSTALL_DATA) $$d$$p $(DESTDIR)$(m4sugarlibdir)/$$f; \
+       done
+
+uninstall-nodist_m4sugarlibDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(nodist_m4sugarlib_DATA)'; for p in $$list; do \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " rm -f $(DESTDIR)$(m4sugarlibdir)/$$f"; \
+         rm -f $(DESTDIR)$(m4sugarlibdir)/$$f; \
+       done
 
 tags: TAGS
 
@@ -170,7 +184,7 @@ check: check-am
 all-am: Makefile $(DATA)
 
 installdirs:
-       $(mkinstalldirs) $(DESTDIR)$(m4sugarlibdir)
+       $(mkinstalldirs) $(DESTDIR)$(m4sugarlibdir) $(DESTDIR)$(m4sugarlibdir)
 
 install: install-am
 install-exec: install-exec-am
@@ -211,7 +225,8 @@ info: info-am
 
 info-am:
 
-install-data-am: install-dist_m4sugarlibDATA
+install-data-am: install-dist_m4sugarlibDATA \
+       install-nodist_m4sugarlibDATA
 
 install-exec-am:
 
@@ -229,28 +244,33 @@ mostlyclean: mostlyclean-am
 
 mostlyclean-am: mostlyclean-generic
 
-uninstall-am: uninstall-dist_m4sugarlibDATA uninstall-info-am
+uninstall-am: uninstall-dist_m4sugarlibDATA uninstall-info-am \
+       uninstall-nodist_m4sugarlibDATA
 
 .PHONY: GTAGS all all-am check check-am check-local clean clean-generic \
        distclean distclean-generic distclean-tags distdir dvi dvi-am \
        info info-am install install-am install-data install-data-am \
        install-dist_m4sugarlibDATA install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
+       install-info install-info-am install-man \
+       install-nodist_m4sugarlibDATA install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-generic tags \
        uninstall uninstall-am uninstall-dist_m4sugarlibDATA \
-       uninstall-info-am
-
-
-# - 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
+       uninstall-info-am uninstall-nodist_m4sugarlibDATA
+
+
+version.m4: $(top_srcdir)/configure.ac
+       {                                       \
+         echo '# This file is part of -*- Autoconf -*-.'; \
+         echo '# Version of Autoconf.'; \
+         echo '# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.'; \
+         echo ;\
+         echo 'm4_define([m4_PACKAGE_NAME],      [@PACKAGE_NAME@])'; \
+         echo 'm4_define([m4_PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])'; \
+         echo 'm4_define([m4_PACKAGE_VERSION],   [@PACKAGE_VERSION@])'; \
+         echo 'm4_define([m4_PACKAGE_STRING],    [@PACKAGE_STRING@])'; \
+         echo 'm4_define([m4_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+       } >version.m4
 
 check-local:
        if (cd $(srcdir) && \
index a60cc4c250308c017120360ff7233e298f171f4e..18a2d44b5697faa25d0c1bdae102c7ba5b0cb0ad 100644 (file)
@@ -1706,8 +1706,12 @@ m4_define([m4_version_compare],
              (m4_split(m4_version_unletter([$2]), [\.])))])
 
 
-# m4_acversion
-# ------------
+# m4_PACKAGE_NAME
+# m4_PACKAGE_TARNAME
+# m4_PACKAGE_VERSION
+# m4_PACKAGE_STRING
+# m4_PACKAGE_BUGREPORT
+# --------------------
 m4_include([m4sugar/version.m4])
 
 
@@ -1715,7 +1719,7 @@ m4_include([m4sugar/version.m4])
 # ----------------------------------------------------
 # Check this Autoconf version against VERSION.
 m4_define([m4_version_prereq],
-[m4_if(m4_version_compare(m4_defn([m4_acversion]), [$1]), -1,
+[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), [$1]), -1,
        [m4_default([$3],
                    [m4_fatal([Autoconf version $1 or higher is required])])],
        [$2])[]dnl
diff --git a/lib/m4sugar/version.in b/lib/m4sugar/version.in
deleted file mode 100644 (file)
index 91fbf3c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file is part of Autoconf.                             -*- Autoconf -*-
-# Version of Autoconf.
-# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
-
-m4_define([m4_acversion], [@VERSION@])
index d8ff64eddb66aea8fb8592683e53876f58c0a7e9..83656a9b586c9608e9006554caadc315a5eaf6c6 100644 (file)
@@ -26,7 +26,7 @@ EXTRA_DIST = $(WRAPPERS) $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \
 # Running the uninstalled scripts.
 WRAPPERS = autoconf autoheader autoreconf autom4te autoupdate ifnames
 
-DISTCLEANFILES       = atconfig atlocal $(TESTSUITE)
+DISTCLEANFILES       = atconfig atlocal package.m4 $(TESTSUITE)
 
 TESTSUITE_GENERATED_AT = \
        aclang.at acc.at acfortran.at \
@@ -53,6 +53,7 @@ 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 \
+          package.m4 \
           atspecific.m4 \
            $(TESTSUITE_AT)
        $(AUTOTEST) -I $(srcdir) suite.at -o $@.tmp
@@ -77,6 +78,23 @@ installcheck-local:
 
 
 
+## ------------ ##
+## package.m4.  ##
+## ------------ ##
+
+package.m4: $(top_srcdir)/configure.ac
+       {                                       \
+         echo '# Signature of the current package.'; \
+         echo 'm4_define([PACKAGE_NAME],      [@PACKAGE_NAME@])'; \
+         echo 'm4_define([PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])'; \
+         echo 'm4_define([PACKAGE_VERSION],   [@PACKAGE_VERSION@])'; \
+         echo 'm4_define([PACKAGE_STRING],    [@PACKAGE_STRING@])'; \
+         echo 'm4_define([PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+       } >package.m4
+
+
+
+
 ## ------------------ ##
 ## Maintainer rules.  ##
 ## ------------------ ##
index aecebef725560452ff2fb7de80ef9376a0c07f06..9440a78b704f77b877d29167d7fed76605ea88de 100644 (file)
@@ -73,7 +73,7 @@ EXTRA_DIST = $(WRAPPERS) $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \
 # Running the uninstalled scripts.
 WRAPPERS = autoconf autoheader autoreconf autom4te autoupdate ifnames
 
-DISTCLEANFILES = atconfig atlocal $(TESTSUITE)
+DISTCLEANFILES = atconfig atlocal package.m4 $(TESTSUITE)
 
 TESTSUITE_GENERATED_AT = \
        aclang.at acc.at acfortran.at \
@@ -126,7 +126,7 @@ subdir = tests
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_CLEAN_FILES =
 DIST_SOURCES =
-DIST_COMMON = README Makefile.am Makefile.in configure.ac
+DIST_COMMON = README Makefile.am Makefile.in configure configure.ac
 all: all-am
 
 .SUFFIXES:
@@ -245,6 +245,7 @@ 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 \
+          package.m4 \
           atspecific.m4 \
            $(TESTSUITE_AT)
        $(AUTOTEST) -I $(srcdir) suite.at -o $@.tmp
@@ -267,6 +268,16 @@ check-local: atconfig atlocal $(TESTSUITE)
 installcheck-local:
        $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
 
+package.m4: $(top_srcdir)/configure.ac
+       {                                       \
+         echo '# Signature of the current package.'; \
+         echo 'm4_define([PACKAGE_NAME],      [@PACKAGE_NAME@])'; \
+         echo 'm4_define([PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])'; \
+         echo 'm4_define([PACKAGE_VERSION],   [@PACKAGE_VERSION@])'; \
+         echo 'm4_define([PACKAGE_STRING],    [@PACKAGE_STRING@])'; \
+         echo 'm4_define([PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+       } >package.m4
+
 $(TESTSUITE_GENERATED_AT): mktests.sh $(AUTOCONF_FILES)
        cd $(srcdir) && ./mktests.sh $(AUTOCONF_FILES)
 
index 16bec35e7a2bfd833d0fd1af9c3c0d1241577436..3b33ef72a8eb39f2d5bd989f7fa12602e62dc86a 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])
+# We need a very up to date version of Autotest.
+m4_version_prereq([2.52d])
 
 # Macros specialized for Autoconf testing.
 m4_include([atspecific.m4])
 
+AT_VICTIMS([autom4te autoconf autoheader autoupdate autoreconf ifnames])
+
 # Still many parts of `autoconf' are not exercised by the test suite.  A few
 # FIXME's, below, are used to list tests that we would need.  Do you feel
 # like contributing new tests?  If you do, you may tell your intent to
@@ -31,13 +32,6 @@ m4_include([atspecific.m4])
 
 AT_INIT
 
-AT_VICTIMS([autom4te autoconf autoheader autoupdate
-            autoreconf])
-
-AT_BANNER(
-[Some tests might be skipped if you don't have the software which the
-macros check (e.g., a Fortran compiler).])
-
 # Run the tests from the lowest level to the highest level, and from
 # the most selective to the easiest.