From 9a6c58cf40739b1d9524afed48b94fc8bb168378 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Mon, 26 Jan 2026 16:03:52 -0500 Subject: [PATCH] Rename version.m4 to autoconf_version.m4. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Many existing projects have their own version.m4, and in some cases having one is recommended by the Automake manual. As of 2.72, the name collision causes a spurious warning about including ‘version.m4’ multiple times, because the “has this been included before” machinery does not track full pathnames. A proper fix is more complicated than anyone has time to develop; let’s just rename our version.m4 to autoconf_version.m4, which should be sufficiently distinctive. Reported in . * lib/version.in: Rename to lib/autoconf_version.in. * bootstrap, configure.ac, lib/freeze.mk, lib/local.mk, lib/m4sugar/m4sugar.m4: Change all uses of version.m4 to autoconf_version.m4, and all uses of version.in to autoconf_version.in. --- bootstrap | 2 +- configure.ac | 2 +- lib/{version.in => autoconf_version.in} | 0 lib/freeze.mk | 2 +- lib/local.mk | 2 +- lib/m4sugar/m4sugar.m4 | 4 ++-- 6 files changed, 6 insertions(+), 6 deletions(-) rename lib/{version.in => autoconf_version.in} (100%) diff --git a/bootstrap b/bootstrap index 6d6b98d23..aea09fca2 100755 --- a/bootstrap +++ b/bootstrap @@ -240,7 +240,7 @@ mkdir "$ACBOOTDIR"/bin "$ACBOOTDIR"/lib "$ACBOOTDIR"/tmp dosubst x bin/autoconf.in bin/autoconf dosubst x bin/autom4te.in bin/autom4te dosubst . lib/autom4te.in lib/autom4te.cfg -dosubst . lib/version.in lib/version.m4 +dosubst . lib/autoconf_version.in lib/autoconf_version.m4 AUTOCONF="$ACBOOTDIR"/bin/autoconf AUTOM4TE="$ACBOOTDIR/bin/autom4te -M -C $ACBOOTDIR/tmp/autom4te.cache" diff --git a/configure.ac b/configure.ac index 956af51ba..aa3f76b93 100644 --- a/configure.ac +++ b/configure.ac @@ -235,7 +235,7 @@ dnl Allow maintainer rules under GNU make even in VPATH builds. AC_CONFIG_LINKS([GNUmakefile:GNUmakefile]) AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([lib/version.m4:lib/version.in]) +AC_CONFIG_FILES([lib/autoconf_version.m4:lib/autoconf_version.in]) AC_OUTPUT # Report the state of this version of Autoconf if this is a beta. diff --git a/lib/version.in b/lib/autoconf_version.in similarity index 100% rename from lib/version.in rename to lib/autoconf_version.in diff --git a/lib/freeze.mk b/lib/freeze.mk index b194c382f..81905e9c2 100644 --- a/lib/freeze.mk +++ b/lib/freeze.mk @@ -62,7 +62,7 @@ m4f_dependencies = $(top_build_prefix)bin/autom4te $(AUTOM4TE_CFG) m4sugar_m4f_dependencies = \ $(m4f_dependencies) \ $(src_libdir)/m4sugar/m4sugar.m4 \ - $(build_libdir)/version.m4 + $(build_libdir)/autoconf_version.m4 m4sh_m4f_dependencies = \ $(m4sugar_m4f_dependencies) \ diff --git a/lib/local.mk b/lib/local.mk index 5490fd57e..f1ce8179c 100644 --- a/lib/local.mk +++ b/lib/local.mk @@ -149,7 +149,7 @@ nodist_m4sugarlib_DATA = \ lib/m4sugar/m4sh.m4f nodist_pkgdata_DATA += \ - lib/version.m4 + lib/autoconf_version.m4 CLEANFILES += $(nodist_m4sugarlib_DATA) $(nodist_pkgdata_DATA) TAGS_FILES += $(dist_m4sugarlib_DATA) diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4 index 079609965..54b60bde8 100644 --- a/lib/m4sugar/m4sugar.m4 +++ b/lib/m4sugar/m4sugar.m4 @@ -2902,7 +2902,7 @@ m4_define([m4_version_compare], # -------------------- # If version.m4 is present, then define version strings. This # file is optional, provided by Autoconf but absent in Bison. -m4_sinclude([version.m4]) +m4_sinclude([autoconf_version.m4]) # m4_version_prereq(VERSION, [IF-OK], [IF-NOT = FAIL]) @@ -2916,7 +2916,7 @@ m4_ifdef([m4_PACKAGE_VERSION], [m4_fatal([Autoconf version $1 or higher is required], [63])])], [$2])]], -[[m4_fatal([version.m4 not found])]])) +[[m4_fatal([autoconf_version.m4 not found])]])) ## ------------------ ## -- 2.47.3