2023-12-22  Zack Weinberg  <zack@owlfolio.org>

	Finalize NEWS for release 2.72.
	Since 2.72[abcde] did not get widely used, squash all the NEWS entries
	since 2.71 together, and delete things that were only of interest to
	people going from a,b,c to d to e.  Finalize the release date.

2023-12-22  Zack Weinberg  <zack@owlfolio.org>

	Save/restore AC_LANG setting in AC_PROG_CC_C_O.
	All of the AC_PROG_{compiler}_C_O macros, *except* AC_PROG_CC_C_O,
	wrap their test in an AC_LANG_PUSH/POP pair for the appropriate
	language.  https://savannah.gnu.org/support/index.php?110987 reports
	that AC_PROG_CC_C_O’s not doing this can cause a configure script to
	malfunction.  Specifically, if a script invokes AC_PROG_CC_C_O with
	AC_LANG([C++]) in effect, AC_PROG_CC_C_O still runs $CC but it passes
	a .cpp source file, possibly along with C-specific options.  Either
	of those can cause the test to mis-detect support for -c -o.

	Add an AC_LANG_PUSH/POP pair to AC_PROG_CC_C_O, ensuring we are
	testing the right compiler and giving it appropriate input.

	* lib/autoconf/c.m4 (AC_PROG_CC_C_O): Wrap body of test in
	  AC_LANG_PUSH/POP to C.

2023-12-22  Zack Weinberg  <zack@owlfolio.org>

	Remove bashism from tests/local.at.
	I regret doing development on a machine where /bin/sh is bash.

	* tests/local.at: Don’t use test ==.

2023-12-22  Zack Weinberg  <zack@owlfolio.org>

	Revert debugging change committed by mistake
	Commit 3fbfb13e7a846e98fa931b2bce373b5b2364a11b includes a debugging
	hack that was not intended to be committed.  Revert it.

	* tests/tools.at (autoconf: forbidden tokens, basic): Remove --verbose
	  from second invocation of autoconf.

2023-12-22  Zack Weinberg  <zack@owlfolio.org>

	Address “autom4te preselections” testsuite failure
	This test failure has the same root cause as described in
	commit 3fbfb13e7a846e98fa931b2bce373b5b2364a11b: autom4te
	regenerates the output unexpectedly because the output has
	the *same* file modification timestamp as the cache file it
	was generated from.  Apply the same stopgap fix.

	* tests/tools.at (autom4te preselections): Immediately after
	  running autoconf the first time, delay and then touch configure.
	  Move the “echo newer > newer” line after the comment that explains
	  what it’s for.  Insert additional blank lines for readability.

2023-12-22  Zack Weinberg  <zack@owlfolio.org>

	Avoid a spurious test failure with shells that ignore write errors.
	In a surprisingly large number of cases, the ‘printf’ shell utility
	doesn’t report errors caused by writing to stdout.  This can cause
	a spurious test failure on systems that have this bug in ‘printf’
	and also have /dev/full.  Detect such systems and skip that subtest.

	Problem reported by Alan Coopersmith.

	* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
	  If /bin/sh’s printf doesn’t report an error on writing to /dev/full,
	  skip the subtests that write to /dev/full.

2023-12-21  Zack Weinberg  <zack@owlfolio.org>

	Address “autoconf: forbidden tokens, basic” testsuite failure
	On file systems with coarse-grained timestamps, this test was broken by
	<https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=713d9822bbfb2923115065efaefed34a0113f8a1>,
	which changed autom4te's logic for deciding whether its output file is
	newer than its cache file.  After that commit, if their modification
	times are equal, the output is considered out of date.  Since both
	files are created in quick succession, on file systems with coarse
	timestamps (1 or 2s resolution), it is very easy for their
	modification times to be equal.

	As a stopgap for 2.72, in this test, force the generated configure
	script’s mtime to be newer than the cache file.

	* tests/tools.at (autoconf: forbidden tokens, basic): After the
	  second AT_MTIME_DELAY, touch configure.

2023-12-21  Zack Weinberg  <zack@owlfolio.org>

	testsuite: Skip tests that use aclocal or automake if they’re too old.
	Old versions of aclocal and/or automake can cause several tests to
	fail, for two unrelated reasons:

	 - when used with sufficiently new Perl they might print a “your code
	   has a minor bug” message on every invocation, causing tests that
	   check for specific output to choke
	 - aclocal prior to 1.11.2 does not support --system-acdir

	We already had code (in each individual test) to skip tests that depend
	on aclocal and/or automake when those programs were *unavailable*, or
	when buggy wrapper scripts were detected (apparently some BSDs once
	shipped with a wrapper that required you to set an environment variable
	before ‘automake’ would do anything at all).  Consolidate all of that
	code into local.at and augment it to detect the above two problems.

	Individual tests that require automake and/or aclocal should now
	just say AT_REQUIRE_AUTOMAKE and/or AT_REQUIRE_ACLOCAL at the top.
	Individual tests that run autoreconf but *don’t* need a real aclocal
	should instead start with AT_SUPPRESS_ACLOCAL, which sets ACLOCAL=true
	and creates a dummy aclocal.m4.

	While I was at it I noticed that AT_TESTED malfunctions if you have a
	shell variable in there that expands to more than one shell word, so I
	removed the AT_TESTED line for $M4 $PERL etc and replaced it with a
	custom report for the most important system-provided programs that the
	testsuite uses.  That report now also includes automake and aclocal.

	This should fix the problems reported by Sevan Janiyan in
	<https://lists.gnu.org/archive/html/bug-autoconf/2023-12/msg00159.html>.
	Tested on x86_64-linux against automake 1.11.1, 1.11.2, 1.13.0, and 1.16.5.

	* tests/local.at (AT_PREPARE_TESTS): Consolidate code to detect
	  availability of automake and aclocal here.  Also detect Perl
	  warning messages that will interfere with matching on the output,
	  and aclocal too old to understand --system-acdir.  Produce a custom
	  report of the versions of system-provided programs we need:
	  m4, perl, sh, make, and optionally automake and aclocal.
	  (AT_TESTED): Only list programs that are part of this package.
	  (AT_REQUIRE_AUTOMAKE, AT_REQUIRE_ACLOCAL, AT_SUPPRESS_ACLOCAL):
	  New helper macros.
	  * tests/fortran.at, tests/tools.at, tests/torture.at:
	  Use AT_REQUIRE_AUTOMAKE, AT_REQUIRE_ACLOCAL, AT_SUPPRESS_ACLOCAL
	  throughout, as appropriate.

