summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2020-07-12 11:59:14 -0400
committerZack Weinberg <zackw@panix.com>2020-07-12 11:59:14 -0400
commita1acd8e66b7a4ca348401f890b4f04a6ca6b7d15 (patch)
tree5eeb7a2d0139cbc614f1f9473c778676c04547dd
parentd5cb54d02dba7ba9c0cd3736b46e7b50a71ce2f3 (diff)
downloadautoconf-a1acd8e66b7a4ca348401f890b4f04a6ca6b7d15.tar.gz
Formally obsolete AC_CONFIG_HEADER (#105403)
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.
-rw-r--r--NEWS14
-rw-r--r--TODO4
-rw-r--r--cfg.mk2
-rw-r--r--lib/autoconf/status.m46
-rw-r--r--tests/tools.at2
5 files changed, 15 insertions, 13 deletions
diff --git a/NEWS b/NEWS
index 394727e8..b7e7dca5 100644
--- 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 14aee2e0..37b2e946 100644
--- 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 ad7e8e10..b9401f11 100644
--- 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)$$
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index cb337d74..d2ab8235 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -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
diff --git a/tests/tools.at b/tests/tools.at
index 7341811a..81743374 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -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])