]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Formally obsolete AC_CONFIG_HEADER (#105403)
authorZack Weinberg <zackw@panix.com>
Sun, 12 Jul 2020 15:59:14 +0000 (11:59 -0400)
committerZack Weinberg <zackw@panix.com>
Sun, 12 Jul 2020 15:59:14 +0000 (11:59 -0400)
This macro was replaced by AC_CONFIG_HEADERS many years ago (before
the beginning of the VCS history) and isn’t even documented, but we
never got around to making autoupdate notice it.  Problem reported
*in 2006* by jensseidel@users.sf.net.

There was one use of AC_CONFIG_HEADER in our source tree, which is
converted.  Also, to avoid confusing people reading old NEWS or TODO
entries, all mentions of AC_CONFIG_HEADER therein are also replaced
with AC_CONFIG_HEADERS.

* lib/autoconf/status.m4 (AC_CONFIG_HEADER): Make an AU_ALIAS for
  AC_CONFIG_HEADERS.

NEWS
TODO
cfg.mk
lib/autoconf/status.m4
tests/tools.at

diff --git a/NEWS b/NEWS
index 394727e8763c9b06ed5ab92e0f0922fad3fe472c..b7e7dca57e911a23dfd11356252913e45fcd8aaf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -184,6 +184,10 @@ GNU Autoconf NEWS - User visible changes.
   change depending on the build environment.  If you find any other cases
   please report them as bugs.
 
+- The obsolete and undocumented macro AC_CONFIG_HEADER is now
+  diagnosed as obsolete, and replaced with AC_CONFIG_HEADERS by
+  autoupdate.
+
 * Noteworthy changes in release 2.69 (2012-04-24) [stable]
 
 ** Autoconf now requires perl 5.6 or better (but generated configure
@@ -1912,10 +1916,10 @@ Major changes in Autoconf 2.12:
 
   Released 1996-11-26 by David J. MacKenzie
 
-* AC_OUTPUT and AC_CONFIG_HEADER can create output files by
+* AC_OUTPUT and AC_CONFIG_HEADERS can create output files by
   concatenating multiple input files separated by colons, like so:
-  AC_CONFIG_HEADER(config.h:conf.pre:config.h.in:conf.post)
-  AC_OUTPUT(Makefile:Makefile.in:Makefile.rules)
+  AC_CONFIG_HEADERS([config.h:conf.pre:config.h.in:conf.post])
+  AC_OUTPUT([Makefile:Makefile.in:Makefile.rules])
   The arguments may be shell variables, to compute the lists on the fly.
 * AC_LINK_FILES and AC_CONFIG_SUBDIRS may be called multiple times.
 * New macro AC_OUTPUT_COMMANDS adds more commands to run in config.status.
@@ -1928,7 +1932,7 @@ Major changes in Autoconf 2.11:
 * AC_PROG_CC and AC_PROG_CXX check whether the compiler works.
   They also default CFLAGS/CXXFLAGS to "-g -O2" for gcc, instead of "-g -O".
 * AC_REPLACE_FUNCS defines HAVE_foo if the system has the function `foo'.
-* AC_CONFIG_HEADER expands shell variables in its argument.
+* AC_CONFIG_HEADERS expands shell variables in its argument.
 * New macros: AC_FUNC_FNMATCH, AC_FUNC_SETPGRP.
 * The "checking..." messages and the source code for test programs that
   fail are saved in config.log.
@@ -2096,7 +2100,7 @@ Major changes in Autoconf 2.0:
   override the file name "config.status".
 * AC_OUTPUT takes an optional argument for passing variables from
   configure to config.status.
-* AC_OUTPUT and AC_CONFIG_HEADER allow you to override the input-file names.
+* AC_OUTPUT and AC_CONFIG_HEADERS allow you to override the input-file names.
 * AC_OUTPUT automatically substitutes the values of CFLAGS, CXXFLAGS,
   CPPFLAGS, and LDFLAGS from the environment.
 * AC_PROG_CC and AC_PROG_CXX now set CFLAGS and CXXFLAGS, respectively.
diff --git a/TODO b/TODO
index 14aee2e0144f1c5cc00cb0a19279ba8434b19238..37b2e9463a983300fb59f822a909dd3074aa7f1f 100644 (file)
--- a/TODO
+++ b/TODO
@@ -175,9 +175,9 @@ Hi Robert,
 > It doesn't seem to add -DX_DISPLAY_MISSING to X_CFLAGS.  X_DISPLAY_MISSING
 > ends up defined in config.h, instead.
 
-That's only because you're no doubt using AC_CONFIG_HEADER(..) to send
+That's only because you're no doubt using AC_CONFIG_HEADERS([..]) to send
 your defines to a config.h-style file.  If you were to not use
-AC_CONFIG_HEADER and X was not available, then you would see
+AC_CONFIG_HEADERS and X was not available, then you would see
 -DX_DISPLAY_MISSING being added to @DEFS@ as your output files were being
 generated.
 
diff --git a/cfg.mk b/cfg.mk
index ad7e8e107fccc61ff11762c8478aa8bba9b44e43..b9401f1134afaec67e11a379871487245fb9d9e3 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -136,7 +136,7 @@ update-release-year:
 .PHONY: update-release-year
 
 # Prevent incorrect NEWS edits.
-old_NEWS_hash = c10c99f23488565809ea61c7db6ce0d8
+old_NEWS_hash = b6af714b06666cbc66cd26169a56bd9d
 
 exclude_file_name_regexp--sc_prohibit_undesirable_word_seq = \
   ^(maint\.mk|build-aux/texinfo\.tex)$$
index cb337d747bbf87caa9d9aa6d6066abf683a4d106..d2ab823591936f6c22b9325e86a299d82f020d6f 100644 (file)
@@ -714,11 +714,9 @@ dnl  fi
 AC_DEFUN([AC_CONFIG_HEADERS], [_AC_CONFIG_FOOS([HEADERS], $@)])
 
 
-# AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
+# AU::AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
 # --------------------------------------
-# FIXME: Make it obsolete?
-AC_DEFUN([AC_CONFIG_HEADER],
-[AC_CONFIG_HEADERS([$1])])
+AU_ALIAS([AC_CONFIG_HEADER], [AC_CONFIG_HEADERS])
 
 
 # _AC_OUTPUT_HEADERS_PREPARE
index 7341811a6f6ac6c7c1c355f9e77f2d9cdfb0555f..81743374bbc10450c972944a0c2590871d7b64ea 100644 (file)
@@ -830,7 +830,7 @@ AT_SETUP([autoheader and macros])
 
 AT_DATA([configure.ac],
 [[AC_INIT
-AC_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
 m4_define([PETER], [SIMSALABIM])
 m4_define([PAUL], [OPENSESAME])
 AC_DEFINE([PETER], [10], [Peter's public info])