2023-12-20  Zack Weinberg  <zack@owlfolio.org>

	update NEWS for 2.72e release candidate

	spelling errors reported by “make syntax-check”

2023-12-19  Zack Weinberg  <zack@owlfolio.org>

	Adjust --help and manpages to make it easier to find the Web manual.
	Today it came to my attention that, if you don’t already know that all
	the GNU manuals are readable in HTML format on gnu.org, it’s not easy
	to find one starting from typical --help output and/or help2man-
	generated manpages.  Let’s do a little to make this easier, and have
	“https://www.gnu.org/software/autoconf/manual/” appear prominently in
	both the --help output and the trailer text of our generated manpages.

	This uses the extended tmac.an “.MT” and “.UR” directives, which are
	not universal, but I suspect anyone who’s actively using Autoconf on
	an old system does not need the advice, and they can get it from
	--help regardless.

	* bin/autoconf.in, bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in
	* bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in:
	  Refer specifically to https://www.gnu.org/software/autoconf/manual/
	  for the web version of the complete Autoconf manual.
	* man/common.x: Likewise; also, suggest the Savannah tracker as
	  well as bug-autoconf for bug reports.

2023-12-19  Zack Weinberg  <zack@owlfolio.org>

	Run gitlog-to-changelog in source directory.
	gitlog-to-changelog needs to run in the source directory so it can
	find the git metadata.  This was masked in many cases because “git log”
	will look in parent directories for .git, but if you have your build
	directory completely outside the source tree then it can’t find it.

	* Makefile.am (gen-ChangeLog): Execute gitlog-to-changelog in $(top_srcdir).

2023-12-19  Zack Weinberg  <zack@owlfolio.org>

	Skip test of AC_SYS_YEAR2038_RECOMMENDED if system doesn’t support 64-bit time_t.
	AC_SYS_YEAR2038_RECOMMENDED causes configure to fail if we can’t find
	a way to activate support for 64-bit time_t.  This makes its
	mktests.pl test fail on systems that don’t support 64-bit time_t.
	Switch to a hand-written test that’s skipped on those systems.
	While I was in there I added slightly more testing of the closely
	related macros AC_SYS_LARGEFILE and AC_SYS_YEAR2038.

	While testing this change I noticed that AC_SYS_LARGEFILE and
	AC_SYS_YEAR2038 malfunction if AC_LANG([C++]) is in effect.
	The cause is too hairy to fix before the release; add a mention
	to NEWS instead.  (Bug <https://savannah.gnu.org/support/index.php?110983>.)

	* tests/mktests.pl: Exclude AC_SYS_LARGEFILE, AC_SYS_YEAR2038, and
	  AC_SYS_YEAR2038_RECOMMENDED from automatic test generation.
	* tests/semantics.at: Add manual tests of those macros.

2023-12-18  Zack Weinberg  <zack@owlfolio.org>

	Revert "config.status: handle CRLF line endings in AC_CONFIG_HEADERS input"
	Solaris 10 /usr/bin/awk doesn't implement sub().  Let's defer this
	change until after the release and I have time to think about it
	some more.

	This reverts commit bfd3894367e4d1c36c514e02c62173cde157f06b.
	This reopens bug <https://savannah.gnu.org/support/?110554>.

2023-12-18  Paul Eggert  <eggert@cs.ucla.edu>

	Fix AC_FUNC_MMAP on CheriBSD
	Problem reported by Brooks Davis in:
	https://lists.gnu.org/r/autoconf/2023-12/msg00022.html
	* lib/autoconf/functions.m4: Don’t unmap, since we
	want to test remapping something already mapped,
	and unmapping breaks on CheriBSD.

2023-12-18  Zack Weinberg  <zack@owlfolio.org>

	Clarify error messages for misuse of m4_warn and --help for -W.
	m4_warn([category], [message]) passes its arguments directly to
	Autom4te::Channels::msg.  If the category argument is not a recognized
	“channel”, that function will crash and emit a *Perl* stack trace,
	which makes it look like there’s something wrong with autoconf or
	autom4te, rather than something wrong with the script.

	Making matters worse, in autoconf 2.69, the manual said you could
	use “all” and the empty string as the first argument to m4_warn.
	As far as I can tell, neither of those was ever a valid message
	channel, and the manual was corrected in 2.70, but we still got
	a bug report from someone who tried it.

	This patch makes us issue a nice helpful user error, instead of a
	confusing internal error, when Autom4te::Channels::msg is called with
	a bogus channel argument.  If the bogus channel is “all” or the empty
	string, that error is demoted to a -Wobsolete warning.  If it is one
	of the other special tokens recognized by -W, we customize the error
	message, since someone might’ve thought that “none” being acceptable
	to -W meant it was also acceptable to m4_warn.  The --help output for
	autoconf, autoheader, autom4te, and autoreconf is also adjusted to
	clarify that not all of the tokens recognized by -W count as
	warning categories.

	(Oddly enough, the lack of filtration at the autom4te level means
	m4_warn([error], […]) actually does issue an error.  There’s no other
	way to get exactly that effect — m4_errprintn(…)  and m4_fatal(…)
	both do something a little different — so I I propose to leave that
	alone for now and promote it to a proper, documented feature, probably
	spelled m4_error(…), post-2.72.)

	Channels.pm and ChannelDefs.pm are shared with Automake.  I believe
	there is nothing you can write in a Makefile.am that will cause
	Automake::Channels::msg to be called with an arbitrary user-supplied
	channel argument, so these changes should have no visible effect on
	that side of the fence.

	Addresses <https://savannah.gnu.org/support/?110872>.

	 * lib/Autom4te/Channels.pm (msg): If the channel argument is invalid,
	   don’t crash; report the mistake and use the ‘syntax’ channel.
	   (report_bad_channel): New function for reporting invalid channels.

	 * lib/Autom4te/ChannelDefs.pm (usage): Clarify that the list of
	   warning categories is exhaustive, and that “all”, “none”,
	   “no-CATEGORY”, and “error” are not warning categories.

	 * bin/autoconf.in, bin/autoheader.in, bin/autom4te.in,
	   bin/autoreconf.in: Tweak --help text.

	 * tests/m4sugar.at (m4@&t@_warn (bad categories)): New test.

2023-12-15  Zack Weinberg  <zack@owlfolio.org>
	    David Allsopp  <david@davidallsopp.com>

	config.status: handle CRLF line endings in AC_CONFIG_HEADERS input
	On systems that normally use Unix line endings, if config.h.in has
	somehow been generated with DOS line endings, then awk will treat
	each CR character as part of the line.  This breaks the regular
	expressions used to edit config.h.in into config.h

	To fix, manually strip trailing CRs from each “input record” before
	any other processing.  For consistency I also made this change to the
	code dealing with AC_CONFIG_FILES substitutions.  On systems that use
	DOS line endings, both changes should be no-ops.

	Reported by David Allsopp in <https://savannah.gnu.org/support/?110554>.
	He offered a different patch, which also worked on my machine, but it
	used a regular expression as the third argument to ‘split’, which
	might not be portable across awk implementations (the gawk manual is
	unclear).  Also, it could produce a config.h with _inconsistent_ line
	endings.

	* lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): In the awk
	  script, strip a trailing CR from each record as the first action.
	  (_AC_OUTPUT_FILES_PREPARE): Likewise.
	* tests/torture.at (CRLF line endings in .in files): New test.

2023-12-13  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_MKDIR_P: Fix detection of busybox mkdir.
	Some versions of BusyBox mkdir respond to ‘mkdir --version’ by
	printing “mkdir: unrecognized option: --version” to stderr, and then
	the version message we’re looking for, also to stderr.  Adjust the
	pattern matching in AC_PROG_MKDIR_P to account for this.

	Problem reported by Valery Ushakov.
	Resolves <https://savannah.gnu.org/support/?110971>.

	* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Fix detection of busybox mkdir.

2023-12-12  Detlef Riekenberg  <wine.dev@web.de>

	Consistently use block comments at beginning of C99 and C11 tests
	Purely cosmetic improvement to the C standard version tests: Use /* */
	comments above all three checks of __STDC__ and/or __STDC_VERSION__,
	and make “// See if C++-style comments work” the very first // comment.

	Resolves issue #110713.

	* c.m4 (_AC_C_C99_TEST_GLOBALS, _AC_C_C11_TEST_GLOBALS):
	  Improve stylistic consistency with _AC_C_C89_TEST_GLOBALS.
	  Move explicit test of C++-style comments earlier.

2023-12-11  Zack Weinberg  <zack@owlfolio.org>

	autom4te: Don’t crash if Data::Dumper::Sortkeys is unavailable.
	Commit c2ab755698db245898a4cc89149eb5df256e4bd0 added an unconditional
	use of Data::Dumper’s Sortkeys method, which was added in version
	2.12_01 of that module.  In terms of Perl versions, it is available in
	5.8.x and later, and in 5.6.2, but not in 5.6.1 or earlier. At the
	time, our minimum Perl version was 5.10, but we lowered it to 5.6.0
	again in 05e295b60cfdf378b7ed8c1f8563a5644d5d4689.  It seems that
	commit was not actually tested with 5.6.1 or earlier.

	As we are only using Sortkeys to facilitate manual comparison of
	autom4te.cache/requests files, we can just ignore the method lookup
	failure with 5.6.[01] and everything will work fine without it.

	Tested on x86_64-unknown-netbsd9.3 with perl 5.6.1.

	* lib/Autom4te/C4che.pm (marshall): Ignore method lookup failure for
	  Data::Dumper::Sortkeys with very old perl.
	* lib/Autom4te/Request.pm (marshall): Likewise.

2023-12-06  Zack Weinberg  <zack@owlfolio.org>

	autom4te: report subsecond timestamp support in --version
	The Automake test suite wants this in order to know if it’s safe to
	reduce the length of various delays for the purpose of ensuring files
	in autom4te.cache are newer than the corresponding source files.  We
	can also take advantage of this to speed up a couple of tests in our
	own testsuite.

	* lib/Autom4te/FileUtils.pm: Provide (but do not export) a flag
	  $subsecond_mtime, indicating whether the ‘mtime’ function reports
	  modification time with precision greater than one second.
	  Reorganize commentary and import logic for clarity.  Add
	  configuration for emacs’ perl-mode to the bottom of the file.
	* bin/autom4te.in ($version): If $Autom4te::FileUtils::subsecond_mtime
	  is true, print “Features: subsecond-mtime” as the second line
	  of --version output.

	* lib/autotest/general.m4: Move definitions of AS_MESSAGE_LOG_FD,
	  AT_JOB_FIFO_IN_FD, and AT_JOB_FIFO_OUT_FD to top level and change
	  the latter two to be defined using _AT_DEFINE_INIT.  This enables
	  use of AS_MESSAGE_LOG_FD in AT_TESTS_PREPARE code.

	* tests/local.at (AT_MTIME_DELAY): New utility that delays a test for
	  an appropriate time to ensure all files created before its use are
	  considered older than all files created afterward.  The delay will
	  be as short as possible.
	  (AT_TESTS_PREPARE): Calculate and log the delay used by AT_MTIME_DELAY.
	  Only use a delay shorter than one second if the build filesystem,
	  our autom4te, and the automake on the PATH all support this.
	  (AT_CMP): En passant removal of unnecessary blank lines.

	* tests/tools.at: Use AT_MTIME_DELAY, instead of sleeping for a
	  hardcoded interval, everywhere the delay was to control file
	  timestamps.

2023-12-01  Paul Eggert  <eggert@cs.ucla.edu>

	Be more conservative about cache timestamps
	* bin/autom4te.in (up_to_date): Fix thinko by using the
	minimum of the cache files’ timestamps, not the maximum.

	Tweak Annex K doc
	* doc/autoconf.texi (C and Posix Variants):
	Don’t insist on C11 when talking about Annex K, as
	Annex K is also present in later versions of the C standard.

	* bin/autom4te.in: Fix comments.

2023-12-01  Zack Weinberg  <zack@owlfolio.org>

	testsuite: log version of shell and make as well
	A lot of bugs recently have been due to unexpected changes in shell
	and/or make behavior, so let’s log their versions in testsuite.log
	to make it easier to figure out when that’s the problem.

	Some shells don’t recognize --version but we still get an indication
	in the logfile of which shell it is, e.g.

	$ make check TESTSUITEFLAGS=1 SHELL=/bin/dash; grep dash tests/testsuite.log
	../../tests/local.at:25: /bin/dash --version
	/bin/dash: 0: Illegal option --

	* tests/local.at: Add ${CONFIG_SHELL-$SHELL} and $MAKE to AT_TESTED.

2023-12-01  Bruno Haible  <bruno@clisp.org>

	Recognize the *-*-windows* config triplets introduced on 2023-06-26.
	* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Treat windows* as
	equivalent to mingw*.
	* lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF):
	Likewise.
	* lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_PROBE): Likewise.

2023-11-30  Zack Weinberg  <zack@owlfolio.org>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	Release 2.72d [beta]
	Revise all NEWS entries since 2.71 for clarity.  Add an entry
	to the compatibility section about the macros that no longer
	have AC_PROG_{EGREP,CPP} as a side effect.

	make fetch

2023-11-26  Paul Eggert  <eggert@cs.ucla.edu>

	Remove m4_file_append
	* lib/m4sugar/m4sugar.m4 (m4_file_append): Remove.
	In 2000, this undocumented macro was left in by mistake
	even though all its callers were removed.
	Inspired by a bug report by Ally Petitt (sr#110961).

2023-10-18  KO Myung-Hun  <komh78@gmail.com>

	m4/m4.m4: Quote argument to AS_ECHO correctly.
	AS_ECHO’s argument is required to be “a single shell word,”
	and this more precisely means it must not be altered by shell
	word splitting.  In particular, if the argument contains shell
	variables whose values contain whitespace then it needs to be
	wrapped in "shell double quotes".

	The absence of these quotes caused one of the embedded M4 scripts
	to be mangled by the Autoconf 2.69 implementation of AS_ECHO.
	We don’t officially support bootstrapping with an older version
	of Autoconf (use the ./bootstrap script instead) but the absence
	of quotes is still incorrect.

	For consistency add [M4 quotes] to the use of AS_ECHO that was
	shell-quoted but not M4-quoted.

	* m4/m4.m4 (AC_PROG_GNU_M4): Quote argument to AS_ECHO correctly.

2023-10-18  Zack Weinberg  <zack@owlfolio.org>
	    KO Myung-Hun  <komh78@gmail.com>

	autom4te: OS/2 compat: Do not attempt to chmod an open file.
	On OS/2, chmod(2) cannot be applied to an open file.

	Instead set the desired permissions when the file is initially
	created, using the PERMS argument to File::Temp::tempfile if
	possible, or by manually emulating that feature if the system
	perl does not provide a new enough version of File::Temp.

	This has the nice side effect that we no longer need to handle
	the umask manually.

	* autom4te.in (tempfile_with_mode): New function.
	  (handle_output): Use tempfile_with_mode instead of directly using
	  File::Temp plus chmod.

2023-08-18  Paul Eggert  <eggert@cs.ucla.edu>

	Improve INSTALL format
	* doc/install.texi (Compilers and Options): Fix two @ref
	instances that don’t work well when making INSTALL.
	Problem noted by Gavin Smith in:
	https://lists.gnu.org/r/autoconf/2023-08/msg00004.html

2023-08-15  Paul Eggert  <eggert@cs.ucla.edu>

	Mention ./bootstrap privacy implications
	* doc/install.texi: Fix some problems noted by Gavin Smith in:
	https://lists.gnu.org/r/autoconf/2023-08/msg00000.html

2023-08-15  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>  (tiny change)

	Fix _AC_LANG_IO_PROGRAM(C) to work with glibc 2.38 headers
	Following the glibc commit glibc-2.38~268 ("libio: Add __nonnull
	for FILE * arguments of fclose and freopen"), the utilization of the gcc
	-fanalyzer flag in combination with the -Werror flag leads to an error
	within the _AC_LANG_IO_PROGRAM(C) function:

	conftest.c:14:23: error: use of possibly-NULL 'f' where non-null expected [CWE-690] [-Werror=analyzer-possible-null-argument]

	* lib/autoconf/c.m4 (_AC_LANG_IO_PROGRAM): Exit upon encountering
	fopen() error.

	See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109570 and
	https://gcc.gnu.org/g:c9a19621a07e246385ae075b61283140b23c3b5a .

2023-06-24  Paul Eggert  <eggert@cs.ucla.edu>

	Shorten and improve INSTALL
	Rewrite install.texi so that INSTALL is shorter and hopefully
	more useful for new installers.
	* doc/install.texi: When not building the Autoconf manual, put
	copyright notice at the end, and omit external references as they
	do not work in INSTALL.
	Avoid long URLs as they do not work well in INSTALL or
	in info files.  Be more consistent (though not entirely
	consistent) about “system” vs “architecture”.
	(System Types, Building for a different system type)
	(Troubleshooting the Build Type): Coalesce into a single section
	and rewrite for clarity and brevity.  Mention build-aux.  Do not
	mention --target here as it’s too rare to make the cut.

2023-06-24  Bruno Haible  <bruno@clisp.org>

	INSTALL: Clarify --build, --host, --target, and the system types.
	* doc/install.texi (Compilers and Options): Add another reference.
	(System Types): Renamed from System Type. Explain how to canonicalize
	and how to validate a system type. Don't explain --build, --host,
	--target here.
	(Building for a different system type): New section.
	(Troubleshooting the Build Type): New section.
	(Configuring a Compiler): New section.
	(configure Invocation): Mention the --host option, not the --build
	option, since --build is so rarely needed.

2023-06-20  Paul Eggert  <eggert@cs.ucla.edu>

	doc: fix broken cross-refs

	Modernize INSTALL
	Problem reported for gettext bootstrap by Julien Palard in:
	https://savannah.gnu.org/bugs/?62196
	* doc/install.texi: Give a brief info as to how to bootstrap,
	on packages built from Git rather from a distribution tarball.
	Remove aging details about c99, macOS, X, HP-UX, OSF/1, Solaris,
	Haiku, sun4.  Improve documentation for enable/disable and
	with/without options.

2023-06-19  Paul Eggert  <eggert@cs.ucla.edu>

	Fix AC_SYS_LARGEFILE on GNU/Linux alpha, s390x
	Problem reported by Matoro <https://bugs.gnu.org/64123>.
	* lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_TEST_CODE):
	New overridable macro FTYPE, to test types other than off_t.
	(_AC_SYS_LARGEFILE_TEST_CODE): Test ino_t for
	-D_FILE_OFFSETBITS=64 too, if no flags are needed for off_t.
	Needed for GNU/Linux on alpha and s390x.

2023-05-17  Paul Eggert  <eggert@cs.ucla.edu>

	Improve AC_FUNC_MMAP comments
	* lib/autoconf/functions.m4 (AC_FUNC_MMAP): Add comment.

2023-05-13  Paul Eggert  <eggert@cs.ucla.edu>

	Improve AC_SYS_YEAR2038_RECOMMENDED diagnostic
	* lib/autoconf/specific.m4 (AC_SYS_YEAR2038_RECOMMENDED):
	Do not recommend gcc -m64, as that likely will not work.
	Problem reported by Bruno Haible in:
	https://lists.gnu.org/r/bug-gnulib/2023-05/msg00060.html
	Instead, mention that 32-bit time_t is not recommended
	for this package, before telling the builder how
	to configure with 32-bit time_t anyway.

2023-05-11  Paul Eggert  <eggert@cs.ucla.edu>

	Fix port of AC_FUNC_MMAP
	Problem reported by Matt Turner in:
	https://lists.gnu.org/r/bug-autoconf/2023-05/msg00005.html
	* lib/autoconf/functions.m4 (AC_FUNC_MMAP): Go back to getting the
	page size, since the zero-fill test needs this after all.
	However, prefer sysconf (_SC_PAGESIZE) or sysconf (_SC_PAGE_SIZE)
	to getpagesize (), and use ‘long’ not ‘int’ to store the page size.
	Also, declare getpagesize if it is used as a function.

2023-05-10  Paul Eggert  <eggert@cs.ucla.edu>

	Port AC_FUNC_MMAP to more-modern systems
	* lib/autoconf/functions.m4 (AC_FUNC_MMAP): Don’t call
	getpagesize, as it’s tricky to configure, modern POSIX doesn’t
	require it, and calling it without including <unistd.h> provokes a
	compile-time error on modern systems.  Instead, rework the test
	to not need getpagesize.  Add a FIXME comment for unnecessary
	tests; I don't want to remove them now as we're too close to
	a release.  Remove long-obsolete comment about GNU grep.

2023-04-26  Paul Eggert  <eggert@cs.ucla.edu>

	Tone down year-2038 changes
	New macro AC_SYS_YEAR2038_RECOMMENDED replaces new macro
	AC_SYS_YEAR2038_REQUIRED, and gives the builder an out of
	specifying --disable-year2038.  Remove new macro
	AC_SYS_LARGEFILE_REQUIRED, which was added only for symmetry and
	does not seem to have a great need.
	* NEWS, doc/autoconf.texi: Document this.
	* lib/autoconf/specific.m4:
	Be more specific about mid-January 2038 than just Jan 2038.
	(_AC_SYS_YEAR2038_PROBE): Ignore IF-NOT-DETECTED arg.
	If support is not detected, merely set ac_have_year2038=no instead
	of erroring out.  All callers changed.
	(_AC_SYS_YEAR2038_OPT_IN): Remove.  All callers removed.
	(AC_SYS_YEAR2038): Simplify by requiring AC_SYS_LARGEFILE
	and then testing the result.
	(AC_SYS_YEAR2038_REQUIRED, AC_SYS_LARGEFILE_REQUIRED): Remove.
	(AC_SYS_YEAR2038_RECOMMENDED): New macro.
	(_AC_SYS_LARGEFILE_PROBE): If support is not detected, merely set
	ac_have_largefile=no instead of erroring out.  All callers changed.
	Take on the burden of invoking year2038 probe as needed.
	(AC_SYS_LARGEFILE): Simplify.

2023-04-19  Bruno Haible  <bruno@clisp.org>

	AC_SYS_YEAR2038_REQUIRED: Fix configure failure with MSVC.
	* lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_PROBE): Distinguish the results
	"support not detected" and "supported through gnulib". If the result is
	"supported through gnulib", don't fail.

2023-04-17  Bruno Haible  <bruno@clisp.org>

	Document limitation of BusyBox tr.
	BusyBox 1.35.0 tr, which is shipped with Alpine Linux 3.17, does not support
	the POSIX [x*n] syntax.

	* doc/autoconf.texi (Limitations of Usual Tools): Document limitation of 'tr'
	from BusyBox.

2023-04-15  Bruno Haible  <bruno@clisp.org>

	AC_SYS_YEAR2038: Fix configure failure on 32-bit mingw.
	* lib/autoconf/specific.m4 (_AC_SYS_YEAR2038_PROBE): Use the same option
	spelling as in _AC_SYS_YEAR2038_OPTIONS.

2023-04-09  Paul Eggert  <eggert@cs.ucla.edu>

	Improve year2038, largefile option processing
	* lib/autoconf/specific.m4 (_AC_SYS_YEAR2038_PROBE)
	(_AC_SYS_YEAR2038_ENABLE, _AC_SYS_YEAR2038_OPT_IN)
	(AC_SYS_YEAR2038, _AC_SYS_LARGEFILE_PROBE)
	(_AC_SYS_LARGEFILE_ENABLE): Do not use enable_largefile to record
	whether largefile is required, as ‘./configure
	--disable-largefile’ sets enable_largefile=no even if largefile is
	required and this disables largefile.  Instead, use a separate
	shell variable ac_largefile_required and test it as well.
	Similarly for enable_year2038.
	(_AC_SYS_LARGEFILE_ENABLE): Omit --disable-largefile help string
	if year2038 is required, since largefile is a prereq for year2038.

2023-04-03  Paul Eggert  <eggert@cs.ucla.edu>

	Support circa early 2022 Gnulib
	Problem reported by Frederic Berat in:
	https://lists.gnu.org/r/bug-rcs/2023-04/msg00001.html
	* lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
	Bring back for compatibility with post-2.71, pre-2.73 Gnulib.

2023-04-02  Zack Weinberg  <zackw@panix.com>

	Remove the last few internal uses of AC_EGREP_CPP.
	Most of the remaining uses were converted to AC_COMPILE_IFELSE.
	The use in AC_FUNC_LOADAVG becomes an AC_PREPROC_IFELSE because
	we can’t be sure getloadavg.c can be _compiled_ at this point in
	the build.  The use in AC_C_VARARRAYS could be either _PREPROC_ or
	_COMPILE_; we use _COMPILE_ because, _PREPROC_ is never used, then
	we don’t have to do the “checking how to run the C preprocessor” test.

	* lib/autoconf/c.m4 (AC_C_VARARRAYS): Use AC_COMPILE_IFELSE instead of
	  AC_EGREP_CPP.
	* lib/autoconf/headers.m4 (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H)
	  (_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL_H): Likewise.
	* lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Use AC_PREPROC_IFELSE
	  instead of AC_EGREP_CPP.

2023-04-02  Zack Weinberg  <zackw@panix.com>

	Fold AC_C_STRINGIZE into AC_PROG_CC.
	Another of the last few uses of AC_EGREP_CPP is to check for the ISO C
	“stringification” operator.  As this is a feature of C89, let’s fold
	the test into the extensive C89 tests we already have, and make
	AC_C_STRINGIZE just lean on AC_PROG_CC, in the same way
	AC_C_PROTOTYPES does.

	* lib/autoconf/c.m4 (_AC_C_C89_TEST_GLOBALS): Add test of preprocessor
	  stringification and token pasting.
	  (AC_C_STRINGIZE): Just check ac_prog_cc_stdc.

2023-04-02  Zack Weinberg  <zackw@panix.com>

	Overhaul AC_TYPE_GETGROUPS and AC_FUNC_GETGROUPS.
	AC_TYPE_GETGROUPS is the last remaining use of AC_EGREP_HEADER in
	stock Autoconf macros.  It uses it only when cross compiling, as a
	fallback from an AC_RUN_IFELSE check, testing for a bug in system
	headers from the late 1980s or early 1990s, where gid_t *existed*
	but the second argument to getgroups needed to be an array of int,
	and this didn’t cause a compile error (i.e. the system headers
	declare getgroups with no prototype or an incorrect prototype).
	AC_FUNC_GETGROUPS also uses AC_RUN_IFELSE to test for obscure
	problems specific to long-obsolete Unixes.

	The downsides of AC_RUN_IFELSE and AC_EGREP_HEADER seem more severe
	than the chances of someone compiling a current-generation program,
	that uses getgroups, on an OS old enough to have one of the really
	nasty bugs.  Accordingly, this patch changes AC_FUNC_GETGROUPS to use
	a host_os-based *blacklist* both in native and cross compilation.
	This is limited to the two host_os values for which either our old
	code, or Gnulib, documented a serious bug: ultrix* and nextstep*.
	Currently it does not try to pin down the exact version ranges subject
	to the bugs — that would require research by someone with access to
	the full history of these OSes.

	An incorrect guess by this blacklist can be overridden by setting
	ac_cv_func_getgroups_works in config.site.  AC_TYPE_GETGROUPS, for its
	part, now does a series of regular old AC_COMPILE_IFELSE checks to
	probe the prototype of getgroups, and considers that good enough.

	While I was in there I noticed that AC_FUNC_GETGROUPS does not
	AC_SUBST a documented output variable, and that the name of this
	variable is misspelled in the manual.

	* lib/autoconf/functions.m4 (AC_FUNC_GETGROUPS): Use AC_SEARCH_LIBS
	  to probe for getgroups.  Use an AC_CANONICAL_HOST-based blacklist
	  for bug detection, not AC_RUN_IFELSE.  AC_SUBST the GETGROUPS_LIB
	  output variable.
	* lib/autoconf/types.m4 (AC_TYPE_GETGROUPS): Check only the prototype
	  of getgroups, using AC_COMPILE_IFELSE; do not use either AC_RUN_IFELSE
	  or AC_EGREP_HEADER.
	* doc/autoconf.texi: Update to match. Correct misspelling of
	  GETGROUPS_LIB.
	* tests.local.at (_AT_CHECK_ENV): Allow GETGROUPS_LIB output variable.

2023-04-02  Zack Weinberg  <zackw@panix.com>

	Make AC_PROG_GCC_TRADITIONAL a compatibility alias for AC_PROG_CC.
	This macro is one of the last remaining internal uses of AC_EGREP_CPP.
	It has only ever done anything useful with GCC, and GCC dropped
	support for ‘traditional’ compilation in version 3.3 (released 2003)
	so I do not think it is worth trying to preserve.

	* lib/autoconf/c.m4 (AC_PROG_GCC_TRADITIONAL): Make into a
	  compatibility alias for AC_PROG_CC, similar to AC_PROG_CC_STDC.
	* lib/autoconf/general.m4 (AC_EGREP_CPP): Remove stale comment.
	* doc/autoconf.texi, NEWS: Document this change.
	* tests/mktests.pl: Exclude AC_PROG_GCC_TRADITIONAL from
	  autoupdate tests.

2023-04-02  Zack Weinberg  <zackw@panix.com>

	AC_TYPE_UID_T: Rewrite using AC_CHECK_TYPE.
	AC_TYPE_UID_T uses AC_EGREP_HEADER to search sys/types.h for
	occurrences of the string ‘uid_t’ and, if found, assumes both
	uid_t and gid_t are available.  This would be better done using
	a pair of AC_CHECK_TYPE operations.

	I also converted two uses of old-style AC_CHECK_TYPE, immediately
	below, to new-style.  (There are probably other old-style uses in
	this file, I only did the ones I happened to see.)

	* lib/autoconf/types.m4 (AC_TYPE_UID_T): Check for uid_t and gid_t,
	  separately, using AC_CHECK_TYPE, instead of grepping sys/types.h.
	  (AC_TYPE_SIZE_T, AC_TYPE_SSIZE_T): Use new-style AC_CHECK_TYPE.

2023-04-02  Zack Weinberg  <zackw@panix.com>

	AC_XENIX_DIR: Rewrite using AC_CANONICAL_HOST.
	AC_XENIX_DIR is an obsolete macro, defined as AC_HEADER_DIRENT plus
	code to make absolutely sure configure scripts that depended on a
	shell variable internal to the original (2.13 era) definition of
	AC_XENIX_DIR are not broken by autoupdate.  (That variable had the
	temptingly public-sounding name “XENIX.”)  This compatibility code
	uses AC_EGREP_CPP, which is itself discouraged for use in new
	configure scripts.

	(N.B. codesearch.debian.net does not find any uses whatsoever of
	this macro, nor any code in an .ac or .m4 file that depends on the
	XENIX variable.)

	Change the compatibility code to use AC_CANONICAL_HOST instead,
	and clarify which pieces of the code inserted by autoupdate are
	probably still necessary.

	* lib/autoconf/specific.m4 (AC_XENIX_DIR): Set XENIX variable
	  based on value of host_os. Clarify what manual cleanup is
	  recommended after autoupdate replaces this obsolete macro.

2023-04-02  Zack Weinberg  <zackw@panix.com>

	New script for building inside Guix containers.
	build-aux/test-build-guix, goes with the top level manifest.scm.
	See the top of the file for usage instructions.

2023-04-01  Paul Eggert  <eggert@cs.ucla.edu>

	Support underquoted callers better
	Problem reported bh Khem Raj for mcpp 2.7.2 (2008) in:
	https://lists.gnu.org/r/autoconf/2023-04/msg00001.html
	* lib/autoconf/programs.m4 (_AC_PATH_PROG_FLAVOR_GNU):
	Add two ‘@%:@(’s to cater to underquoted callers.
	* lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Use quadrigraph instead of
	‘#’, for underquoted callers.

	Fix timing bug on high-speed builds
	Problem reported by Bogdan via Jacob Bachmeyer in:
	https://lists.gnu.org/r/autoconf/2023-04/msg00002.html
	* bin/autom4te.in: If a file timestamp equals a dependency’s
	timestamp, consider the file to be out of date.  Although this may
	result in extra work, it fixes some rare timing bugs.

2023-03-31  Paul Eggert  <eggert@cs.ucla.edu>

	Go back to requiring only Perl 5.6+ for users
	Commit 61901a1a14fd50c03cfb1529d091554376fef286 dated 2022-07-10
	bumped the Perl requirement to 5.10 or later, because
	commit 3a9802d60156809c139e9b4620bf04917e143ee2 dated 2021-08-31
	added code using Time::HiRes’s ‘stat’ function, a feature
	added in Perl 5.8.9+ or Perl 5.10+, and it was hard
	to find Perl 5.8.9 hosts to test with.  Also, requiring Perl 5.10
	meant that we could then use operators like Digest::SHA, the // and
	//= operators, the regexp \K escape, and ‘state’ variables.

	However, that Time::HiRes code, which was taken from Automake, has
	recently been made optional by Automake, and it now works again with
	Perl 5.6.  And Autoconf is not yet using any other post-5.6 feature,
	except when developers run help-extract.pl (something Autoconf users
	do not use).  So relax the Autoconf user requirement back to 5.6 as it
	was in Autoconf 2.71; although Autoconf developers will need 5.10 or
	better, Autoconf users can get by with 5.6.

	I ran into this problem when testing the Autoconf release candidate on
	Solaris 10, which has Perl 5.8.4.  Oracle says Solaris 10’s
	end-of-life is January 2024, so it’s still (barely) a viable porting
	target.  Of course with Solaris 10 one must install a recent-enough
	GNU m4, but adding a requirement to also install a recent-enough Perl
	is a new barrier, and if it’s not needed then it might be better to
	wait until it is needed (or until 2024 arrives).

	* NEWS: Update news item about Perl 5.6 vs 5.10.
	* README-hacking: Bump Perl recommendation to 5.10.
	* build-aux/fetch.pl: Do not munge imported code to require 5.10.

2023-03-31  Paul Eggert  <eggert@cs.ucla.edu>

	Cater to programs misusing AC_EGREP_HEADER
	Problem reported by Frederic Berat in:
	https://lists.gnu.org/archive/html/autoconf/2022-11/msg00127.html
	* lib/autoconf/programs.m4 (AC_PROG_EGREP): Also set
	EGREP_TRADITIONAL and ac_cv_path_EGREP_TRADITIONAL.
	* tests/c.at (AC_PROG_EGREP and AC_EGREP_HEADER):
	New test, taken from Frederic Berat’s email in:
	https://lists.gnu.org/r/autoconf/2023-03/msg00043.html

	* NEWS: Tighten up wording.

2023-03-29  Paul Eggert  <eggert@cs.ucla.edu>

	build: run "make fetch", which updated these:
	* build-aux/texinfo.tex: Update from texinfo.
	* lib/Autom4te/FileUtils.pm: Update from automake.

2023-03-27  Paul Eggert  <eggert@cs.ucla.edu>

	mention prototypes more prominently in NEWS
	* NEWS: Mention the function prototype issue early.
	(From a suggestion by Zack Weinberg.)

2023-03-27  Jim Meyering  <meyering@fb.com>

	tests: avoid an unwarranted test failure
	* tests/autotest.at (parallel autotest and signal handling): This
	test would consistently fail due to an exit status of 0. That was
	considered failure because the test required a SIGHUP-indicating
	exit status. However, an status of 0 is perfectly fine, too, so
	accept that.

2023-03-26  Jim Meyering  <meyering@fb.com>

	build: run "make fetch", which updated these:
	Preparing to make a pre-release snapshot, update these:
	* build-aux/announce-gen: Update from gnulib
	* build-aux/gnupload: Likewise.
	* build-aux/texinfo.tex: Update from texinfo.

2023-03-12  Zack Weinberg  <zackw@panix.com>

	Add experimental manifest.scm for testing Autoconf under guix shell.
	‘guix shell’ is a utility for constructing isolated environments
	for development; I’ve put together a “manifest” stating the
	build and test requirements for autoconf, starting from a git
	checkout.

2023-03-12  Zack Weinberg  <zackw@panix.com>

	bootstrap: Use an absolute path for ACBOOTDIR.
	If we use a relative path for ACBOOTDIR, Automake can’t tell the
	difference between Autoconf’s configure script’s aclocal.m4
	inclusions (…/m4/*.m4) and the guts of Autoconf
	itself (…/lib/autoconf/*.m4) so it puts both of them into
	$(am__aclocal_m4_deps).  This would be harmless, except that the
	guts-of-Autoconf files are named *relative to $ACBOOTDIR*, which
	means Make can’t find them later.  And this is why a build from a
	clean git checkout always starts by regenerating aclocal.m4 and
	configure again.

	Using an absolute path for ACBOOTDIR gives automake enough of a clue
	what’s going on (see the heuristic circa 5500 of current automake.in,
	commented “Some modified versions of autoconf don’t use frozen files…”)
	for it to produce the same value for $(am__aclocal_m4) that it would
	if we were running an installed Autoconf.

2023-03-12  Zack Weinberg  <zackw@panix.com>

	Skip all Autotest parallelism tests if using Guix’s bash.
	It is not clear to me why, but the “parallel autotest and signal
	handling” test malfunctions if the active shell is Guix bash.  I don’t
	think it’s worth investigating in detail, considering I intend to
	reimplement parallel autotest using the same technique that Automake’s
	parallel test driver uses, i.e. make -j, which should eliminate this
	entire class of problems.

2023-03-12  Zack Weinberg  <zackw@panix.com>

	Fix ‘make syntax-check’ complaints.
	* cfg.mk (local-checks-to-skip): Add sc_unportable_grep_q, which has
	  too many false positives to bother with; for instance, it triggers
	  on autoconf.texi’s discussion of why grep -q is unportable, and on
	  the code in maint.mk that implements the check!
	  (old_NEWS_hash): Update for commit b751bf49496ea3f0054533cfd63f977640abb07a,
	  which fixed spelling errors in old NEWS.

	* doc/autoconf.texi: Remove a doubled word.
	* lib/autoconf/programs.m4: Remove a space immediately before a tab.
	* lib/m4sugar/m4sh.m4 (_AS_IF): Rephrase documentation to avoid saying
	  “if IF-FALSE” which triggers the prohibit_doubled_word check.

2023-02-06  Paul Eggert  <eggert@cs.ucla.edu>

	doc: improve AS_IF doc
	* doc/autoconf.texi: Improve documentation of AS_IF, AS_CASE, etc.
	Clarify the advice about when AS_IF is needed, and follow that
	advice in examples.

	Update doc slightly for C23.

2023-02-03  Paul Eggert  <eggert@cs.ucla.edu>

	Clarify NEWS
	* NEWS: Clarify recent items about AC_SYS_LARGEFILE_REQUIRED,
	AC_SYS_YEAR2038_REQUIRED, AC_PROG_MKDIR_P. Reported by Bruno Haible in:
	https://lists.gnu.org/r/bug-autoconf/2023-02/msg00005.html

2023-02-02  Paul Eggert  <eggert@cs.ucla.edu>

	make fetch

	Improve year-2038 documentation
	* NEWS, doc/autoconf.texi (System Services):
	Improve documentation for behavior of largefile and year-2038 support.
	Say that in the current implementation, year-2038 support
	requires largefile support.  Say that year-2038 support
	matters only for GNU/Linux glibc 2.34+ on 32-bit x86 and ARM.
	Prefer brevity when this does not hurt understandability;
	for example, prefer active to passive voice.
	Prefer “wider” to “larger” when talking about the number of
	bits in an integer, as this terminology is more standard.
	Tone down the wording in warnings about enabling year-2038 support,
	use similar wording in warnings about enabling largefile support,
	and warn also about disabling largefile and year-2038 support.
	No need for @emph.  Also mention rlim_t.
	Be a bit more careful about saying “2 GiB” rather than “2 GB”.
	Mention that a future version of Autoconf might change
	AC_SYS_LARGEFILE to default to --enable-year2038, since
	something has gotta happen before 2038.
	Coalesce descriptions of --enable-largefile and --enable-year2038
	to simplify documentation.  Mention that the only system where
	AC_SYS_LARGEFILE changes CC is IRIX and that these systems
	are obsolete.  Say that ‘stat’ can fail due to time_t
	overflow.  Say that you can’t portably print time_t with %ld.
	Say that binary compatibilty problems also can occur when one
	library is linking to amother; it’s not just apps vs libraries.
	Mention the possibility of modifying libraries to support both
	32- and 64-bit interfaces.  Warn more consistently about
	ABI compatibility issues, but put the bulk of this text
	in one location that the other locations refer to.

2023-01-21  Paul Eggert  <eggert@cs.ucla.edu>

	Restore lib/Autom4te/FileUtils.pm local fixes
	These were lost by 'make fetch'.

	spelling fixes

	make update-copyright

	make fetch

2022-12-30  Paul Eggert  <eggert@cs.ucla.edu>

