2026-02-03  Zack Weinberg  <zack@owlfolio.org>

	Autoconf 2.72.90 (beta test 1 for Autoconf 2.73).

2026-02-03  Zack Weinberg  <zack@owlfolio.org>

	NEWS: Briefly mention a few more improvements.
	Specifically, this is meant to cover these commits:

	2b56e8c2 autoreconf: don’t fail if gtkdocize is unavailable (#110503)
	912567e9 autoreconf: require word boundaries when grepping for macros (#111271)
	4774e6bb autoreconf: Adapt to the on-disk situation after autopoint has run.
	f0d97fb5 autoreconf: Invoke autopoint in more situations.

	and

	9a6c58cf Rename version.m4 to autoconf_version.m4.

2026-02-03  Zack Weinberg  <zack@owlfolio.org>

	fetch.pl: get GNU standards documents from gnulib
	Pulling these files from gnulib, instead of getting them directly
	from their official home, means that all the files fetched by fetch.pl
	come from Savannah Git repositories, which is particularly important
	right now as Savannah CVS repositories are currently inaccessible via
	the web, see
	https://lists.gnu.org/archive/html/savannah-hackers/2026-02/msg00024.html
	et seq.

	* fetch.pl (to_fetch): Get all gnustandards files from gnulib instead.
	  (savannah_url): Remove special case for gnustandards.

2026-02-03  Zack Weinberg  <zack@owlfolio.org>

	syntax-check: avoid unsigned_* false positive on maint.mk
	* maint.mk (sc_unsigned_char, sc_unsigned_short, sc_unsigned_int)
	  (sc_unsigned_log): Add ‘exclude’ patterns so that these tests do
	  not throw a false positive on their own commentary.

	autoconf.texi: typo fix
	‘the the’ -> ‘the’ in one place.  Caught by ‘make syntax-check’.

	maint.mk: fix tab/space usage in release-prep script
	This makes the ‘makefile_TAB_only_indentation’ syntax check happy.

	cfg.mk: update old_NEWS_hash
	Commit c3705f11bc0f1796836cddacfcd97e9f7e243563 modified the copyright
	dates at the bottom of NEWS but did not update old_NEWS_hash.

	syntax-check: avoid fsf_postal false positive on maint.mk
	* maint.mk (sc_fsf_postal): Adjust ‘prohibit’ regex to not match itself.

	Update COPYING from https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
	Our copy still mentioned the FSF’s old postal mail address.

	make fetch
	Right now, Savannah’s HTTP interface to CVS repositories (viewvc) is
	responding to all queries with a 429 Too Many Requests error code,
	so those files were updated manually.  (The actual CVS server is
	still working fine.)

2026-02-03  Bruno Haible  <bruno@clisp.org>

	maint: Suggest to use the savannah tracker for bug reports.
	* bin/autoconf.in ($help): Mention the savannah tracker as first bug
	reporting option.
	* bin/autoheader.in ($help): Likewise.
	* bin/autom4te.in ($help): Likewise.
	* bin/autoreconf.in ($help): Likewise.
	* bin/autoscan.in ($help): Likewise.
	* bin/autoupdate.in ($help): Likewise.
	* bin/ifnames.in ($help): Likewise.

2026-01-27  Paul Eggert  <eggert@cs.ucla.edu>

	Mention strchr issues in NEWS
	* NEWS: Mention problems with strchr-like functions in C23.

2026-01-27  Zack Weinberg  <zack@owlfolio.org>

	autoreconf: don’t fail if gtkdocize is unavailable (#110503)
	Since 2.70, autoreconf has run gtkdocize when it detects a use of the
	macro GTK_DOC_CHECK in the configure.ac.  Some projects (e.g. per the
	bug report, gnutls and harfbuzz) were using a clever hack with
	m4_ifdef to allow people to build the project without having gtkdocize
	installed, if they didn’t care about building the documentation; the
	change to autoreconf broke this hack.

	Attempt to make the hack work again, by only running gtkdocize if that
	command is actually installed; autoreconf will not error out if the
	macro is detected but the command is unavailable, similar to the
	existing treatment of autopoint.

	Problem reported by Marvin Scholz.

	* bin/autoreconf.in (autoreconf_current_directory): Do not error out
	  if gtkdocize is wanted but unavailable.

2026-01-27  Zack Weinberg  <zack@owlfolio.org>

	autoreconf: require word boundaries when grepping for macros (#111271)
	autoreconf’s first pass over configure.ac is effectively a grep
	operation for a number of macros that almost always appear directly
	in that file, if they’re going to appear at all.  All but one of the
	regular expressions made no attempt to check for word boundaries, and
	the one that did was doing it incorrectly (using ^ rather than \b),
	leading to issue #111271.

	Fix all the regexps to surround each identifier with \b…\b and not
	to use ^.

	Reported by Kip, originally as gettext bug #52424.

	* bin/autoreconf.in (autoreconf_current_directory): In the first pass,
	  require each of the macros we look for to be a complete word.

2026-01-27  Jan André Reuter  <j.reuter@fz-juelich.de>

	Ignore target feature flags in _AC_FC_LIBRARY_LDFLAGS (#111353)
	Ignore target specific feature flags passed via '-target-feature'.
	When encountered, ignore the flag passed after. These flags might
	contain a '-l', e.g. '-target-feature -lwp', causing non-existent
	libraries to be picked up, failing later checks, or the build of
	the application.

	This can e.g. be encountered when '-march=native' is passed to
	configure during a build with LLVM on Zen 4 machines.

	Reported by, and patch written by, Jan André Reuter <j.reuter@fz-juelich.de>.

	* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Skip arguments
	  immediately following ‘-target-feature’.

2026-01-27  Luke Mewburn  <Luke@Mewburn.net>

	doc: cross-reference m4 manual for regex syntax (#111095)
	The documentation of the various M4sugar macros that take regex
	arguments did not explain GNU M4’s idiosyncratic regex syntax, which
	resembles POSIX basic regexes but is not actually the same, nor is it
	the same as Emacs regexes.  Add cross-references to the GNU M4 manual
	to rectify this.

	Reported by Luke Mewburn <Luke@Mewburn.net>.
	Patch originally by Luke Mewburn, revised by Zack Weinberg.

	* doc/autoconf.texi: Add cross-references from the documentation of
	  ‘m4_bpatsubst’ and ‘m4_bregexp’ to the GNU M4 manual sections that
	  explain ‘patsubst’ and ‘regexp’.  Also add cross-references from
	  ‘m4_bmatch’ and ‘m4_bpatsubsts’ to ‘m4_bregexp’ and ‘m4_bpatsubst’
	  respectively.

2026-01-27  Paul Eggert  <eggert@cs.ucla.edu>

	Avoid trailing whitespace in config.h
	Problem (and earlier patch) reported by Collin Funk in:
	https://lists.gnu.org/archive/html/autoconf-patches/2025-10/msg00002.html
	* NEWS: Mention this.
	* lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE):
	Omit trailing white space from C macro definitions.
	* tests/torture.at (No trailing white space in macro definitions):
	New test.

2026-01-26  Zack Weinberg  <zack@owlfolio.org>

	Rename version.m4 to autoconf_version.m4.
	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 <https://savannah.gnu.org/support/?111007>.

	* 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.

2026-01-26  Zack Weinberg  <zack@owlfolio.org>

	lib/autom4te.in: Update Autoreconf-preselections.
	It looks like the trace list in autoreconf proper was updated several
	times without keeping this in sync.

2026-01-26  Bruno Haible  <bruno@clisp.org>

	autoreconf: Adapt to the on-disk situation after autopoint has run.
	Reported in <https://savannah.gnu.org/support/?111273>.

	* bin/autoreconf.in (autoreconf_current_directory): After invoking autopoint,
	rerun aclocal. When doing so, pass extra options "-I m4" if the configure.ac
	does not specify a macro dir.

2026-01-26  Bruno Haible  <bruno@clisp.org>

	autoreconf: Invoke autopoint in more situations.
	Reported in <https://savannah.gnu.org/support/?111272>.

	* bin/autoreconf.in (autoreconf_current_directory): Invoke autopoint also when
	the package uses AM_GNU_GETTEXT (without AM_GNU_GETTEXT_VERSION), AM_PO_SUBDIRS,
	AM_ICONV, AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS, AC_LIB_LINKFLAGS_FROM_LIBS,
	or GUILE_FLAGS.

2026-01-26  Zack Weinberg  <zack@owlfolio.org>

	Move more code out of shell traps into shell functions.
	Follow-up on 416b8f50c9bd4e38f9bc48b946505d2a18f6b1fd.

	* lib/autoconf/general.m4 (_AC_INIT_PREPARE): Emit function ac_exit_trap,
	  move remaining code from the 'trap 0' command to ac_exit_trap.

2026-01-09  Paul Eggert  <eggert@cs.ucla.edu>

	Fix quoting problem in Solaris commentary
	Problem reported by Nick Bowler in:
	https://lists.gnu.org/r/bug-autoconf/2026-01/msg00001.html

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

	maint: update all copyright dates via "make update-copyright"

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

	Update Solaris commentary

2025-11-20  Christian Feld  <c.feld@fz-juelich.de>  (tiny change)

	Fix bug in Fortran implicit int handling
	* lib/autoconf/fortran.m4 (_AC_FC_IMPLICIT_NONE):
	Fix typo in argument numbering.

2025-10-26  Jose E. Marchesi  <jemarch@gnu.org>

	Support for the Algol 68 language
	This patch adds support for the Algol 68 programming language to
	Autoconf.  It is based on the Algol 68 GCC front-end, which is
	currently under development [1].  The front-end is temporarily hosted
	in the sourceware forge until integration in GCC is completed [3].

	Note that the GCC Algol 68 front-end is not yet integrated in the main
	compiler, so it is developed and distributed off-tree.  See
	https://gcc.gnu.org/wiki/Algol68FrontEnd.  Additional information
	about the Algol 68 programming language, and how it is being evolved
	by the GNU Algol 68 Working Group can be found at
	https://algol68-lang.org.

	Automake support for Algol 68 has been already pushed as of 2 February
	2025.

	[1] https://gcc.gnu.org/wiki/Algol68FrontEnd
	[2] https://inbox.sourceware.org/gcc-patches/20250101020952.18404-1-jose.marchesi@oracle.com/T/#t
	[3] https://forge.sourceforge.org/gcc/gcc-a68

	    Add support for the Algol68 programming language.

	    * lib/autoconf/a68.m4: New file.
	    * lib/autoconf/autoconf.m4: Include autoconf/a68.m4.
	    * lib/autoconf/Makefile.am (dist_autoconflib_DATA): Add a68.m4.
	    * lib/freeze.mk (autoconf_m4f_dependencies): Add
	    $(src_libdir)/autoconf/a68.m4.
	    * doc/autoconf.texi: Rebuild menus.
	    (Preset Output Variables): Mention Algol 68.  Document A68FLAGS.
	    (Algol 68 Compiler): New subsection.
	    (Language Choice): Mention Algol 68.
	    (Generating Sources): Likewise.
	    (Running the Preprocessor): Likewise.
	    * tests/a68.at: New file.
	    * tests/suite.at: Include a68.at.
	    * tests/local.at (_AT_CHECK_ENV): Add A68 and A68FLAGS.
	    * NEWS: Update.

2025-10-15  Basil L. Contovounesios  <basil@contovou.net>  (tiny change)

	doc: fix AC_LANG_PROGRAM signature
	* doc/autoconf.texi (Generating Sources): Mark AC_LANG_PROGRAM
	arguments as optional to match its definition and common usage.

2025-08-30  Paul Eggert  <eggert@cs.ucla.edu>

	doc: improve sed doc
	* src/autoconf.texi: Modernize description of sed limitations.
	Prompted by a bug report by Daniel Locks in:
	https://lists.gnu.org/r/bug-autoconf/2025-08/msg00001.html

2025-08-07  Paul Eggert  <eggert@cs.ucla.edu>

	Port _AC_C_C99_TEST_MAIN to -Wc++-compat
	Problem reported by Vincent Lefevre in:
	https://lists.gnu.org/r/autoconf-patches/2025-08/msg00004.html
	* lib/autoconf/c.m4 (_AC_C_C99_TEST_MAIN):
	Don’t use malloc.

	Port _AC_C_C99_TEST_GLOBALS to -Wc++-compat
	Problem reported by Vincent Lefevre in:
	https://lists.gnu.org/r/autoconf-patches/2025-08/msg00004.html
	* lib/autoconf/c.m4 (_AC_C_C99_TEST_GLOBALS): and → aND.

2025-08-07  Vincent Lefevre  <vincent@vinc17.net>  (tiny change)

	Make _AC_C_C99_TEST_MAIN more robust with -Werror
	The current code fails with gcc r16-2729-g0d276cd378e and
	  -Werror=discarded-qualifiers -Werror=write-strings
	(the -Werror=write-strings is useful to check compatibility of
	user code with C++, and the -Werror=discarded-qualifiers is an
	upgrade of a default warning to an error). Since this is a test
	for C99, we may assume that const is supported by the compiler,
	and adding const makes the code more robust in this context.

2025-08-07  Paul Eggert  <eggert@cs.ucla.edu>

	Port AC_C_CONST to GCC 16 -Wunused-but-set-variable
	Problem reported by Vincent Lefevre in:
	https://lists.gnu.org/r/autoconf-patches/2025-08/msg00001.html
	https://lists.gnu.org/r/autoconf-patches/2025-08/msg00002.html
	* lib/autoconf/c.m4 (AC_C_CONST): Combine two tests, use
	the set variable, and don’t try to add 1 to a null pointer.

2025-07-28  Paul Eggert  <eggert@cs.ucla.edu>

	Quote $OLDPWD in doc
	Problem reported by Florian Weimer in:
	https://lists.gnu.org/r/autoconf/2025-07/msg00008.html

2025-07-27  Paul Eggert  <eggert@cs.ucla.edu>

	doc: update cd info
	* doc/autoconf.texi: Modernize and update description
	of cd gotchas.  Prompted by email from Farblos in:
	https://lists.gnu.org/r/autoconf/2025-07/msg00004.html

2025-07-18  Paul Eggert  <eggert@cs.ucla.edu>

	doc: omit confusing space before paren
	* doc/autoconf.texi: Set txidefnamenospace to avoid confusing spaces.
	Problem reported by Gavin Smith in:
	https://lists.gnu.org/r/autoconf/2025-07/msg00000.html

2025-06-25  Paul Eggert  <eggert@cs.ucla.edu>

	Document s/a/\n/ etc
	Problem reported by Bruno Haible in:
	https://lists.gnu.org/r/autoconf-patches/2025-06/msg00001.html
	* doc/autoconf.texi (Limitations of Usual Tools):
	Also mention escapes in replacement strings.
	While we’re at it, update -e and -f concatenation doc.

2025-05-26  Bruno Haible  <bruno@clisp.org>

	Fix trap quoting (regression 2024-08-04).
	* lib/autoconf/general.m4 (_AC_INIT_PREPARE): Emit functions ac_cache_dump,
	ac_dump_debugging_info. In the trap command, invoke ac_dump_debugging_info.
	(AC_CACHE_SAVE): Invoke ac_cache_dump instead of expanding _AC_CACHE_DUMP a
	second time.

2025-05-26  Bruno Haible  <bruno@clisp.org>
	    Paul Eggert  <eggert@cs.ucla.edu>

	AC_CHECK_DECL now ignores future Darwin functions
	* lib/autoconf/general.m4 (_AC_UNDECLARED_BUILTIN):
	Use shorter diagnostic, to be consistent with other changes.
	(_AC_FUTURE_DARWIN): New macro.
	(AC_CHECK_DECL): Require per-language _AC_FUTURE_DARWIN.
	Use $ac_c_future_darwin_options alongside with
	$ac_c_undeclared_builtin_options.
	* NEWS: Mention the fix.

2025-05-06  Paul Eggert  <eggert@cs.ucla.edu>

	More shell patterns to avoid
	* doc/autoconf.texi (Shell Pattern Matching):
	Improve on the recent discussion about brace expansion.

2025-05-06  Bruno Haible  <bruno@clisp.org>

	doc: Document another pitfall of shell pattern matching.
	* doc/autoconf.texi (Shell Pattern Matching): Mention non-portability of
	patterns with braces.

2025-04-20  Paul Eggert  <eggert@cs.ucla.edu>

	Fall back on busybox awk
	* lib/autoconf/programs.m4 (AC_PROG_AWK):
	Fall back 'busybox awk' of none of the other awks work.

2025-04-18  Paul Eggert  <eggert@cs.ucla.edu>

	Avoid grep in minimal configure
	* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE):
	Use ‘sed -n '$='’ instead of ‘grep -c’, since these
	are the only uses of grep in a minimal ‘configure’
	and we are already using sed elsewhere.

	config.status now checks for missing awk
	* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS):
	Diagnose missing awk and fail, rather than blundering on.

2025-04-17  Paul Eggert  <eggert@cs.ucla.edu>

	Improve list of 'configure' prereqs
	* doc/install.texi (Installation Prerequisites):
	Use a more-accurate list.

	Document that 'configure' needs awk etc
	Problem reported by Simon Josefsson in:
	https://lists.gnu.org/r/bug-gnulib/2025-04/msg00127.html
	* doc/install.texi (Installation Prerequisites): New section.

2025-04-07  Paul Eggert  <eggert@cs.ucla.edu>

	Fix AC_DEFINE_UNQUOTED regexp
	Problem reported by Eric Blake in:
	https://savannah.gnu.org/support/?111221
	* lib/autoconf/general.m4 (_AC_DEFINE_UNQUOTED): Fix typo that
	caused us to not use a here-document in some cases when we should.
	* tests/torture.at (Substitute and define special characters):
	Test for the bug.

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

	Port install_aux_file to OS/2
	* bin/autoreconf.in (install_aux_file): Port to OS/2,
	which does not allow file name operations on open files.
	Problem reported by KO Myung-Hun in:
	https://lists.gnu.org/r/autoconf-patches/2025-02/msg00001.html

2025-01-29  Paul Eggert  <eggert@cs.ucla.edu>

	Fix dependency issue for autoscan.list
	* lib/local.mk (lib/autoscan/autoscan.list):
	Depend on lib/autoconf/autoconf.m4f, not merely on its dependencies.

2025-01-29  Yann E. MORIN  <yann.morin@orange.com>  (tiny change)

	tests/local.mk: fix dependencies for generating the wrapper template
	Generating the tests wrapper template currently depends on the
	dependencies needed for the frozen lib/m4sugar/m4sh.m4f. However,
	it also requires that frozen sugar to actually be generated, or the
	build will fail if it is not (or at least if it is in the process of
	being generated).

	Change the dependency to actually depend on the generated file, rather
	than on its dependencies.

	This kind of failure has been noticed on highly parallel builds on very
	loaded machines.

2025-01-29  Paul Eggert  <eggert@cs.ucla.edu>

	Document AIX 7.3 find exec + bug
	* doc/autoconf.texi (Limitations of Usual Tools):
	Document AIX 7.3 bug with exit status of ‘find ... -exec ... +’.

	Update doc for POSIX, OS versions
	* doc/autoconf.texi: Some updates for newer POSIX and OS versions.
	Omit no-longer-relevant version numbers.

2025-01-16  Paul Eggert  <eggert@cs.ucla.edu>

	Port better to NVHPC
	See <https://savannah.gnu.org/support/?111172>.
	* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS):
	Ignore -l options with embedded '='.

2025-01-05  Markus Mützel  <markus.muetzel@gmx.de>

	Keep "-lmingwex" and "-lmoldname" in linker flags for MinGW
	It is needed when building Octave targeting Windows. Without it, the
	implementation of "casin" from the Windows runtime is used instead of
	the replacement from MinGW-w64.  That means that results for the
	"casin" function are wrong without that change.
	* lib/autoconf/fortran.m4: Do not remove "-lmingwex" or "-lmoldname"
	from the linker flags when targeting MinGW.  Removing "-lmingwex" causes
	an incorrect linker resolution for functions like "casin" for projects
	that consist of Fortran and C++ sources.  Removing "-lmoldname" causes
	issues for Fortran projects that try to use POSIX-like C functions
	without a '_' symbol prefix when targeting MinGW.

2025-01-05  Jack Kelly  <jack@jackkelly.name>

	AC_USE_SYSTEM_EXTENSIONS: Set _COSMO_SOURCE
	This enables extensions when compiling with Cosmopolitan Libc.
	https://justine.lol/cosmopolitan/
	* lib/autoconf/specific.m4: Define _COSMO_SOURCE.

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

	Fix test failure on macOS 15.1.1
	Problem reported by Sean Denny in:
	https://lists.gnu.org/r/bug-autoconf/2024-12/msg00001.html
	* doc/autoconf.texi (Limitations of Builtins):
	Document the macOS sh bug.
	* tests/base.at (AC_CACHE_CHECK):
	* tests/local.at: Use test -ot rather than ls -t, as POSIX
	requires the former to work reliably, but does not require the
	latter (POSIX does not require a stable sort for ls -t).
	Somewhat ironically, this should work around the macOS bug
	because the use of its buggy test -ot should increase the
	timestamp resolution to 1 s.

	maint: update all copyright dates via "make update-copyright"

2024-12-28  Paul Eggert  <eggert@cs.ucla.edu>

	Update timestamp doc
	* doc/autoconf.texi (Limitations of Usual Tools)
	(Timestamps and Make): Modernize discussion a bit,
	and give a downside of the GNU make approach.

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

	doc: mention tr issues in multi-byte locales
	* doc/autoconf.texi (tr): Mention multi-byte issues.

2024-12-02  R. Diez  <rdiez-2006@rd10.de>

	bootstrap: Disallow use of undefined shell variables, if possible.

2024-11-17  Paul Eggert  <eggert@cs.ucla.edu>

	Further improvements for C23 tests
	Problems reported by Bruno Haible in:
	https://lists.gnu.org/r/bug-gnulib/2024-11/msg00140.html
	https://lists.gnu.org/r/bug-gnulib/2024-11/msg00141.html
	https://lists.gnu.org/r/bug-gnulib/2024-11/msg00145.html
	* lib/autoconf/c.m4 (_AC_C_C23_TEST_GLOBALS):
	In use_u8, add parens to pacify GCC 15 -Wbool-compare,
	and use sizeof to make it a conforming integer constant expression.
	Do not test stdbit.h, as some current sort-of-C23 environments
	lack it and want to use options like -std=gnu23 on such platforms.
	Use null_pointer to pacify GCC -Wunused-const-variable.

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

	Fix comment typo re malloc
	Problem reported by Bruno Haible in:
	https://lists.gnu.org/r/bug-gnulib/2024-11/msg00048.html

2024-10-31  Paul Eggert  <eggert@cs.ucla.edu>

	Fix use of $3 in _AC_FUNC_MALLOC_IF etc
	Use m4_default in case $3 is omitted.
	Problem reported by Bruno Haible in:
	https://lists.gnu.org/r/bug-gnulib/2024-10/msg00284.html
	Also, use AS_CASE to defend against $3 containing macros
	that might be expaned.

2024-10-31  Bruno Haible  <bruno@clisp.org>

	AC_FUNC_MALLOC now guesses yes when cross-compiling
	The only platform that had this problem was native Windows,
	and MSVC's malloc sets errno since 2015 at least.

	* lib/autoconf/functions.m4 (AC_FUNC_MALLOC): Guess yes when
	cross-compiling.

2024-10-31  Paul Eggert  <eggert@cs.ucla.edu>

	Say malloc/realloc cache vars can have spaces

2024-10-29  Paul Eggert  <eggert@cs.ucla.edu>

	* functions.m4: Fix typos in previous change.

	Update ‘volatile’ doc for C23
	* doc/autoconf.texi (Volatile Objects): Update for C23.

	Match Gnulib INSTALL for quoting
	The manual was already using curved single quotes, so we
	might as well use curved double quotes and en and em dashes too.
	* doc/local.mk (AM_MAKEINFOFLAGS): Add ASCII_DASHES_AND_QUOTES=0,
	CHECK_NORMAL_MENU_STRUCTURE=1.
	* Makefile.am ($(srcdir)/INSTALL): Also use AM_MAKEINFOFLAGS.
	This matches Gnulib INSTALL’s quoting practice.

	Merge from Gnulib for malloc, realloc checking
	* lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF):
	Add 3rd argument for cross-guessing; all callers changed.
	Use ‘volatile’ so that compilers don’t second-guess.
	Also guess yes on gnu*, midipix*, midnightbsd*.

2024-10-26  Paul Eggert  <eggert@cs.ucla.edu>

	Go back to using “POSIX” not “Posix”
	In my Mon Oct 11 20:21:33 2004 +0000 commit when I standardized the
	spelling of various acronyms in documentation and comments I spelled
	it “Posix”.  However, it seems that “POSIX” has won out in practice
	(including my own practice!), so let’s change it back to “POSIX”.

	Remove some doc for no-longer-used systems; update URLs

	Document realloc (p, 0) gotchas
	* doc/autoconf.texi (Function Portability, Particular Functions):
	Don’t recommend realloc-gnu as it doesn’t (and probably shouldn’t)
	enforce glibc compatibility.  Document variance in glibc behavior.

2024-10-21  Paul Eggert  <eggert@cs.ucla.edu>

	Avoid some echo '...\...' gotchas
	Problem with AC_SUBST_FILE reported by Dylan Palauzov in:
	https://lists.gnu.org/r/bug-autoconf/2024-10/msg00018.html
	The other problems I found by a manual scan.
	* bootstrap: Use printf, not echo.
	* doc/autoconf.texi (Polymorphic Variables):
	* lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT):
	* lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT):
	* lib/autoconf/status.m4 (_AC_SUBST_FILES):
	* lib/autotest/general.m4 (AT_FINISH):
	Use AS_ECHO, not echo.

2024-09-28  Paul Eggert  <eggert@cs.ucla.edu>

	Mention autogen.sh sooner in doc
	* doc/install.texi (Basic Installation):
	Be more explicit about bootstrapping scripts
	not named ‘bootstrap’.  Problem reported by Gavin Smith in:
	https://lists.gnu.org/r/autoconf/2024-09/msg00003.html

2024-09-22  Paul Eggert  <eggert@cs.ucla.edu>

	doc: remove IRIX from manual
	* doc/autoconf.texi: Remove references to IRIX, except for the
	obsolete macro AC_IRIX_SUN.  IRIX has not been supported by its
	vendor since 2013, and is no longer a documented Autoconf target.

2024-09-05  Paul Eggert  <eggert@cs.ucla.edu>

	Give a URL for COPYING.EXCEPTION in notices
	This can be useful if the file is copied elsewhere
	but the COPYING.EXCEPTION file is not present at the destination.

2024-08-06  Paul Eggert  <eggert@cs.ucla.edu>

	Stop documenting Tru64
	* doc/autoconf.texi: Simplify manual by removing coverage of
	Ultrix, OSF/1, Tru64, and DEC Alpha.  HP stopped supporting the
	last release at the end of 2012, so this platform is long dead.
	(Long Lines in Makefiles, Tru64 Directory Magic): Remove.

	Improve coverage of ‘echo’ in manual
	In manual, prefer AS_ECHO or printf instead of echo,
	when that might make a difference.
	Don’t use ‘date >timestamp’, to avoid spurious diffs.
	* doc/autoconf.texi (Notices): No need to worry any more about
	RCS or CVS being used to maintain Autoconf.
	(Preset Output Variables): Say that ECHO_N etc. are obsolete.
	(Automatic Remaking): Remove obsolescent mention of CVS.
	(AS_ECHO): Mention that AS_ECHO expands to something involving “'”,
	and how to work around this (rare) issue.
	(Shell Substitutions, Slashes, Limitations of Builtins): Omit
	no-longer-relevant discussion about ancient shell bugs that
	involved a lot of ‘echo’s that would otherwise need to be
	replaced.
	(Limitations of Builtins): Don’t mention ‘echo "x$word"’ trick, as
	it doesn’t resist backslashes.  Just use printf.  Expand on
	discussion of ‘echo’ options.  Say that even modernish shells (e.g.,
	ksh93 on OmniOS) sometimes screw up with here-documents.
	(Making testsuite Scripts): Simplify $(srcdir)/package.m4
	rule by using printf instead of echo, and defend against
	some shell metacharacters in $(srcdir).

	More defense against bad echo
	* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS)
	(_AC_ARG_VAR_VALIDATE):
	Defend against ‘echo’ interpreting ‘\’ or leading ‘-’.
	(_AC_EVAL, _AC_EVAL_STDERR): Add to comment yet another reason
	that these macros are obsolete and should be removed.  There’s no
	point trying to change them as that’s more likely to hurt than
	help the (zero?) callers who still use them.

	Allow shell metachars in CONFIG_STATUS
	* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS, _AC_INIT_PREPARE):
	* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE)
	(_AC_OUTPUT_FILE, _AC_OUTPUT_HEADERS_PREPARE, AC_OUTPUT)
	(_AC_OUTPUT_CONFIG_STATUS):
	Work even if $CONFIG_STATUS contains shell metacharacters,
	leading ‘-’, or no ‘/’.

	Support more special chars in $(LIBDIR) etc
	* lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF):
	* lib/autoconf/programs.m4 (AC_PROG_MAKE_SET):
	Allow more special characters in ‘make’ macros like LIBDIR and MAKE.

	Minor AC_FUNC_SELECT_ARGTYPES speedups
	* lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES):
	Don’t use ‘sed 's/\*/\*/g'’, which is a no-op.
	Don’t use ‘echo’ either.

	Don’t mishandle ‘\’ in VERSION
	This is minor, it’s just allowing more chars (though not all)
	in $(VERSION).
	* Makefile.am (edit, top_srcdir.version, dist-hook)
	(check-coverage-report):
	* man/local.mk (VERSION):
	Work even if VERSION contains ‘\’.

	Follow own advice about \ in shell double-quoted strings
	* lib/autoconf/headers.m4 (_AC_HEADERS_EXPANSION):
	* lib/m4sugar/m4sh.m4 (AS_ECHO):
	Go back to using '%s\n' instead of "%s\n".
	(AS_VAR_GET): Work around the quoting problem by using printf
	directly with "%s\\n" instead of AS_ECHO; this is safe now that we
	assume printf.

2024-08-03  Paul Eggert  <eggert@cs.ucla.edu>

	Fix typos in previous $@ doc change
	Problem reported in <https://savannah.gnu.org/support/?111102>.

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

	Port to AIX 7.2 ksh93
	Problem reported in <https://savannah.gnu.org/support/?111102>.
	* lib/autotest/general.m4:
	* lib/m4sugar/m4sh.m4 (_AS_REEXEC_WITH_SHELL):
	* tests/wrapper.as:
	Port to AIX 7.2 ksh93, whidh mishandles ${1+"$@"}, by not using
	that construct.

2024-07-17  Zack Weinberg  <zack@owlfolio.org>

	Fix syntax-check complaints
	One complaint is correct: house style is “file system” not “filesystem.”

	The other one is bogus: sc_two_space_separator_in_usage gets a false
	positive on gendocs.sh, which isn’t even our code.  I tried to exclude
	just that file using exclude_file_name_regexp but it didn’t immediately
	work and my patience for debugging maint.mk is nil.

2024-07-17  Zack Weinberg  <zack@owlfolio.org>

	Adjust set size correctly in all cases of m4_set_add_all.
	Both the recursive and the iterative versions of m4_set_add_all had a
	bug where they did not update the set size correctly if the set
	contained tombstones.  I guess m4_set_remove isn’t used that often.
	(I found this bug by accident while investigating an unrelated thing.)

	The root cause of the bug was that in the tombstone case we had two
	different layers quarreling over who got the last word on the size of
	the set: m4_set_add, called for each value argument, was updating the
	set size for each actual addition, and then the outer expansion of
	m4_set_add_all was clobbering those updates with a calculation based
	on the number of times the loop evaluated to a ‘-’ character, which
	in the tombstone case was always zero.

	The fix is to not mess with the set size on each actual addition,
	relying on the outer calculation in all cases.  Most of the volume
	of the patch is refactoring to eliminate all the duplicate copies of
	the “add this element only if it isn’t already there” logic which were
	confusing the issue.

	I also made m4_set_add_all not go into an infinite loop if invoked
	with fewer than two arguments.  Possibly it should error out in this
	case instead of silently doing nothing, but I don’t think it matters
	very much.

	* lib/m4sugar/m4sugar.m4 (_m4_set_add, _m4_set_add_clean):
	  New macros, factoring out common “add element to set” logic.
	  (m4_set_add): Redefine using _m4_set_add.
	  (_m4_set_add_all): Rename to _m4_set_add_all_clean; use _m4_set_add_clean.
	  (_m4_set_add_check): Use _m4_set_add, not m4_set_add; emit a string
	  of dashes as _m4_set_add_all_clean does.
	  (m4_set_add_all): Update to match renamed _m4_set_add_all_clean.
	  Do nothing if invoked with fewer than two arguments.

	* lib/m4sugar/foreach.m4: Define variants of _m4_set_add_all_clean and
	  _m4_set_add_all_check, matching the behavior of the definitions in
	  m4sugar.m4.  Do not define m4_set_add_all here.

	* tests/m4sugar.at (m4_set): Add more tests of interaction among
	  m4_set_add_all, m4_set_remove, and m4_set_size.

2024-07-17  Zack Weinberg  <zack@owlfolio.org>

	Quote separators in foreach.m4 version of m4_joinall.
	The entire output of m4_joinall is supposed to be quoted, including
	separators, but the foreach.m4 implementation (used with M4 1.4.x)
	was missing some quotes, and we didn’t notice because the test suite
	wasn’t thorough enough.  Fix.

	* lib/m4sugar/foreach.m4 (m4_joinall): Quote each separator as it’s
	  emitted.
	* tests/m4sugar.at (m4_join test): Expand tests of both m4_join and
	  m4_joinall.

2024-07-17  Zack Weinberg  <zack@owlfolio.org>

	Add a FLAGS argument to AT_CHECK_M4SUGAR_TEXT.
	This is not actually used within the testsuite at present, but is
	handy for troubleshooting m4sugar tests.  For instance, you can pass
	-v to a specific autom4te invocation and get told the underlying m4
	invocation.

	* tests/m4sugar.at (AT_CHECK_M4SUGAR_TEXT): Add fourth argument
	  FLAGS which specifies additional command line arguments to pass to
	  autom4te.

2024-07-17  Zack Weinberg  <zack@owlfolio.org>

	Emit compat shims less often for old AS_ECHO implementation details.
	The shell variables $as_echo and $as_echo_n and the substitution
	variables @ECHO_C@, @ECHO_N@, and @ECHO_T@ are implementation
	details of the old implementation of AS_ECHO and AS_ECHO_N
	(2.69-era; before the switch to use ‘printf’).  We continue
	to provide them for compatibility with various third-party macros and
	Makefiles that used them, even though, as far as I can tell, they were
	never documented.  (Someone made ECHO_C etc. substitution variables on
	purpose, though.)

	For $as_echo and $as_echo_n, we can tell precisely when they are
	needed, because all uses are exposed to M4 macro expansion.
	Therefore, emit the necessary support code on first use and not
	from AS_INIT.  As a side effect this means the -Wobsolete warning
	only appears on the first use of each, which IMHO is polite.

	For @ECHO_C@, @ECHO_N@, and @ECHO_T@, we have no way of knowing
	whether a substitution variable is used, but we *do* know that
	substitution variables are exclusively a configure.ac thing, so their
	support code can be moved to general.m4 and emitted from AC_INIT
	rather than from AS_INIT.

	(It’s faintly possible that someone decided to use $ECHO_C in an
	Autotest script but considering how rare it is for people to use
	Autotest at all, or any other non-Autoconf application of M4sh,
	I think we can worry about that when we hear about it.)

	* lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE): Removed.
	  (AS_PREPARE, _AS_PREPARE): Don’t use _AS_ECHO_N_PREPARE.
	  (_as_echo_var_prepare, _as_echo_n_var_prepare): New macros which
	  emit the -Wobsolete warning and the support code for $as_echo and
	  $as_echo_n respectively.
	  (as_echo, as_echo_n): Move to bottom of the block that sets up
	  the current implementation of AS_ECHO.  Invoke _as_echo_var_prepare
	  and _as_echo_n_var_prepare, respectively, on first use.

	* lib/autoconf/general.m4 (_AC_INIT_ECHO_N): New internal macro,
	  contains the probe code that used to be in _AS_ECHO_N_PREPARE.
	  AC_SUBSTs ECHO_C, ECHO_N, and ECHO_T.
	  (AC_INIT): Don’t AC_SUBST ECHO_C, ECHO_N, and ECHO_T here.
	  Invoke _AC_INIT_ECHO_N.

2024-07-16  Bruno Haible  <bruno@clisp.org>

	Port AC_PROG_OBJC to RHEL 9
	* lib/autoconf/c.m4 (AC_PROG_OBJC): Search for gobjc before gcc.
	* NEWS: Mention the change.

2024-07-16  Paul Eggert  <eggert@cs.ucla.edu>

	Detect Android 5.0 strnlen bug
	This is useful for GNU Emacs, which still ports to that
	old Android version.  The change here is imported from Gnulib.
	* lib/autoconf/functions.m4 (AC_FUNC_STRNLEN):
	Also detect Android 5.0 bug.  Use AC_COMPILE_IFELSE rather
	than AC_CANONICAL_HOST for cross-compile test.

2024-07-05  Paul Eggert  <eggert@cs.ucla.edu>

	doc: mention ACLOCAL_AMFLAGS and #
	* doc/autoconf.texi: Mention that ACLOCAL_AMFLAGS
	cannot use makefile comments.  Problem reported by
	Collin Funk in:
	https://lists.gnu.org/r/bug-gnulib/2024-06/msg00005.html

2024-06-23  Zack Weinberg  <zack@owlfolio.org>

	autoconf.texi: Don’t say that Darwin is “derived from FreeBSD.”
	This is an oversimplification and is probably going to cause
	more confusion than it solves.

	The commit which added this text was attributed to Sevan Janiyan,
	but the text itself was written by me (Zack Weinberg); I revised
	the patch but did not remember to also revise the commit message.

2024-06-23  Zack Weinberg  <zack@owlfolio.org>

	autoconf.texi: Move ‘Systemology’ to ‘Portable Shell Programming’ section.
	It’s not an ideal fit in this location, but it’s better here than
	where it was (jammed in the middle of ‘Writing Tests’).

	Add ‘shell.nix’ defining Autoconf’s build dependencies in NixOS terms.
	Like the existing ‘manifest.scm’, which does the same job for GNU Guix,
	the point of this file is to facilitate testing Autoconf itself on NixOS:
	‘nix-shell --pure shell.nix’ gives you an interactive shell with all
	the necessary tools in $PATH, and nothing else.

2024-06-23  Sevan Janiyan  <venture37@geeklan.co.uk>

	doc/autoconf.texi (Systemology): Update Darwin.
	Catch up with changes in Darwin since 2002 when the section was added.

2024-06-23  KO Myung-Hun  <komh78@gmail.com>

	bootstrap: Allow 'ln -s' to be overridden by the user.
	For example, one might set LN_S=cp when working on an
	OS or filesystem that does not support symbolic links.

	* bootstrap: Honor $LN_S environment variable, defaulting
	  to 'ln -s'.

2024-06-18  Paul Eggert  <eggert@cs.ucla.edu>

	Improve wording for Y2038 and largefile probes
	Problem reported by Bruno Haible in:
	https://lists.gnu.org/r/bug-gnulib/2024-06/msg00181.html
	* lib/autoconf/specific.m4 (_AC_SYS_YEAR2038_PROBE)
	(_AC_SYS_LARGEFILE_PROBE): Improve wording of chatter.

2024-06-15  Paul Eggert  <eggert@cs.ucla.edu>

	Process C23 #elifdef and #elifndef
	Inspired by Collin Funk’s suggestion in:
	https://lists.gnu.org/r/autoconf-patches/2024-06/msg00000.html
	* bin/autom4te.in (handle_output):
	* bin/autoscan.in, bin/ifnames.in (scan_c_file):
	Also recognize #elifdef and #elifndef.
	* tests/tools.at (ifnames): Test it for ifnames.

2024-06-01  Paul Eggert  <eggert@cs.ucla.edu>

	Document Solaris ‘make’ glitch with ‘!’
	* doc/autoconf.texi (Failure in Make Rules):
	Document that there are some complicated exceptions to
	the idea that sh -e exits if any subcommand fails.
	(Command Line Prefixes): New section.

2024-05-28  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CXX no longer adjusts C++ language version
	* lib/autoconf/c.m4 (_AC_CXX_CXX98_TEST_GLOBALS)
	(_AC_CXX_CXX98_TEST_MAIN, _AC_CXX_CXX11_TEST_GLOBALS)
	(_AC_CXX_CXX11_TEST_MAIN, _AC_CXX_CXX98_TEST_PROGRAM)
	(_AC_CXX_CXX11_TEST_PROGRAM, _AC_CXX_CXX14_TEST_PROGRAM)
	(_AC_CXX_CXX17_TEST_PROGRAM, _AC_CXX_CXX20_TEST_PROGRAM)
	(_AC_CXX_CXX23_TEST_PROGRAM, _AC_CXX_CXX98_OPTIONS)
	(_AC_CXX_CXX11_OPTIONS, _AC_CXX_CXX14_OPTIONS)
	(_AC_CXX_CXX17_OPTIONS, _AC_CXX_CXX20_OPTIONS)
	(_AC_CXX_CXX23_OPTIONS, _AC_PROG_CXX_STDCXX_EDITION_TRY)
	(_AC_PROG_CXX_STDCXX_EDITION_TRY): Remove.  All uses removed.

2024-05-26  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CXX now tries C++23, C++20, C++17, C++14
	The recent glitch with C++11 underscores the fact that it’s
	long past time for Autoconf to catch up with the C++ standards.
	Add simple tests for each iteration of the C++ standard.
	They can be improved later as needed.  When testing for these
	newer standards, do not also test for features required by earlier
	standards, as this isn’t all that helpful, leads to an O(N**2)
	growth of ‘configure’, and can result in problems such as the
	C++11 vs C++20 bug recently fixed.
	* lib/autoconf/c.m4 (_AC_CXX_CXX14_TEST_PROGRAM)
	(_AC_CXX_CXX17_TEST_PROGRAM, _AC_CXX_CXX20_TEST_PROGRAM)
	(_AC_CXX_CXX23_TEST_PROGRAM, _AC_CXX_CXX14_OPTIONS)
	(_AC_CXX_CXX17_OPTIONS, _AC_CXX_CXX20_OPTIONS)
	(_AC_CXX_CXX23_OPTIONS): New macros.
	(_AC_C_C23_TEST_PROGRAM, _AC_C_C23_OPTIONS): New macros.
	(_AC_PROG_CC_STDC_EDITION): Try C23 first.
	(_AC_PROG_CXX_STDCXX_EDITION): Use them.

	Port C11 test to C++20
	Trivial fix suggested by Peter Johansson in:
	https://lists.gnu.org/r/autoconf/2024-05/msg00004.html
	* lib/autoconf/c.m4 (_AC_CXX_CXX11_TEST_MAIN):
	Do not test assigning u8"..." to char const *, as this
	runs afoul of C++20.

2024-05-15  Alyssa Ross  <hi@alyssa.is>

	AC_FUNC_MALLOC: fix cross compilation to musl
	This check returned yes for me on musl 1.2.3 on
	aarch64-unknown-linux-musl.

2024-04-30  Paul Eggert  <eggert@cs.ucla.edu>

	Improve VLA wording in NEWS
	Thanks to a suggestion by Werner Lemberg in:
	https://lists.gnu.org/r/autoconf/2024-04/msg00009.html

	Mention C keywords in NEWS
	Thanks to Alan Coopersmith for mentioning this in:
	https://lists.gnu.org/r/autoconf/2024-04/msg00011.html

	AC_PROG_CC now tries C23 too
	As C23 is now mostly supported by GCC, it's time for
	AC_PROG_CC to prefer C23 if available.
	* lib/autoconf/c.m4 (_AC_C_C23_TEST_GLOBALS, _AC_C_C23_TEST_MAIN):
	(_AC_C_C23_TEST_PROGRAM, _AC_C_C23_OPTIONS): New macros.
	(_AC_PROG_CC_STDC_EDITION): Try C23 first.

	Port better to MSVC
	Problems reported by Antonin Décimo in:
	https://lists.gnu.org/r/autoconf/2024-04/msg00001.html
	* lib/autoconf/c.m4 (_AC_C_C89_TEST_GLOBALS):
	Do not test the value of __STDC__.
	(_AC_C_C99_TEST_MAIN): Do not test for VLAs.
	(_AC_C_C11_OPTIONS): Also test -std:c11.

	Fix doc typo with " {"
	Problem reported by Brad Smith
	<https://savannah.gnu.org/support/?111054>.

2024-04-25  Paul Eggert  <eggert@cs.ucla.edu>

	Adjust tests to match new Automake files
	* tests/m4sugar.at (bad categories): Adjust test cases
	to match changed behavior of files copied from Automake.

	make fetch

2024-04-24  Paul Eggert  <eggert@cs.ucla.edu>

	Port AC_SYS_LARGEFILE to C++
	Problem reported by Zack Weinberg
	<https://savannah.gnu.org/support/?110983>.
	* lib/autoconf/specific.m4 (_AC_SYS_YEAR2038_PROBE)
	(_AC_SYS_LARGEFILE_PROBE):
	In chatter, say it’s a CPPFLAGS option, not a CC option.
	(_AC_SYS_LARGEFILE_OPTIONS): Omit -n32, as we no longer
	need to worry about IRIX.
	(_AC_SYS_LARGEFILE_PROBE): Fiddle with CPPFLAGS, not CC,
	and don’t worry about -n32.

2024-04-06  Paul Eggert  <eggert@cs.ucla.edu>

	Improve “possibly undefined macro” diagnostic
	Simplified version of a suggestion by Reuben Thomas in:
	https://lists.gnu.org/r/bug-autoconf/2024-04/msg00021.html
	* bin/autom4te.in (warn_forbidden): Change message wording.
	* tests/tools.at (autom4te and whitespace in file names)
	(forbidden tokens, exceptions): Adjust tests to match new behavior.

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

	Remove incorrect check in AC_CHECK_SIZEOF
	* lib/autoconf/types.m4 (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF):
	When the size or alignment cannot be determined, do not fail if
	ac_cv_type_$1 is yes, as there’s no guarantee that ac_cv_type_$1
	is defined, and failure here would contradict the documentation
	that the size or alignment is 0 when sizeof($1)/alignof($1) cannot
	be compiled.  The test for ac_cv_type_$1 made sense long ago when
	it was checked for in these macros, but the test has not made
	sense for many years.

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

	Document ‘cp’ limitations better
	* doc/autoconf.texi (Limitations of Usual Tools):
	Modernize discussion of ‘cp’.

2024-01-17  Paul Eggert  <eggert@cs.ucla.edu>

	Fix typo in previous patch

2024-01-16  Paul Eggert  <eggert@cs.ucla.edu>

	Fix ‘long long’ checks on ancient platforms
	Problem reported by Nick Bowler in:
	https://lists.gnu.org/r/bug-autoconf/2024-01/msg00018.html
	* lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT)
	(AC_TYPE_UNSIGNED_LONG_LONG_INT): Test for these
	when K&R or c89, not when neither K&R nor C89.
	This fixes a thinko that I introduced in
	commit cdef0d2dad57f92301cb4baf782f8c24b01d5f1d
	dated Wed Feb 16 01:29:40 2011 -0800.

	make fetch

2024-01-10  Paul Eggert  <eggert@cs.ucla.edu>

	doc: mention join bug
	* doc/autoconf.texi: Mention BSD ‘join’ bug
	<https://lists.gnu.org/r/bug-gnulib/2024-01/msg00028.html>.

2024-01-05  Jim Meyering  <meyering@meta.com>

	maint: update all copyright dates via "make update-copyright"

2023-12-22  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.

	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>

	Improve OS version commentary
	* lib/autoconf/specific.m4: Improve comments about which
	OS releases need -D_LARGE_FILES, -n32, _ALL_SOURCE.

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

	Restore *_REQUIRED macros
	As per:
	https://lists.gnu.org/r/autoconf-patches/2022-12/msg00004.html

2022-12-26  Todd C. Miller  <Todd.Miller@sudo.ws>  (tiny change)

	fix AC_CHECK_HEADER_STDBOOL regression
	Commit 6dcecb780a69bd208088d666b299e92aa7ae7e80 "Port
	AC_CHECK_HEADER_STDBOOL to C23" causes AC_CHECK_HEADER_STDBOOL to
	always fail, even on systems with a conforming stdbool.h.

	There is no longer an 'a' variable so it should not be referenced
	in the return statement.

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

	Omit just-added *_REQUIRED macros
	They are not needed for Gnulib, and users have an easy way to get
	their effect, so for now omit them and just document the easy way.
	Also, redo documentation to make it clear that AC_YEAR_2038 is
	like AC_SYS_LARGEFILE except with a different year-2038 default.
	* NEWS, doc/autoconf.texi: Document the above.
	* lib/autoconf/specific.m4 (AC_SYS_YEAR2038_REQUIRED):
	(AC_SYS_LARGEFILE_REQUIRED): Remove.  Remove some support code.
	Perhaps further simplification could be done but I quit while
	I was ahead.

2022-12-25  Zack Weinberg  <zack@owlfolio.org>

	AC_SYS_LARGEFILE: Don’t enlarge time_t by default
	Having AC_SYS_LARGEFILE enlarge time_t means that any program that has
	already requested large file support will be abruptly migrated to
	64-bit time_t (on 32-bit systems) as soon as its configure script is
	regenerated with a sufficiently new Autoconf.  We’ve received reports
	of several widely used programs and libraries that are not prepared
	for this migration, with breakage ranging from annoying (garbage
	timestamps in messages) through serious (binary compatibility break
	in security-critical shared library) to catastrophic (on-disk data
	corruption).

	Partially revert f6657256a37da44c987c04bf9cd75575dfca3b60: in the
	absence of AC_SYS_YEAR2038, AC_SYS_LARGEFILE will now only add an
	--enable-year2038 command line option to configure.  If this option is
	used, time_t will be enlarged, allowing people to experiment with the
	migration without needing to *edit* the configure script in question,
	only regenerate it.

	In the process, AC_SYS_LARGEFILE and AC_SYS_YEAR2038 were drastically
	overhauled for modularity; it should now be much easier to add support
	for platforms that offer large off_t / time_t but not with the standard
	feature selection macros.  Also, new macros AC_SYS_LARGEFILE_REQUIRED and
	AC_SYS_YEAR2038_REQUIRED can be used by programs for which large off_t /
	time_t are essential.

	The implementation is a little messy because it needs to gracefully
	handle the case where AC_SYS_LARGEFILE and AC_SYS_LARGEFILE_REQUIRED
	are both used in the same configure script — or, probably more common,
	AC_SYS_LARGEFILE (which invokes _AC_SYS_YEAR2038_OPT_IN) followed by
	AC_SYS_YEAR2038 — but if macro B is invoked after macro A, there’s no
	way for B to change *what macro A expanded to*.  The best kludge I
	managed to find is to AC_CONFIG_COMMANDS_PRE as a m4-level hook that
	sets shell variables in an early diversion.

	* lib/autoconf/functions.m4 (AC_FUNC_FSEEKO): Rewrite to avoid dependency
	  on internal subroutines of AC_SYS_LARGEFILE.

	* lib/autoconf/specific.m4 (_AC_SYS_YEAR2038_TEST_INCLUDES): Renamed to
	  _AC_SYS_YEAR2038_TEST_CODE.
	  (_AC_SYS_YEAR2038): Refactor into subroutines: _AC_SYS_YEAR2038_OPTIONS,
	  _AC_SYS_YEAR2038_PROBE, _AC_SYS_YEAR2038_ENABLE.
	  (AC_SYS_YEAR2038): Update for refactoring.
	  (_AC_SYS_YEAR2038_OPT_IN): New sorta-top-level macro, for use by
	  AC_SYS_LARGEFILE, that probes for large time_t only if the
	  --enable-year2038 option is given.
	  (AC_SYS_YEAR2038_REQUIRED): New top-level macro that insists on
	  support for large time_t.

	  (_AC_SYS_LARGEFILE_TEST_INCLUDES): Renamed to _AC_SYS_LARGEFILE_TEST_CODE.
	  (_AC_SYS_LARGEFILE_MACRO_VALUE, AC_SYS_LARGEFILE): Refactor along same
	  lines as above: _AC_SYS_LARGEFILE_OPTIONS, _AC_SYS_LARGEFILE_PROBE,
	  _AC_SYS_LARGEFILE_ENABLE.  Invoke _AC_SYS_YEAR2038_OPT_IN at end of
	  _AC_SYS_LARGEFILE_PROBE.  MinGW-specific logic moved to YEAR2038
	  macros as it has nothing to do with large file support.
	  (AC_SYS_LARGEFILE_REQUIRED): New top-level macro that insists on
	  support for large off_t.

	* tests/local.at (_AT_CHECK_ENV): Also allow changes in CPPFLAGS,
	  enableval, enable_*, withval, with_*.

	* doc/autoconf.texi, NEWS: Update documentation to match above changes.
	  Fix typo in definition of @dvarv.

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

	Move NEWS entry to better location

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

	Document C23 <stdckdint.h>

	Use UTF-8 and spell "François" correctly

	AC_USE_SYSTEM_EXTENSIONS now enables C23 Annex F
	* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
	Also define __STDC_WANT_IEC_60559_EXT__, for C23.

2022-11-16  Paul Eggert  <eggert@cs.ucla.edu>

	Cater better to underquoted callers
	Problem reported by Frederic Berat in:
	https://lists.gnu.org/r/autoconf/2022-11/msg00092.html
	* lib/autoconf/c.m4 (AC_LANG_CALL(C)): Omit comma in comment,
	which triggers bugs in underquoted callers.

2022-11-12  Bruno Haible  <bruno@clisp.org>

	Fix misspelled NEWS entry

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

	Modernize and regularize doc for C89 etc.
	In documentation and comments, prefer the more-common “C89” to the
	equivalent “C90”, and use 2-digit years for C standards as that’s
	common usage.  Remove some confusing old doc for pre-C89 systems,
	as Autoconf assumes C89 or later.  Mention C17 and C23 briefly.
	Improve doc for malloc, realloc.

2022-11-10  Zack Weinberg  <zackw@panix.com>

	More fixes for compilers that reject K&R function definitions.
	This fixes all of the remaining failures exposed by running the
	testsuite with GCC 12 and
	CC='cc -Wimplicit-function-declaration -Wold-style-definition
	       -Wimplicit-int -Werror'
	.

	* lib/autoconf/c.m4 (_AC_C_C89_TEST_GLOBALS): Don’t use K&R function
	  definitions.
	* lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise.
	  (AC_FUNC_MKTIME): Declare functions taking no arguments as ‘fn (void)’
	  not ‘fn ()’.
	* lib/autoconf/c.m4 (_AC_C_C99_TEST_GLOBALS): Declare free().

2022-10-28  Paul Eggert  <eggert@cs.ucla.edu>

	Warn about TMPDIR
	* doc/autoconf.texi (Initialization Macros): Warn about
	setting TMPDIR, following up on this Paul Smith remark:
	https://lists.gnu.org/r/autoconf/2022-10/msg00024.html

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

	MKDIR_P now falls back on mkdir -p
	* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P):
	Fall back on mkdir -p instead of on a relative path to
	install-sh, as the latter now seems to be more of a problem
	than the former.

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

	Update M4 version numbers in documentation

2022-09-30  Xi Ruoyao  <xry111@xry111.site>  (tiny change)

	Fix testsuite failures with bash 5.2.
	Bash v5.2 includes several new optimizations to the number of
	subshells used for various constructs; as a side effect, the value of
	SHLVL is less stable than it used to be.  Add SHLVL to the list of
	built-in shell variables with unstable values, to be ignored when
	checking for inappropriate differences to the shell environment
	before and after a macro invocation / between two configure runs.

	Problem and solution reported by Xi Ruoyao in
	https://lists.gnu.org/archive/html/autoconf/2022-09/msg00015.html
	Problem also reported by Bruce Dubbs in
	https://lists.gnu.org/archive/html/bug-autoconf/2022-09/msg00010.html

	* tests/local.at (_AT_CHECK_ENV, AT_CONFIG_CMP): Ignore changes in
	  value of SHLVL.

2022-09-18  Paul Eggert  <eggert@cs.ucla.edu>

	Mention latest change in NEWS

2022-09-17  Paul Eggert  <eggert@cs.ucla.edu>

	Improve comment in previous change

2022-09-17  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)

	Allow users to clear BINSH
	Problem and solution reported by Roger Crew in:
	https://lists.gnu.org/r/bug-autoconf/2022-09/msg00005.html
	* lib/m4sugar/m4sh.m4 (_m4_divert(BINSH)): Change from 0 to 1,
	and add 2 to HEADER-REVISION, HEADER-COMMENT, HEADER-COPYRIGHT,
	M4SH-SANITIZE, M4SH-INIT-FN, and M4SH-INIT.

2022-09-09  Sergei Trofimovich  <slyich@gmail.com>  (tiny change)

	autoconf: store autom4te request keys in sorted order
	Notced unstable key order when debugging unrelated bug.
	Data::Dumper's SortKeys() makes ordering stable and decreases
	diffs from run to run. No functional change otherwise.

	* lib/Autom4te/C4che.pm
	* lib/Autom4te/Request.pm: Sort request keys in serialization.

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

	Port to GNU make 4.4
	* cfg.mk (PATH): Assign eagerly, and simplify shell use, avoiding
	use of the shell entirely if PWD is set, as it should be.
	Problem reported by Sergei Trofimovich in:
	https://lists.gnu.org/r/autoconf-patches/2022-09/msg00007.html

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

	Port to compilers that moan about K&R func decls
	* lib/autoconf/c.m4 (AC_LANG_CALL, AC_LANG_FUNC_LINK_TRY):
	Use '(void)' rather than '()' in function prototypes, as the latter
	provokes fatal errors in some compilers nowadays.
	* lib/autoconf/functions.m4 (AC_FUNC_STRTOD):
	* tests/fortran.at (AC_F77_DUMMY_MAIN usage):
	* tests/semantics.at (AC_CHECK_DECLS):
	Don’t use () in a function decl.

2022-08-25  Paul Eggert  <eggert@cs.ucla.edu>

	Remove obsolete Solaris info from manual
	Don't mention anything about Solaris 9 or older,
	as Oracle no longer supports those old versions
	and the obsolete info merely clutters the manual.

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

	Improve doc for AC_SYS_LARGEFILE etc.

2022-08-13  Paul Eggert  <eggert@cs.ucla.edu>

	Port AC_CHECK_HEADER_STDBOOL to C23
	Modernize the bool documentation a bit too.
	* lib/autoconf/headers.m4 (AC_CHECK_HEADER_STDBOOL):
	Allow C23 too.

2022-08-09  Paul Eggert  <eggert@cs.ucla.edu>

	AC_SYS_LARGEFILE now widens time_t if possible
	This change is taken from Gnulib, and is needed for apps like GDB.
	* lib/autoconf/specific.m4 (_AC_SYS_YEAR2038_TEST_INCLUDES)
	(_AC_SYS_YEAR2038, AC_SYS_YEAR2038): New macros, taken (with
	renaming) from Gnulib.
	(_AC_SYS_LARGEFILE_MACRO_VALUE): #undef before #define.
	(AC_SYS_LARGEFILE): Prefer AS_IF and AS_CASE to doing it by hand.
	Widen time_t if possible, too.  Define  __MINGW_USE_VC2005_COMPAT
	early if needed.

	Fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
	This should render unnecessary Gnulib’s gl_SET_LARGEFILE_SOURCE hack
	https://lists.gnu.org/r/bug-gnulib/2019-12/msg00046.html
	* lib/autoconf/functions.m4 (AC_FUNC_FSEEKO):
	On that platform, simply set _LARGEFILE_SOURCE.

2022-07-27  Paul Eggert  <eggert@cs.ucla.edu>

	Port AC_C_BIGENDIAN to cross gcc -std=c11 -flto
	* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Improve the
	inherently-unportable grep trick well enough to survive gcc
	-std=c11 -flto when cross-compiling (sr#110687).

2022-07-21  Paul Eggert  <eggert@cs.ucla.edu>

	basename and dirname are portable now
	* doc/autoconf.texi (Limitations of Usual Tools):
	basename and dirname are portable shell commands now.

2022-07-14  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)

	Handle z/OS Unix ‘set’ output
	Problem and fix reported by Jeff Shimoda in:
	https://lists.gnu.org/r/autoconf-patches/2022-06/msg00007.html
	* tests/local.at (AT_CONFIG_CMP): Treat ‘var=""’ like ‘var=''’.

2022-07-10  Zack Weinberg  <zackw@panix.com>

	Fix testsuite failures on Darwin (aka macOS).
	Tests of AC_{CHECK_,}HEADER_STDBOOL were failing on Darwin for two
	reasons: an m4 quoting bug in tests/local.at causing Darwin sed to
	throw syntax errors, and an excessively precise interpretation of how
	C99 and C++11 interact.  The latter is worth mentioning in NEWS.

	 * tests/local.at (_AT_DEFINES_CMP_PRUNE): Insert [] before ‘dnl’ in
	   two places to keep it separate from the result of the m4_bpatsubsts
	   operation that immediately precedes it.
	 * lib/autoconf/headers.m4 (AC_CHECK_HEADER_STDBOOL): Allow ‘bool’,
	   ‘true’, and ‘false’ not to be macros, after including stdbool.h,
	   whenever __cplusplus is defined.
	 * NEWS: Document change to AC_{CHECK_,}HEADER_STDBOOL.

2022-07-10  Zack Weinberg  <zackw@panix.com>

	Make help-extract.pl work with Perl 5.10.x.
	The main issue was use of s///r; the /r modifier was added in 5.14.
	Since the baseline is now 5.10.0 instead of 5.6.0, a couple places
	can be tidied up using slightly newer constructs.

	* help-extract.pl: Use File::Spec::Functions instead of File::Spec
	  for reduced clunkiness.
	  (eval_qq_no_interpolation): Don’t use s///r.  Do use \K and (?=...)
	  to match the empty string (but only in just the right locations),
	  so we don’t need to use $& in the replacement.
	  (main): Don’t use s///r.

2022-07-10  Zack Weinberg  <zackw@panix.com>

	Remove ancient backward compatibility code from m4/m4.m4.
	We have had AC_PREREQ([2.69]) in our own configure.ac since 2021,
	and before that it was AC_PREREQ([2.62]) since 2012, so backcompat
	code for 2.61 is not necessary anymore.

	Also add logging of the name of each candidate executable and bump the
	serial number.

2022-07-10  Zack Weinberg  <zackw@panix.com>

	make fetch
	Our local patches to lib/Autom4te/FileUtils.pm and maint.mk were
	manually reapplied.

2022-07-10  Zack Weinberg  <zackw@panix.com>

	Require Perl 5.10.0 or later.
	The minimum Perl version was raised to 5.8.0 from 5.6.0 in commit
	3a9802d60156809c139e9b4620bf04917e143ee2 (but not documented as
	such until e8c2d79ec42c70b6e4fa282bc0c024bf42f0585f, and not
	actually *enforced* by our own configure script until, er, now)
	in order to use Time::HiRes::stat.

	Unfortunately, while the Time::HiRes *module* was added in 5.8.0, it
	did not export a ‘stat’ function until 5.8.9.  More precisely, this
	feature was added to Time::HiRes in version 1.92 of that module; Perl
	core 5.8.8 shipped Time::HiRes 1.86, 5.8.9 shipped 1.9715.  The only
	system I have convenient access to, that has older Perls installed,
	offers me a choice of 5.8.8 or 5.10.1, so the new requirement means
	I cannot test with 5.8.x anymore.

	Per https://perldoc.perl.org/perlhist the release history of these
	versions of Perl is, in chronological order,

	  5.8.0         2002-Jul-18
	  5.8.8         2006-Jan-31
	  5.10.0        2007-Dec-18
	  5.8.9         2008-Dec-14  <-- almost a year later than 5.10.0
	  5.10.1        2009-Aug-22
	  5.12.0        2010-Apr-12

	Per https://perldoc.perl.org/perl5101delta the differences between
	5.10.0 and 5.10.1 are small, and do not make me worry about
	accidentally introducing code that works on my test boxes but not for
	our users, unlike the gulf between 5.8.x and 5.10.x.

	Requiring 5.10 will mean that we have access to Digest::SHA, the //
	and //= operators, the regexp \K escape, and ‘state’ variables
	(lexical scope, persistent value) all of which I can think
	of uses for (but none of them are actually used in this patch).

	Putting it all together, I think a requirement bump to version 5.10.0
	is justified.  We are already chopping off the trailing edge at 2006
	due to the requirement for M4 1.4.8 (/de facto/ since 2.70) and late
	2007 is still 15 years ago.

	This patch also makes configure search $PATH for executables named
	‘perl5*’ and ‘perl-5.*’ if bare ‘perl’ is too old.  To do this, it
	introduces a helper macro AClocal_PATH_PROG_GLOBS_FEATURE_CHECK, which
	I would *like* to promote to a new Autoconf feature, but I got stuck
	on quoting issues — see comments in m4/perl-time-hires.m4.

	* NEWS: Document requirement for Perl 5.10.
	* m4/perl-time-hires.m4: New file.
	* configure.ac: Use AC_PATH_PERL_WITH_TIME_HIRES_STAT to probe for
	  perl.
	* build-aux/fetch.pl (fetch): For .pm files fetched from Automake,
	  rewrite “use 5.006” to “use 5.010”.

	* build-aux/help-extract.pl
	* lib/Autom4te/C4che.pm
	* lib/Autom4te/ChannelDefs.pm
	* lib/Autom4te/Channels.pm
	* lib/Autom4te/Config.pm
	* lib/Autom4te/Configure_ac.pm
	* lib/Autom4te/FileUtils.pm
	* lib/Autom4te/General.pm
	* lib/Autom4te/Getopt.pm
	* lib/Autom4te/Request.pm
	* lib/Autom4te/XFile.pm
	* tests/mktests.pl: Change “use 5.006” to “use 5.010”.

2022-07-06  Zack Weinberg  <zackw@panix.com>

	Require GNU M4 1.4.8 or later.
	The former minimum version was 1.4.6.  1.4.6 and 1.4.7 do not track
	the original location of text fed to ‘m4wrap’, which breaks autom4te’s
	ability to trace macros invoked from _AC_FINALIZE.

	Right now, the only _user_ visible effect of this is that autoconf
	running on M4 1.4.6 or 1.4.7 will emit an internal error, instead of
	the intended warning message, when it processes a configure.ac that
	neglects to invoke AC_INIT or AC_OUTPUT.  Perhaps more importantly,
	it causes a bunch of scary-sounding failures in our own testsuite,
	which deliberately doesn’t use AC_OUTPUT sometimes.

	M4 1.4.6 and 1.4.7 also have bugs in location tracking of macro
	invocations spread over multiple lines, which, guess what, causes
	even more testsuite failures.

	1.4.8 came out in 2006.  As a practical matter, this change to our
	requirements means that people using macOS *to run autoconf* (not just
	to run generated configure scripts) cannot use the system-provided m4
	anymore.  {Free,Net,Open}BSD already don’t ship GNU M4 as their system
	m4, so users of those OSes should not be affected.

2022-07-06  Zack Weinberg  <zackw@panix.com>

	testsuite: Handle `balanced ASCII quotes' correctly in m4 errors.
	AT_CHECK_M4 was _documented_ to convert

	   m4: cannot open `foo': No such file or directory

	to

	   m4: cannot open 'foo': No such file or directory

	but the regexp that was supposed to do this didn’t work.

	Fix the regexp, and remove a workaround for the bug in one test
	(yes, we had code in our own testsuite to work around bugs in our
	own testsuite!)

	* tests/local.at (AT_CHECK_M4): Fix regex for “cannot open” messages.
	* tests/tools.at (autom4te cache): Remove workaround for buggy regex
	  in AT_CHECK_M4.

2022-06-28  Paul Eggert  <eggert@cs.ucla.edu>

	Port _AC_COMPILER_EXEEXT to IBM z/OS Unix
	Problem reported by Jeff Shimoda in:
	https://lists.gnu.org/r/autoconf-patches/2022-06/msg00001.html
	* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT):
	Also remove conftest.o and conftest.obj.
	We can't use $ac_objext as it might not be defined yet.

	Avoid \] in BREs and EREs
	* bootstrap (PACKAGE_NAME, PACKAGE_BUGREPORT):
	* lib/autoconf/status.m4 (AC_OUTPUT_MAKE_DEFS):
	* maint.mk (longopt_re, gpg_key_ID):
	* tests/m4sugar.at (m4_dumpdef):
	Avoid \] in POSIX-specified regular expressions, as POSIX says \]
	produces undefined results in BREs and EREs.

	Refactor recent AC_FUNC_ALLOCA fix
	* lib/autoconf/functions.m4 (AC_FUNC_ALLOCA): Simplify and use
	AS_IF.  Had I done it this way originally I would have avoided the
	bug that Jim just fixed.

2022-06-28  Jim Meyering  <meyering@fb.com>

	AC_FUNC_ALLOCA: fix a misplaced (now fatal) closing "fi"
	"autoconf quoting is a pain"
	* lib/autoconf/functions.m4 (AC_FUNC_ALLOCA): Its AC_CACHE_CHECK
	contains an if/else block, but the closing "fi" lay just after its ")".
	Before, this error didn't trigger any failure because the if/else code was
	in the "else" block of AC_CACHE_CHECK's AS_IF invocation and AS_IF was also
	implemented using an if..fi block. So the ostensibly-"outer" "fi" provided
	by AS_IF matched the inner "if/else", and that stray-after-end "fi" served
	to close the AS_IF block. However, when AS_IF switched from if..fi to
	case..esac, this became a nesting error: no matching "fi".
	Initially-harmless error introduced by v2.69-52-gfd29dbd7 in 2012.
	Error exposed by v2.72a-30-gc8d6d6eb.
	* tests/mktests.pl (scan_m4_files): Do not elide direct test
	of AC_FUNC_ALLOCA.

	FTR, here's the list of macros whose direct tests were being suppressed:
	AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET
	AC_CHECK_INCLUDES_DEFAULT AC_DISABLE_OPTION_CHECKING
	AC_ERLANG_NEED_ERL AC_ERLANG_NEED_ERLC AC_ERLANG_SUBST_ERTS_VER
	AC_ERLANG_SUBST_INSTALL_LIB_DIR AC_ERLANG_SUBST_LIB_DIR AC_F77_DUMMY_MAIN
	AC_F77_LIBRARY_LDFLAGS AC_FC_DUMMY_MAIN AC_FC_LIBRARY_LDFLAGS
	AC_FUNC_ALLOCA AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_GNU_SOURCE
	AC_HEADER_DIRENT AC_HEADER_SYS_WAIT AC_PATH_X AC_PROG_CPP AC_PROG_CXX
	AC_PROG_CXXCPP AC_PROG_F77 AC_PROG_FC AC_PROG_GO AC_PROG_GREP
	AC_PROG_OBJC AC_PROG_OBJCPP AC_PROG_OBJCXX AC_PROG_OBJCXXCPP
	AC_STRUCT_TM AC_TYPE_GETGROUPS AC_TYPE_LONG_LONG_INT AC_TYPE_MBSTATE_T
	AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_UID_T AC_TYPE_UNSIGNED_LONG_LONG_INT
	AC_USE_SYSTEM_EXTENSIONS

2022-06-28  Jim Meyering  <meyering@fb.com>

	tests: avoid test failures due to new EGREP_TRADITIONAL
	Some tests require that filtered pre- and post-test
	environments be identical. The filtering removes assignments
	to known (set-by-test) envvar names, like GREP, SED, YACC.
	* tests/local.at (_AT_CHECK_ENV): Also filter out assignments to
	EGREP_TRADITIONAL, added in v2.72a-35-g0c762675.

2022-06-22  Paul Eggert  <eggert@cs.ucla.edu>

	Improve regex documentation
	* doc/autoconf.texi (Running the Preprocessor)
	(Limitations of Usual Tools):
	Improve comments on limitations of regular expressions.

2022-06-08  Paul Eggert  <eggert@cs.ucla.edu>

	Fix bug: AC_EGREP_CPP with leading '-' in pattern
	Also, port AC_EGREP_CPP to AT&T UnixPC.
	Latter problem reported by Alain Knaff [sr #110657].
	* lib/autoconf/general.m4 (AC_EGREP_CPP): Use new _AC_PROG_GREP.
	Work even if the pattern starts with "-".
	* lib/autoconf/programs.m4 (_AC_PROG_GREP):
	New optional arg ACTION-IF-NOT-FOUND.
	(_AC_PROG_EGREP_TRADITIONAL): New macro.

2022-05-19  Paul Eggert  <eggert@cs.ucla.edu>

	make update-copyright

2022-05-16  Paul Eggert  <eggert@cs.ucla.edu>

	Work around AT&T 3b1 bug
	* lib/m4sugar/m4sh.m4: Work around bug in ancient sed.
	Problem reported by Alain Knaff [sr#110654] for AT&T 3b1.
	The Autoconf manual says this sed bug also occurs for
	RISC/OS and IRIX 5.3.

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

	Document AC_RUN_IFELSE([], ...) etc.
	* doc/autoconf.texi (Running the Preprocessor)
	(Running the Compiler, Running the Linker, Runtime):
	Document that the _IFELSE macros reuse an existing input file
	if their input is empty.

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

	Work around memory-leak false alarms
	Problem reported by Raphael Isemann in:
	https://lists.gnu.org/r/autoconf-patches/2022-03/msg00007.html
	* lib/autoconf/c.m4 (_AC_C_C99_TEST_MAIN, AC_C_FLEXIBLE_ARRAY_MEMBER):
	* tests/data/gnulib_std_gnu11_2020_08_17.m4 (_AC_C_C99_TEST_HEADER):
	Free storage allocated via malloc, to pacify overly-picky
	implementations that issue false alarms about memory leaks.

	Fix bug with AS_IF and ‘set -e’
	Problem reported by Peter Johansson in:
	https://lists.gnu.org/r/bug-autoconf/2022-03/msg00009.html
	The bug was introduced in 2020-11-15T18:56:18Z!zackw@panix.com
	with commit message saying “If anyone has a better idea for how to
	make this work I will be glad to hear it”, and this patch uses a
	trick with ‘case’ that should be a better idea.
	* lib/m4sugar/m4sh.m4 (as_nop, as_fn_nop, _AS_EMPTY_ELSE_PREPARE):
	Remove.  All uses removed.
	(_AS_IF_ELSE): Wrap the non-blank IF-ELSE inside a no-op case,
	which works since a case branch can be empty in the shell.
	* tests/m4sh.at (AS_IF and AS_CASE): Test the fix.

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

	doc: update Manthey name+email

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

	Fix unwanted globbing of sed script
	Problem reported by mirabilos via Eric Blake in:
	https://www.austingroupbugs.net/view.php?id=1558
	https://lists.gnu.org/r/bug-autoconf/2022-02/msg00003.html
	* lib/m4sugar/m4sh.m4 (_AS_TR_SH_PREPARE):
	Define as_sed_sh as the sed script.  All uses of as_tr_sh changed.
	Define as_tr_sh as before, but only for compatibility with scripts
	that mistakenly use as_tr_sh directly.
	(AS_TR_CPP_PREPARE): Likewise for as_sed_cpp and as_tr_cpp.

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

	Clarify documentation of number format
	Problem reported by Mike Frysinger in:
	https://lists.gnu.org/r/autoconf-patches/2022-02/msg00007.html

2022-01-24  Mike Frysinger  <vapier@gentoo.org>

	add new AC_PROG_AR helper
	This mirrors the existing RANLIB and related toolchain macros that
	autoconf already exports.  Some projects assume `ar` is available
	which isn't always safe, so provide a macro that probes the full
	toolchain settings.

	This also makes it easier to use AC_REQUIRE with the macro instead
	of duplicating the AC_CHECK_TOOL call in projects.

	  * lib/autoconf/programs.m4 (AC_PROG_AR): New macro.
	  * doc/autoconf.texi: Document it.
	  * tests/local.at (_AT_CHECK_ENV): Allow $AR output variable.

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

	doc: Document how to deal with missing 'join'.
	* doc/autoconf.texi (Limitations of Usual Tools): Mention that 'join' is missing
	in BusyBox.

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

	doc: document BusyBox sed w bug

2021-10-09  Paul Eggert  <eggert@cs.ucla.edu>

	doc: update ‘find’ info
	* doc/autoconf.texi (Limitations of Usual Tools):
	Mention a few more GNU ‘find’ options that are not portable.
	Modernize a bit.

2021-10-03  Zack Weinberg  <zackw@panix.com>

	Update .gitignore for move of version.m4.
	Commit af5c11ed moved version.m4 from lib/m4sugar to lib, but did not
	update .gitignore to match.

2021-09-15  Zack Weinberg  <zackw@panix.com>

	Add a bootstrap script like Automake has.
	The bootstrap script generates the same files ‘autoreconf -vi’ would,
	in a normal package, but it uses autoconf *from the git sources* to do
	it.  This means people building from git do not need autoconf to be
	installed already.  More importantly, it eliminates the extra steps
	when building from git, of re-generating autoconf’s own configure
	script with the just-built autoconf, then rebuilding the entire tree.

	(This process still requires Automake to be installed already, and
	Automake’s bootstrap script requires Autoconf to be installed already,
	so there is still a dependency loop between Autoconf and Automake when
	building from git—you need at least one of them installed from a
	tarball to get started.)

	The bootstrap script works by creating a partial installation tree in
	a temporary directory, containing bin/autoconf, bin/autom4te, and just
	enough of the usual contents of $(pkgdatadir) for autoconf and
	autom4te to work.  It then runs a hardcoded list of commands,
	corresponding to what ‘autoreconf -i -Wall,error’ would run, but
	setting environment variables AUTOCONF and AUTOM4TE to ensure the
	bootstrap versions of these tools are used.  (We have to create both,
	because automake runs autoconf, not autom4te, to trace configure.ac.)

	The ‘Autom4te’, ‘autoconf’, and ‘m4sugar’ subdirectories of the
	partial installation tree are symlinked back to the source tree; this
	is why version.m4 needed to be moved out of the m4sugar subdirectory,
	so the bootstrap script can create it without scribbling on the source
	tree.  autom4te is run in --melt mode, so we don’t need to create
	freeze files in any subdirectories either.  All of the substitution
	variables that are needed for autoconf and autom4te to both run, and
	create the same output that they would have if fully configured, are
	honored (unfortunately this does involve digging around in
	configure.ac with sed expressions).

2021-09-15  Zack Weinberg  <zackw@panix.com>

	Rewrite bin/autoconf in Perl.
	Of all the installed programs (autoconf, autoheader, autom4te,
	autoreconf, autoscan, autoupdate, ifnames) autoconf is the only one
	that is a shell script instead of a Perl script.  This means it has to
	do a lot of fiddly quoting and requoting to assemble an autom4te
	command line, it doesn’t get to use the shared option handling code in
	Autom4te/{General,Getopt}.pm, and it has to duplicate usage text that
	properly should only be in Autom4te/ChannelDefs.pm.  It also means
	there’s extra code in build-aux/help-extract.pl just for it, and a
	special two-phase generation process in bin/local.mk.

	This also paves the way for the bootstrap script mentioned in the
	previous commit; it will only have to know how to deal with
	substitution variables, not generation of m4sh scripts.

	The new script winds up being slightly longer on disk but that’s
	because our boilerplate for Perl scripts is quite long.  The code is
	visibly simpler.

	* bin/autoconf.as: Rename to bin/autoconf.in and rewrite in Perl.
	* bin/local.mk (EXTRA_DIST): Change autoconf.as to autoconf.in.
	  (MOSTLYCLEANFILES): Don’t delete autoconf.in.
	  (bin/autoconf.in): Delete rule.
	  (ETAGS_PERL): Add autoconf.in and sort list.
	  (ETAGS_SH): Delete, no longer needed.
	* tests/tools.at: Syntax-check autoconf as a Perl script.

	* build-aux/help-extract.pl: Remove all code for extracting usage text
	  from shell scripts.
	* man/autoconf.w, man/local.mk: Refer to autoconf.in, not autoconf.as.

2021-09-15  Zack Weinberg  <zackw@panix.com>

	Generate version.m4 from config.status, in lib/ not lib/m4sugar/.
	This simplifies the Makefile a bit and also paves the way for a
	bootstrap script (replacing the process of re-running autoreconf with
	the just-built autoconf) which will be able to cope with generated
	files that get installed in @pkgdatadir@ but not in @pkgdatadir@/m4sugar.

	* lib/version.in: New file, contents extracted from lib/local.mk.
	* lib/local.mk: Do not generate version.m4 here.
	* configure.ac: Generate lib/version.m4 from lib/version.in via
	  config.status.

	* lib/freeze.mk, lib/local.mk, lib/m4sugar/m4sugar.m4:
	  version.m4 now lives in @pkgdatadir@ rather than @pkgdatadir@/m4sugar.

2021-09-01  Paul Eggert  <eggert@cs.ucla.edu>

	fortran: *mingw* → mingw* in previous patch
	* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Omit a ‘*’.

2021-09-01  Keno Fischer  <keno@juliacomputing.com>  (tiny change)

	fortran.m4: Filter mingw intrinsic libraries
	* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS):
	Filter out mingw libraries too.
	Problem and fix reported by Keno Fischer in
	https://lists.gnu.org/r/autoconf-patches/2021-09/msg00000.html

2021-09-01  Jim Meyering  <meyering@fb.com>

	fix a typo
	* doc/autoconf.texi (Integer Overflow): Fix typo: s/many/may/

2021-08-31  Paul Eggert  <eggert@cs.ucla.edu>

	Add commentary for Time::HiRes patches

2021-08-31  Andreas K. Hüttel  <dilfridge@gentoo.org>

	Fix bug when autom4te updates too quickly
	Use stat from Time::HiRes (instead of File::stat).

	Problem reported by Ionen Wolkens <https://bugs.gentoo.org/782985>.

2021-08-31  Paul Eggert  <eggert@cs.ucla.edu>

	Port AC_LANG_CALL(C) to C++
	* lib/autoconf/c.m4 (AC_LANG_CALL(C)): Add an extern "C" if C++.
	Problem reported by Vincent Lefèvre (sr #110532).

	Modernize discussion of integer overflow
	* doc/autoconf.texi (Integer Overflow, Integer Overflow Basics)
	(Signed Overflow Examples, Optimization and Wraparound):
	Modernize discussion to take current compiler and Gnulib
	technology into account.

	Port test to next m4 version
	* tests/tools.at (autom4te cache):
	Allow m4 to quote 'like this' as well as 'like this'.

2021-08-16  Marshall Ward  <marshall.ward@gmail.com>

	Fortran Cray pointer macro support
	This patch adds the AC_F77_CRAY_POINTERS and AC_FC_CRAY_POINTERS macros,
	which test if the Fortran compiler supports Cray pointers.

	The macros are written such that the tests share a common backend
	(_AC_FC_CRAY_POINTERS) which works on both F77 and FC compilers.
	Wrappers are provided to address any future potential compatibility
	issues.

	The macros include additional tests for particular flags required by
	GFortran and PGI compilers.  The current set of flags is sparse, but can
	be extended for other compilers if needed.

	Documentation and a minimal test of the macro have been included.

	Two minor variable name typos (@EXEEXT@ as @EEXEXT@) were also fixed in
	two of the other Fortran tests.

2021-08-12  Eric Blake  <eblake@redhat.com>

	tests: typo fix
	* tests/base.at: Fix typo.
	Spotted by anonymous in https://savannah.gnu.org/support/?110526

2021-07-20  Paul Eggert  <eggert@cs.ucla.edu>

	Autoconf now quotes 'like this' instead of `like this'
	Autoconf’s diagnostics now follow current GNU coding standards,
	which say that diagnostics in the C locale should quote 'like this'
	with plain apostrophes instead of the older GNU style `like this'
	with grave accent and apostrophe.

2021-07-19  Paul Eggert  <eggert@cs.ucla.edu>

	Document unquoted here-documents better
	Problem reported by Bruno Haible (sr #110518).
	* doc/autoconf.texi (Generating Sources)
	(Running the Preprocessor, Running the Compiler)
	(Running the Linker, Runtime): Briefly mention that the program
	snippets are expanded as unquoted here-documents.
	(Here-Documents): Document escaping needed in unquoted
	here-documents.  Remove mention of \" glitch in OpenBSD 2.7 sh;
	that old system has not been supported for many years.
	Remove advice that every \ must be quoted, as that sort
	of quoting (though harmless) is not needed and is rarely done.
	* lib/autoconf/c.m4 (AC_C_BIGENDIAN, _AC_LANG_OPENMP(Fortran 77)):
	* lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Properly quote
	code snippets.  The backslash-newline typos were harmless, and the
	backslash-$ typo has unspecified behavior as per POSIX though the
	typo is harmless on all shells I know of.  However, Autoconf
	should follow its own quoting advice.

2021-06-30  Emanuele Giaquinta  <emanuele.giaquinta@gmail.com>

	doc: fix typo in variable name
	Message-Id: <YJ4Tm3WEkv86L/YV@FSAPPLE2215.fi.f-secure.com>
	(tiny change)

	_AC_PROG_CXX_STDCXX_EDITION_TRY: fix typo in variable name
	The typo causes "ac_prog_cxx_stdcxx" to be always set to "cxx11",
	regardless of whether the C++ compiler supports C++11.
	Message-Id: <YJ4TXAeJcvU0oSec@FSAPPLE2215.fi.f-secure.com>
	(tiny change)

2021-05-10  Eric Blake  <eblake@redhat.com>

	maint: advertise GNU in README
	* README: Add section to attract more people towards the GNU project.
	Inspired by a suggestion from Jose E. Marchesi <jemarch@gnu.org> on
	the gnu-prog-discuss mailing list.

	maint: ensure autoconf-latest.* links stay up-to-date
	* cfg.mk (GNUPLOADFLAGS): New.
	https://lists.gnu.org/archive/html/autoconf/2021-05/msg00006.html

	maint: Add names to THANKS
	* THANKS: Add names that resulted in several recent commits. Also
	tweak addresses per owner requests.

2021-05-10  Ben Elliston  <bje@air.net.au>

	update HACKING file
	Fairly obvious - be gender neutral in who gets thanked.
	* HACKING: Tweak pronouns.
	Message-Id: <20151125100819.GA29844@air.net.au>

2021-01-28  Zack Weinberg  <zackw@panix.com>

	trunk post-release administrivia
	Matching the commits on the release branch:

	* NEWS: Bring over record of release notes.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

2021-01-28  Zack Weinberg  <zackw@panix.com>

	make fetch

	make update-copyright

2021-01-04  Zack Weinberg  <zackw@panix.com>

	autoreconf: don’t error out when AM_GNU_GETTEXT is used alone.
	Some projects intentionally don't call AM_GNU_GETTEXT_(REQUIRE_)VERSION
	because they have all of the gettext infrastructure checked into version
	control and they want autoreconf to _not_ run autopoint.  Therefore, make
	the “AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_(REQUIRE_)VERSION”
	and “AM_GNU_GETTEXT_(REQUIRE_)VERSION is used, but not AM_GNU_GETTEXT”
	diagnostics be warnings again, as they were in 2.69.

	(Technically these diagnostics were always errors, in the sense that
	they were reported with a call to Autom4te::Channels::error(), but
	prior to 2.70, error() calls made by autoreconf did not cause
	autoreconf to exit unsuccessfully, due to an unrelated bug.  So people
	came to depend on these diagnostics not being fatal.)

2020-12-30  Bruno Haible  <bruno@clisp.org>

	doc: Document another portability problem of 'od'.
	* doc/autoconf.texi (Limitations of Usual Tools): Document that decimal output
	is not portable.

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

	doc: modernize grep discussion

2020-12-29  Zack Weinberg  <zackw@panix.com>

	autom4te: always update the output file, even if it hasn’t changed
	Automake generates a Makefile rule for regenerating the configure
	script, that relies on an invocation of ‘autoconf’ always bumping the
	timestamp on the configure script, even if it hasn’t changed.
	The patch to make autom4te update the output file atomically
	(1725c947144d9bebfe7817c2c5f0d53d884b1297) broke this.

	Fixes several failures in automake’s test suite.

	 * bin/autom4te.in (handle_output): Always call update_file with force=1.
	 * tests/tools.at (autoconf: timestamp changes): New test.

2020-12-23  Zack Weinberg  <zackw@panix.com>

	Restore compatibility with older std-gnu11.m4.
	Gnulib’s std-gnu11.m4 backports C11 and C++11 detection to autoconf
	2.69.  It does this by replacing the definitions of AC_PROC_CC and
	AC_PROG_CXX and most of their subroutines.  In particular, it replaces
	the definitions of _AC_PROG_CC_C11, _AC_PROG_CC_C99, and _AC_C_STD_TRY,
	but it does *not* replace the definition of _AC_PROG_CC_C89.

	Autoconf commit 131d8c69f31dc6fc8dc93abe1096d52d1fe19fd3 changed the
	calling convention of _AC_C_STD_TRY, and changed the internal
	definitions of _AC_PROG_CC_C{11,99,89} to match.  If std-gnu11.m4 is
	in use, our _AC_PROG_CC_C89 calls their _AC_C_STD_TRY with the new
	calling convention, and this produces a syntactically invalid
	configure script.  (This is is fortunate: it could easily have been a
	runtime malfunction that only manifested with compilers that only
	implement C89, and then we might not have noticed the problem for
	years.)

	Gnulib commit a3b3fc85e3e632374811b27cb2111e50fa177e36 makes
	std-gnu11.m4 do nothing when used with autoconf >=2.70, but older
	versions of the file will circulate for years to come, so this patch
	works around the problem in autoconf.  It does this by renaming all of
	the internal macros involved with C and C++ standard edition
	detection, *except* _AC_PROG_CC_C89.  AC_PROG_CC now calls
	_AC_PROG_CC_STDC_EDITION, which loops over all supported editions
	calling _AC_PROG_CC_STDC_EDITION_TRY, which uses the data provided by
	the existing _AC_C_C${edition}_TEST_PROGRAM macros and a new set of
	macros called _AC_C_C${edition}_OPTIONS to perform the test for that
	edition of the standard.  Similarly, AC_PROG_CXX calls
	_AC_PROG_CXX_STDCXX_EDITION, which loops calling
	_AC_PROG_CXX_STDCXX_EDITION_TRY, which uses data from
	_AC_CXX_CXX${edition}_TEST_PROGRAM and _AC_CXX_CXX${edition}_OPTIONS.

	_AC_PROG_CC_C89 is the only macro from the old set that we still
	define, and its definition is reverted to what std-gnu11.m4 expects it
	to be.  Nothing in Autoconf proper uses it anymore.

	foreign.at grows a test to verify that the compatibility stub version
	of _AC_PROG_CC_C89 does its job.  Since this is now the third test
	involving an embedded copy of a third-party macro, I broke them all
	out of foreign.at to separate files in test/data/.

	In addition to fixing the breakage, this patch should make it easier
	to extend C / C++ standard edition detection in the future, by getting
	rid of the if-else chains in AC_PROG_CC/CXX and by disentangling the
	lists of command-line options to test from the logic.

	I also changed the manual to suggest people refer to the variables
	‘ac_prog_cc_stdc’ and ‘ac_prog_cxx_stdcxx’ to learn which edition
	of the C and C++ standards are selected; these are much easier to
	work with than the ac_cv_prog_cc_cNN cache variables.

	* lib/autoconf/c.m4 (_AC_C_STD_TRY, _AC_PROG_CC_C99, _AC_PROG_CC_C11)
	  (_AC_CXX_STD_TRY, _AC_PROG_CXX_CXX98, _AC_PROG_CXX_CXX11): Remove macro.

	  (_AC_C_C89_OPTIONS, _AC_C_C99_OPTIONS, _AC_C_C11_OPTIONS)
	  (_AC_PROG_CC_STDC_EDITION, _AC_PROG_CC_STDC_EDITION_TRY)
	  (_AC_CXX_CXX98_OPTIONS, _AC_CXX_CXX11_OPTIONS)
	  (_AC_PROG_CXX_STDCXX_EDITION, _AC_PROG_CXX_STDCXX_EDITION_TRY): New macros.

	  (_AC_PROG_CC_C89): Convert to compatibility stub for std-gnu11.m4.

	  (AC_PROG_CC): Use _AC_PROG_CC_STDC_EDITION.
	  (AC_PROG_CXX): Use _AC_PROG_CXX_STDCXX_EDITION.

	* tests/data/ax_prog_cc_for_build_v18.m4
	* tests/data/ax_prog_cxx_for_build_v3.m4
	* tests/data/gnulib_std_gnu11_2020_08_17.m4: New files.
	* tests/foreign.at (AX_PROG_CC_FOR_BUILD, AX_PROG_CXX_FOR_BUILD):
	  Remove embedded copy of ax_prog_cc_for_build_v18.m4,
	  ax_prog_cxx_for_build_v3.m4 respectively.
	  (gnulib-std-gnu11.m4): New test.
	* tests/local.mk: Distribute tests/data/*.m4.

	* doc/autoconf.texi (AC_PROG_CC, AC_PROG_CXX): Document use of
	  ac_prog_cc_stdc / ac_prog_cxx_stdcxx, respectively, to tell which
	  edition of the C / C++ standards are selected, instead of looking
	  through a series of cache variables with awkward definitions.

2020-12-23  Zack Weinberg  <zackw@panix.com>

	Use -fno-builtin, not -Werror, in AC_CHECK_DECLS (#110400)
	clang issues only a warning, not an error, when an undeclared
	identifier that names a built-in function is used: for instance

	    char *(*p)(const char *, int) = strchr;

	(with no `#include <string.h>`) is an error with most compilers,
	a warning with clang.  This broke the 2.69 implementation of
	AC_CHECK_DECL.  In commit 82ef7805faffa151e724aa76c245ec590d174580,
	we tried to work around this quirk by using -Werror, but that put us
	at risk of being tripped up by other warnings.  Bug 110400 reports,
	for instance, that this fragment (which is roughly what you get, after
	preprocessing, when AC_CHECK_DECL is applied to a function that *is*
	properly declared)

	    extern void ac_decl (int, char *);
	    int main (void)
	    {
	      (void) ac_decl;
	      ;
	      return 0;
	    }

	provokes a warning from clang (and thus an error) when -Wextra-semi-stmt
	has been added to CFLAGS earlier in the configure script.  The extra
	semicolon comes from AC_LANG_PROGRAM, and we can’t get rid of it
	because we have no way of telling reliably when someone wrote
	something like

	    AC_LANG_PROGRAM([[#include <stdio.h>]],
	                    [[puts("hello world")]])

	with no semicolon at the end of the statement; this has been
	acceptable for decades.  Besides, that’s just one warning, who knows
	what compilers will start complaining about tomorrow?

	So: change AC_CHECK_DECL to compile its programs with -fno-builtin,
	instead, when the default compilation mode fails to detect an
	undeclared strchr.  The code is restructured so that we can try other
	options as well, if we find another compiler with the same quirk but
	different command-line syntax.

	(All of this logic is very C-family specific, but it appears to me
	that AC_CHECK_DECL has never worked with other languages, so we can
	continue to live with that for now.)

	Fixes bug 110400; partially reverts 82ef7805faffa151e724aa76c245ec590d174580.

	 * lib/autoconf/general.m4 (_AC_UNDECLARED_WARNING): Rename to
	   _AC_UNDECLARED_BUILTIN.  Instead of looking at diagnostic output,
	   loop trying to find a command-line option that makes the compiler
	   error out on undeclared builtins.
	   (_AC_CHECK_DECL_BODY): Don’t AC_REQUIRE anything here.
	   Make shell code language-agnostic, except for the actual test program.
	   Add arguments to the shell function for additional compiler options
	   to use.
	   (AC_CHECK_DECL): AC_REQUIRE _AC_UNDECLARED_BUILTIN here.
	   Supply $ac_{AC_LANG_ABBREV}_undeclared_builtin_options to
	   ac_fn_check_decl.

	 * tests/local.at (AT_CONFIG_CMP): Update list of variables to ignore
	   when comparing C and C++ configure runs.
	 * tests/semantics.at (AC_CHECK_DECLS): Add memcpy and strchr to
	   AC_CHECK_DECLS call for functions that may be known to the compiler.

	 * doc/autoconf.texi (AC_CHECK_DECL, AC_CHECK_DECLS): Remove note
	   about compiler warnings.

2020-12-23  Zack Weinberg  <zackw@panix.com>

	autom4te: correct error message when we can’t create autom4te.cache.
	While testing something else, I noticed that autom4te may print a
	nonsensical error message when it fails to create autom4te.cache,
	because it checks again whether the directory already exists before
	giving up, and this clobbers errno.

	Instead of doing (the perl equivalent of)
	    test -d $cache || mkdir $cache || test -d $cache
	call mkdir unconditionally.  If it fails with an errno code other than
	EEXIST, consider that a hard failure; if it fails with EEXIST, check
	whether the thing that exists is in fact a directory.  (A symlink to
	a directory qualifies; I wouldn’t be surprised if people are moving
	autom4te.cache around with symlinks.)

	Either way, if we fail, report strerror(errno) from the original
	mkdir failure.  Also, print the current working directory as part
	of the error message; this aids debugging when you’re working with a
	big hairy nested tree.

	* bin/autom4te.in: Don’t check whether autom4te.cache exists before
	  attempting to create it.  Only stat autom4te.cache if mkdir fails
	  with EEXIST, otherwise fail immediately.  Make sure to report the
	  errno code from mkdir, not the subsequent stat (if any).  Report
	  the current working directory as part of the error message.

	* tests/tools.at: Verify that autom4te reports the actual reason when
	  it fails to create autom4te.cache.  Verify that failure to create
	  autom4te.cache because that name exists, but isn’t a directory,
	  is detected.

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

	Merge branch 'branch-2.70' into master

2020-12-11  Paul Eggert  <eggert@cs.ucla.edu>

	Improve AC_USE_SYSTEM_EXTENSIONS port to HP-UX 11.11
	* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
	Define _HPUX_ALT_XOPEN_SOCKET_API, for HP-UX 11.11.
	This patch is adapted from Gnulib.

	Port minor AC_HEADER_MAJOR fixes from Gnulib
	* lib/autoconf/headers.m4 (AC_HEADER_MAJOR):
	Improve m4 quoting.

	Port minor AC_FUNC_ALLOCA fixes from Gnulib
	* lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_ALLOCA):
	Use ' not ` in generated comments, as per current GNU coding style.
	(_AC_LIBOBJ_ALLOCA): Use plain # instead of unnecessary quadrigraph.
	This patch is adapted from Gnulib.

	Improve port of AC_C_RESTRICT to Oracle C++
	Problem reported by Christian Biesinger in:
	https://lists.gnu.org/r/bug-gnulib/2019-12/msg00159.html
	* lib/autoconf/c.m4 (AC_C_RESTRICT): Port better to
	Oracle Developer Studio C++ 12.5 or later.
	This patch is adapted from Gnulib.

2020-12-08  Zack Weinberg  <zackw@panix.com>

	_AC_PROG_CC_C99: fix typo (#110396)
	_AC_PROG_CC_C99 was using the wrong test program.

	Fixes #110396, reported anonymously.

	* lib/autoconf/c.m4 (_AC_PROG_CC_C99): Use the C99 test program, not
	  the C89 test program.

2020-12-08  Zack Weinberg  <zackw@panix.com>

	maint: add outline for future NEWS (release branch).

2020-12-08  Zack Weinberg  <zackw@panix.com>

	_AC_PROG_CC_C99: fix typo (#110396)
	_AC_PROG_CC_C99 was using the wrong test program.

	Fixes #110396, reported anonymously.

	* lib/autoconf/c.m4 (_AC_PROG_CC_C99): Use the C99 test program, not
	  the C89 test program.

2020-12-08  Zack Weinberg  <zackw@panix.com>

	maint: add outline for future NEWS

	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.70.

	Remove obsolete instructions from HACKING.
	configure CC=g++ is no longer supported, so don’t tell maintainers to
	test that.

2020-12-08  Zack Weinberg  <zackw@panix.com>

	testsuite: log version of M4 and Perl
	Jannick reported problems on OSX for which the most plausible
	explanation is that the system-provided M4 is emitting error messages
	with different line numbers than we expect, perhaps because Apple
	froze their copy of GNU M4 to the last GPLv2 release.  To test this
	hypothesis, add $PERL and $M4 to AT_TESTED in our testsuite.

	* tests/atlocal.in: Also set $M4 from configure.
	* tests/local.at: Add AT_TESTED([$PERL $M4]).

2020-12-08  Zack Weinberg  <zackw@panix.com>

	lib/autotest/general.m4: typo fix
	The absolute-path case in AT_TESTED had a typo in it, causing bizarre
	error messages and preventing programs identified by absolute path
	from being logged properly.

	* lib/autotest/general.m4 (AT_TESTED): Fix typoed shell syntax in
	  handling of programs identified by absolute path.

2020-12-08  Zack Weinberg  <zackw@panix.com>

	Three minor testsuite fixes.
	1. To insulate the test suite from a system-provided config.site file,
	set the CONFIG_SITE environment variable to a file that is known not
	to exist.  Problem reported by Jannick.

	2. AC_PROG_CC, AC_PROG_CXX, AC_PROG_CPP, and AC_PROG_CXXCPP may set
	cache variables named ‘ac_cv_prog_$tool’ or ‘ac_cv_prog_ac_ct_$tool’,
	depending on system conditions; _AT_CONFIG_CMP_PRUNE needs to handle
	both possibilities.  Found by testing on FreeBSD 12; I have no idea
	why it didn’t show up on _any_ of my other test platforms.

	3. The ‘AC_PROG_LEX with yywrap’ test needs to be skipped on systems
	that don’t provide libl.a nor libfl.a.  This change needed yet another
	hook for AT_CHECK_MACRO.  Found by testing on Alpine Linux.

	(Ideally, instead of skipping this test, we would test that this
	configure script *errors out* on these systems, but that would involve
	much more invasive changes to AT_CHECK_MACRO, which I don’t want to
	hold the release for.)

	* tests/local.at (AT_PREPARE_TESTS): Set CONFIG_SITE to refer to
	  a file that is known not to exist, and export it.
	  (_AT_CONFIG_CMP_PRUNE): Prune all variables matching the
	  ERE ‘ac_cv_prog_(ac_ct_)?(CC|CXX|CPP|CXXCPP)’.
	  (AT_CHECK_MACRO): Add PRETEST-CMDS argument which takes commands to
	  execute immediately after AT_SETUP.
	* tests/semantics.at (AC_PROG_LEX with yywrap): Using PRETEST-CMDS,
	  skip this test on OSes where neither -ll nor -lfl provides a
	  definition of yywrap.

2020-12-08  Zack Weinberg  <zackw@panix.com>

	autoreconf --install --force: replace install-sh with no timestamp
	Old versions of install-sh did not have a timestamp line.  Therefore,
	treat the absence of a timestamp line as indicating a very old file
	(that --install --force should replace), not as an error.

	Problem reported by Pascal Terjan.

	* bin/autoreconf.in (extract_time_stamp): Return 1970-01-01 when
	  no timestamp line is found.
	* tests/torture.at (Missing auxiliary files (--force)):
	  Test replacement of old install-sh with no timestamp line.

2020-12-07  Zack Weinberg  <zackw@panix.com>

	make fetch

2020-12-07  Zack Weinberg  <zackw@panix.com>

	Update documentation of AC_USE_SYSTEM_EXTENSIONS.
	The list of macros documented as being defined by
	AC_USE_SYSTEM_EXTENSIONS had gotten out of sync with the actual list.
	Update it thoroughly.

	Also, I introduced an error into the commentary when I merged Julien
	ÉLIE’s patch to define _NETBSD_SOURCE and _OPENBSD_SOURCE in
	AC_USE_SYSTEM_EXTENSIONS.  _OPENBSD_SOURCE does something on NetBSD
	and *doesn’t* do anything on OpenBSD.  This is corrected.

	Clean up the code in AC_USE_SYSTEM_EXTENSIONS a bit while I’m in
	there; we now had a redundant definition of _NETBSD_SOURCE (one
	unconditional and one conditional on minix/config.h existing).
	Reorganize the macro to make it easier to catch problems like this in
	the future.

	* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Reorganize;
	  remove redundant AC_DEFINE of _NETBSD_SOURCE; add some missing
	  AC_BEFOREs; use _AC_CHECK_HEADER_ONCE for header checks;
	  revise all commentary.
	* doc/autoconf.texi (AC_USE_SYSTEM_EXTENSIONS): Update.

2020-12-07  Zack Weinberg  <zackw@panix.com>

	Revise documentation of AT_CHECK.
	Patch originally by Jannick but then about 10x more words added by me.

2020-12-07  Zack Weinberg  <zackw@panix.com>

	Revise documentation of AC_PROG_CC and comments on conformance checks.
	Makes the documentation of AC_PROG_CC consistent with the
	documentation of AC_PROG_CXX.  Also removes a bunch of redundant text
	from c.m4 and adds lists of the headers that *can* be used in the
	conformance tests, so future hackers don’t have to look them up.

	* doc/autoconf.texi (AC_PROG_CC): Make description consistent with
	  description of AC_PROG_CXX.
	* lib/autoconf/c.m4: Clean up some outdated or repetitive commentary
	  and add lists of the freestanding headers above the code that needs
	  to avoid using non-freestanding headers.

2020-12-07  Zack Weinberg  <zackw@panix.com>

	Add checks of __STDC__ and __STDC_VERSION__ to C conformance tests.
	This makes the C conformance tests more consistent with the C++
	conformance tests, and should also speed up cycling through the
	possible options to turn on C99/C11.

	Tested with gcc, clang, SunPRO C, and AIX xlc.

	* lib/autoconf/c.m4 (_AC_C_C89_TEST_GLOBALS): Add preprocessor test
	  for __STDC__ being defined (to any value).
	  (_AC_C_C99_TEST_GLOBALS, _AC_C_C11_TEST_GLOBALS): Add preprocessor
	  test of the value of __STDC_VERSION__.

2020-12-07  Zack Weinberg  <zackw@panix.com>

	autom4te: don’t crash when warnings have no stacktrace
	In testing on Darwin (OSX), sometimes warnings reported from M4 code
	reach autom4te with no stack trace at all, causing the perl script to
	crash with a “use of uninitialized value” error.  The root cause of
	the problem is not clear to me, but the script certainly shouldn’t
	crash.

	Problem found by Jannick <thirdedition@gmx.net>.

	* bin/autom4te.in: When processing warnings, make sure $stacktrace is
	  defined.

2020-12-07  Jannick  <thirdedition@gmx.net>

	Small bug fixes for the test suite.
	* tests/atlocal.in: Also set AWK to value detected by configure.
	  Alphabetize list of shell variables set by config.status.
	* tests/local.mk: Add a rule to recreate tests/atconfig when
	  config.status changes.

2020-12-06  Zack Weinberg  <zackw@panix.com>

	Don’t use hosted headers when testing for C(++) standard level (#110393)
	The tests for the level of the C and C++ standard supported by their
	respective compilers should also avoid using any headers that are not
	guaranteed to be available in the respective freestanding environment.

	Unlike the previous change, the only user-visible consequence of this
	one should be that C11/C99/C89/C++11/C++98 *compiler* support is now
	correctly detected when the compilation target is a freestanding
	environment.

	This patch also refactors how we “emit [the text of the C/C++
	standard-conformance test programs] only once per [configure script],
	into shell variables which can then be referenced repeatedly,” from
	c3853873, because editing them just a little made the M4 quotation
	break.  Clearly too fragile.

	I believe this completes the fix for bug #110393.

	* lib/autoconf/c.m4 (_AC_PROG_CC_C89, _AC_PROG_CC_C99, _AC_PROG_CC_C11)
	  _AC_C_C99_TEST_HEADER, _AC_C_C99_TEST_BODY): Move all test program
	  fragments into new macros that can be AC_REQUIREd individually:
	  _AC_C_C89_TEST_GLOBALS, _AC_C_C89_TEST_MAIN, _AC_C_C89_TEST_PROGRAM,
	  _AC_C_C99_TEST_GLOBALS, _AC_C_C99_TEST_MAIN, _AC_C_C99_TEST_PROGRAM,
	  _AC_C_C11_TEST_GLOBALS, _AC_C_C11_TEST_MAIN, _AC_C_C11_TEST_PROGRAM.
	  Each emits test code at most once, into a shell variable in the
	  INIT_PREPARE diversion.
	  Revise each test program to use only library features of the
	  respective standard’s freestanding environment.
	  (_AC_C_STD_TRY): Take the *name* of the shell variable holding the
	  complete test program as an argument, not the code itself.  All
	  callers adjusted to match.

	  (_AC_PROG_CXX_CXX98, _AC_PROG_CXX_CXX11, _AC_CXX_STD_TRY)
	  (_AC_CXX_CXX98_TEST_HEADER, _AC_CXX_CXX98_TEST_BODY)
	  (_AC_CXX_CXX11_TEST_HEADER, _AC_CXX_CXX11_TEST_BODY): Similarly.
	  New macros are:
	  _AC_CXX_CXX98_TEST_GLOBALS, _AC_CXX_CXX98_TEST_MAIN,
	  _AC_CXX_CXX98_TEST_PROGRAM,
	  _AC_CXX_CXX11_TEST_GLOBALS, _AC_CXX_CXX11_TEST_MAIN,
	  _AC_CXX_CXX11_TEST_PROGRAM.

2020-12-06  Zack Weinberg  <zackw@panix.com>

	AC_INCLUDES_DEFAULT: Check for presence of C90 hosted headers (#110393)
	Since 1993, Autoconf has been assuming that it is safe to include any
	of the headers defined by ISO C90 without checking for them; this is
	inaccurate, since only a subset are necessarily available in a
	C90 *freestanding* environment.

	It is OK to assume the presence of a header in a macro that checks
	specifically for something declared by that header (if the header is
	not present, we will think the specific declaration is unavailable,
	which is probably accurate for modern embedded environments).  It is
	also OK to continue recommending that user code use these headers
	unconditionally—anyone working with a freestanding environment knows
	it.  But it is not OK for very generic code within Autoconf itself,
	such as AC_INCLUDES_DEFAULT, to make this assumption.

	Note that the set of headers that are not always available includes
	stdio.h, which we have been assuming can be included unconditionally
	for even longer.

	In AC_INCLUDES_DEFAULT, revert to checking for string.h and stdlib.h
	before including them.  Also revert to defining STDC_HEADERS only when
	string.h and stdlib.h are available (but do not check for float.h and
	stdarg.h, as these are part of the freestanding set).  Add a new check
	for stdio.h.  Sort the inclusion list by standard (C90 freestanding;
	C90 hosted; C99; POSIX) and alphabetically within each group.  Revise
	all the documentation and update the testsuite.

	This partially reverts commit 86c213d0e355296f026a36e3203c0813041aae89
	and is a partial fix for bug #110393.

	* lib/autoconf/headers.m4 (AC_CHECK_INCLUDES_DEFAULT): Check for
	  stdio.h, stdlib.h, and string.h before including them.  Define
	  STDC_HEADERS only when string.h and stdlib.h are both available.
	  Organize includes list by standard, then alphabetically.

	* doc/autoconf.texi, NEWS: Update to match.

	* tests/local.at (AT_CHECK_DEFINES): Make regexes more specific.
	  Also expect a definition of HAVE_STDIO_H.
	* tests/c.at, tests/semantics.at, tests/tools.at: Use <float.h>,
	  not <stdio.h>, as a header that we expect always to exist.
	  Add HAVE_STDIO_H to various lists of macros that are expected to
	  appear in config.h.

2020-12-06  Julien ÉLIE  <julien@trigofacile.com>

	Define _NETBSD_SOURCE and _OPENBSD_SOURCE in AC_USE_SYSTEM_EXTENSIONS (#110392)
	These expose additional extensions specific to those operating
	systems, similar to _DARWIN_C_SOURCE, _GNU_SOURCE, etc.

	(DragonflyBSD and FreeBSD currently do not have any equivalent
	macros.)

	Fixes bug #110392.  See also
	https://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/extensions.m4
	https://git.eyrie.org/?p=devel/rra-c-util.git;a=commitdiff;h=f8a922cf31804dcc25ac176dcc22fdcdffcb5fdf

	* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Also define
	  _NETBSD_SOURCE and _OPENBSD_SOURCE.  Add comment explaining that
	  there are (currently) no equivalent macros on DragonflyBSD and
	  FreeBSD.  Put macro list in alphabetical order.

2020-12-04  Zack Weinberg  <zackw@panix.com>

	Revert "AC_PROG_CC: define via AC_DEFUN_ONCE". (#110350)
	Revert commit 18c140b50b0619454d4da50d58a318cc257d580a, restoring
	AC_PROG_CC to being defined as an ordinary AC_DEFUN.  This broke
	third-party macros (e.g. the Autoconf Macro Archive’s
	AX_PROG_CC_FOR_BUILD) that intentionally invoked AC_PROG_CC a second
	time with its guts redefined via a whole bunch of ‘pushdef’s.  I don’t
	think we want to support this long-term, but needing access to a
	build-native compiler in cross-compilation is common enough that we
	should have *some* supported way to do it, and it may as well be
	AX_PROG_CC_FOR_BUILD until we come up with something better.

	If we go back to AC_DEFUN_ONCE for AC_PROG_CC in the future, we should
	do it consistently for all the “find me a compiler” macros -- it
	was *only* done for AC_PROG_CC in 18c140b5.

	The rationale for AC_DEFUN_ONCE seems to have been to reduce the size
	of the generated configure script.  The bulk of the size accountable to
	AC_PROG_CC is the test programs for figuring out which version of the
	C standard is available, so I tweaked _AC_C_STD_TRY (and _AC_CXX_STD_TRY)
	to emit that text only once per program, into shell variables which
	can then be referenced repeatedly.

	Fixes bug #110350.

	* NEWS, doc/autoconf.texi: Revert documentation changes associated
	  with AC_PROG_CC being a one-shot macro.
	* lib/autoconf/c.m4 (AC_PROG_CC): Revert to defining with AC_DEFUN.
	  (_AC_C_STD_TRY, _AC_CXX_STD_TRY): Emit the test program only once,
	  even if invoked multiple times with the same arguments.

	* tests/foreign.at (AX_PROG_CC_FOR_BUILD, AX_PROG_CXX_FOR_BUILD):
	  New tests.

2020-12-02  Zack Weinberg  <zackw@panix.com>

	Autotest: add official way to execute code before all/each test.
	Currently, there isn’t any documented way for an Autotest testsuite to
	add custom code to be run either right before the main driver loop, or
	at the point of each AT_SETUP.  For instance, there’s no good place to
	put environment variable sanitization that should apply to the entire
	testsuite (but isn’t universally relevant), or shell function
	definitions to be used by custom test macros.

	Autoconf’s test suite is poking shell functions directly into the
	PREPARE_TESTS diversion, and doing environment variable sanitization
	in each individual test.  Both of these are obviously undesirable.

	This patch adds three new AT_* macros that can be used to do these
	things in an officially-supported way: AT_PREPARE_TESTS adds code to
	be run right before the main driver loop, AT_PREPARE_EACH_TEST adds
	code to be run at the beginning of each test, and AT_TEST_HELPER_FN
	defines a shell function that will be available to each test.  In
	Autoconf’s test suite, I use AT_PREPARE_TESTS to factor out
	environment variable sanitization that *ought* to apply across the
	board, and AT_TEST_HELPER_FN for the helper function used by
	AT_CHECK_ENV.

	(This fixes the testsuite bug reported by Jannick at
	https://lists.gnu.org/archive/html/autoconf/2020-10/msg00052.html :
	CONFIG_SITE in the parent environment will no longer be visible to tests.)

	It would be nice to give an example of when AT_PREPARE_EACH_TEST is
	useful, in the documentation, but I didn’t find one in the autoconf
	test suite.

	* lib/autotest/general.m4 (AT_PREPARE_TESTS, AT_PREPARE_EACH_TEST)
	  (AT_TEST_HELPER_FN): New macros.
	  (AT_INIT, AT_TESTED): Emit the code to report tested programs only
	  if it’s needed, and make sure it’s after any code added by
	  AT_PREPARE_TESTS.

	* tests/local.at: Add AT_PREPARE_TESTS block that ensures
	  $MAKE is set sensibly and $MAKEFLAGS and $CONFIG_SITE are unset.
	  Use AT_TEST_HELPER_FN for the helper function needed by AT_CHECK_ENV.
	  (AT_CHECK_MAKE): No need to sanitize $MAKE or $MAKEFLAGS here.
	* tests/base.at, tests/compile.at, tests/m4sh.at, tests/torture.at:
	  No need to unset or neutralize $CONFIG_SITE in individual tests.
	* tests/autotest.at: Add tests for new macros.

	* doc/autoconf.texi, NEWS: Document new macros.

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

	Document better where to put -m32 or -m64 compiler options.
	* doc/autoconf.texi (Preset Output Variables): Clarify that options -m32 or -m64
	must go into CC, not CFLAGS and not CPPFLAGS either. This is needed because on
	bi-arch platforms, config.guess runs $CC without $CFLAGS nor $CPPFLAGS.

2020-12-01  Zack Weinberg  <zackw@panix.com>

	Add a note to NEWS about ac_cv_header_stdlib_h not being set...
	... even though HAVE_STDLIB_H is.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	Make autoreconf --force --install overwrite existing files (#110371)
	The new feature of autoreconf --install installing config.guess,
	config.sub, and install-sh itself didn’t implement --force mode
	correctly; existing files would not be overwritten.

	The fix has two parts.  If --force is in effect, we try to install
	everything that we can from the needed-auxfiles list *before* checking
	which of them already exist.  But also, we don’t overwrite existing
	files unconditionally, even with --force; we only do so if the file we
	can install has a newer “timestamp” line than the copy at the
	destination.  This is because Automake can also install all of the
	files we can install.  Suppose someone is using autoconf 2.70 with a
	newly released automake 1.17; automake 1.17 will presumably ship with
	a newer config.guess than autoconf 2.70 did; that version should win.

	Fixes bug #110371.

	* bin/autoreconf.in (extract_time_stamp, our_aux_file_is_newer): New functions.
	  (install_aux_file): If the destination exists, and our copy is not
	  newer, do not overwrite it.
	  (autoreconf_current_directory): When $force is true, attempt to
	  install all needed aux files *before* scanning for missing aux files.
	  (throughout): Remove extra \n from various error messages.

	* tests/torture.at (Missing auxiliary files (--force)): New test.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	Add more release notes about compatibility problems.
	See https://savannah.gnu.org/support/?110382 and
	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97998 for background.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	AT_CHECK_MACRO: test C++ as well as C, cross as well as native
	Many of the reported regressions in Autoconf 2.70 betas went unnoticed
	for years because Autoconf’s bundled test suite didn’t test most of
	the macros with a C++ compiler and/or in cross compilation mode.
	There’s a special makefile target ‘maintainer-check-c++’ that runs all
	the tests with CC=g++, but that doesn’t catch the regressions either,
	because it doesn’t compare the configure results with what you’d have
	gotten with a C compiler.  Also, C and C++ have diverged to the point
	where setting CC to a C++ compiler doesn’t work reliably anymore.

	This patch overhauls AT_CHECK_MACRO to test each macro four times:
	(C compiler, C++ compiler) x (native mode, cross-compilation mode).
	All four tests are expected to produce the same config.cache and
	config.h, except for certain predictable differences due to running
	AC_PROG_CXX instead of AC_PROG_CC, and a short list of known,
	acceptable differences, maintained in mktests.pl.

	There are two classes of known, acceptable differences.  Macros that
	use AC_RUN_IFELSE aren’t tested in cross-compilation mode at all,
	because they may crash the script (this is temporary and will be
	revisited after 2.70).  Macros that correctly detect a difference
	between C and C++ (e.g. AC_HEADER_STDBOOL will notice that C++ doesn’t
	have the _Bool type) are annotated with the specific cache variable
	and #define that varies.

	mktests.pl now also has the capability to provide values for the
	MACRO-USE, ADDITIONAL-COMMANDS, and AUTOCONF-FLAGS arguments to
	AT_CHECK_(AU_)MACRO, on a per-macro basis, but that’s not used in this
	patch.

	Some of the manual uses of AT_CHECK_MACRO do not need to test C++
	and/or cross compilation; for them, there is a new test helper,
	AT_CHECK_CONFIGURE_AC.  Another new helper, AT_PRESERVE_CONFIG_STATUS,
	is used extensively in AT_CHECK_(AU_)MACRO but may be also useful in
	manual tests that need to do multiple configure runs.

	This change supersedes AT_CHECK_MACRO_CROSS and
	‘make maintainer-check-c++’, which are removed.

	In my testing, setting CC to a C++ compiler no longer works at all,
	for reasons that are impractical to fix (e.g. C++ compilers choke on
	the test for C2011 features) so I have added a note to NEWS saying
	that this is not supported anymore.

	 * tests/local.at (AT_CHECK_MACRO): Default behavior is now to test
	   the macro in both native and cross-compilation mode, and expect the
	   results to be identical.  If the macro transitively required
	   AC_PROG_CC, and a C++ compiler is available, then test it twice
	   more with AC_LANG([C++]) in effect, and again expect the results to
	   be identical.  New fifth argument TEST-PARAMETERS can modify this
	   behavior.
	   (_AT_FILTER_CXX_CV_VARIES, _AT_FILTER_CXX_DEFINE_VARIES): New,
	   subroutines of AT_CHECK_MACRO.

	   (AT_CHECK_MACRO_CROSS): Remove, subsumed by new AT_CHECK_MACRO
	   behavior.
	   (AT_CHECK_AU_MACRO): Forward to AT_CHECK_MACRO for the basic test;
	   then do the same autoupdate test as before, as a separate test group.

	   (at_check_env): Also ignore OPENMP_CXXFLAGS.
	   (AT_CONFIG_CMP): Add third argument EXTRA-VARIANCE that specifies
	   additional variables that are expected to vary in a particular test.
	   (_AT_CONFIG_CMP_PRUNE): New, subroutine of AT_CONFIG_CMP.
	   (AT_DEFINES_CMP): New helper macro that compares config.h headers,
	   with the ability to ignore variation in specific defines.
	   (_AT_DEFINES_CMP_PRUNE): New, subroutine of AT_DEFINES_CMP.

	   (AT_PRESERVE_CONFIG_STATUS): New helper that makes copies of
	   config.h, config.log, config.status, and state-env.after under
	   names that won’t be clobbered by a subsequent run of configure.

	   (AT_CHECK_CONFIGURE_AC): New helper that defines a complete test
	   group consisting of a single invocation of _AT_CHECK_AC_MACRO;
	   effectively what AT_CHECK_MACRO used to be.
	   (_AT_CHECK_AC_MACRO): Correct documentation comment; the PRE-TESTS
	   argument has always been optional.

	 * tests/mktests.pl (test_parameters): New global data object giving
	   extra arguments to pass to AT_CHECK_MACRO/AT_CHECK_AU_MACRO on a
	   per-macro basis.
	   (emit_test): New function that handles emitting calls to
	   AT_CHECK_(AU_)MACRO with the desired arguments.
	   (scan_m4_files): Use emit_test.

	   (au_exclude_list): Add AC_HAVE_LIBRARY, AC_COMPILE_CHECK,
	   AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK, and AC_TRY_RUN.

	 * tests/semantics.at (AC_CHECK_LIB, AC_SEARCH_LIBS): Rewrite test
	   using symbols from zlib instead of libm, to get consistent behavior
	   from C and C++.
	   (AC_SEARCH_LIBS (none needed)): Revise to clarify what is being tested.
	   (AC_CHECK_DECLS): Use _AC_LANG_ABBREV when inspecting cache variables.
	   (AC_CHECK_ALIGNOF, AC_CHECK_ALIGNOF struct)
	   (AC_CHECK_SIZEOF, AC_CHECK_SIZEOF struct)
	   No need for AT_CHECK_MACRO_CROSS.
	   (AC_CHECK_FILES): Switch to AT_CHECK_CONFIGURE_AC.
	   (AC_SYS_RESTARTABLE_SYSCALLS, AC_FUNC_WAIT3): Do not test in cross
	   compilation mode.
	   (AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK, AC_TRY_RUN)
	   (AC_COMPILE_CHECK, AC_HAVE_LIBRARY): New manual AT_CHECK_AU_MACRO tests.

	 * tests/c.at (Extensions, C keywords, AC_PROG_CPP requires AC_PROG_CC)
	   (AC_NO_EXECUTABLES (working linker), AC_NO_EXECUTABLES (broken linker)):
	   Switch to AT_CHECK_CONFIGURE_AC. Also convert case statements to AS_CASE.
	   (Broken/missing compilers): Pass CC=no-such-compiler on the command
	   line instead of hardwiring it in the configure script.

	 * tests/local.mk (maintainer-check-c++): Remove target.
	   (maintainer-check): Run the ordinary ‘make check’ as well as
	   ‘make maintainer-check-posix’.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	Rewrite mktests.sh in Perl.
	This is probably marginally faster since it doesn’t have to read the
	.m4 files twice or muck around with temporary files and subprocesses,
	but the actual point of this rewrite is that it will make it easier to
	provide additional arguments to AT_CHECK_MACRO and AT_CHECK_AU_MACRO
	on a per-macro basis; this capability will be added and used in the
	next patch.

	In *this* patch, the ac*.at files are not functionally changed at all.
	(The comments come out slightly differently, though.)

	* tests/mktests.sh: Delete and...
	* tests/mktests.pl: ...rewrite in Perl.
	* tests/local.mk: Update to match.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	Overhaul Erlang support.
	Erlang is similar to Java in that it doesn’t compile to standalone
	machine code; the output of ‘erlc’ is byte-code files that are then
	interpreted by ‘erl’.  We handle this poorly in a whole bunch of ways,
	particularly when cross-compiling.  This patch fixes up the more
	serious problems:

	 - AC_COMPILE_IFELSE now actually works when AC_LANG([Erlang]) is in
	   effect.
	 - ‘conftest.beam’ is now deleted in several more places where it
	   could be created.
	 - The various AC_ERLANG_* macros that interrogate the runtime
	   environment do so by invoking ‘$ERL’ directly, rather than using
	   AC_RUN_IFELSE, and thus do not crash the configure script when
	   we think we’re cross-compiling.  (It is not clear to me whether
	   they get the correct answer when cross-compiling, but this should
	   still be strictly an improvement.)
	 - The Erlang-related tests have been streamlined.

	Further improvements are definitely possible, but we’d have to teach
	the infrastructure to make $ac_objext language-specific first, which
	seems like too big of a change for 2.70.

	(This patch is all fallout from a logically unrelated testsuite change
	which is coming up next.  Gotta love the fundamental interconnectedness
	of things.)

	* lib/autoconf/general.m4 (_AC_COMPILE_IFELSE_BODY)
	  (_AC_LINK_IFELSE_BODY): Delete conftest.beam as well as conftest.$ac_objext.

	* lib/autoconf/erlang.m4 (AC_ERLANG_PATH_ERLC, AC_ERLANG_PATH_ERL):
	  Don’t repeat work done by AC_PATH_TOOL.
	  (Erlang $ac_compile): Fake an .o file so AC_TRY_COMPILE will be happy.
	  (AC_LANG_COMPILER(Erlang)): AC_REQUIRE AC_ERLANG_NEED_ERLC, not
	  AC_ERLANG_PATH_ERLC.  Also AC_REQUIRE AC_ERLANG_NEED_ERL so
	  AC_RUN_IFELSE works reliably.
	  (AC_ERLANG_CHECK_LIB, AC_ERLANG_SUBST_ROOT_DIR)
	  (AC_ERLANG_SUBST_LIB_DIR, AC_ERLANG_SUBST_ERTS_VER):
	  Use $ERL -eval, not AC_RUN_IFELSE.
	  No need to AC_REQUIRE AC_ERLANG_NEED_ERLC.

	* tests/erlang.at: Don’t test anything here that’s tested adequately
	  by acerlang.at; document which macros those are expected to be.
	  Remove unnecessary AC_ERLANG_PATH_ERL/ERLC invocations throughout.
	  (AT_CHECK_MACRO([Erlang])): Rename test to ‘Erlang basic compilation’;
	  expect both AC_COMPILE_IFELSE and AC_RUN_IFELSE to work;
	  handle cross compilation mode properly.
	* tests/mktests.sh: Exclude from acerlang.at all macros completely
	  covered by erlang.at.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	Make “redefining AS_ECHO internals” test more robust.
	M4-redefining ‘printf’ as ‘echo’ brings back all the variations in
	‘echo’ behavior that we were trying to get away from by switching to
	‘printf’ in the first place.  This caused a spurious failure on AIX.

	* tests/m4sh.at (Redefining AS_ECHO internals): Redefine ‘printf’ as
	  a shell function with fully predictable output, not as ‘echo’.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	torture.at: Insulate more tests from buggy third-party m4 files.
	All tests that run autoreconf need to defend against the possibility
	of aclocal not existing and/or barfing on bugs in third-party m4 files
	installed on the build system.  Two of the “Missing auxiliary files”
	tests were missing this defensive code.

	 * tests/torture.at (Missing auxiliary files (install-sh))
	   (Missing auxiliary files (foreign)): Prevent autoreconf from
	   running aclocal.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	Avoid ‘new File::Temp’ in Perl scripts.
	Despite what the documentation says, ‘new File::Temp’ does not work
	reliably in perl 5.6.x.  Rather than figure out exactly what is wrong
	with it, let’s just stick to ‘tempfile’.

	 * bin/autom4te.in (handle_output): Use tempfile function instead of
	   object-oriented File::Temp interface.
	 * bin/autoreconf.in (install_aux_file): Likewise.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	Disentangle HAVE__BOOL from ac_cv_header_stdbool_h.
	AC_CHECK_HEADER_STDBOOL is documented to make two checks: whether the
	C99 header <stdbool.h> is available and fulfills its
	specification (i.e. including it makes the type ‘bool’ and the
	constants ‘true’ and ‘false’ available), and, independently, whether
	the type ‘_Bool’ is available.

	In C++, the type ‘_Bool’ is usually _not_ available, but <stdbool.h>
	is still supposed to be include-able and the type ‘bool’ and the
	constants ‘true’ and ‘false’ are still supposed to be available
	(unconditionally).  However, the test for <stdbool.h> fulfilling its
	specification freely used _Bool, and would therefore fail spuriously.
	Correct this by checking for _Bool first, and then refactoring the
	test program for <stdbool.h> so that it does all its tests using bool,
	then repeats them with _Bool only when available.

	* lib/autoconf/headers.m4 (AC_CHECK_HEADER_STDBOOL): Do the test for
	  _Bool before the test for stdbool.h.  Test semantics of bool
	  unconditionally; test _Bool only when HAVE__BOOL is defined.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	AC_FUNC_SETPGRP: Don’t depend on the return type of setpgrp.
	AC_FUNC_SETPGRP determines whether you have the historic BSD setpgrp,
	which takes two arguments and returns int, or the historic POSIX
	setpgrp, which takes no arguments and returns int.  Solaris has yet a
	third variant, which takes no arguments and returns a pid_t (the new
	process group ID).  This difference causes AC_FUNC_SETPGRP’s test
	program to fail to compile under AC_LANG([C++]), which in turn causes
	the macro to report that setpgrp does take arguments, which is wrong.

	It is not worth adding a new result #define for this variant,
	since *all* forms of setpgrp are deprecated in favor of setpgid, which
	is old enough that it can be used unconditionally.  However, it is
	worth documenting that this variant exists, and fixing AC_FUNC_SETPGRP
	to produce the right value for its existing result #define on Solaris
	with C++.

	* lib/autoconf/functions.m4 (AC_FUNC_SETPGRP): Redesign test program to
	  not depend on the return type of setpgrp.
	* doc/autoconf.texi (AC_FUNC_SETPGRP): Mention that the macro does not
	  check for the Solaris variant of setpgrp that returns pid_t.  Change
	  programming advice to recommend use of setpgid.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	AC_C_CHAR_UNSIGNED: Remove check of $GCC.
	On systems where plain ‘char’ is unsigned (e.g. AIX) we would define
	__CHAR_UNSIGNED__ only when $GCC was not true at configure time.
	If AC_LANG([C++]) has been in effect since the beginning of the
	script (so AC_PROG_CC was never invoked), $GCC will be false
	regardless; this causes an inconsistency between the C and C++
	behaviors, even when both compilers are GNU.

	The point of checking $GCC here is that GCC has command line options
	to override the signedness of plain ‘char’, and it predefines
	__CHAR_UNSIGNED__ to indicate what the signedness actually is.
	We don’t want config.h to override that.  However, there is already
	a special autoheader template for __CHAR_UNSIGNED__ that prevents it
	being redefined if it’s defined already, so checking $GCC at
	configure time is redundant and can safely be removed.

	* lib/autoconf/c.m4 (AC_C_CHAR_UNSIGNED): Do not make result depend on
	  value of $GCC.  Adjust commentary.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	sc_error_message_uppercase: allow fully uppercased words
	If an error message starts with an entire fully uppercased word,
	that’s probably a proper noun and it should stay that way.  For
	instance, autoreconf has an error message that starts with
	"AM_GNU_GETTEXT is used, but ..."; AM_GNU_GETTEXT is the name of an
	Automake macro, it needs to stay uppercased.

	This subsumes the existing exception for the words FATAL and WARNING.
	While I was in there I generalized the exception for PRIuMAX to cover
	all of the inttypes.h PRI* and SCN* macros.

	This patch has been submitted to Gnulib; until it is merged there,
	anyone running ‘make fetch’ should take care not to drop this change.

	* maint.mk (sc_error_message_uppercase): Allow error messages that
	  begin with any fully uppercased word, or with any of the inttypes.h
	  PRI[dioux]\w+ or SCN[dioux]\w+ macros.

2020-11-30  Zack Weinberg  <zackw@panix.com>

	make fetch and update savannah gitweb urls to cgit.
	Several of the files updated by make fetch have made this change, so
	we follow suit for consistency:

	* README-hacking
	* build-aux/fetch.pl
	* doc/autoconf.texi: Replace all git.savannah.gnu.org/gitweb URLs with
	  equivalent /cgit URLs.

2020-11-16  Zack Weinberg  <zackw@panix.com>

	AC_INIT: better handling of unusual arguments (#110349)
	Fix some subtle quotation bugs in _AC_INIT_PACKAGE that made it
	impossible to put ‘,’ or an unbalanced close parenthesis in some of
	the arguments to AC_INIT.  Document that arguments to AC_INIT
	containing parentheses, square brackets, ‘,’ or ‘#’ may need to be
	double-quoted.  Provide more detailed examples and exposition re
	computing the arguments to AC_INIT when autoconf is run (e.g. with
	git-version-gen).  Add a whole bunch more tests for unusual arguments
	to AC_INIT, and a test that the backward-compatibility behavior of
	AC_INIT with only one argument is still correct.

	This may still break some of the existing configure scripts described
	in the threads at
	https://lists.gnu.org/r/autoconf/2020-10/msg00013.html and
	https://lists.gnu.org/r/bug-autoconf/2020-10/msg00012.html
	but, I hope, only in ways covered by the existing warning in NEWS
	about pickier M4 quotation.

	* lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Redo argument
	  normalization and default value selection in a simpler, less
	  error-prone fashion.
	  (_AC_INIT_PACKAGE_N): New helper subroutine.
	  (AC_INIT): Always call _AC_INIT_PACKAGE, but supply no arguments if
	  we were called with only one argument.

	* tests/base.at (AC_INIT (obsolete invocation)): New test.
	  (AC_INIT with unusual version strings): Expand test.

	* doc/autoconf.texi (AC_INIT): Revise.

2020-11-16  Zack Weinberg  <zackw@panix.com>

	AS_ECHO(_N): Do not expand macros named ‘s’ or ‘n’ (#110377)
	AS_ECHO expands to ‘printf "%s\n" $1’.  If a configure script defines
	an M4 macro named ‘s’ or ‘n’ it will be expanded in the first argument
	to printf, which is almost certainly not what was intended.
	The configure script for ruby 2.7.2 uses ‘AS_VAR_PUSHDEF([s], ...)’
	and breaks with 2.69d because of this.

	Add some extra quoting so that the ‘%s\n’ is treated as literal;
	similarly for AS_ECHO_N and the legacy shell variables $as_echo
	and $as_echo_n.

	For now, anyway, don’t quote the word ‘printf’; if someone does
	define that as a M4 macro they might well mean to affect AS_ECHO.
	(Whether this is something we *want* to allow, we can worry about
	when it comes up.)

	Fixes bug #110377.

	* lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE, AS_ECHO, AS_ECHO_N):
	  Add another layer of quoting around the first argument to printf.
	* tests/m4sh.at (Redefining AS_ECHO internals): New test.

2020-11-15  Zack Weinberg  <zackw@panix.com>

	Don’t issue obsoletion warnings for AC_LANG_SAVE/RESTORE (#110375)
	The most recently released version of libtool.m4 is five years old as
	of this commit, and no new release is likely to appear anytime soon.
	It uses AC_LANG_SAVE and AC_LANG_RESTORE, in a way that doesn’t
	obviously translate to AC_LANG_PUSH and AC_LANG_POP.  This will need
	to be fixed by libtool upstream.  Until that actually happens, disable
	the -Wobsolete warnings for AC_LANG_SAVE and AC_LANG_RESTORE.  (They
	are still documented as obsolete in the manual, as they have been for
	many years.)

	Fixes bug #110375.

	* lib/autoconf/lang.m4 (AC_LANG_SAVE, AC_LANG_RESTORE): Define with
	  AC_DEFUN, not AU_DEFUN; remove manual -Wobsolete warnings.

2020-11-15  Zack Weinberg  <zackw@panix.com>

	AS_IF: Handle else clause being empty after macro expansion (#110369)
	AS_IF can emit a syntactically invalid shell if-then-else,

	  if CONDITION
	  then :
	    # ...
	  else
	  fi

	when its IF-FALSE argument consists of macros that don’t produce any
	shell code.  This was a documented limitation in AS_IF, but it’s a bad
	limitation to have, because macros that *used* to expand to shell
	commands might start expanding to nothing in future releases.  For
	instance, this broke the libzmq configure script, which did

	  AC_PROG_CC
	  AX_CHECK_COMPILE_FLAG([-std=gnu11],
	    [CFLAGS+=" -std=gnu11"],
	    [AC_PROG_CC_C99])

	Perfectly valid in 2.69, but in 2.70 AC_PROG_CC_C99 doesn’t produce
	any shell code and the script crashes.

	We had that limitation for good reason: we can’t just put ‘:’ at the
	beginning of the else-clause, like we do for the then-clause, because
	that would clobber $? and the IF-FALSE commands might want to inspect
	it.  (This doesn’t matter for the then-clause, because $? is always
	zero at the beginning of a then-clause anyway.)  The simplest and
	least inefficient shell construct I can find that works in this
	context is a shell function that does ‘return $?’.  Due to awkward
	M4sh initialization ordering constraints (AS_IF gets used before we
	can safely use shell functions) an indirection through a shell
	variable is necessary.  The structure of a m4sh script is now

	  #! /bin/sh
	  ## M4sh Initialization
	  as_nop=:

	  ...
	  ## M4sh Shell Functions

	  as_fn_nop () { return $?; }
	  as_nop=as_fn_nop
	  ...

	and AS_IF emits

	  if CONDITION
	  then :
	    # ...
	  else $as_nop
	    # ...
	  fi

	The uses of AS_IF that appear before the beginning of the M4sh Shell
	Functions section are all under our control and they don’t need to
	look at $?.

	If anyone has a better idea for how to make this work I will be glad
	to hear it.

	Fixes bug #110369.

	* lib/m4sugar/m4sh.m4
	  (_AS_IF_ELSE): When $1 is nonempty, invoke _AS_EMPTY_ELSE_PREPARE.
	  Emit $as_nop at beginning of else clause.
	  (_AS_BOURNE_COMPATIBLE): Initialize as_nop to ‘:’.
	  (_AS_EMPTY_ELSE_PREPARE): New macro which emits a definition of
	  as_fn_nop and resets as_nop to as_fn_nop.
	  (AS_PREPARE, _AS_PREPARE): Invoke _AS_EMPTY_ELSE_PREPARE.
	  (_AS_UNSET_PREPARE): Tweak white space.

	* tests/m4sh.at (AS_IF and AS_CASE): Test AS_IF’s IF-FALSE argument
	  being empty after macro expansion.

	* doc/autoconf.texi (AS_IF): Remove warning about use with
	  ‘run-if-false’ argument empty after macro expansion.

2020-11-11  Ross Burton  <ross.burton@arm.com>

	Support CONFIG_SITE being a list of entries.
	Instead of treating CONFIG_SITE as a single path, treat it as a
	space-separated list of paths and load them in order.

	Also remove the special-casing of entries starting with a dash, this is
	redundant as they'll be caught by the wildcard case.

	Finally add a test case to verify that multiple files are loaded
	correctly.

	* lib/autoconf/general.m4 (AC_SITE_LOAD): Treat CONFIG_SITE as a
	  space-separated list of scripts to be sourced.  Simplify handling
	  of default config.site locations using this capability.
	* tests/base.at (AC_CACHE_CHECK): Test loading of multiple site files.
	* doc/autoconf.texi (Site Defaults): Update documentation of CONFIG_SITE.

2020-11-11  Zack Weinberg  <zackw@panix.com>

	tests/compile.at (AC_RUN_IFELSE): typo fix

2020-11-10  Ben Pfaff  <pfaffben@debian.org>

	autom4te: replace output file atomically (#110305)
	In 2003, Joey Hess reported the following bug against Debian's
	autoconf package (see http://bugs.debian.org/221483):

	    I noticed that if I ctrl-c autoconf, it can leave a partially
	    written, executable configure script. I was lucky enough to
	    get a configure script that exited with a shell parse error,
	    but if I had been unlucky, it might have exited 0 without
	    doing all the tests I expected it to do.  That would have
	    sucked to ship to users.

	    There are many ways to update a file in a way that is not
	    prone to these problems, and I suggest that autoconf adopt
	    one of them.

	Ben Pfaff wrote a patch to make autom4te replace the output file
	atomically; Debian has carried it since 2006.  He submitted it
	to autoconf upstream in 2008 but it never went anywhere.

	I (Zack) have dusted off the patch and made some minor improvements:
	using File::Temp (with DIR set to the directory of the output file)
	instead of a predictable temporary file name, and using
	Autom4te::FileUtils::update_file instead of File::Copy::move.

	I do not attempt to test the fix (the test would be inherently racey)
	nor do I have autom4te delete the temp file if it crashes while the
	file is being written (there is no way to do this with 100%
	reliability and it strikes me as likely to cause more problems than it
	solves).

	Fixes our bug #110305.

	* bin/autom4te.in (handle_output): When $output is to a regular or
	  nonexistent file, write to a temporary file in the same directory
	  and then rename it over $output after completion.

2020-11-09  Zack Weinberg  <zackw@panix.com>

	make fetch

2020-11-09  Zack Weinberg  <zackw@panix.com>

	m4sh: Require shell to support $(...) command substitution.
	As of the 2020-11-07 update, config.sub and config.guess
	unconditionally use $(...) command substitution; see
	<https://lists.gnu.org/archive/html/config-patches/2020-11/msg00011.html>.

	Therefore, add this to the set of required shell features, searched
	for by _AS_DETECT_BETTER_SHELL.  On a system where /bin/sh doesn’t
	support $(...), $CONFIG_SHELL will be set to one that does (and the
	primary configure script will be re-executed using that shell).
	AC_CANONICAL_* use $CONFIG_SHELL to execute config.guess/sub, so they
	will keep working.  This also means that configure scripts and
	third-party macros that use $(...) will quietly start working
	correctly on such ancient systems.

	The test code is simple, but sufficient to weed out Solaris 10’s
	/bin/sh, which doesn’t support $(...) but *does* support shell
	functions.

	I’m not going to touch any of the existing uses of `...` command
	substitution in Autoconf proper for now, but it might make sense to
	bulk upgrade them early in the 2.71 release cycle; if nothing else,
	it would remove a major obstacle to running shellcheck over our
	scripts.

	* lib/m4sugar/m4sh.m4 (_AS_MODERN_CMDSUBST_WORKS): New macro.
	  (AS_INIT, AS_SHELL_SANITIZE): Call _AS_DETECT_REQUIRED for
	  _AS_MODERN_CMDSUBST_WORKS.
	* NEWS: Mention the requirement for $(...).

2020-11-09  Zack Weinberg  <zackw@panix.com>

	Check in install-sh as synced from automake (#110368)
	As pointed out in sr #110368, since install-sh is now being installed
	as part of autoconf, we should make sure to ship the latest version
	rather than the version shipped by the automake that was used to
	bootstrap the autoconf release tarball.

	The build-aux/fetch.pl script is already supposed to fetch the latest
	version, but install-sh is listed in .gitignore so any updates are
	discarded when starting from a clean tree.  Correct this.

	At the same time, since mdate-sh is *not* installed by autoconf nor is
	it directly referenced in any code maintained in the autoconf
	repository, remove it from the list of files to fetch and keep it in
	.gitignore.

	This change exposed a bug in fetch.pl where it would crash when
	there was no old copy of a file being updated.

	 * .gitignore: Remove /build-aux/install-sh.
	 * build-aux/fetch.pl (%to_fetch): Remove build-aux/mdate-sh.
	   (slurp): Don’t die on ENOENT, return undef.
	   (replace_if_change): Handle $oldcontents being undef.
	 * build-aux/install-sh: Is now checked in.

2020-11-09  Zack Weinberg  <zackw@panix.com>

	Mention AM_GNU_GETTEXT_REQUIRE_VERSION support in NEWS.

2020-11-09  Michał Górny  <mgorny@gentoo.org>

	autoreconf: Support AM_GNU_GETTEXT_REQUIRE_VERSION
	As reported in https://github.com/gentoo/gentoo/pull/163, gettext 0.19.6
	supports using AM_GNU_GETTEXT_REQUIRE_VERSION (specifying a *minimum*
	required version of gettext) instead of AM_GNU_GETTEXT_VERSION
	(which specifies a *fixed* required version of gettext).
	Update autoreconf to support both.

	 * bin/autoreconf.in (autoreconf_current_directory): Check for
	   AM_GNU_GETTEXT_REQUIRE_VERSION as well as AM_GNU_GETTEXT_VERSION.
	   Update diagnostics about using AM_GNU_GETTEXT_VERSION but not
	   AM_GNU_GETTEXT, or vice versa, to match.
	 * doc/autoconf.texi (autoreconf Invocation): Update to match.

2020-11-09  Zack Weinberg  <zackw@panix.com>

	Fix more bugs in specific tests under AC_LANG(C++).
	Found by exhaustive testing for differences between probe results
	under AC_LANG(C) and AC_LANG(C++).

	 * lib/autoconf/c.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER): Cast result of
	   malloc for C++ compatibility.
	 * lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): Declare yywrap
	   as extern "C" when compiling as C++.

2020-11-05  Zack Weinberg  <zackw@panix.com>

	Make ‘forbidden tokens, basic’ test more robust.
	While testing the previous patch I noticed that the ‘forbidden tokens,
	basic’ test can fail if it runs too fast, because the autom4te cache
	files aren’t considered newer than configure.ac.

	* tests/tools.at (forbidden tokens, basic): Add delays to ensure
	  autom4te.cache files are newer than configure.ac.

2020-11-05  Zack Weinberg  <zackw@panix.com>

	Do not apply --program-transform-name to build-aux scripts.
	autoreconf expects to find $(pkgdatadir)/build-aux/config.sub etc
	under those names, not names modified by --program-transform-name.
	Placing them in $(pkgdatadir) is sufficient to keep parallel
	installations of autoconf separate: anyone doing that would need
	to adjust @PACKAGE@ anyway.

	* lib/local.mk: Use a _DATA rule, not a _SCRIPTS rule, to install
	  config.guess, config.sub, and install-sh.
	  (install-data-hook-make-aux-scripts-executable): New hook rule.

2020-11-05  Zack Weinberg  <zackw@panix.com>

	AC_FUNC_STRERROR_R: Include string.h in test program.
	I misremembered how AC_LANG_PROGRAM works.  We don’t need to invoke
	AC_INCLUDES_DEFAULT here but we *do* need to explicitly include
	string.h.

	Unfortunately we have no good way of testing for this regression with
	the testsuite as it is today.

	* lib/autoconf/functions.m4 (AC_FUNC_STRERROR_R): Include string.h in
	  test program.

2020-11-05  Zack Weinberg  <zackw@panix.com>

	Define AC_REQUIRE_AUX_FILE with AC_DEFUN.
	Some widely used Automake recipes involve putting AC_REQUIRE_AUX_FILE
	at top level of a configure script, and it uses AC_REQUIRE now, so it
	needs to be defined with AC_DEFUN.

	* lib/autoconf/general.m4 (AC_REQUIRE_AUX_FILE): Define with AC_DEFUN.
	* tests/torture.at (Missing auxiliary files (foreign)): New test.

2020-11-03  Zack Weinberg  <zackw@panix.com>

	make fetch

	fix ‘make syntax-check’ complaints (only affects comments).

2020-11-03  Jannick  <thirdedition@gmx.net>

	_AC_PROG_YYTEXT_DECL: Forward declare yywrap (#110312)
	Some versions of lex need you to forward-declare yywrap in a %{ %}
	block before the rules section, if you’re going to define it yourself.

	May help with bug #110312.

	* lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): In the test
	  input to lex, forward-declare yywrap before the rules.

2020-11-02  Zack Weinberg  <zackw@panix.com>

	autoreconf.in: improve compatibility with old perl
	In very old perls (I noticed this with 5.8.4), File::Temp objects are
	not automatically stringified in all contexts where we expect them to
	be, causing autoreconf to crash.

	* bin/autoreconf.in (install_aux_file): Explicitly extract the
	  temporary file’s name from $temp, and use that in all the places we
	  were using $temp.

2020-11-02  Zack Weinberg  <zackw@panix.com>

	Revert to 2.69-compatible behavior in AC_PROG_LEX (#110346)
	Commit 29ede6b96feee29c0c477d1659081bbdb82cd8b3 caused AC_PROG_LEX to
	stop looking for a library that provides yywrap.  This broke several
	packages in a Debian archive rebuild.

	Revert all the way to the 2.69 behavior, which was to set LEXLIB to
	-ll or -lfl if that library defines yywrap, but allow AC_PROG_LEX to
	succeed if neither -ll nor -lfl exists on the system, even if a lex
	program that doesn't define yywrap would need it.
	(This behavior was a bug, but people have come to depend on it.
	See https://savannah.gnu.org/support/index.php?110269 and the
	thread starting from
	https://lists.gnu.org/r/autoconf-patches/2020-07/msg00013.html
	for gory details.)

	To provide a path away from bug-compatibility, AC_PROG_LEX now takes
	one argument, documented as a whitespace-separated list of options.
	Two options are defined: ‘yywrap’ means to look for yywrap and behave
	as if lex is unavailable if it isn’t found; ‘noyywrap’ means to not
	look for yywrap at all.  These are mutually exclusive.

	Fixes bug #110346.

	* lib/autoconf/programs.m4 (AC_PROG_LEX): Add an argument which
	  can be either ‘yywrap’, meaning to look for yywrap in -ll, or
	  ‘noyywrap’, meaning to not look for yywrap at all.  In the
	  absence of either option, issue an obsoletion warning and
	  revert to behavior bug-compatible with 2.69.

	* tests/semantics.at: Add more tests of AC_PROG_LEX.
	* tests/mktests.sh: Exclude AC_PROG_LEX from autogenerated tests.

	* doc/autoconf.texi: Update documentation of AC_PROG_LEX.
	* NEWS: Update notes on AC_PROG_LEX.

2020-11-02  Zack Weinberg  <zackw@panix.com>

	AC_OPENMP: Avoid clobbering ‘mp’ and/or ‘penmp’ (#110353)
	Some of the compiler options that AC_OPENMP tests, mean “enable
	OpenMP” to one compiler, but “write output to a file named ‘mp’ or
	‘penmp’” to other compilers.  The author of AC_OPENMP believed that
	this could only happen if compilation was *successful*, but didn’t
	realize that one of the options means “write *preprocessed* output to
	a file named ‘penmp’” to SunPRO C, and that this *would* succeed on
	the test program.  (AC_LINK_IFELSE fails anyway, because the
	compilation didn’t create conftest$exeext.)

	The option that actually means “enable OpenMP” to SunPRO C is earlier
	in the list than the option that means “write preprocessed output to a
	file named ‘penmp’”, so we might never have noticed this, but for a
	second bug: if you have a bad combination of Solaris operating system
	patches installed, it’s possible for this compiler to
	successfully *compile* a program that uses OpenMP, but then fail
	to *link* it because the OpenMP runtime library is out of sync with
	the core C library.  AC_OPENMP doesn’t distinguish this case from
	“that option doesn’t mean ‘enable OpenMP’” so it goes on to other
	entries in the list and hits the “write preprocessed output” one.

	Implement four layers of defensive measures against this mess:

	 - Use an #error directive instead of a compile-time syntax error
	   to halt compilation when _OPENMP is not defined.
	 - For each option that might mean “enable OpenMP”, first do an
	   AC_COMPILE_IFELSE to find out whether it really means that, and
	   then an AC_LINK_IFELSE to find out whether it works.  If the
	   compilation succeeds but the link fails, bail out of the loop and
	   declare OpenMP to be unsupported.
	 - If a file named ‘mp’ or ‘openmp’ exists in configure’s working
	   directory when AC_OPENMP begins, error out.  This means it is safe
	   to delete any file named ‘mp’ or ‘openmp’ that exists at the *end*
	   of AC_OPENMP.
	 - If a file named ‘mp’ or ‘openmp’ exists in the top level of the
	   source tree with a configure.ac that uses AC_OPENMP, have autoconf
	   error out, too.

	Fixes bug #110353.  Problem reported by Dagobert Michelsen.

	* lib/autoconf/c.m4 (_AC_LANG_OPENMP(C)): Change ‘choke me’ to
	  ‘#error "OpenMP not supported"’.
	  (AC_OPENMP): AC_REQUIRE _AC_OPENMP_SAFE_WD.  For each option, do
	  both a compile test and a link test; if the compile test succeeds
	  but the link fails, don’t go on to other candidate options.
	  Delete files named ‘mp’ and ‘penmp’ after the loop.
	  (_AC_OPENMP_SAFE_WD): New macro, subroutine of AC_OPENMP.  If files
	  named ‘mp’ or ‘penmp’ exist, error out both at autoconf time and at
	  configure time.

	* tests/torture.at (Files clobbered by AC_OPENMP): New test.
	* doc/autoconf.texi: Document requirement not to have files
	  named ‘mp’ or ‘penmp’ next to a configure.ac that uses AC_OPENMP.

2020-11-02  Zack Weinberg  <zackw@panix.com>

	testsuite: Isolate aclocal from third-party macros (#110352).
	Several tests in the testsuite run a system-provided aclocal, which
	will look into its $prefix/share/aclocal for third-party macros.
	If those macros are buggy, aclocal may bomb out even though the test
	doesn’t use them, causing the test to fail spuriously.

	In all tests that need to run aclocal, create an empty directory and
	give aclocal the --system-acdir option pointing at that directory.
	This masks out all these potentially buggy macros.  (It does *not*
	mask out AM_INIT_AUTOMAKE, which aclocal will find in a different
	directory.)

	In all tests that run autoreconf but *don’t* need to run aclocal,
	create an empty aclocal.m4 and set ACLOCAL=true in the environment.

	Fixes bug #110352.  Problem reported by Dagobert Michelsen.

	* tests/fortran.at
	* tests/tools.at
	* tests/torture.at:
	  Set ACLOCAL=true in the environment in all tests that run
	  autoreconf but don’t need to run aclocal.
	  Set ACLOCAL="aclocal --system-acdir <empty directory>" in all
	  tests that do need to run aclocal.

2020-11-01  Zack Weinberg  <zackw@panix.com>

	AC_LANG_CALL(C++): Use ‘int’ for return type of conftest::$2.
	Commit 326c9a547423d25c621bc5c0ef76edbf6eda8c92 introduced a custom
	AC_LANG_CALL for C++.  Jani Välimaa reports in
	https://lists.gnu.org/archive/html/bug-autoconf/2020-10/msg00054.html
	that the new code does not handle AC_CHECK_LIB([foo], [main])
	correctly.  This is not the recommended way to use AC_CHECK_LIB, but
	it’s what you get if you autoupdate from AC_HAVE_LIBRARY, and some
	people may not have bothered replacing main with a more appropriate
	symbol.

	This patch changes the return type of the fake function declaration
	for AC_CHECK_LIB’s second argument to be ‘int’, which is sufficient to
	make g++ 10.2.0 happy again.  We’re still on thin ice, unfortunately;
	the code generated by AC_LANG_CALL *always* has undefined behavior, in
	both C and C++, unless by chance the real prototype of the function
	we’re probing for happens to match our fake declaration.  The only
	permanent cure is to stop faking declarations, and that’s going to be
	a challenge.

	* lib/autoconf/c.m4 (AC_LANG_CALL(C++)): Use ‘int’ for the return
	  type of the fake function declaration, to avoid problems when
	  the function whose declaration we’re faking is ‘main’.

2020-11-01  Zack Weinberg  <zackw@panix.com>

	Don’t search for X11 when cross compiling (#110345)
	This is undesirable because X11 development headers and libraries
	found by searching /usr are much more likely to belong to the build
	operating system than the host operating system (being cross-compiled
	for).  A particularly problematic case, from the original bug report,
	is “using a sysroot where the target is binary compatible with the
	host.  In this case AC_PATH_X will happily look at /usr and say that
	yes, X is available, even if the sysroot doesn't have X.”

	To cross-compile X client applications, the recommended procedure is
	to put X11 headers and libraries for the host system in the cross
	compiler’s default search path; alternatively, --x-includes and
	--x-libraries can be used.

	Fixes bug #110345.  Problem reported by Ross Burton.

	 * lib/autoconf/libs.m4 (_AC_PATH_X): Before doing anything else,
	   see whether a test compilation with no special options (just -lX11)
	   will work.  If it doesn’t, only invoke _AC_PATH_X_XMKMF and
	   _AC_PATH_X_DIRECT when not cross compiling.

2020-10-31  Zack Weinberg  <zackw@panix.com>

	Ignore stderr when testing parallel autotest (#110351).
	Non-release versions of bash (notably 5.1.0(1)-rc1, which was uploaded
	to Debian unstable) print internal debugging messages like

	    TRACE: pid 411364: bgp_delete: deleting 432074

	to the test driver’s stderr while executing the parallel test driver.
	This causes spurious failures in the test suite.  Chet Ramsey assures
	me these are not a symptom of a bug in either bash or the driver code
	(see https://lists.gnu.org/archive/html/bug-autoconf/2020-10/msg00047.html)
	so have the test suite ignore them.

	This fixes Savannah bug #110351.

	* tests/autotest.at: Ignore stderr whenever running a micro-suite in
	  parallel mode, to avoid spurious failures due to internal debugging
	  messages that may be printed by bash.

2020-10-29  Zack Weinberg  <zackw@panix.com>

	tests/m4sh.at: prevent an undesirable expansion of __oline__.
	The descriptive comment for AT_DATA_LINENO mentions __oline__, and
	this is expanded when generating the testsuite, which is confusing
	to anyone reading the generated testuite.  Defang it with @&t@.

	* tests/m4sh.at (AT_DATA_LINENO): Prevent expansion of __oline__
	  in the descriptive comment.

2020-10-28  Jannick  <thirdedition@gmx.net>

	Treat msys(2) the same as cygwin when looking at host_os.
	In most cases, checks depending on the value of $host_os should
	treat *-*-cygwin*, *-*-msys*, and *-*-mingw* all the same.

	* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS):
	  Discard -lkernel32 on msys* as well.
	  When not discarding -lkernel32, deduplicate it, like other -l options.

	* lib/autoconf/functions.m4 (AC_FUNC_MALLOC, AC_FUNC_REALLOC):
	  msys* also guarantee to return nonnull for malloc(0)/realloc(0).

	* tests/local.at (at_check_env): Also ignore MSYS as an environment
	  variable.

2020-10-20  Zack Weinberg  <zackw@panix.com>

	Improve handling of missing aux scripts (autoreconf)
	Make ‘autoreconf --install’ add config.sub, config.guess, and
	install-sh to the source tree when necessary.  This is only relevant
	for packages that don’t use Automake, because ‘automake --add-missing’
	already adds these scripts to the source tree, but apparently there
	are plenty of packages out there that don’t use Automake, didn’t need
	config.{sub,guess} with autoconf 2.69, and do need them with 2.70.
	Such packages will need to have their equivalent of ‘make dist’
	manually updated to ship the new files, of course.

	This patch also has ‘autoreconf’ issue an error if aux files are
	missing and ‘--install’ *wasn’t* used, or if --install *was* used but
	could not install all the missing files.  This error is more likely to
	be caught by maintainers than the configure-time error added in the
	previous patch.  It is not currently practical to make autoconf itself
	issue this error message, because of how the autoconf wrapper script
	is different from all the other wrapper scripts.  Also, autoreconf
	runs automake *after* autoconf, so we’d get spurious errors from
	packages that do use automake.

	* bin/autoreconf.in ($buildauxdir): New package global, initialized
	  to $pkgdatadir/build-aux, or to $ENV{autom4te_buildauxdir} if that’s set.
	  (find_missing_aux_files, can_install_aux_files, try_install_aux_files)
	  (install_aux_file, make_executable): New subs.
	  (autoreconf_current_directory): Trace AC_REQUIRE_AUX_FILE.
	  After running all tools that might install aux files, try to
	  install aux files ourself if --install was given.
	  After that, report on any that are still missing.
	* lib/autom4te.in (Autoreconf-preselections): Add AC_REQUIRE_AUX_FILE.
	  Make list order consistent with list order in autoreconf.in.
	* tests/wrapper.as: Set autom4te_buildauxdir to point to location of
	  config.guess, config.sub, and install-sh within the source tree.

	* lib/local.mk: Install config.guess, config.sub, and install-sh
	  into $(pkgdatadir)/build-aux.

	* doc/autoconf.texi: Document that autoreconf can now install
	  config.guess, config.sub, and install-sh itself without help from
	  automake, but packages not using automake will need to arrange for
	  tarball distribution of these files by hand.

	* tests/torture.at (Missing auxiliary files): Test autoreconf as well.

2020-10-20  Zack Weinberg  <zackw@panix.com>

	Improve handling of missing aux scripts.
	Another regression identified by the Debian archive rebuild was that
	more macros require the presence of config.sub and config.guess now.
	‘autoreconf --install’ doesn’t install these itself, it relies on
	‘automake --add-missing’ to do that; so, packages that don’t use
	Automake will fail at the configure stage after configure is
	regenerated.  To make matters worse, AC_CONFIG_AUX_DIRS assumes that
	everyone who needs config.sub and config.guess also needs install-sh,
	so in about half of the affected packages, the failure manifested as a
	complaint about install-sh being missing -- technically true but
	adding install-sh wouldn’t have resolved the problem by itself.

	This patch overhauls the AC_CONFIG_AUX_DIR(S) mechanism so that a
	configure script knows the complete set of aux scripts that were
	AC_REQUIRE_AUX_FILE’d for it, checks for the existence of all of
	them, and not any others.  Thus, this configure script

	    AC_INIT([test], [1.0])
	    AC_FUNC_MALLOC
	    AC_CONFIG_HEADERS([config.h])
	    AC_OUTPUT

	will work fine in a directory that contains config.sub and
	config.guess but not install-sh.  Also, if it’s in a directory
	that *doesn’t* contain config.sub and config.guess, it will print an
	accurate error message

	    configure: error: cannot find required auxiliary files: config.guess config.sub

	instead of the misleading

	    configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."

	A side-effect: it doesn’t make sense for AC_CONFIG_SUBDIRS to demand
	the presence of Cygnus configure in the aux dir, on the off-chance
	that one of the subdirectories *might* be using it -- I have no idea
	where someone would even get a copy of that nowadays -- so I dropped
	that feature.  I rather suspect nobody has needed it in over a decade.

	I also documented the expanded need for config.sub and config.guess in
	NEWS as well as the manual.

	* NEWS: Document expanded need for config.sub and config.guess.
	  Document removed support for Cygnus configure in subdirectories.

	* doc/autoconf.texi: Clarify exactly when install-sh, config.sub,
	  and/or config.guess are required.  Document canonical online sources
	  for these scripts.  Revise documentation of AC_CONFIG_AUX_DIR and
	  AC_REQUIRE_AUX_FILE.  Minor improvements to documentation of
	  AC_CONFIG_SRCDIR.  Remove mentions of Cygnus configure in
	  subdirectories.

	* lib/autoconf/general.m4
	  (_AC_INIT_PARSE_ARGS): Remove mention of Cygnus configure;
	  clarify function of configure.gnu.
	  (AC_CONFIG_AUX_DIR): Support multiple invocations.
	  (AC_CONFIG_AUX_DIRS): Now an undocumented compatibility interface
	  rather than an internal subroutine; just runs AC_CONFIG_AUX_DIR on
	  each of its arguments.
	  (AC_CONFIG_AUX_DIR_DEFAULT): Now a backward compatibility stub that
	  requires _AC_INIT_AUX_DIR without adding anything to _AC_AUX_FILES.

	  (AC_REQUIRE_AUX_FILE): Now adds the named aux file to _AC_AUX_FILES
	  and requires _AC_INIT_AUX_DIR, as well as being a trace hook.

	  (_AC_INIT_AUX_DIR): New home of the loop searching for necessary aux
	  files (formerly in AC_CONFIG_AUX_DIRS).  Looks for all the necessary
	  aux files, not just for install-sh.

	  (ac_config_guess, ac_config_sub, ac_configure): Issue deprecation
	  warnings if these undocumented shell variables are actually used.

	  (AC_CANONICAL_BUILD, AC_CANONICAL_HOST, AC_CANONICAL_TARGET):
	  No need to require AC_CONFIG_AUX_DIR_DEFAULT.
	  Can rely on $ac_aux_dir ending with a slash.

	  * lib/autoconf/programs.m4 (AC_PROG_INSTALL, AC_PROG_MKDIR_P):
	  No need to require AC_CONFIG_AUX_DIR_DEFAULT.

	  * lib/autoconf/status.m4 (_AC_CONFIG_SUBDIRS):
	  No need to require AC_CONFIG_AUX_DIR_DEFAULT.
	  Remove check for Cygnus configure; clarify function of configure.gnu.

	  * lib/autotest/general.m4: Remove mention of Cygnus configure.

	  * tests/torture.at (Missing auxiliary files): New test.

2020-10-14  Ross Burton  <ross.burton@arm.com>

	autoreconf: remove redundant xsystem calls
	xsystem_hint() executes the command, so there's no need to call xsystem()
	afterwards.

	* bin/autoreconf.in: No need to call xsystem($cmd) immediately after
	  calling xsystem_hint("message", $cmd).

2020-10-14  Zack Weinberg  <zackw@panix.com>

	autoreconf: cope with empty AC_CONFIG_SUBDIRS (bug 110331)
	Commit 41edf99f9515f3f83398428c39d79e11266a5a0d made all Perl warnings
	fatal.  This caused autoreconf to crash on packages that call
	AC_CONFIG_SUBDIRS with no arguments. They probably shouldn’t do that,
	but we shouldn’t crash if they do.

	Problem reported by Ross Burton.

	* bin/autoreconf.in (autoreconf_current_directory):
	  Convert undef to '' before attempting to split it.
	* tests/torture.at (Empty AC_CONFIG_SUBDIRS): New test.

2020-10-12  Paul Eggert  <eggert@cs.ucla.edu>

	doc: improve AS_CASE, AS_IF doc
	See the thread containing:
	https://lists.gnu.org/r/bug-gnulib/2020-10/msg00033.html
	* doc/autoconf.texi: Distinguish between Solaris 10 and later.
	(Balancing Parentheses): Mention the Posix syntax for ‘case’,
	typically a better solution nowadays.
	(AS_CASE, AS_IF): Mention AC_REQUIRE, portability, parens.
	(Prerequisite Macros): Tighten up example and make it less dated.
	Say that AS_CASE and AS_IF are not needed outside macros.
	* NEWS: Don’t mention AS_FOR.  It’s not documented, and for
	good reason since it is so ... quirky.

2020-10-10  Zack Weinberg  <zackw@panix.com>

	_AS_PATH_WALK: Use AS_IF for IF-NOT-FOUND argument.
	The construct _AS_PATH_WALK was using to conditionally execute its
	IF-NOT-FOUND argument, was a little too fragile: relatively natural
	variations in usage, such as putting the final `])` on a line by
	itself, could cause shell syntax errors.  Use AS_IF instead.

	* lib/m4sugar/m4sh.m4: Use AS_IF to execute IF-NOT-FOUND conditionally.

2020-10-10  Zack Weinberg  <zackw@panix.com>

	Fix regressions when using the C++ compiler to perform tests.
	The Debian project has done an archive rebuild using autoconf 2.69c,
	which found several serious regressions from 2.69 where test programs
	used to be accepted by a C++ compiler, but are now rejected.  Part of
	the problem is that newer C++ compilers are more likely to reject
	“traditional” sloppy C, but part of it is that bug fixes since 2.69
	did not consider the possibility of test macros being used with
	AC_LANG([C++]) in effect.

	I’m still working on test suite improvements that will catch these
	regressions in the future, but I don’t see any reason to delay the
	actual bugfixes.  (I’ve gotten far enough on the test suite changes
	that I know they _will_ catch the bugs.)

	* NEWS: Document that AC_FUNC_STRERROR_R no longer tries to detect a
	  strerror_r that exists in the C library but isn’t declared by string.h.

	* lib/autoconf/c.m4
	  (AC_LANG_CALL(C++)): New macro.  Use a more robust technique for
	  avoiding a type conflict with any intrinsic prototype.
	  (AC_LANG_CALL(C)): Remove #ifdef __cplusplus, this macro is no longer
	  used to generate C++ code.

	* lib/autoconf/functions.m4
	  (AC_FUNC_CLOSEDIR_VOID): Rely on <dirent.h> to declare closedir.
	  Simplify test program.  Use AC_COMPILE_IFELSE, not AC_RUN_IFELSE.
	  (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF): Use void *, not char *,
	  for variable holding a value returned by malloc/realloc respectively.
	  (AC_FUNC_STRERROR_R): Don’t AC_CHECK_FUNCS_ONCE strerror_r.
	  AC_DEFINE HAVE_STRERROR_R if and only if we are also going to define
	  HAVE_DECL_STRERROR_R.  Remove AC_RUN_IFELSE fallback when strerror_r
	  is not declared.

	* lib/autoconf/headers.m4 (AC_USG): Use "", not 0, for the first
	  argument to rindex.

2020-10-07  Zack Weinberg  <zackw@panix.com>

	Don’t issue obsoletion warnings for AC_DIAGNOSE.
	AC_DIAGNOSE is used in several extremely popular add-on macros,
	notably AM_INIT_AUTOMAKE, AM_GNU_GETTEXT, and AC_LIBTOOL_DLOPEN.
	Until newer versions of these macros are available, -Wobsolete
	warnings for AC_DIAGNOSE will be unhelpful noise.

	Therefore, make it so AC_DIAGNOSE(...) will still be replaced with
	m4_warn(...) by autoupdate, but autoconf runs will not complain about
	AC_DIAGNOSE.  The bulk of the patch is augmenting AU_DEFUN so that it
	can define a “silent” autoupdate replacement, and documenting the new
	feature.

	* lib/autoconf/autoupdate.m4 (AU_DEFUN): Add a fourth argument, SILENT,
	  which must be either empty or the word ‘silent’.  If it is ‘silent’,
	  the macro being defined will *not* issue a -Wobsolete warning when
	  expanded by autoconf.
	  Tweak quotation to prevent emacs’ parenthesis matching from getting
	  confused.
	  (AU_ALIAS): Add the SILENT argument here as well.

	* lib/autoconf/general.m4 (AC_DIAGNOSE): Define as a silent AU_DEFUN.
	  Add commentary explaining why this was done and when it can be
	  changed back.

	* doc/autoconf.texi (AU_DEFUN, AU_ALIAS): Revise; document new SILENT
	  argument.

2020-10-05  Zack Weinberg  <zackw@panix.com>

	NEWS: Mention more bug fixes.

2020-09-26  Zack Weinberg  <zackw@panix.com>

	Reorganize 2.70 NEWS
	The changes are now classified into “backward incompatibilities”,
	“new features”, “obsolete features and new warnings”,
	“notable bug fixes”, and “autotest enhancements”.

	Also make the warning about argument-quotation bugs more prominent
	and explicit.  (See for instance Savannah bug 110319.)

2020-09-24  Zack Weinberg  <zackw@panix.com>

	mktmpdir: Ensure that $tmp is always an absolute pathname.
	Several autotools programs use ‘do’ to evaluate Perl code
	generated into a file in the temporary directory created by
	Autom4te::General::mktmpdir.  If the environment variable
	TMPDIR is a relative path, mktmpdir will set $tmp to a
	relative path and we’ll end up trying to ‘do’ a relative
	path, which searches for the file in @INC.  This doesn’t
	work under perl 5.26 or later, because ‘.’ was removed
	from @INC in that version (for security reasons).

	Ensure that mktmpdir sets $tmp to an absolute pathname.
	Also use File::Temp::tempdir to create the temporary
	directory, instead of shelling out to ‘mktemp -d’;
	this eliminates a subprocess and means we don’t have
	to worry about cleaning up the directory on exit.

	Problem found by Kent Fredric and reported as
	<https://bugs.gentoo.org/625576>.
	Supersedes Gentoo’s autoconf-2.69-perl-5.26-2.patch.

	* lib/Autom4te/General.pm
	  (mktmpdir): Use File::Temp to create temporary directory.
	  Ensure that $tmp is an absolute path.
	  (END): No need to clean up $tmp.

	* tests/tools.at (autotools and relative TMPDIR): New test.

2020-09-24  Zack Weinberg  <zackw@panix.com>

	tests/mktests.sh: fix awk syntax error.
	I forgot that you can’t start an awk action block on the next line
	from its condition.

	build-aux/fetch.pl: Fetch ChannelDefs.pm from automake.

2020-09-22  Zack Weinberg  <zackw@panix.com>

	Autoupdate AC_{DIAGNOSE,FATAL,OBSOLETE,WARNING} and _AC_COMPUTE_INT.
	While working on the previous patches I noticed that all of these
	macros are officially obsolete, but autoupdate doesn’t replace them.

	_AC_COMPUTE_INT is easy to autoupdate.  AC_{DIAGNOSE,FATAL,WARNING}
	require a little special handling because their replacements are
	m4sugar macros, and autoupdate normally expands m4sugar macros as it
	goes.  Fortunately, the same workaround as is used for AC_FOREACH can
	be applied.  AC_OBSOLETE also needs that workaround, and cannot be
	fully replaced automatically.

	The bulk of the patch is removing internal uses of AC_DIAGNOSE.

	* lib/autoconf/autoupdate.m4
	* lib/autoconf/c.m4
	* lib/autoconf/functions.m4
	* lib/autoconf/general.m4
	* lib/autoconf/headers.m4
	* lib/autoconf/lang.m4
	* lib/autoconf/status.m4
	* lib/autoconf/types.m4
	* tests/local.at
	* tests/tools.at:
	  Use, and/or refer to, m4_warn instead of AC_DIAGNOSE.

	* lib/autoconf/general.m4 (_AC_COMPUTE_INT): Define using AU_DEFUN.
	  (AC_DIAGNOSE, AC_FATAL, AC_WARNING): Autoupdate to m4_warn,
	  m4_fatal, and m4_warn([syntax], [$1]) respectively, using the same
	  paired AU_DEFUN/AC_DEFUN trick that is used for AC_FOREACH.
	  (AC_OBSOLETE): Autoupdate to m4_warn([obsolete], [$1]) and advise
	  hand-conversion to AU_DEFUN.

	* lib/autoconf/autoupdate.m4 (AU_DEFUN): Tweak quoting so m4_warn([$3])
	  is emitted into the edited configure.ac instead of being expanded at
	  autoupdate time.

	* tests/tools.at (autoupdating AC_FOREACH): Adjust grep expressions.
	  (autoupdating AC_DIAGNOSE and AC_WARNING): New test.
	  (autoupdating AC_FATAL): New test.
	  (autoupdating AC_OBSOLETE): New test.
	* tests/mktests.sh (ac_exclude_list, au_exclude_list):
	  Exclude AC_DIAGNOSE, AC_FATAL, AC_FOREACH, AC_OBSOLETE, and AC_WARNING
	  if not already excluded.

2020-09-22  Zack Weinberg  <zackw@panix.com>

	Update documentation related to warnings.
	This makes the Texinfo documentation consistent with the previous
	changes.  --help output regarding warnings is already drawn directly
	from ChannelDefs.pm and thus does not need to be updated.

	* doc/autoconf.texi: Update all ‘invocation’ sections to describe
	  -W/--warnings consistently, and to refer to m4_warn for the list
	  of categories.
	  (m4_warn): Document the complete current list of categories.
	  (Reporting Messages): Delete section.
	  (AC_DIAGNOSE, AC_WARNING, AC_FATAL): Move to Obsolete Macros.

2020-09-22  Zack Weinberg  <zackw@panix.com>

	Use WARNINGS to pass down warnings options from autoreconf.
	autoreconf runs a bunch of subsidiary tools, and is expected to pass
	along various command-line settings, such as those controlling
	warnings.  It has historically done this via the command line.
	However, not all of the tools recognize the same set of command-line
	warnings options.  There’s an existing check for whether aclocal and
	automake understand ‘--warnings’ at all, but it currently assumes that
	automake will accept the same set of warnings *categories* that
	autoconf does.  This hasn’t actually been true for many years
	and is known to cause problems; see the discussion starting at
	<https://lists.gnu.org/archive/html/autoconf/2020-09/msg00000.html>.

	Previous patches in this series (and related patches applied to
	automake) have restored agreement between the current development
	trunks of the two sets of tools on the set of warnings categories, but
	we still need to deal with the possibility of the *installed* tools
	not being in agreement.

	If we use the WARNINGS environment variable to pass down warnings
	options, instead of the command line, then all the tools are already
	coded to ignore unknown warning categories, and this ceases to be an
	issue.  And we no longer need the check for ‘--warnings’ support in
	automake, either.

	Also, autoreconf as well should suppress warnings from its first
	invocation of autoconf, which is for tracing purposes only and may
	emit spurious warnings because aclocal.m4 is not yet in place.

	* bin/autoreconf.in
	  ($aclocal_supports_warnings, $automake_supports_warnings): Delete.
	  (@warning): Make local to sub parse_args.
	  (parse_args): Do not add --warnings options to $autoconf,
	  $autoheader, $aclocal, or $automake.  Instead, set $ENV{WARNINGS}
	  appropriately.  No longer necessary to probe for --warnings support
	  from aclocal and automake.
	  (autoreconf_current_directory): Set $ENV{WARNINGS} temporarily to
	  “none” when running autoconf in trace mode.  Fix typo in comment.
	  Close $traces immediately after we’re done with it.

	* tests/torture.at (Specific warnings options for autoreconf):
	  New test.

2020-09-22  Zack Weinberg  <zackw@panix.com>

	Disable all warnings when running autoconf as a subprocess.
	autoheader and autoscan both run autoconf in trace mode, and
	autoheader makes a point of passing down the warnings options.
	This means autoheader prints warnings that a regular invocation
	of autoconf would also print, so in the common case where both
	are being run by autoreconf, the warnings are duplicated.
	autoscan doesn’t pass down warnings options but it _does_ leave
	the WARNINGS environment variable alone, which means it may issue
	completely spurious warnings because the configure script is still
	under construction.

	Change this so that both programs disable all warnings for the
	subsidiary invocation of autoconf, by not passing any warnings
	options themselves, and by setting the WARNINGS environment variable
	to “none” for the subprocess.  For this to work correctly, the
	‘args: --warnings syntax’ line has to be removed from autom4te.cfg
	(m4sugar section).  Since syntax warnings are on by default anyway,
	the sole effect of this is to allow WARNINGS=none to turn off syntax
	warnings.

	The test suite changes are all to remove expectations of duplicate
	diagnostics from autoheader.

	* bin/autoheader.in: Do not pass warnings options down to subsidiary
	  autoconf, and set WARNINGS=none in the environment for that process.
	* bin/autoscan.in: Set WARNINGS=none in the environment for subsidiary
	  autoconf.
	* lib/autom4te.in (M4sugar): Remove ‘--warnings syntax’.
	* tests/semantics.at, tests/torture.at: No longer expect various
	  diagnostics from autoheader as well as autoconf.

2020-09-22  Zack Weinberg  <zackw@panix.com>

	New utility function Autom4te::ChannelDefs::merge_WARNINGS.
	This function merges a list of warnings categories into the environment
	variable WARNINGS, returning a new value to set it to.  The intended use
	is in code of the form

	{
	  local $ENV{WARNINGS} = merge_WARNINGS ("this", "that");

	  # run a command here with WARNINGS=this,that,etc
	}

	This is not used yet, but will be in the next patch.

	* lib/Autom4te/ChannelDefs.pm (merge_WARNINGS): New function.

2020-09-22  Zack Weinberg  <zackw@panix.com>

	Manually sync ChannelDefs.pm from automake.
	ChannelDefs.pm *ought* to be kept in sync between automake and autoconf,
	because it defines the set of valid -W options, and autoreconf assumes
	that it can pass arbitrary -W options to all of the tools it invokes.
	However, it isn’t covered by either project’s ‘make fetch’ and it hasn’t
	actually *been* in sync for more than 17 years.

	This patch manually brings over all of the changes made on the
	automake side.  Once the complementary patch is applied by the
	automake team, both versions of the file will be the same, and then we
	can add it to the list in fetch.pl and not have this problem any more
	in the future.

	There are some user-visible consequences to bringing this file back
	into sync.  The only one worth mentioning in NEWS is that the ‘obsolete’
	category of warnings is now on by default.  This had quite a bit of
	fallout throughout the testsuite.  There are also some new warning
	categories that get mentioned in --help output, but we don’t actually
	generate any warnings in those categories, so people using ‘-Wall’
	won’t see any change.  More diagnostics are automatically tagged with
	‘warning:’ or ‘error:’, which also had some fallout in the testsuite.
	Finally, ‘-Werror’ no longer causes complaints about unknown warning
	categories to be treated as hard errors.

	Internally, there are some small API changes: ‘parse_warnings’ is no
	longer usable as a ‘getopt’ callback function, and we now have a stub
	Autom4te/Config.pm to match the automake code’s expectations.  (This
	file *should* also be synced from automake by ‘make fetch’, but we
	can’t quite do that yet because it’s a generated file and our build
	system is not prepared to handle adding *two* directories to @INC when
	running a not-yet-installed Perl script.  I plan to fix that after 2.70.)

	As a side-effect of adding a Config.pm, ‘prog_error’ now says to
	report the bug to bug-autoconf, not bug-automake.  If this is why we
	mostly haven’t been using prog_error for internal errors, we can stop
	avoiding it.  (I did not change anything to use prog_error in this
	patch.)

	* lib/Autom4te/ChannelDefs.pm: Merge from automake.
	* lib/Autom4te/Config.pm: New file.
	* lib/local.mk (dist_perllib_DATA): Add Autom4te/Config.pm.

	* bin/autoconf.as: Update list of warning categories to match
	  Autom4te::ChannelDefs::usage.
	* bin/autoheader.in (@warnings): New global.
	  (parse_args): Don’t use parse_warnings as a getopt callback.
	  (main): Add warnings options from our command line to $autoconf.
	  No need to turn on 'obsolete' warnings explicitly.
	  No need to include "warning: " in warning messages.
	* bin/autom4te.in (parse_args): Don’t use parse_warnings as a getopt callback.
	  (main): No need to include "warning: " in warning messages.
	* bin/autoreconf.in (parse_args): parse_warnings now takes only one argument.
	* bin/autoupdate.in: Set WARNINGS=none in environment for all child processes.

	* tests/local.at
	  (AT_CHECK_M4): Handle `autom4te: error: /usr/bin/m4 ...` like
	  `autom4te: /usr/bin/m4 ...`.
	  (_AT_CHECK_AC_MACRO): Add AUTOCONF-FLAGS argument, passed to both
	  autoconf and autoheader.
	  (AT_CHECK_MACRO): Default AUTOCONF-FLAGS argument to empty.
	  Pass that argument to autoheader as well as autoconf.
	  (AT_CHECK_AU_MACRO): Expect a “macro ‘NAME’ is obsolete’ diagnostic
	  on the first run of autoconf.  Pass -Wno-obsolete to autoconf on the
	  second run, and to autoheader on both runs.

	* tests/base.at
	* tests/c.at
	* tests/compile.at
	* tests/m4sh.at
	* tests/m4sugar.at
	* tests/semantics.at
	* tests/tools.at
	* tests/torture.at:
	  No need to pass -Wobsolete to autoconf.
	  Pass -Wno-obsolete to autoheader where needed to avoid handling
	  the same warning twice.
	  Update various expectations for diagnostics to match behavior
	  changes.

	* tests/tools.at (autoupdating AU_ALIAS): Add an AC_CONFIG_HEADERS
	  line to the test configure.ac to eliminate an unrelated diagnostic.

2020-09-22  Jonathan Wakely  <jwakely@redhat.com>

	doc: Fix cross-reference for AC_TRY_LINK
	The documentation for AC_TRY_LINK has a cross-reference to "Running
	the Compiler".  This should be "Running the Linker" instead.  Also
	make the link in AC_TRY_LINK_FUNC consistent.

2020-09-22  Zack Weinberg  <zackw@panix.com>

	bin/autoconf.as: Fix --help.
	Commit 9b5c0f17741836e99d0a801c6309389d391c03f9 introduced a bug where
	autoconf --help would only print “Try 'autoconf --help' for more information.”
	Correct this.

	* bin/autoconf.as: Print $help, not $usage_err, for --help.
	  Consistently use AS_ECHO, not bare echo.

2020-09-21  Zack Weinberg  <zackw@panix.com>

	Consistently use ‘our’ instead of ‘use vars’ in Perl.
	At file scope of a file containing at most one ‘package’ declaration,
	‘use vars’ is exactly equivalent to ‘our’, and the latter is preferred
	starting with Perl 5.6.0, which happens to be the oldest version we
	support.

	In one place ‘our’ was not actually necessary and was switched to ‘my’.

	(This change has already been made in Automake and applied to the
	shared Perl code via the previous ‘make fetch’ commit.)

	* lib/Autom4te/C4che.pm
	* lib/Autom4te/ChannelDefs.pm
	* lib/Autom4te/General.pm: Replace all uses of ‘use vars’ with ‘our’.
	* bin/autoheader.in: Replace all uses of ‘use vars’ with ‘our’.
	  Remove an unnecessary ‘local’.
	* bin/autoscan.in: Convert ‘use vars’ variables to ‘my’ variables.

2020-09-21  Zack Weinberg  <zackw@panix.com>

	make fetch yet again

2020-09-18  Bruno Haible  <bruno@clisp.org>

	doc: Mention two more shell portability problems.
	* doc/autoconf.texi (File Descriptors): Mention a problem of Solaris 10.
	Mention that a known problem also occurs in dash.

2020-09-11  Zack Weinberg  <zackw@panix.com>

	make fetch

2020-09-11  Zack Weinberg  <zackw@panix.com>

	Fetch more files from their official upstream.
	‘make fetch’ was updating several auxiliary files from the copy
	embedded in Gnulib instead of from their official home.  This patch
	teaches fetch.pl to update as many as possible of them from their
	official homes.  The remaining exception is GNU license files, which,
	except for fdl.texi, do not appear to have a public version control
	system.  Gnulib has a script for updating them, but it appears one
	must be logged into some specific FSF-operated shell host for it to
	work.

	The files affected, and their official homes, are:

	  build-aux/install-sh    automake
	  build-aux/mdate-sh      automake
	  build-aux/config.guess  config
	  build-aux/config.sub    config
	  doc/fdl.texi            gnustandards
	  doc/gnu-oids.texi       gnustandards
	  doc/make-stds.texi      gnustandards
	  doc/standards.texi      gnustandards
	  doc/texinfo.tex         texinfo

	This change exposed a bug in fetch.sh: there is a subtle difference
	between File::Spec->catpath and ->catfile and I should have been using
	the latter.

	* build-aux/fetch.pl: Can now fetch from arbitrary Savannah
	  repositories, not just from gnulib and automake.  Fetch as
	  many files as possible from their official home, instead of
	  from gnulib.  Use File::Spec->catfile, not ->catpath.
	  Strip trailing whitespace from all files.

2020-09-11  Zack Weinberg  <zackw@panix.com>

	Rewrite fetch.sh in Perl.
	Using HTTP::Tiny to talk to the network, instead of wget, means that
	we can make just one TCP connection to git.savannah.gnu.org to do the
	whole job, which is quite a bit faster.  It should also be more
	robust against weird characters in filenames / URLs and stuff.

	The script has a higher requirement for Perl than is the standard in
	autoconf -- 5.14 (first version with HTTP::Tiny), with IO::Socket::SSL
	installed -- but that’s ok, I hope, because it’s maintainer-only and
	not installed.

	fetch.sh was the sole user of move-if-change, and the Perl script does
	that job itself, but I left move-if-change in build-aux and on the fetch
	list anyway, in case we discover another use for it in the future.

	* build-aux/fetch.sh: Replace with...
	* build-aux/fetch.pl: ... reimplementation in Perl.
	* cfg.mk (fetch): Update to match.

2020-09-10  Zack Weinberg  <zackw@panix.com>

	AC_PROG_*CPP: Try ‘cpp’ before ‘/lib/cpp’
	All of the AC_PROG_*CPP macros fall back to ‘/lib/cpp’ if invoking the
	relevant compiler with ‘-E’ doesn’t work.  This is an obsolete
	location to find the C preprocessor.  Linux distributions tend to ship
	a compatibility symlink, as do Solaris and AIX (as of the versions in the
	GCC compile farm, anyway), but the BSDs no longer do.

	The tests for this fallback are already expecting ‘cpp’ to be a
	command findable via $PATH, so make the probe macros do the same
	thing.  (We still try ‘/lib/cpp’ if ‘cpp’ _isn’t_ in $PATH.)

	* lib/autoconf/c.m4
	  (AC_PROG_CPP, AC_PROG_CXXCPP, AC_PROG_OBJCPP, AC_PROG_OBJCXXCPP):
	  If $CC / $CXX / $OBJC / $OBJCXX -E (respectively) does not run the
	  preprocessor, look for ‘cpp’ in $PATH before falling back to ‘/lib/cpp’.

	* doc/autoconf.texi
	  (AC_PROG_CPP, AC_PROG_CXXCPP, AC_PROG_OBJCPP, AC_PROG_OBJCXXCPP):
	  Update to match.

2020-09-03  Zack Weinberg  <zackw@panix.com>

	make fetch

2020-09-03  Zack Weinberg  <zackw@panix.com>

	Add Configure_ac.pm to set of files to be synced from automake.
	This file seems to have been accidentally left off of the list of .pm
	files that should be kept the same between automake and autom4te.
	It’s already almost identical in both codebases.

	It would make sense to sync ChannelDefs.pm too, but the copies of that
	file in the two codebases have diverged; they would need to be
	reconciled by hand first.

	* build-aux/fetch.sh (automake_files): Add lib/Automake/Configure_ac.pm.

2020-09-03  Zack Weinberg  <zackw@panix.com>

	Fetch gnulib files from gitweb.
	‘make fetch’ pulls the files maintained by Automake from gitweb, so we
	always get the HEAD revision at the time of the operation.  The files
	maintained by Gnulib, on the other hand, are just copied from whatever
	local gnulib checkout you happen to have on your hard drive at the
	time, which might not have been updated recently and might not even be
	checked out from gnulib trunk.

	This patch makes us use the same logic for Gnulib that we do for
	Automake.  It also pulls all of the code out of cfg.mk to a separate
	shell script.  The lists of files to update from each repository are
	also moved to that file.

	 * build-aux/fetch.sh: New script.  Lists of files to fetch from
	   Gnulib and Automake are now kept here.
	 * cfg.mk (fetch): Run fetch.sh, it does all the work.
	   (gnulib-update, autom4te-update, WGETFLAGS, automake_gitweb)
	   (autom4te_files, move_if_change): Delete.

2020-08-31  Zack Weinberg  <zackw@panix.com>

	Fatalize all warnings in Perl code.
	Search-and-replace change ‘use warnings;’ to ‘use warnings FATAL => 'all';’
	in all Perl code.

	Notwithstanding the dire cautions in ‘perldoc warnings’ about this,
	I think it’s the right call for us.  One file was already doing it.
	No new testsuite failures are observed on Linux with Perl 5.30.3
	nor on NetBSD with Perl 5.6.1.

	* bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in
	* bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in
	* lib/Autom4te/C4che.pm, lib/Autom4te/ChannelDefs.pm
	* lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm
	* lib/Autom4te/FileUtils.pm, lib/Autom4te/General.pm
	* lib/Autom4te/Request.pm, lib/Autom4te/XFile.pm:
	  Make all warnings from the Perl interpreter into fatal errors.

2020-08-31  Zack Weinberg  <zackw@panix.com>

	Autom4te::XFile: Remove unnecessary imports.
	Autom4te::XFile does not appear to have any use for Carp, DynaLoader,
	or File::Basename.

	This happened to catch my eye while I was doing the previous two
	patches.  I have not done a comprehensive audit of imports in the Perl
	code.

	* lib/Autom4te/XFile.pm: Remove ‘use’s of Carp, DynaLoader,
	  and File::Basename.
	  (@ISA): Remove DynaLoader.

2020-08-31  Zack Weinberg  <zackw@panix.com>

	Rationalize ‘use’ order in Perl code.
	All the Perl scripts and modules now ‘use’ other modules in the
	following order:

	 - use 5.006; use strict; use warnings; in that order.
	   If a file was not already use-ing one of these three, it was added.

	 - The BEGIN block that adds the installation directory for the
	   Autom4te:: modules to @INC, if necessary.

	 - All stdlib modules whose name begins with a capital letter,
	   in ASCII sort order.

	 - All Autom4te:: modules, in ASCII sort order.

	 - ‘use vars qw (...)’, if any, last.

	Also, ‘use foo qw (...)’ and @ISA lists have been sorted into ASCII
	sort order.  (@EXPORT lists, which often follow immediately after @ISA
	lists, have *not* been sorted, as these appear to have been organized
	semantically in many cases.)  qw delimiters have been normalized to
	round parentheses with a space between the qw and the open paren.

	* bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in
	* bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in
	* lib/Autom4te/C4che.pm, lib/Autom4te/ChannelDefs.pm
	* lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm
	* lib/Autom4te/FileUtils.pm, lib/Autom4te/General.pm
	* lib/Autom4te/Getopt.pm, lib/Autom4te/Request.pm
	* lib/Autom4te/XFile.pm: Rationalize order and format of ‘use’
	  directives and @ISA lists.  Add any of ‘use 5.006’, ‘use strict’,
	  and ‘use warnings’ that was not already present.

2020-08-31  Serhii Popovych  <spopovyc@cisco.com>

	perl: Replace -w option in shebangs with ‘use warnings’ in code
	Some downstream redistributors for Autoconf wish to use
	‘/usr/bin/env perl’ as the #! line for the installed Perl scripts.
	This does not work with command-line options on the #! line, as the
	kernel doesn’t support supplying more than one argument to a #!
	interpreter (this limitation is universal across Unixes that
	support #!, as far as I know).

	Remove ‘-w’ from all perl #! lines and instead add ‘use warnings’
	to all the scripts and .pm files that didn’t already have it.
	This ‘use’ directive was added to Perl in version 5.6.0 (aka 5.006)
	so there is no change to our minimum Perl requirement.

	(It is necessary to add ‘use warnings’ to all the .pm files as well as
	the scripts, because the ‘-w’ command-line option turns on warnings
	globally, but ‘use warnings’ does so only for the current lexical scope.)

	Patch uplifted from OpenEmbedded, originally by Serhii Popovych.
	It’s a mechanical search-and-replace change so I do not believe a
	copyright assignment is necessary.

	* bin/autom4te.in, bin/autoreconf.in, bin/autoscan.in
	* bin/autoupdate.in, bin/ifnames.in: Remove -w from #! line
	  and add ‘use warnings’ to imports.

	* lib/Autom4te/C4che.pm, lib/Autom4te/ChannelDefs.pm
	* lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm
	* lib/Autom4te/FileUtils.pm, lib/Autom4te/General.pm
	* lib/Autom4te/Request.pm, lib/Autom4te/XFile.pm:
	  Add ‘use warnings’ to imports.

2020-08-28  Zack Weinberg  <zackw@panix.com>

	BUGS: Remove mention of old shells lacking functions.
	The change to require shell functions in configure scripts happened
	circa 2009, well before the release of autoconf 2.69; if this was
	causing problems for people we would have heard about it by now.

2020-08-28  Zack Weinberg  <zackw@panix.com>

	Fix testsuite failures from ‘make maintainer-check-c++’.
	‘make maintainer-check-c++’ has two test failures that don’t show in
	an ordinary ‘make check’.  One of these is a pair of problems with the
	semantics.at test of AC_CHECK_DECL(S):

	 * AC_CHECK_DECL cannot handle a function argument whose declared type
	   is ‘char []’; it generates a cast to the array type, which is
	   invalid in both C and C++.  This was masked by an M4 quotation bug,
	   causing it to emit a cast to ‘char’ instead, prodicing code that
	   was valid C but invalid C++.  I don’t think it’s practical to teach
	   AC_CHECK_DECL to do argument type decay, so I changed the type
	   signature in the AC_CHECK_DECL call (not in the actual declaration)
	   to ‘char *’.  Conveniently this also avoids the quotation issue.

	 * In C++, apparently ‘extern struct { int x; } foo;’ is invalid.
	   (clang++ explains at length: “variable ‘foo’ is used but not
	   defined in this translation unit, and cannot be defined in any
	   other translation unit because its type does not have linkage.”)
	   Fixed by giving the struct a tag.

	The other failure is an actual bug in AC_PROG_LEX: the test program
	used by _AC_PROG_LEX_YYTEXT_DECL uses the flex utility function
	‘input’, which is renamed to ‘yyinput’ when the scanner is compiled as
	C++.  Fixed with ifdefs in the offending action--it might seem cleaner
	to use a macro defined in a %{ %} block, but that would be inserted into
	the skeleton *above* the declaration of (yy)input, so I didn’t feel
	it was safe.

	* tests/semantics.at (AC_CHECK_DECLS): Adjust test programs for C++
	  compatibility and to work around lack of support for argument type
	  decay.

	* programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): Call yyinput(), not input(),
	  in scanner action when scanner is compiled as C++.

2020-08-28  Zack Weinberg  <zackw@panix.com>

	Suppress ‘make syntax-check’ complaint about use of strcmp.
	Recently ‘make syntax-check’ added a lint rule discouraging use of
	bare ‘strcmp’ (in favor of gnulib’s streq/strneq wrappers), which
	triggers on some code in c.m4’s test for C++98 compliance.

	This lint rule makes sense for typical C programs coded to GNU’s
	standards, but not for autoconf’s test programs.  There is no way to
	disable it from outside the code, so this patch adds parentheses
	around the name ‘strcmp’, which is sufficient to disable this
	grep-based lint but doesn’t change the meaning of the code as
	understood by an actual C++ compiler.

	* c.m4 (_AC_CXX_CXX98_TEST_HEADER): Suppress ‘make syntax-check’
	  error on use of strcmp.

2020-08-28  Zack Weinberg  <zackw@panix.com>

	AS_INIT: ensure fds 0, 1, 2 are open
	A patch was recently proposed for GNU libc to make *all* processes
	start up with file descriptors 0, 1, and 2 guaranteed to be open.
	Part of the rationale for this patch was that configure scripts fail
	catastrophically if these fds are closed, even if you just want to run
	--help or --version, e.g.

	   $ ./configure --version <&-; echo $?
	   ./configure: line 555: 0: Bad file descriptor
	   1

	configure scripts cannot rely on behavior specific to GNU libc, so
	whether or not that patch gets committed, it makes sense for us to
	make configure scripts robust against being started up with closed
	stdin/stdout/stderr.

	This patch adds code to ensure fds 0, 1, and 2 are open, early in
	_AS_SHELL_SANITIZE.  It uses a construct, ‘(exec 3>&n)’, that’s known
	not to work in very old shells, but that’s OK because those shells
	will be rejected by _AS_DETECT_BETTER_SHELL anyway.  The worst-case
	scenario is that the “This script requires a shell more modern than
	all the shells I found on your system” error message won’t get printed.

	When these fds are found not to be open, we open them on /dev/null, in
	the normal I/O direction (0 for reading, 1 and 2 for writing).  There
	is a case for opening them in the *opposite* direction so that, for
	instance, writes to fd 1 will fail when fd 1 started out closed.
	However, that would expose latent bugs that I think should be dealt
	with *after* 2.70.  (See Savannah bug #110300 for more detail.)

	I also took the opportunity to rationalize the order of operations in
	_AS_SHELL_SANITIZE a little.  All the special shell and environment
	variables that we care about are dealt with immediately after
	AS_BOURNE_COMPATIBLE, and _AS_PATH_SEPARATOR_PREPARE happens
	immediately before the first use of _AS_PATH_WALK.

	* lib/m4sugar/m4sh.m4 (_AS_ENSURE_STANDARD_FDS): New macro.
	  (_AS_SHELL_SANITIZE): Move the “Unset variables that we do not need”
	  and “NLS nuisances” blocks immediately after setting IFS; merge the
	  unsetting of CDPATH into the main unsetting loop; move invocation of
	  _AS_PATH_SEPARATOR_PREPARE to immediately above the “Find who we are”
	  block; invoke _AS_ENSURE_STANDARD_FDS immediately before
	  _AS_PATH_SEPARATOR_PREPARE.

	* tests/base.at (configure with closed standard fds): New test.
	* tests/torture.at (--help and --version in unwritable directory): New test.

2020-08-26  Zack Weinberg  <zackw@panix.com>

	Add ‘START_TIME’ and ‘ToD’ to shell variable filter list.
	NetBSD sh has invented more magic shell variables with values related
	to the current time: ‘START_TIME’ and ‘ToD’.  Like ‘SECONDS’, these
	can cause spurious testsuite failures and should be filtered out when
	checking for undesirable changes to the environment.

	* tests/local.at (_AT_CHECK_ENV, AT_CONFIG_CMP): Add shell variables
	  START_TIME and ToD to filter list.

2020-08-26  Zack Weinberg  <zackw@panix.com>

	Pass $(MAKE) down to testsuite.
	If Make is not available under the command name ‘make’, only some
	other name (e.g. ‘gmake’) then the test suite’s internal invocations
	of Make will all fail unless you explicitly set MAKE=<the other name>
	in the environment, which is obnoxious.  Pass the value of $(MAKE)
	down to the testsuite so that ‘gmake check’ Just Works.

	 * tests/local.mk (run_testsuite): Append MAKE=$(MAKE).

2020-08-26  Zack Weinberg  <zackw@panix.com>

	Add NetBSD /bin/sh to the -n whitelist.
	NetBSD’s /bin/sh sets a special variable “NETBSD_SHELL” to identify
	itself.  This means we can whitelist it as not having a buggy -n
	implementation.

	 * configure.ac: Assume -n mode works in shells that have a preset
	 variable named NETBSD_SHELL.

2020-08-23  Paul Eggert  <eggert@cs.ucla.edu>

	* lib/autoconf/types.m4: Say "Microsoft" before "Windows".

2020-08-23  Bruno Haible  <bruno@clisp.org>

	AC_TYPE_PID_T: Define pid_t correctly on 64-bit native Windows.
	Reported at <https://savannah.gnu.org/support/index.php?110296>.

	* lib/autoconf/types.m4 (AC_TYPE_PID_T): Define pid_t to '__int64' on 64-bit
	native Windows, and to 'int' otherwise.

2020-08-21  Zack Weinberg  <zackw@panix.com>

	Generate manpages directly from source code.
	We generate manpages for autoconf’s installed programs (autoconf,
	autoheader, etc.) using help2man, which runs each program in order to
	learn its --help output.  Each manpage therefore has a dependency on
	the existence of the corresponding program, but this dependency is
	intentionally left out of the Makefile so that one can build from a
	tarball release (which will include prebuilt manpages) without having
	help2man installed.

	But when building from a git checkout with high levels of
	parallelism (-j20 or so), the missing dependency can lead to build
	failures, because help2man will try to run the program before it
	exists.  In an earlier patch I tried to work around this with a
	recursive make invocation in the ‘.x.1’ rule, to ensure the existence
	of the program.  That only traded one concurrency bug for another, now
	we could have two jobs trying to build the same program simultaneously
	and they would clobber each other’s work and the build would still
	fail.

	Instead, this patch introduces a utility script ‘help-extract.pl’ that
	reads --help and --version information directly from the source code
	for each program.  This utility, wrapped appropriately for each
	program, is what help2man now runs.  Usage is a little weird because
	help2man doesn’t let you specify any arguments to the “executable”
	that it runs, but it works, and lets us write all of the true
	dependencies of each manpage into the Makefile without naming any file
	that would be created during a build from a tarball.  help-extract.pl
	is a Perl script, so it introduces no new build-time requirements.

	A downside is that we have to make sure each of the script sources in
	bin/, and also part of lib/Autom4te/ChannelDefs.pm, are parseable by
	help-extract.  The most important constraints are that the text output
	by --help must be defined in a global variable named ‘help’, and its
	definition has to be formatted just the way these definitions are
	currently formatted.  Similarly for --version.  Furthermore, only some
	non-literal substitutions are possible in these texts; each has to be
	explicitly supported in help-extract.pl.  The current list of supported
	substitutions is $0, @PACKAGE_NAME@, @VERSION@, @RELEASE_YEAR@, and
	Autom4te::ChannelDefs::usage.

	The generated manpages themselves are character-for-character
	identical before and after this patch.

	 * build-aux/help-extract.pl: New build script that extracts --help
	  and --version output from manpages.

	 * man/autoconf.w, man/autoheader.w, man/autom4te.w, man/autoreconf.w
	 * man/autoscan.w, man/autoupdate.w, man/ifnames.w: New shell scripts
	   which wrap build-aux/help-extract.pl.

	 * man/local.mk: Generate each manpage by running help2man on the
	   corresponding .w script, not on the built utility itself.
	   Revise all dependencies to match.

	 * bin/autoconf.as: Rename ‘usage’ variable to ‘help’ and
	   ‘help’ variable to ‘usage_err’.
	 * bin/autoheader.in: Call Autom4te::ChannelDefs::usage with no
	   function-call parentheses, matching all the other scripts.
	 * bin/autom4te.in: Initialize $version with a regular double-quoted
	   string, not a heredoc, matching all the other scripts.
	 * bin/autoscan.in: Remove global variable $configure_scan.

2020-08-21  Zack Weinberg  <zackw@panix.com>

	Fix ‘make distcheck’ failure due to generated manpages in build dir.
	If we are doing a VPATH build and we generate the manpages,
	they will be written to the build directory, and should be
	deleted by ‘make distclean’; ‘make distcheck’ fails if this
	is not done.  However, if we are doing a build in the source
	directory, the manpages might have been shipped to us and we
	should *not* delete them in ‘make distclean’.

	Correction to 5d3c99e56247d5a6496729931774cff08cf8dc0f.

	* man/local.mk (distclean-local-man): New rule.  Delete $(dist_man_MANS)
	  in VPATH builds only.
	  (MOSTLYCLEANFILES, .x.1): Don’t use globs to decide what to delete.

2020-08-20  Zack Weinberg  <zackw@panix.com>

	tests: New helper macro AT_CHECK_MAKE.
	This macro factors out some repeated code surrounding tests that run
	make, such as honoring $MAKE, *not* honoring $MAKEFLAGS, and
	normalizing the exit status.  Partially addresses bug #110267
	(problems with Sun’s make barfing on GNU make options from
	$MAKEFLAGS).

	Also addresses some unrelated problems I noticed while changing all
	the tests that run make to use this macro:

	The shtool test is now properly skipped if shtool is not available on
	the host system.

	Some of the Fortran tests would create an executable and then run it,
	others would create an executable and then the AT_CHECK operation that
	would run it was commented out.  There’s no evidence in the changelog
	or the git history for why this was done.  I uncommented all of the
	commented-out cases; this can be undone easily if it causes
	problems.  (It can’t be an issue with cross-compilation because some
	of the tests do run the executable.)

	* tests/local.at (AT_CHECK_MAKE): New macro wrapping an AT_CHECK
	  invocation of make.  All tests that run make updated to use this macro.
	* tests/fortran.at: Uncomment all AT_CHECKs that run the just-compiled
	  program.
	* tests/foreign.at (shtool): Skip the test if shtool is not available
	  from the host system.  Simplify shell logic.

2020-08-20  Zack Weinberg  <zackw@panix.com>

	Properly skip erlang tests when erl/erlc are not available.
	Fallout from the previous change, which I should’ve tested on a
	machine without Erlang tools installed, before pushing.

	It bugs me a little that we have to put these special exit codes into
	autoconf itself instead of the testsuite, but it is what it is.

	 * lib/autoconf/erlang.m4 (AC_ERLANG_NEED_ERLC, AC_ERLANG_NEED_ERL):
	 Exit with code 77 on failure so testsuite understands to skip Erlang
	 tests in this case.
	 (AC_ERLANG_CHECK_LIB): Use AC_ERLANG_NEED_ERLC and AC_ERLANG_NEED_ERL
	 instead of the _PATH_ versions.

2020-08-20  Zack Weinberg  <zackw@panix.com>

	tests/suite.at: m4_include acerlang.at.
	This corrects a long-standing oversight; the “blind” tests for the
	Erlang macros have never actually gotten run.

2020-08-18  Zack Weinberg  <zackw@panix.com>

	_AC_COMPILER_EXEEXT_CROSS: exit 77 if test program does not run
	This causes our testsuite to report a skipped test, rather than a
	failure, if the detected compiler for _AC_LANG produces broken
	executables.  It matches the behavior of _AC_COMPILER_EXEEXT_DEFAULT,
	which has exited with that code for a long time if it hits the
	“_AC_LANG compiler cannot *create* executables” failure case.

	Partially addresses bug #110267.  The Solaris 10 machine I have access
	to, has a broken gccgo installation that generates executables that
	crash on startup.   Without this patch, test “358: Go” fails.  With
	this patch, it is skipped.

2020-08-18  Zack Weinberg  <zackw@panix.com>

	Generate manpages in build directory.
	It is not necessary to generate the manpages in the source directory
	during a split build; ‘make dist’ can still find them in the build
	directory and put them in the tarball.

	Also add some defensive logic to the .x.1 rule to ensure that
	bin/command and tests/command exist before generating man/command.1.
	Without this, if you do a sufficiently parallel build, help2man may
	generate the manpage from an older installed copy of ‘command’.
	(Ideally, we wouldn’t have to run ‘command’ at all and this would not
	be an issue, but ‘help2man’ doesn’t appear to support that.)

	After this patch, the only files written to the source directory
	during the ‘make’ phase of a split build (starting from a clean Git
	checkout) are

	doc/version.texi
	doc/stamp-vti
	doc/autoconf.info
	doc/standards.info

	These are not under our control, they’re being created by automake’s
	built-in rules for Texinfo documentation.

	* man/local.mk: Replace all instances of $(mansrcdir) with literal ‘man’.
	  (.x.1): Ensure that bin/command, tests/command, and the man
	  directory exist before creating man/command.1.

2020-08-18  Zack Weinberg  <zackw@panix.com>

	Delete a dummy ChangeLog in ‘make distclean’.
	‘make distcheck’ from git may create a dummy ChangeLog file in the
	build directory.  Delete this on ‘make distclean’, but don’t delete
	a real ChangeLog (generated by the gen-ChangeLog rule).

	* Makefile.am (distclean-local): Delete ChangeLog if it is the dummy
	  created to pacify automake.

2020-08-18  Zack Weinberg  <zackw@panix.com>

	Don’t distribute tests/ac*.at.
	tests/ac*.at are generated files containing basic test cases for all
	the public AC_* macros that can be invoked without arguments.  They’re
	generated using a simple awk script, and we already require awk at
	build time because of automake, so there is no reason to ship them in
	the tarball.  If we don’t ship them in the tarball, we can simplify
	the logic in tests/local.mk, and avoid writing these files to the
	source directory in a split build.

	This should fix a problem with split builds using Solaris’ dmake
	(see bug #110289).

	tests/mktests.sh probably doesn’t work right if any of its argument
	paths have spaces in their names, but that’s a separate issue.

	* tests/local.mk (tests/mktests.stamp): Don’t change directory or
	  rewrite the contents of $(AUTOCONF_FILES).
	  (TESTSUITE_GENERATED_AT): Remove $(srcdir) prefix.
	  Add tests/acerlang.at (accidentally omitted).
	  (CLEANFILES): Add $(TESTSUITE_GENERATED_AT), mktests.stamp and mktests.tmp.
	  (MAINTAINERCLEANFILES): Don’t set.
	  (EXTRA_DIST): Include only the hand-written .at files, $(TESTSUITE_HAND_AT).

	* configure.ac: Run AC_PROG_AWK, if for some reason AM_INIT_AUTOMAKE
	  hasn’t done it for us.
	* tests/mktests.sh: Use $AWK if set in environment.  Shell script linting.

2020-08-18  Zack Weinberg  <zackw@panix.com>

	autoreconf: mention intltoolize and gtkdocize in --help output.

2020-08-18  Eli Schwartz  <eschwartz@archlinux.org>

	autoreconf: integrate intltoolize into the standard configuration tools
	In addition to the gtkdocize tool, gtk-related software may utilize the
	IT_PROG_INTLTOOL macro in order to require the intltoolize tool. So too
	here should the tool be run by autoreconf itself, in order to guarantee
	its initialization via the unified frontend for all autotools projects.

	autoreconf: integrate gtkdocize into the standard reconfiguration tools
	When the GTK_DOC_CHECK macro is in use, this flags a given configure.ac
	as belonging the the common class of gtk-related software that requires
	the gtkdocize tool to be run before autoreconf, in order to install the
	gtk-doc macro and Makefile fragment. Make this easier to accomplish via
	teaching autoreconf how to detect and run this tool automatically; this
	gets us one step closer to a world in which `autoreconf -fi` on its own
	is enough to bootstrap any autotools project into a configurable state.

2020-08-18  Zack Weinberg  <zackw@panix.com>

	Warn if AC_INIT or AC_OUTPUT are missing from configure.ac (#107986)
	It is almost always incorrect for a configure script to omit either
	AC_INIT or AC_OUTPUT.  Issue warnings in the ‘syntax’ category for
	this.

	The implementation is, unfortunately, a bit of a kludge.  To check for
	the _absence_ of a macro invocation, we can use m4_provide_if inside a
	m4_wrap hook.  However, if we activate the m4_wrap hook directly from
	general.m4, we get spurious warnings at freeze time.  We also get
	warnings whenever a script that’s missing AC_INIT and/or AC_OUTPUT
	is *traced*, which means we get double warnings from autoconf, and
	autoheader and aclocal complain about it too, which seems unnecessary.

	A clean way to deal with this would be to make the hook look for a
	special macro that’s defined only when autoconf (the program) is
	invoked without any --trace arguments.  Unfortunately, autom4te
	doesn’t pass --define down to M4, and changing that would involve
	coordinating with Automake (the project), so instead I’ve gone for the
	kludge: a new file lib/autoconf/trailer.m4 that calls m4_wrap.  This
	file is *not* included in autoconf.m4f, but it’s installed, and it’s
	added to the m4 invocation by autoconf (the program) only when not
	tracing.  (It still uses m4_wrap, because we pass it to m4 *before*
	configure.ac, because otherwise we get nonsense locations for any
	*other* diagnostics coming out of this autoconf invocation.  I don’t
	know why.)

	The additional checks in autoreconf are intended to make sure that if
	autoreconf skips a directory entirely, you get told why.

	Lots of tests in the testsuite didn’t bother with AC_OUTPUT, and
	somewhat fewer didn’t bother with AC_INIT; where possible I just added
	them.

	Suggested by David A. Wheeler, who submitted a patch, but I didn’t
	wind up using any of his code.  (His implementation used an extra
	tracing pass, only checked for a missing AC_INIT, and invented a new
	command-line option to turn off this specific warning.  I thought this
	was tidier overall, despite the kludge.)

	* lib/autoconf/general.m4 (_AC_FINALIZE): New macro: code to be run
	  when generating configure, after the entire configure.ac is
	  processed. Currently only checks that AC_INIT and AC_OUTPUT were
	  called at some point, issuing syntax-category warnings if not.
	  (AC_INIT, AC_OUTPUT): m4_provide self.
	* lib/autoconf/trailer.m4: New file that just calls m4_wrap([_AC_FINALIZE]).
	* lib/local.mk: Install new file.

	* bin/autoconf.as: Add trailer.m4 to the final invocation of autom4te,
	  but only when not tracing.
	* bin/autoreconf.in (autoreconf_current_directory): Distinguish in
	  diagnostics between “directory skipped because it doesn’t have a
	  configure.ac or configure.in” (e.g. Cygnus configure) and “directory
	  has a configure.ac but it doesn’t appear to be autoconf input.”

	* tests/*.at: Fix all tests affected by the new warnings.

2020-08-18  Zack Weinberg  <zackw@panix.com>

	Trim whitespace from arguments of AC_INIT (#107986)
	Specifically, all five arguments, if present, are passed through
	m4_normalize before doing anything else with them.  For instance,
	AC_INIT([  GNU  Hello  ], [1.0]) is now equivalent to
	AC_INIT([GNU Hello], [1.0]).

	As a consequence, newlines in the arguments to AC_INIT are now
	converted to spaces and no longer trigger warnings.

	Also, diagnose inappropriate contents of the fourth and fifth
	arguments as well as the first three.  The fifth argument should be
	“usable as-is in single- and double-quoted strings and quoted and
	unquoted here-docs,” like the first three.  (This is the check
	performed by _AC_INIT_LITERAL.)  The fourth argument (TARNAME) is used
	to construct filenames, so apply an even more stringent test, namely
	AS_LITERAL_WORD_IF.

	Suggested by David A. Wheeler, who submitted a patch, but I didn’t
	wind up using any of his code.

	* lib/autoconf/general.m4 (_AC_INIT_LITERAL): Not necessary to check
	  for newlines anymore.
	  (_AC_INIT_PACKAGE): Pass all five arguments through m4_normalize
	  before doing anything else with them.  New warning: apply
	  _AC_INIT_LITERAL to fifth argument (URL).  New warning: complain
	  if fourth argument (TARNAME) is not a literal word according to
	  AS_LITERAL_WORD_IF.  Simplify a conditional by using m4_default.

	* tests/base.at (AC_INIT with unusual version strings): Adjust to
	  match above changes, add more subtests.

2020-08-06  Paul Eggert  <eggert@cs.ucla.edu>

	Avoid one-argument ‘main’
	* tests/autotest.at (C unit tests, C unit tests (EXEEXT)):
	Avoid ‘int main (int argc)’ as the C standard says this
	is not portable.

	Pacify -Werror in two places
	Although this cannot easily be done in general, there are a couple
	of places where it’s easy.
	* lib/autoconf/c.m4 (AC_LANG_INT_SAVE (C)):
	Change ‘()’ to ‘(void)’ to pacify picky compilers.
	Problem reported by Vincent Lefevre in:
	https://lists.gnu.org/r/autoconf-patches/2020-08/msg00000.html
	(AC_C_INLINE): Likewise.

	* lib/autoconf/c.m4: Bring XL C comments up to date.

	* TODO: Add -Werror support.

2020-08-05  Zack Weinberg  <zackw@panix.com>

	AT_CHECK_MACRO: Preserve config.log and config.status from run 1.
	AT_CHECK_MACRO runs a test configure script twice and looks for
	differences in the results.  If something goes wrong, it’ll be helpful
	for debugging to preserve the config.log and config.status files from
	both runs.

	* tests/local.at (AT_CHECK_MACRO): Also copy config.log and
	  config.status to config-log.$at_run and config-status.$at_run
	  respectively.

2020-08-04  Zack Weinberg  <zackw@panix.com>

	Only probe C++ language features, not library, for speed (#110285)
	The test programs used by _AC_PROG_CXX_CXX98 and _AC_PROG_CXX_CXX11
	can take several seconds to compile, even on current-generation CPUs.
	Each of them may be test-compiled up to six times as the configure
	script searches for appropriate command-line switches.  This is
	reported to cancel out all of the other performance gains made since
	2.69.

	Replace these programs with simpler ones that do not exercise the C++
	standard *library* and can be compiled in less than a second each.
	On my computer, which is quite new, the minimal configure script

	    AC_INIT
	    AC_PROG_CXX

	executes in 4.5 seconds (wall-clock) before this change and 0.5
	seconds after.

	* lib/autoconf/c.m4 (_AC_CXX_CXX98_TEST_HEADER, _AC_CXX_CXX98_TEST_BODY):
	  Rewrite to test only C++ 1998 language features, not library features.
	  (_AC_CXX_CXX11_TEST_HEADER, _AC_CXX_CXX11_TEST_BODY):
	  Similarly for C++ 2011.
	* doc/autoconf.texi (AC_PROG_CXX): Document this change.

2020-08-04  Zack Weinberg  <zackw@panix.com>

	Filter out _AST_FEATURES when comparing environment state. (#110283)
	ksh93 uses an environment variable called _AST_FEATURES to communicate
	with subshell instances of itself.  Its value may change at any time
	so AT_CHECK_ENV and AT_CONFIG_CMP should ignore it.

	This was responsible for many spurious testsuite failures on
	OpenIndiana.  Problem reported by Bob Friesenhahn.

	* tests/local.at (_AT_CHECK_ENV, AT_CONFIG_CMP): Add _AST_FEATURES to
	  list of variables set by shells to unstable values.

2020-08-04  Zack Weinberg  <zackw@panix.com>

	Partially revert e54e3f90: restore use of $(MAKE) in error message.
	In commit 14d58bfd, the error message printed by the
	‘abort-due-to-no-makefile’ rule in GNUmakefile was changed to refer to
	the value of ‘$(MAKE)’ instead of a literal ‘make’.  A subsequent
	‘make fetch’ (e54e3f90) clobbered this.  Put it back.

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

	Expect OpenIndiana test failure
	On OpenIndiana, Perl file locking does not work atop NFS.
	* tests/tools.at (autom4te cache locking):
	Expect this test to file if Perl file locking does not work.

	Work around ksh93 bug that broke config.status
	* lib/autoconf/status.m4 (_AC_OUTPUT_HEADER):
	Use ‘>&1’, which is a no-op, to work around a bug in ksh93
	Version JM 93t+ 2010-03-05 as used in OpenIndiana.
	The bug causes ‘printf "foo"’ to mistakenly succeed in
	some cases even though the underlying ‘write’ syscall fails.
	The ‘>&1’ causes the printf to fail, as it should.

2020-08-01  Paul Eggert  <eggert@cs.ucla.edu>

	Fix regression: autotools and whitespace in file names
	* bin/autoheader.in (templates_for_header): Fix previous change by
	not warning about file names with shell metacharacters, as this is
	OK for command-line file names.

	make fetch

	Fix regression that broke Automake ‘make check’
	Problem reported by Ken Moffat (sr#110287); the problem was
	introduced in 2016-12-21T16:15:46Z!daniel.kitta@gmail.com.
	* bin/autoheader.in (templates_for_header):
	When generating warnings about symbols lacking templates,
	downgrade template read failure from a fatal error to a warning.
	Also, don’t even try to read from a template file whose name has
	shell metavariables (which Autoconf 2.50 withdrew support for);
	just warn about that, too.  These changes cause the Automake
	tests to merely generate warnings that are ignored, instead
	of failing.
	* doc/autoconf.texi (Configuration Files, Configuration Headers)
	(Configuration Commands, Configuration Links):
	Also document here that the file names should not contain
	shell metacharacters, to make this constraint more obvious.

2020-07-31  Paul Eggert  <eggert@cs.ucla.edu>

	* doc/autoconf.texi: Tweak wording.

2020-07-31  Bruno Haible  <bruno@clisp.org>

	doc: Update some more macro descriptions.
	* doc/autoconf.texi (Particular Functions): Add a remark about AC_FUNC_MMAP.
	Clarify AC_FUNC_STRCOLL.

	doc: Refer to Gnulib where it makes sense.
	* doc/autoconf.texi (Particular Functions): Point to Gnulib wherever Gnulib has
	more workarounds than mentioned for the particular macro, namely for
	AC_FUNC_CHOWN, AC_FUNC_FSEEKO, AC_FUNC_GETGROUPS, AC_FUNC_GETMNTENT,
	AC_FUNC_MBRTOWC, AC_FUNC_STRERROR_R, AC_FUNC_STRTOLD.

	doc: Refer to Gnulib instead of asking clients to provide replacement code.
	* doc/autoconf.texi (Particular Functions): Point to Gnulib for all macros that
	may call AC_LIBOBJ, namely AC_FUNC_ALLOCA, AC_FUNC_MALLOC, AC_FUNC_OBSTACK,
	AC_FUNC_REALLOC, AC_FUNC_STRNLEN.

2020-07-30  Paul Eggert  <eggert@cs.ucla.edu>

	Remove obsolete Cray support
	Gnulib removed this recently, and we should be consistent.
	* doc/autoconf.texi (Autoheader Macros):
	Use a more up-to-date example.
	* lib/autoconf/functions.m4 (CRAY_STACKSEG_END): Remove.
	This is backported from the following Gnulib patch:
	https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=41a2d446c7984f8f39e3eeca40c6d30630969c10

2020-07-27  Zack Weinberg  <zackw@panix.com>

	Simplify Makefiles embedded in autotest.at
	This is a follow-up for the various patches to address problems with
	tests 221 and 222 with various non-GNU make implementations.  We’re
	not trying to exercise Make at all in these tests; it’s just a
	convenient way to invoke the compiler found by AC_PROG_CC on a test
	program.  The tests will be more reliable if we minimize the number of
	Make features we are using.  So: no implicit rules at all, and no
	intermediates.  Generate ‘testprog’ directly from ‘testprog.c’.

	Also copy from fortran.at a more thorough set of substitution
	variables for the compilation command, mainly for consistency,
	and don’t use Makefile variables, again for consistency with
	fortran.at.

	(This is also, theoretically, faster since we’re only invoking the
	compiler driver once, but it’s probably not enough of a difference to
	measure.)

2020-07-22  Paul Eggert  <eggert@cs.ucla.edu>

	Port AC_F77_LIBRARY_LDFLAGS to oneAPI HPC Toolkit
	Problem reported by Bill Dieter in:
	https://lists.gnu.org/r/bug-autoconf/2020-07/msg00089.html
	* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS):
	Defend against ‘clang -mllvm -loopopt=0’.

2020-07-20  Paul Eggert  <eggert@cs.ucla.edu>

	Don’t assume plain ‘make’ in C unit tests
	Problem reported by Bruno Haible in:
	https://savannah.gnu.org/support/?110273#comment6
	* lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE):
	* tests/autotest.at (C unit tests, C unit tests (EXEEXT)):
	Prefer ‘${MAKE-make}’ to ‘make’ in shell code.

	Prefer ‘$(MAKE)’ to ‘make’ in Makefiles
	* GNUmakefile (abort-due-to-no-makefile):
	* Makefile.am (check-coverage-report):
	Prefer ‘$(MAKE)’ to ‘make’ in diagnostics.

2020-07-17  Paul Eggert  <eggert@cs.ucla.edu>

	Port build procedure to AIX 7.1
	* lib/freeze.mk (MY_AUTOM4TE, build_libdir, m4f_dependencies):
	Prefer ‘$(top_build_prefix)’ to ‘$(top_builddir)/’.
	The difference matters on AIX 7.1, where ‘make’ doesn’t know that
	bin/autom4te and ./bin/autom4te are the same file,
	and gets confused about dependencies without this change.
	‘$(top_build_prefix)bin/autom4te’ expands to ‘bin/automake’
	whereas ‘$(top_builddir)/bin/autom4te’ expands to
	‘./bin/automake’, and the former works where the latter doesn’t.

	Test AC_FC_LINE_LENGTH only to 250 columns
	* NEWS, doc/autoconf.texi, lib/autoconf/fortran.m4:
	Document 250, not 254.
	* tests/fortran.at (AC_FC_LINE_LENGTH): Test lines with 250
	columns not 253, since Oracle Studio 12.6 Fortran 95 8.8
	2017/05/30 goes up only to 250.

	Fix ${VAR-NONWORD} bugs
	* lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES):
	* lib/autoconf/programs.m4 (AC_FUNC_SELECT_ARGTYPES):
	* lib/autotest/general.m4 (AT_INIT):
	Rewrite to avoid ${VAR-VALUE} where VALUE is not a shell word.

2020-07-16  Paul Eggert  <eggert@cs.ucla.edu>

	Document that VAL must be a word in ${VAR-VALUE}
	* doc/autoconf.texi (Shell Substitutions):
	Document that in ${VAR-VALUE}, VALUE must be a shell word,
	and omit examples implying otherwise.

2020-07-16  Zack Weinberg  <zackw@panix.com>

	tests/autotest.at: don’t use suffix rules to generate executables
	In two tests, when @EXEEXT@ is empty, we were generating Makefiles
	containing suffix rules with only one explicit suffix, e.g.

	    .o:
	        $(CC) -o $@ $^

	Solaris 10’s ‘dmake’ does not understand this as a rule to create
	‘foo’ from ‘foo.o’.  That’s not the point of the tests, so use
	ordinary per-rule commands to link the executables in these tests
	instead.

	Partially addresses #110267.

2020-07-16  Zack Weinberg  <zackw@panix.com>

	tests/local.at: improve sed portability
	Solaris 10 /bin/sed does not support * after \( … \), only after
	subexpressions that match a _single character_.

	Partially addresses #110267. Problem reported by Dagobert Michelsen.

	* tests/local.at (AT_CHECK_M4): Do not use star after parenthesized
	  subexpression in sed s/// commands.

2020-07-16  Zack Weinberg  <zackw@panix.com>

	Revise documentation for AC_PROG_LEX.
	 - Better explanation of the additional tests performed by this macro,
	   once the tool has been located.

	 - Update advice re using Flex to generate a bundled lex.yy.c.

	 - Remove text describing a bug in Automake that has long since been
	   corrected.

2020-07-16  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_LEX no longer sets LEXLIB for yywrap
	Suggested by Zack Weinberg in:
	https://lists.gnu.org/r/autoconf-patches/2020-07/msg00016.html
	* lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL):
	Define yywrap too.

	Fix AC_PROG_LEX regression
	Problem reported by Ross Burton in:
	https://savannah.gnu.org/support/?110269
	* lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL):
	If tests indicate that LEX or LEXLIB does not work, set LEX to ":"
	and LEXLIB empty, instead of failing out of 'configure' entirely.

2020-07-15  Paul Eggert  <eggert@cs.ucla.edu>

	Document AC_EGREP* better
	From a suggestion by Bruno Haible in:
	https://lists.gnu.org/archive/html/bug-autoconf/2017-02/msg00001.html

2020-07-15  Bruno Haible  <bruno@clisp.org>

	doc: More clarifications regarding --host and --build.
	* doc/autoconf.texi (Specifying Target Triplets): Describe the effects
	of --host in more detail. Don't recommend to specify --build when
	specifying --host. Add another example regarding MinGW.

2020-07-15  Paul Eggert  <eggert@cs.ucla.edu>

	Revert mistaken patch for Bison
	Problem reported by Bruno Haible in:
	https://savannah.gnu.org/support/?110266
	* lib/autoconf/programs.m4 (AC_PROG_YACC):
	Go back to using bison -y instead of bison -o y.tab.c.

	Use more-modern cross-compilation examples
	* doc/autoconf.texi (Generic Programs)
	(Specifying Target Triplets, Transformation Examples)
	(Hosts and Cross-Compilation): Use more-modern examples.

	Revert mistaken patch for Wine
	* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_CROSS):
	Revert patch trying to cater to GNU/Linux builds
	for Wine.  They should use --build as well as --host.
	Problem reported by Bruno Haible in:
	https://savannah.gnu.org/support/?110268

2020-07-14  Nick Alcock  <nick.alcock@oracle.com>

	NEWS: don’t describe Automake 1.13 as “upcoming.”
	Automake 1.13 was released eight years ago.  The current version is
	1.16.2.

2020-07-13  Paul Eggert  <eggert@cs.ucla.edu>

	* doc/autoconf.texi: Fix mishandling of `.

	make fetch

2020-07-12  Zack Weinberg  <zackw@panix.com>

	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.

2020-07-12  Zack Weinberg  <zackw@panix.com>

	Add AC_PROG_EGREP to AU_DEFUN for AC_HEADER_STDC (#110215)
	AC_HEADER_STDC used to use AC_EGREP_CPP, and therefore had the side
	effect of AC_REQUIRE([AC_PROG_EGREP]).  In 2.70 AC_HEADER_STDC is an
	AU_DEFUN and, before this change, the replacement didn’t invoke
	AC_PROG_EGREP, which broke configure scripts that assumed $EGREP would
	be set.  Problem reported by Ross Burton.

	* lib/autoconf/headers.m4 (AU::AC_HEADER_STDC): Also invoke AC_PROG_EGREP.

2020-07-12  Tom  <tom@ojodeagua.com>

	Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)
	The search for the appropriate value for @LEXLIB@ did not distinguish
	correctly between success (‘break’ out of a shell for loop, having set
	$ac_cv_lib_lex) and failure (normal termination of the loop, value in
	$ac_cv_lib_lex is garbage).  Bug report and original patch by
	Tom <tom@ojodeagua.com> with refinements by Zack Weinberg.

	* lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL):
	  Error out if we cannot find the library that (f)lex scanners
	  need to be linked against, instead of continuing with @LEXLIB@
	  set to the empty string.

2020-07-11  Zack Weinberg  <zackw@panix.com>

	make fetch
	URLs in gnu-oids.texi are now consistent with standards.texi.

2020-07-10  Zack Weinberg  <zackw@panix.com>

	Update hyperlinks in the manual and README-hacking.
	Lots of http:// -> https:// conversions;
	refer to XZ Utils instead of the obsolete LZMA Utils;
	remove dead link to dbaspot.com;
	replace mention of -fmudflap with -fsanitize=
	  and add a proper cross-reference to the GCC manual for that.

2020-07-10  Zack Weinberg  <zackw@panix.com>

	Update links in COPYING, COPYINGv3, and COPYING.EXCEPTION.
	 - COPYINGv3 now exactly matches
	   https://www.gnu.org/licenses/gpl-3.0.txt
	   as of 2020-07-10.
	   The only change was to turn a bunch of http:// URLs
	   into https:// URLs.

	 - COPYING now exactly matches
	   https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
	   as of 2020-07-10
	   except that the FSF’s old postal address has been deleted
	   and <https://fsf.org/> inserted
	   (consistent with COPYINGv3).
	   Besides the above, the only change was to whitespace.

	 - A typo in a URL in COPYING.EXCEPTION was corrected.

2020-07-10  Paul Eggert  <eggert@cs.ucla.edu>

	Document AS_IF(..., ..., [[]]) glitch
	* doc/autoconf.texi (Common Shell Constructs):
	Note the if-false arg problem reported by Jannick in:
	https://lists.gnu.org/r/autoconf/2020-03/msg00045.html

	Fix ac_compiler_gnu bug
	Problem and fix reported by Jannick in:
	https://lists.gnu.org/r/autoconf/2020-03/msg00045.html
	except that I omitted the comment, which I thought unnecessary.
	* lib/autoconf/lang.m4 (_AC_LANG_COMPILER_GNU): Set
	ac_compiler_gnu regardless of whether result was from cache.

2020-07-10  Zack Weinberg  <zackw@panix.com>

	NEWS: add notes about known breakage due to pickier macros.
	These are all cases where the offending configure script or
	third-party macro was always incorrect, but autoconf 2.69 let you get
	away with it.

2020-07-09  Zack Weinberg  <zackw@panix.com>

	NEWS: mention that AS_INIT no longer embeds full paths to source files.
	(Change made in c6daae41276a49b52a9d5e2f70c95651364ed619.)

	Also reorder some of the NEWS entries more logically.

2020-07-05  Luke Mewburn  <luke@mewburn.net>

	AS_INIT: basename __file__
	Fix AS_INIT to encode the basename of __file__
	instead of the full path to the source directory.
	Allows for reproducible builds.

2020-07-03  Paul Eggert  <eggert@cs.ucla.edu>

	Fix AC_CHECK_LIB quoting bug
	Problem reported by Bert Wesarg in:
	https://lists.gnu.org/archive/html/autoconf/2016-04/msg00020.html
	* lib/autoconf/libs.m4 (AC_CHECK_LIB): Fix quoting bug.
	* tests/semantics.at (AC_CHECK_LIB): Add a test for the bug.

2020-06-30  Paul Eggert  <eggert@cs.ucla.edu>

	* tests/local.at: Fix space-tab problems.

2020-06-30  Zack Weinberg  <zackw@panix.com>

	Consistently expand macros in whitespace-separated lists.
	Several of the most commonly used Autoconf macros (starting with
	AC_CHECK_FUNCS and AC_CHECK_HEADERS) take a whitespace-separated list
	of symbols as their primary argument.  It would abstractly be best if
	this list were _not_ subject to M4 macro expansion, in case there’s a
	collision between a M4 macro name and something to be looked for.
	However, we have historically not been careful about this, and there’s
	been reports of configure scripts using ‘dnl’ to write comments inside
	the list.  The AS_LITERAL_IF optimizations added to AC_CHECK_FUNCS and
	AC_CHECK_HEADERS since 2.69 broke some of those scripts with bizarre
	shell syntax errors.

	Also, the macro expansion behavior is not consistent among all of the
	macros that take whitespace-separated lists, nor is it consistent
	between autoconf and autoheader.

	Address this by introducing a new m4sugar macro, currently called
	‘m4_validate_w’ (I’m open to suggestions for better names).  Here’s
	its documentation comment:

	| m4_validate_w(STRING): Expands into m4_normalize(m4_expand([STRING])),
	| but if that is not the same as just m4_normalize([STRING]),
	| issue a warning.

	The text of the warning is

	| configure.ac:N: warning: whitespace-separated-list contains macros;
	| configure.ac:N: in a future version of Autoconf they will not be expanded

	If the unexpanded form of the string contains the token ‘dnl’ then
	there’s an additional line:

	| configure.ac:N: note: ‘dnl’ is a macro

	All of the public macros that take a whitespace-separated list of
	symbols are changed to pass that argument through m4_validate_w before
	doing anything else with it, and the test suite is updated to verify
	consistent behavior for every last one of them.

	This addresses Savannah issues #110210 and #110211, and the harmless
	but annoying autoheader behavior described at
	https://lists.gnu.org/archive/html/bug-autoconf/2018-02/msg00005.html .

	In order to avoid expanding relatively expensive m4sugar macros
	multiple times per top-level macro invocation, several of the affected
	Autoconf macros are restructured along the same lines as I did for
	AC_REPLACE_FUNCS in the previous patch.

	* lib/m4sugar/m4sugar.m4 (m4_validate_w): New macro.
	* lib/autoconf/functions.m4 (AC_CHECK_FUNCS, AC_CHECK_FUNCS_ONCE)
	  (AC_REPLACE_FUNCS)
	* lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIRS, AC_CHECK_FILES)
	* lib/autoconf/headers.m4 (AC_CHECK_HEADERS, AC_CHECK_HEADERS_ONCE)
	* lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Pass $1 through
	  m4_validate_w before use.

	* lib/autoconf/headers.m4 (AC_CHECK_HEADERS): Refactor with helpers
	  _AC_CHECK_HEADERS_ONE_U, _AC_CHECK_HEADERS_ONE_S, _AC_CHECK_HEADERS_ONE_C.
	  (AC_CHECK_HEADERS_ONCE): Eliminate _AC_CHECK_HEADERS_ONCE.
	  (AC_CHECK_INCLUDES_DEFAULT): Don’t use _AC_CHECK_HEADERS_ONCE.

	* lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Refactor with helpers
	  _AC_CHECK_FUNCS_ONE_U, _AC_CHECK_FUNCS_ONE_S, _AC_CHECK_FUNCS_ONE_C.

	* lib/autoconf/status.m4 (_AC_CONFIG_SUBDIRS): No need to use m4_normalize.

	* tests/semantics.at: Add tests for expansion of M4 macros in
	  whitespace-separated list arguments to all of the above.

2020-06-30  Zack Weinberg  <zackw@panix.com>

	AC_REPLACE_FUNCS: invoke _AH_CHECK_FUNC and AC_LIBSOURCE unconditionally.
	While investigating something else, I noticed that AC_REPLACE_FUNCS
	calls _AH_CHECK_FUNC and AC_LIBSOURCE in the success branch of an
	AC_CHECK_FUNC.  This doesn’t work; both of those are marker macros
	that need to be expanded unconditionally at m4 time so that traces
	(placed by autoheader and automake, respectively) will fire.  In order
	to fix this while keeping the code readable, I would up doing a major
	refactor.  There are now four internal macros implementing AC_REPLACE_FUNCS.

	_AC_REPLACE_FUNC_U is called unconditionally for every shell word in
	the list passed to AC_REPLACE_FUNCS, and does _AH_CHECK_FUNC +
	AC_LIBSOURCE if it can, or issues a warning if it can’t.  (It could
	make sense to make this a public function, if we think shell variables
	in the AC_REPLACE_FUNCS list need to be supported long-term.  I dunno
	if there’s a use case that can’t be handled by AC_REPLACE_FUNCS inside
	a shell conditional just as well.)

	_AC_REPLACE_FUNC_L and _AC_REPLACE_FUNC_NL implement the actual test
	performed for each function to be replaced; the difference is that _L
	(for literal) can only be used on a function whose name is known at m4
	expansion time, _NL (nonliteral) works regardless.  _AC_REPLACE_FUNCS,
	which already existed, handles looping either at m4 time or shell time
	as appropriate.  AC_REPLACE_FUNCS remains a thin wrapper that runs
	_AC_REPLACE_FUNCS(m4_flatten([$1])).

	The _bulk_ of the patch is changes to the testsuite so that it notices
	the original bug.  Specifically, AT_CHECK_AUTOHEADER now takes an
	argument which is a whitespace-separated list of preprocessor macro
	names that ought to appear in the generated config.h.in.  This can be
	set to ‘ignore’ to skip the test, and unfortunately that’s what the
	“trivial” per-macro tests have to do (AT_CHECK_MACRO and friends), so
	coverage is not ideal, but it’s better than what we had.  Also,
	AT_CHECK_M4 now normalizes the backtrace lines that appear in the
	output of an AC_DIAGNOSE, e.g.

	    configure.ac:6: warning: The macro `AC_LANG_SAVE' is obsolete.
	    configure.ac:6: You should run autoupdate.
	    ../../lib/autoconf/lang.m4:125: AC_LANG_SAVE is expanded from...
	    configure.ac:6: the top level

	becomes

	    configure.ac:6: warning: The macro `AC_LANG_SAVE' is obsolete.
	    configure.ac:6: You should run autoupdate.
	    lang.m4: AC_LANG_SAVE is expanded from...
	    configure.ac:6: the top level

	This allows us to write tests for these diagnostics that don’t depend
	on the relationship between the source and build directories, and
	won’t break when unrelated patches change the line number of a macro
	definition.

		* lib/autoconf/functions.m4 (AC_REPLACE_FUNCS, _AC_REPLACE_FUNCS)
	        (_AC_REPLACE_FUNC): Refactor into AC_REPLACE_FUNCS,
	        _AC_REPLACE_FUNCS, _AC_REPLACE_FUNC_U, _AC_REPLACE_FUNC_L,
	        _AC_REPLACE_FUNC_NL.  Ensure that _AH_CHECK_FUNC and
	        AC_LIBSOURCE are invoked unconditionally at m4 expansion
	        time for each literal function name in the argument to
	        AC_CHECK_FUNCS.  Issue warnings about non-literal names.

	        * tests/local.at (AT_CHECK_M4): Normalize backtrace lines from
	        the output of AC_DIAGNOSE / m4_warn.
	        (AT_CHECK_AUTOHEADER): Add arg EXPECTED-TMPLS
	        giving a list of preprocessor macro names that should appear
	        in the generated config.h.in.  Use AT_CHECK_M4 to invoke autoheader.
	        (_AT_CHECK_AC_MACRO, AT_CHECK_MACRO, AT_CHECK_AU_MACRO):
	        Update uses of AT_CHECK_AUTOHEADER.
	        * tests/fortran.at, tests/semantics.at, tests/tools.at
	        * tests/torture.at: Update all uses of AT_CHECK_AUTOHEADER.

	        * tests/semantics.at (AC_REPLACE_FUNCS test): Make somewhat
	        more thorough, using new functionality of AT_CHECK_M4 and
	        AT_CHECK_AUTOHEADER.

2020-06-30  Zack Weinberg  <zackw@panix.com>

	Look harder for a shell whose -n is known to work.
	The test suite was insisting on using /bin/sh -n for syntax checking,
	which meant that if /bin/sh wasn’t one of the short list of shells
	whose -n is known to work, we would skip all of the syntax-check
	tests, even if some other shell was available that would work.

	Instead do like _AS_DETECT_BETTER_SHELL, and loop over possible
	shells, starting with $SHELL and going on to a hardwired list of
	known-good possibilities.  The result is written to the substitution
	variable @SHELL_N@ and the testsuite uses that.

	(Should we invoke AC_PATH_PROG on the result of the search if it’s not
	already absolute?)

		* configure.ac: Search for a shell whose -n mode is known to
	        work, instead of just checking /bin/sh.  Set @SHELL_N@ to
	        what we find.
	        * tests/atlocal.in: Propagate @SHELL_N@ to testsuite.
	        * tests/local.at (AT_CHECK_SHELL_SYNTAX): Use $SHELL_N instead
	        of hardcoding /bin/sh.  Update test for usable shell -n.
	        (AT_CHECK_AUTOCONF): Update test for usable shell -n.
	        * tests/tools.at: Update test for usable shell -n.

2020-06-29  Paul Eggert  <eggert@cs.ucla.edu>

	make fetch

	Update release advice

	Stop using up_to_date_p
	* bin/autom4te.in (up_to_date): Rewrite to stop using
	up_to_date_p, which has been removed from Automake.

	make fetch

	Save and check Autom4te version in cache
	Problem reported in <https://bugs.debian.org/219621>.
	* bin/autom4te.in: Save and check autom4te version number into cache index.
	* lib/Autom4te/C4che.pm (save): New arg $version.  All callers changed.
	(good_version): New sub.

	Fix undefined behavior in AC_SYS_LARGEFILE
	* lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
	Avoid undefined behavior on platforms where off_t is 32 bits.  See:
	https://bugs.debian.org/742780

2020-06-29  Andreas Barth  <aba@ayous.org>  (tiny change)

	Look for AM_PROG_LIBTOOL too
	This helps out dh-autoreconf on Debian
	<https://bugs.debian.org/759739>.
	* bin/autoreconf.in (autoreconf_current_directory):
	* lib/autom4te.in (args): Look for AM_PROG_LIBTOOL too.

2020-03-13  Zack Weinberg  <zackw@panix.com>

	Define $as_echo and $as_echo_n for backward compatibility.
	Commit 2b59b6f8a79b8bf77e178ff4e5aa0ede433d39cf removed the internal
	shell variables $as_echo and $as_echo_n.  It turns out that these are
	used by several widely-used third-party m4 files (notably both
	gnulib-common.m4 from gnulib, and ax_pthread.m4 from the Autoconf
	macro archive) as well as any number of existing configure.ac’s.

	Restore these shell variables, unconditionally defining them to use
	printf.  Issue -Wobsolete warnings if they are used, recommending the
	use of AS_ECHO and AS_ECHO_N respectively.  Add a test which checks
	both that they do work and that they trigger warnings.

2020-03-13  Zack Weinberg  <zackw@panix.com>

	_AS_REEXEC_WITH_SHELL: don’t use AS_EXIT.
	If _AS_REEXEC_WITH_SHELL fails to exec the selected “better” shell
	interpreter, and that failure somehow doesn’t terminate the process,
	it calls AS_EXIT([255]).  This expands to an invocation of as_fn_exit.
	However, the definition of as_fn_exit goes into the M4SH-INIT-FN
	diversion, whereas _AS_REEXEC_WITH_SHELL goes into the M4SH-SANITIZE
	diversion, so as_fn_exit won’t be defined at the point of this use.
	We can’t move the definition of as_fn_exit earlier, because we don’t
	know that the shell supports shell functions until after we get to the
	end of the M4SH-SANITIZE diversion.

	This is only a theoretical bug because, as the comments say, “all the
	known shells bail out after a failed exec.”  However, a shell that
	doesn’t bail out will instead give the user a flood of nonsensical
	error messages (starting with “as_fn_exit: not found” and then going
	on to choke on the rest of the script) so I think we should fix it
	anyway.  There shouldn’t be any problem with using a plain ‘exit’ at
	this point; no traps are active yet, and we are exiting with an
	explicit error code.

2020-03-13  Zack Weinberg  <zackw@panix.com>

	README-hacking: re-configure from scratch during bootstrap.
	When building autoconf from a git checkout, recommend running
	‘make distclean’ and a second ‘./configure’ after regenerating
	autoconf’s own configure script using the just-built autoconf.
	If one only runs ‘make check’ at that point, some configure-time
	tests will not be repeated using the new code, such as detection
	of a “better” shell.

2020-03-12  Paul Eggert  <eggert@cs.ucla.edu>

	Fix _AS_DETECT_BETTER_SHELL breakage
	Problem reported by Zack Weinberg in:
	https://lists.gnu.org/r/autoconf/2020-03/msg00017.html
	* lib/m4sugar/m4sh.m4 (_AS_RUN): Use sh -c instead of
	the no-longer-existent $as_echo.  This fixes a bug introduced
	in 2013-01-28T03:44:45Z!gary@gnu.org.

2020-02-26  Zack Weinberg  <zackw@panix.com>

	Fix `make syntax-check'.
	There are two errors caught by make syntax-check currently.

	First, the recent make update-copyright
	(d78a7dd95fed24e417dfb4d08124a9ce7c1f7d1e) missed autoconf.texi, I
	think because there are a bunch of .texi files in doc/ whose copyright
	years should *not* be updated (e.g. standards.texi, fdl.texi) and the
	exclusion pattern is too broad.  I can't actually *find* the exclusion
	pattern in the twisty maze of .mk files, all alike, so I just manually
	updated autoconf.texi.

	Second, it objects to an edit to an old section of NEWS.  This is
	because of d3dcd5895d64f6c86275c9333e2760a867e540e7, which is a
	legitimate change (replacing http:// with https:// in a URL) so the
	correct action is to change old_NEWS_hash to match.

		* doc/autoconf.texi: Update copyright year.
		* cfg.mk (old_NEWS_hash): Update to acknowledge commit
		d3dcd5895d64f6c86275c9333e2760a867e540e7.

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

	Mention 32-bit GNU/Linux 64-bit inodes
	* lib/autoconf/specific.m4 (AC_SYS_LARGEFILE):
	In a comment, mention 64-bit inode problem on 32-bit GNU/Linux.
	This is taken from Gnulib.

	Remove definition of _DARWIN_USE_64_BIT_INODE
	It’s not needed in currently-supported macOS versions, and was
	problematic anyway in MacOS X 10.5 which was the only version that
	could use it.  Problem reported by Peter Eisentraut in:
	https://lists.gnu.org/r/bug-autoconf/2020-02/msg00004.html
	* lib/autoconf/specific.m4 (AC_SYS_LARGEFILE):
	Don’t define _DARWIN_USE_64_BIT_INODE.

2020-01-01  Jim Meyering  <meyering@fb.com>

	maint: make update-copyright

2019-12-25  Paul Eggert  <eggert@cs.ucla.edu>

	Document AIX 7.2 printf command gotcha
	* doc/autoconf.texi (Limitations of Builtins):
	Document AIX 7.2 sh printf problem with octal escapes.

2019-10-06  Paul Eggert  <eggert@cs.ucla.edu>

	Fix terminology typo in mkdir -p check
	* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Say “race-free”, not
	“thread-safe”.  Problem reported by Reuben Thomas in:
	https://lists.gnu.org/r/bug-autoconf/2019-09/msg00003.html

2019-09-10  Ondrej Dubaj  <odubaj@redhat.com>

	Port tests to Bash 5
	* tests/local.at (AT_CHECK_ENV, AT_CONFIG_CMP):
	Add BASH_ARGC, BASH_ARGV to list of variables to be ignored when
	comparing variable space dumps.
	(AT_CONFIG_CMP): Also ignore LINENO.
	* tests/m4sh.at: Also unset LINENO in 'reference' and 'test/test-1'.

2019-05-29  Paul Eggert  <eggert@cs.ucla.edu>

	Port AC_C_BIGENDIAN to recent clang
	Problem and trivial patch reported by Matthieu Gautier in:
	https://lists.gnu.org/r/bug-autoconf/2019-05/msg00006.html
	* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Use unsigned short for
	values greater than 2**15 - 1.

2018-12-15  Jim Meyering  <meyering@fb.com>

	doc/autoconf.texi: fix spelling/grammar nits

2018-11-24  Noah Misch  <noah@cs.caltech.edu>

	AC_CHECK_DECL: when cached, don't overwrite a werror flag
	* lib/autoconf/general.m4 (_AC_CHECK_DECL_BODY): Restore werror flags
	inside the AC_CACHE_CHECK that saves them.  Commit
	82ef7805faffa151e724aa76c245ec590d174580 broke this.  From Tom Lane
	(trivial change).
	* tests/semantics.at (AC_CHECK_DECLS): Test this.

2018-03-19  Paul Eggert  <eggert@cs.ucla.edu>

	lib: use list of unsafe chars, not safe ones
	* lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG):
	Rely on list of unsafe chars instead of list of safe ones.
	This corresponds more closely to POSIX and should result
	in less quoting.
	* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS):
	Adjust to this change.
	x

2018-03-19  Daniel Colascione  <dancol@dancol.org>

	fix quoting

	Fix test suite with modern Perl

2017-10-29  Paul Eggert  <eggert@cs.ucla.edu>

	lib: fix update_file timestamps
	Problem reported by Bruno Haible in:
	https://savannah.gnu.org/support/?109406
	* lib/Autom4te/FileUtils.pm (update_file): Use rename + system
	instead of move, since move truncates file timestamps.

2017-09-23  Paul Eggert  <eggert@cs.ucla.edu>

	maint: update URLs
	Most of this is replacing http: with https: when either will do.

	lib: check ‘install file dir/’
	* lib/autoconf/programs.m4 (AC_PROG_INSTALL): Check that the
	system install program works when the destination name has a
	trailing slash.  This helped catch problems in an experimental and
	never-published version of GNU Coreutils, and is a good thing to
	check in general.

	maint: sync from Automake
	This just updates comments, notably URLs.

2017-09-16  Paul Eggert  <eggert@cs.ucla.edu>

	Prefer HTTPS to FTP and HTTP

	make fetch

	"time stamp" -> "timestamp", as per POSIX

2017-01-25  Eric Blake  <eblake@redhat.com>

	doc: emphasize that config.h must be first
	* doc/autoconf.texi (C and Posix Variants, System Services):
	Remind user to include config.h first.
	(Configuration Headers): Give another reason why config.h must be
	first, and mention that only .c files need it.
	Based on discussion on bugs.debian.org/158969

2017-01-01  Jim Meyering  <meyering@fb.com>

	maint: update copyright dates for 2017
	* all files: Run "make update-copyright".
	* doc/autoconf.texi: Update manually.

2016-12-23  Eric Blake  <eblake@redhat.com>

	doc: Mention effect of 'autoreconf -fi' on INSTALL
	Several projects have a bootstrap script that invokes
	'autoreconf -fi' as part of a fresh version control checkout,
	in order to avoid storing common files in version control,
	while also allowing contributors to rerun bootstrap to pick
	up the benefits of any upgrade of one of the autotools.

	However, the documentation did not make it obvious that such
	a setup will overwrite any customizations to files like
	INSTALL, if those files are stored in version control, when
	automake still considers that file to be standard based on
	AM_INIT_AUTOMAKE settings.  In such a case, a mere
	'autoreconf -i' is good for the bootstrap script, while a
	separate 'autoreconf -f' is good for picking up on an upgrade
	of any autotools.

	* bin/autoreconf.in (help): Mention standard files.
	* doc/autoconf.texi (autoreconf Invocation): Add more text, including
	warning that mixing --force and --install may undo customizations,
	and that the set of files impacted is controlled by automake.
	Reported by Emil Laine <laine.emil@gmail.com>

2016-12-22  Eric Blake  <eblake@redhat.com>

	doc: Patterns in m4_pattern_forbid cause error, not warning
	The example text regarding a desired literal AC_DC in output
	claimed that the result would trigger a warning if one does
	not use creative quoting; but in reality, autoconf's use of
	m4_pattern_forbid to reserve the entire AC_ namespace makes
	it a hard error.  Reword the section to mention the use of
	m4_pattern_allow() as the fix, and beef up the example to
	better demonstrate the problem.

	* doc/autoconf.texi (Autoconf Language): Improve AC_DC example.
	Reported by Gavin Smith <gavinsmith0123@gmail.com>.

2016-12-21  Daniel Elstner  <daniel.kitta@gmail.com>

	autoheader: check templates of all config headers
	* bin/autoheader.in: When checking for missing templates, take
	all config headers into account, not just the one generated by
	autoheader.  This makes it possible to use AC_DEFINE() for
	secondary headers without duplicating the template into the
	first header.
	* tests/tools.at: Add a check for autoheader with multiple
	config headers.
	* NEWS: Document the new behavior.
	Message-Id: <1482336946.31331.2.camel@gmail.com>

2016-12-21  Paolo Bonzini  <bonzini@gnu.org>

	autoconf: prefer an unrolled loop for trivial AC_CHECK_HEADERS
	An unrolled loop avoids the cost of spawning sed in AS_TR_SH and
	AS_TR_CPP.  Prefer it if there is nothing in the second and third
	argument of AC_CHECK_HEADERS and the first argument is a literal.

	* lib/autoconf/headers.m4 (AC_CHECK_HEADERS): Unroll loop if safe.
	(_AC_CHECK_HEADERS): Move basic implementation here.
	(AC_CHECK_INCLUDES_DEFAULT): Remove unnecessary arguments after the first.

	Message-Id: <1477933688-4884-3-git-send-email-bonzini@gnu.org>
	[eblake: perform AC_CHECK_HEADERS_ONCE changes separately, use
	dnl to reduce generated blank lines]

2016-12-21  Paolo Bonzini  <bonzini@gnu.org>

	autoconf: prefer an unrolled loop for trivial AC_CHECK_FUNCS
	An unrolled loop avoids the cost of spawning sed in AS_TR_SH and
	AS_TR_CPP.  Prefer it if there is nothing in the second and third
	argument of AC_CHECK_FUNCS and the first argument is a literal.

	* lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Unroll loop if safe.
	(_AC_CHECK_FUNCS): Move basic implementation here.

	Message-Id: <1477933688-4884-2-git-send-email-bonzini@gnu.org>
	[eblake: perform AC_CHECK_FUNCS_ONCE changes separately, use
	dnl to reduce generated blank lines]

2016-12-21  Eric Blake  <eblake@redhat.com>

	AC_CHECK_HEADERS_ONCE: hoist cache name computation to m4 time
	Rather than perform a sed script on each element of the
	$ac_header_c_list to compute the corresponding cache name, we
	can inline enough of AC_CHECK_HEADER to bypass the normal
	polymorphic code, and instead directly use the literal
	header and cache name that we are consuming from the list.

	The resulting configure script is roughly unchanged in size,
	but performs slightly faster.

	* lib/autoconf/headers.m4 (AC_CHECK_HEADER_COMPILE): Split out shell
	function registration...
	(_AC_CHECK_HEADER_COMPILE_FN): ...to here.
	(_AC_HEADERS_EXPANSION): Use it to inline enough of AC_CHECK_HEADER
	to operate on a literal rather than a shell variable, for fewer sed
	calls.

2016-12-21  Eric Blake  <eblake@redhat.com>

	AC_CHECK_FUNCS_ONCE: hoist cache name computation to m4 time
	Rather than perform a sed script on each element of the
	$ac_func_c_list to compute the corresponding cache name, we
	can inline enough of AC_CHECK_FUNC to bypass the normal
	polymorphic code, and instead directly use the literal
	function name that we are consuming from the list.

	While at it, we can use echo instead of cat to append to
	confdefs.h, for another process shaved.

	The resulting configure script is roughly unchanged in size,
	but performs slightly faster.

	* lib/autoconf/functions.m4 (AC_CHECK_FUNC): Split out shell
	function registration...
	(_AC_CHECK_FUNC_FN): ...to here.
	(_AC_FUNCS_EXPANSION): Use it to inline enough of AC_CHECK_FUNC to
	operate on a literal rather than a shell variable, for fewer sed
	calls.

2016-12-21  Eric Blake  <eblake@redhat.com>

	AC_CHECK_HEADERS_ONCE: hoist CPP name computation to m4 time
	Rather than perform a sed script on each element of the
	$ac_header_c_list to compute the corresponding CPP name, we can
	make the list store a series of triples of header names, shell-safe
	names, and CPP names all computed at m4 time.

	The resulting configure script is slightly larger based on
	how many headers are checked once, but also performs
	slightly faster.

	There is still a sed call in AC_CHECK_HEADER for computing the
	cache variable name; that will be dealt with next.  That patch
	will also be the one that takes advantage of the shell-safe name.

	* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_ONCE): Track the shell
	and CPP name in the list...
	(_AC_HEADERS_EXPANSION): ...and rewrite the list walk to parse off
	triples of arguments, for fewer sed calls.

2016-12-21  Eric Blake  <eblake@redhat.com>

	AC_CHECK_FUNCS_ONCE: hoist CPP name computation to m4 time
	Rather than perform a sed script on each element of the
	$ac_func_c_list to compute the corresponding CPP name, we can
	make the list store a series of pairs of function names and
	CPP names all computed at m4 time.

	The resulting configure script is slightly larger based on
	how many function names are checked once, but also performs
	slightly faster.

	There is still a sed call in AC_CHECK_FUNC for computing the
	cache variable name; that will be dealt with next.

	* lib/autoconf/functions.m4 (_AC_CHECK_FUNC_ONCE): Track the CPP
	name in the list...
	(_AC_FUNCS_EXPANSION): ...and rewrite the list walk to parse off
	pairs of arguments, for fewer sed calls.

2016-12-21  Eric Blake  <eblake@redhat.com>

	AC_CHECK_HEADERS_ONCE: honor current AC_LANG
	Previously, AC_CHECK_HEADERS_ONCE collected a list of header names
	to check, but ran the checks using the AC_LANG that was active
	during the first encounter of the macro.  In practice, this is
	usually the C language, and we haven't had actual reports of projects
	attempting to use AC_CHECK_HEADERS_ONCE across multiple languages,
	rather this was discovered by code inspection.

	With this patch, the code now tracks a separate per-language list of
	names to check.  Note, however, that it is only possible to check for
	a given header name in one language; attempting to add a name again
	under AC_CHECK_HEADERS_ONCE while a different language is active is a
	no-op (this still makes sense because the side-effect of defining
	the CPP macro HAVE_HEADER does not include a language prefix).

	* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_ONCE)
	(_AC_HEADERS_EXPANSION):
	* NEWS: Mention it.

2016-12-20  Eric Blake  <eblake@redhat.com>

	AC_CHECK_FUNCS_ONCE: honor current AC_LANG
	Previously, AC_CHECK_FUNCS_ONCE collected a list of function names
	to check, but ran the checks using the AC_LANG that was active
	during the first encounter of the macro.  In practice, this is
	usually the C language, and we haven't had actual reports of projects
	attempting to use AC_CHECK_FUNCS_ONCE across multiple languages,
	rather this was discovered by code inspection.

	With this patch, the code now tracks a separate per-language list of
	names to check.  Note, however, that it is only possible to check for
	a given function name in one language; attempting to add a name again
	under AC_CHECK_FUNCS_ONCE while a different language is active is a
	no-op (this still makes sense because the side-effect of defining
	the CPP macro HAVE_FUNC does not include a language prefix).

	* lib/autoconf/functions.m4 (_AC_CHECK_FUNC_ONCE)
	(_AC_FUNCS_EXPANSION):
	* NEWS: Mention it.

2016-12-14  Bruno Haible  <bruno@clisp.org>

	* doc/autoconf.texi (Using Autotest): Stop mentioning Free Recode.
	Free Wdiff is now GNU Wdiff again.

2016-11-04  Paolo Bonzini  <bonzini@gnu.org>

	autoconf: refine quadrigraph test in _AC_DEFINE_UNQUOTED
	It is a very common case that a quadrigraph appears in the argument of
	_AC_DEFINE_UNQUOTED, because "#define" is expanded through a quadrigraph.
	Therefore, restrict the quadrigraph tests to "$" (for "$(" and "${")
	and "(" (for "$(").

	At the same time, "#" should not be used inside AC_ECHO because it confuses
	m4's comment parsing.  This pre-existing latent bug is caught by test 251:

	   AC_DEFINE_UNQUOTED([bar], [[%!_!# X]])

	Previously the quadrigraph in "@%:@define bar %!_!# X" made Autoconf fall back
	to cat anyway.  Now that Autoconf is not fooled by the quadrigraph, the test
	catches that "#" is not special-cased.  Kudos to Eric for coming up with it!

	* lib/autoconf/general (_AC_DEFINE_UNQUOTED): Do not blindly
	use cat on all quadrigraphs.

	Message-Id: <1477933688-4884-4-git-send-email-bonzini@gnu.org>

2016-11-02  Quinn Grier  <quinn.grier@gmail.com>

	doc: fix an infinitely recursing example
	The "single" macro infinitely recurses because its expansion contains
	the unquoted text " single-". The "double" macro almost has the same
	problem, but it is protected by extra quotes. In any case, the macro
	names being repeated in the macro definitions is not necessary.

	This commit changes the macro names to "foo" and "bar", which are taken
	from a very similar example in the GNU M4 1.4.17 manual. See lines 1971
	to 1980 of v1.4.17:doc/m4.texi in the GNU M4 Git repository.

	* doc/autoconf.texi (Quoting and Parameters): Fix broken example.

2016-11-01  Pádraig Brady  <P@draigBrady.com>

	doc: detail inconsistencies in sed word boundary handling
	* doc/autoconf.texi (Limitations of usual tools): Display a
	table showing where the various syntaxes for word boundaries
	are supported.

2016-09-15  Paul Eggert  <eggert@cs.ucla.edu>

	AC_USE_SYSTEM_EXTENSIONS: Remove stray TR in doc

	AC_USE_SYSTEM_EXTENSIONS: port to more ISO C TSes
	* doc/autoconf.texi (C and Posix Variants): Rename from "Posix
	Variants", and document updated behavior.
	* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Also define
	__STDC_WANT_IEC_60559_ATTRIBS_EXT__,
	__STDC_WANT_IEC_60559_DFP_EXT__,
	__STDC_WANT_IEC_60559_TYPES_EXT__, and
	__STDC_WANT_MATH_SPEC_FUNCS__.  From a suggestion by Joseph Myers in:
	http://lists.gnu.org/archive/html/autoconf-patches/2016-09/msg00011.html

2016-09-15  Eric Blake  <eblake@redhat.com>

	AC_HEADER_MAJOR: port to glibc 2.25
	glibc 2.25 is deprecating the namespace pollution of <sys/types.h>
	injecting major(), minor(), and makedev() into the compilation
	environment, with a warning that insists that users include
	<sys/sysmacros.h> instead.  However, because the expansion of
	AC_HEADER_MAJOR didn't bother checking sys/sysmacros.h until
	after probing whether sys/types.h pollutes the namespace, it was
	not defining MAJOR_IN_SYSMACROS, with the result that code
	compiled with -Werror chokes on the deprecation warnings because
	it was not including sysmacros.h.

	In addition to fixing autoconf (which only benefits projects
	that rebuild configure after this fix is released), we can also
	give a hint to distros on how they can populate config.site with
	a cache variable to force pre-existing configure scripts without
	the updated macro to behave sanely in the presence of glibc 2.25
	(the documentation is especially useful since that cache variable
	is no longer present in autoconf after this patch).

	Note that mingw lacks major/minor/makedev in any of its standard
	headers; for that platform, the behavior of this macro is unchanged
	(code using the recommended include formula will get a compile error
	when trying to use major(), whether before or after this patch); but
	for now, it is assumed that programs actually concerned with
	creating devices are not worried about portability to mingw.  If
	desired, a later patch could tighten AC_HEADER_MAJOR to fail at
	configure time if the macros are unavailable in any of the three
	system headers, but that semantic change is not worth mixing into
	this patch.

	* lib/autoconf/headers.m4 (AC_HEADER_MAJOR): Drop check for
	major within sys/types.h; it interferes with the need to check
	sysmacros.h first.
	* doc/autoconf.texi (Particular Headers) <AC_HEADER_MAJOR>: Expand
	details on usage, and on workarounds for non-updated projects.

2016-09-14  Paul Eggert  <eggert@cs.ucla.edu>

	doc: resplit lines to avoid Texinfo chaos
	* doc/autoconf.texi (Introduction): Resplit lines to avoid
	Texinfo 6.3 incompatibility with Perl 5.22.  See:
	http://lists.gnu.org/archive/html/bug-texinfo/2016-09/msg00037.html

2016-09-13  Paul Eggert  <eggert@cs.ucla.edu>

	AC_USE_SYSTEM_EXTENSIONS: port to recent ISO C
	* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
	Also define __STDC_WANT_IEC_60559_BFP_EXT__,
	__STDC_WANT_IEC_60559_FUNCS_EXT__, and __STDC_WANT_LIB_EXT2__.
	* NEWS, doc/autoconf.texi (Posix Variants):
	Document this.  Also, document other changes in this area
	that were not properly documented before.

	doc: port to Texinfo 6.3
	* doc/autoconf.texi: Remove obsolete @setcontentsaftertitlepage
	that provokes a warning from Texinfo 6.3.

2016-09-13  Eric Blake  <eblake@redhat.com>

	doc: use @xref correctly
	Silences this warning from new-enough texinfo:
	./doc/autoconf.texi:14236: warning: @xref node name should not contain `.'

	* doc/autoconf.texi (Macro Definitions): No need for .info.

2016-05-31  Paul Eggert  <eggert@cs.ucla.edu>

	Port AC_CHECK_HEADER_STDBOOL to C++11
	* lib/autoconf/headers.m4: Port to C++11.
	Problem reported by David Seifert in:
	http://lists.gnu.org/archive/html/bug-gnulib/2016-05/msg00052.html

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

	Use American spelling for "initialize"
	* lib/autoconf/c.m4: Prefer the spelling "initializer" in comments.

2016-03-15  Paul Eggert  <eggert@cs.ucla.edu>

	autom4te: fix problem when tracing to '-'
	* bin/autom4te.in (handle_traces): When $output is '-', use
	stdout rather than creating a file named '-'.  This fixes a problem
	introduced by the recent port to the new Autom4te::XFile API.

	Also try clang
	Problem reported by Václav Zeman in:
	http://lists.gnu.org/archive/html/autoconf/2012-10/msg00000.html
	* lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_OBJC): Also try clang.
	(AC_PROG_CXX): Also try clang++.
	These are at the end of the existing lists, to avoid compatibility
	issues in older installations.

	Port C11 and C++11 testing to clang
	* lib/autoconf/c.m4 (_AC_C_C99_TEST_HEADER):
	Include stddef.h, for offsetof.
	(_AC_PROG_CC_C11): Limit _Static_assert to integer constant
	expressions.  Suggested by Nick Bowler in:
	http://lists.gnu.org/archive/html/autoconf/2016-02/msg00009.html
	(_AC_CXX_CXX11_TEST_BODY): Don't use string literals to initialize
	non-const pointers.  Suggested by Mike Miller in:
	http://lists.gnu.org/archive/html/autoconf/2016-02/msg00008.html

	Fix broken URL to Unix history
	* doc/autoconf.texi (Systemology): Fix broken URL.
	Reported by Tom Wilcox.

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

	AC_C_RESTRICT: port better to non-GCC + glibc
	Problem reported by Dwight Guth in:
	http://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
	* lib/autoconf/c.m4 (AC_C_RESTRICT): Prefer __restrict__ to __restrict.
	Also, fix and update some comments.

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

	Move config.* man pages to its source tree
	Suggested by Ben Elliston in:
	https://lists.gnu.org/archive/html/autoconf-patches/2015-11/msg00000.html
	* man/config.guess.x, man/config.sub.x: Remove.
	* NEWS: Mention this.
	* man/local.mk (dist_man_MANS): Remove them.
	($(mansrcdir)/config.guess.1, $(mansrcdir)/config.sub.1): Remove rules.

	maint: make update-copyright

	port to new Autom4te::XFile API

	make fetch

	Port better to gcc -fsanitize=address
	* lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF):
	Free heap-allocated storage before exiting.

	Fix memory leak in AC_FUNC_MMAP
	* lib/autoconf/functions.m4 (AC_FUNC_MMAP): Fix memory leak
	in test case, found by configuring with gcc -fsanitize=address.

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

	Document dash ${*-unset} behavior
	* doc/autoconf.texi (Shell Substitutions): Document dash
	incompatibility.  Problem reported by David Caldwell in:
	http://bugs.gnu.org/22556

2015-10-08  Thomas Jahns  <jahns@dkrz.de>  (tiny change)

	Add -mdir flag for NAG Fortran compiler
	* lib/autoconf/fortran.m4 (AC_FC_MODULE_OUTPUT_FLAG):
	Also try -mdir.  Also, prefer autoconf macros instead of verbatim shell
	code and make tests safer.

2015-09-05  Paul Eggert  <eggert@cs.ucla.edu>

	tests: port to recent libtool diagnostics
	Problem reported by Christian Fafard in:
	http://lists.gnu.org/archive/html/bug-autoconf/2015-09/msg00009.html
	* tests/foreign.at (libtool): Run the scripts in the C locale,
	so that we need not worry about localized quotes in their output.

2015-08-07  Paul Eggert  <eggert@cs.ucla.edu>

	Add /opt/X11/include to X search path
	* lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT):
	Add /opt/X11/include for OS X.
	Problem reported by Daniel Macks at:
	http://lists.gnu.org/archive/html/bug-autoconf/2015-08/msg00002.html

2015-06-04  Eric Blake  <eblake@redhat.com>

	doc: mention 'for' syntax issue on older shells
	Based on a report by Michael Felt, via Paul Eggert on the
	coreutils list.

	* doc/autoconf.texi (Limitations of Builtins) <for>: Document
	problem with 'for var in ;'.

2015-05-13  Noah Misch  <noah@cs.caltech.edu>

	AC_CHECK_DECL, AC_CHECK_DECLS: port to the Clang compiler
	* lib/autoconf/general.m4 (_AC_UNDECLARED_WARNING): New macro.
	(_AC_CHECK_DECL_BODY): Call it once per language; treat warnings as
	errors when its verdict indicates that.
	* tests/semantics.at (AC_CHECK_DECLS): Add a macro call that relies on
	the new semantics.  Avoid -Wmissing-variable-declarations warnings.
	* doc/autoconf.texi (Generic Declarations): Document the implications.
	* NEWS: Mention this change.

2015-04-21  Matěj Týč  <matej.tyc@gmail.com>

	m4_pattern_forbid: better documentation
	Give a more concrete description of what the m4_pattern_forbid
	thingy that pretends it is a macro accepts as an argument.

	Copyright-paper-exempt: Yes

2015-04-21  Eric Blake  <eblake@redhat.com>

	lib: use shorter way to test if variable is set
	Based on an idea by Bernhard Reutner-Fischer.

	We frequently used the idiom of 'test "${var+set}" = set' to
	test if $var was set to a non-empty string, but this can portably
	be trimmed to a more compact 'test ${var+y}' for a smaller
	configure file.  Testing that a variable is not set can be done
	with '${var+false} :' (although the value of $? is not reliably
	1 when the variable is set).

	The code for AS_VAR_TEST_SET already used the form '${var+:} false',
	but it is slightly longer, and does not guarantee $? of 1.

	Tested on coreutils, where the resulting configure file is about
	1k smaller.

	* doc/autoconf.texi (Shell Substitutions): Prefer shorter sequence
	for testing if a variable is set.
	(Limitations of Builtins) <test (strings)>: Document it.
	* configure.ac: Use it.
	* lib/autoconf/c.m4 (_AC_PROG_CC_G, _AC_PROG_CXX_G)
	(_AC_PROG_OBJC_G, _AC_PROG_OBJCXX_G): Likewise.
	* lib/autoconf/fortran.m4 (_AC_PROG_FC_G): Likewise.
	* lib/autoconf/general.m4 (_AC_ENABLE_IF_ACTION, AC_CACHE_SAVE):
	Likewise.
	* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Likewise.
	* lib/autoconf/programs.m4 (AC_PROG_INSTALL, AC_PROG_MKDIR_P)
	(_AC_PROG_LEX_YYTEXT_DECL): Likewise.
	* lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Likewise.
	* lib/autotest/general.m4 (AT_INIT): Likewise.
	* tests/base.at (AC_CACHE_CHECK): Likewise.
	* tests/m4sh.at (LINENO): Likewise.
	* lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE)
	(_AS_DETECT_BETTER_SHELL, _AS_SHELL_SANITIZE)
	(_AS_PATH_SEPARATOR_PREPARE): Likewise.
	(AS_VAR_TEST_SET): Use shorter sequence.

2015-04-21  Eric Blake  <eblake@redhat.com>

	m4_set_foreach: minor optimization
	As a minor optimization, most macros in m4sugar.m4 try to avoid
	output of 'dnl' in the expansion, to reduce the number of macros
	that must be expanded at each call site.

	* lib/m4sugar/m4sugar.m4 (m4_set_foreach): Don't expand dnl in all
	callers.

2015-04-21  Nick Bowler  <nbowler@draconx.ca>  (tiny change)

	m4sugar: fix pop typo in m4_set_foreach
	* lib/m4sugar/m4sugar.m4 (m4_set_foreach): Pop macro definition.

2015-04-09  Eric Blake  <eblake@redhat.com>

	AC_PROG_MKDIR_P: reduce macro output size
	Merging two case globs into one gives slightly smaller files and
	less time spent in shell globbing on systems that lack GNU mkdir.

	* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Combine two GNU cases.

2015-04-09  Bernhard Reutner-Fischer  <rep.dot.nop@gmail.com>

	AC_PROG_MKDIR_P: Also accept BusyBox mkdir -p
	* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Accept BusyBox.

2015-02-01  Jim Meyering  <meyering@fb.com>

	tests: avoid two false-positive parallel test failures
	* tests/local.mk (check-local): Add a leading "+",
	to void false-positive test failures when running
	them in parallel.  Before this change, running e.g.,
	"make check TESTSUITEFLAGS=--jobs=15" would always
	fail the two "make"-invoking tests: "C unit tests"
	and "C unit tests (EXEEXT)".
	(installcheck-local): Likewise for "installcheck".

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

	doc: -f is now portable for cp and ln
	This follows up on a comment by Glenn Morris in:
	http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00011.html
	* doc/autoconf.texi (Limitations of Usual Tools):
	Remove circa-1990 advice about avoiding cp -f and ln -f.
	Although that advice was reasonable for the early 1990s, the -f
	option is portable for both cp and ln nowadays.  These options
	were standardized in POSIX 1003.2-1992, and pre-POSIX systems such
	as SunOS 4 are no longer of practical concern.

	maint: bump copyright year
	* doc/autoconf.texi: Update copyright year.
	This had to be done by hand.

	maint: bump copyright to 2015
	* all files: Run 'make update-copyright'.

2014-12-17  Stefano Lattarini  <stefano.lattarini@gmail.com>

	Fix spurious testsuite failure when /bin/sh is dash
	The testsuite used slightly different logic in the code employed to
	decide whether a test should be skipped due to a limitation of the
	selected shell, and in the code running the test itself.

	* tests/autotest.at (Syntax error): Adjust.
	(parallel syntax error): Likewise.

2014-11-03  Gary V. Vaughan  <gary@gnu.org>

	tests: avoid spurious test failure with libtool 2.4.3
	Based on a report by Bruce Dubbs.

	* tests/foreign.at (Libtool): Be tolerant of 'quote' replacing the
	older `quote'.

2014-11-03  Eric Blake  <eblake@redhat.com>

	docs: mention that not all values can be exported
	There has been a LOT of news about bash's Shell Shock bug lately.
	Document some of the ramifications it has on portable scripting.

	* doc/autoconf.texi (Limitations of Builtins) <export>: Add some
	details about Shell Shock CVE-2014-6271.

2014-09-08  Paul Eggert  <eggert@cs.ucla.edu>

	doc: distinguish GCC from GNU C, etc.
	* doc/autoconf.texi (C Compiler, Objective C Compiler)
	(Objective C++ Compiler, Fortran Compiler): Be more careful about
	distinguishing GNU C from GCC, and similarly for other languages.
	Problem reported by Marko Lindqvist in:
	http://lists.gnu.org/archive/html/autoconf/2014-09/msg00027.html

	autoconf: clarify "checking" message for GNU-compatible compiliers
	Problem reported by Bastien Chevreux in:
	http://lists.gnu.org/archive/html/autoconf/2014-09/msg00022.html
	and idea for fix by Eric Blake in:
	http://lists.gnu.org/archive/html/autoconf/2014-09/msg00025.html
	* doc/autoconf.texi (Running the Preprocessor)
	(Present But Cannot Be Compiled):
	Adjust examples to match current behavior.
	* lib/autoconf/lang.m4 (_AC_LANG_COMPILER_GNU): Say
	"checking whether the compiler supports GNU C", not
	"checking whether we are using the GNU C compiler".

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

	autoconf: fix typo in previous change
	* lib/autoconf/c.m4 (AC_C_RESTRICT): Fix typo in previous change.

	autoconf: port 'restrict' to GCC 4.2.1
	* lib/autoconf/c.m4 (AC_C_RESTRICT): Detect GCC bug 14050.
	Problem reported by Marco Munari for OpenBSD 5.5.

2014-08-08  Jehan  <jehan@girinstud.io>

	cross-compiling: handling modern platforms able to run foreign binaries.
	* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_CROSS):
	When only --host is set, and no --build, but in the end, the resulting
	computed $build and $host are different, set $cross_compiling = yes.
	Indeed we can't rely only on a successful test program run, because false
	positives occur on some platforms. In particular modern GNU/Linux
	distributions set Wine to automatically handle Windows binaries.
	Consequently $cross_compiling gets set to "no" even though we are in an
	obvious cross-compilation case.
	(tiny change)

2014-08-07  Paul Eggert  <eggert@cs.ucla.edu>

	autoconf: modernize AC_C_VARARRAYS for C11
	* lib/autoconf/c.m4 (AC_C_VARARRAYS): Define __STDC_NO_VLA__ if
	VLAs are not supported, as this is what C11 does.  The old macro
	HAVE_C_VARARRAYS is still defined if they are supported, but is
	now obsolescent.  Also, check for VLA bug in GCC 3.4.3.
	* doc/autoconf.texi (C Compiler), NEWS: Document the above.

	doc: Solaris 11 supports $(...)
	* doc/autoconf.texi (Shell Substitutions): Say that $(...) isn't
	working in Solaris 10 and earlier, not in "recent releases".

	doc: modernize character encoding
	* doc/autoconf.texi: Specify @documentencoding UTF-8.  Don't abuse
	'`' to mean open quote, unless Texinfo already interprets it that
	way.  Be more careful about hyphen versus minus versus endash
	versus emdash.

2014-07-17  Eric Blake  <eblake@redhat.com>

	m4sh: allow trailing newlines in shell conditions
	Dimitrios Apostolou reported getting a shell syntax error for
	this construct in his configure.ac:

	AM_CONDITIONAL([HAVE_LIBXML2],
	    [test "x$with_libxml2" != xno &&
	     test "x$ac_cv_lib_xml2_xmlFirstElementChild" = xyes]
	)

	He analyzed it to a root cause: his trailing newline, coupled
	with an 'if $2; then' construct in the macro body, resulted in
	configure containing:
	if test ... xyes
	; then
	where the semicolon is a syntax error in shell; and proposed
	a patch to automake to fix his use case.

	While that macro is not under our control, it does highlight
	the fact that the shell can use either ; or newline to
	terminate a conditional prior to the next keyword in a compound
	statement.  If we use newline, we gain two benefits - the
	configure file is slightly smaller (more lines, but fewer
	bytes), and any user that doesn't realize that unquoted
	trailing newlines in a macro argument are still significant
	can still generate valid shell code when their argument is
	used in a shell compound statement.

	* lib/m4sugar/m4sh.m4 (AS_IF, _AS_IF, _AS_CLEAN_DIR): Prefer
	newline over semicolon to end user-supplied conditionals.
	* lib/autoconf/general.m4 (AC_CONFIG_AUX_DIRS): Likewise.
	* lib/autoconf/libs.m4 (AC_SEARCH_LIBS): Likewise.
	* lib/autoconf/programs.m4 (_AC_PATH_PROGS_FEATURE_CHECK):
	Likewise.
	* tests/m4sh.at (AS_IF and AS_CASE): Test it.

2014-05-30  Eric Blake  <eblake@redhat.com>

	maint: add to THANKS
	* THANKS: Update.

2014-05-30  Eric Blake  <eblake@redhat.com>

	AC_INIT: quote invalid feature names
	Changes:
	   configure: error: invalid feature name: debug
	to
	   configure: error: invalid feature name: `debug '
	to make it obvious if trailing space is the reason why a feature
	name was rejected; similar to existing error messages elsewhere
	about invalid shell variable names.

	* lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE2): Add quotes.
	Reported by Noel Grandin.

2014-05-12  Paul Eggert  <eggert@cs.ucla.edu>

	autoconf: fix typo in description generated by AC_RUN_IFELSE
	* lib/autoconf/general.m4 (_AC_RUN_IFELSE): "run" not "link"
	in description.

2014-02-13  Vincent Lefevre  <vincent@vinc17.net>  (tiny change)

	Change main () to main (void) for C/C++
	This patch changes "main ()" to "main (void)" for C/C++.
	See: http://lists.gnu.org/archive/html/bug-autoconf/2014-01/msg00005.html

	On my machine, before this patch, 3 tests were failing:

	  38: tools.at:1329      autom4te cache locking
	 218: autotest.at:1893   C unit tests
	      ac_config_testdir at_tested autotest
	 219: autotest.at:1948   C unit tests (EXEEXT)
	      ac_config_testdir at_tested autotest

	With this patch, 2 tests were failing:

	 218: autotest.at:1893   C unit tests
	      ac_config_testdir at_tested autotest
	 219: autotest.at:1948   C unit tests (EXEEXT)
	      ac_config_testdir at_tested autotest

	(I suspect that 38 is unrelated.)

2014-02-05  Eric Blake  <eblake@redhat.com>

	doc: give an example of using the macro for pkg-config
	The autoconf manual doesn't mention any examples of actually
	using m4_pattern_forbid.  Yet this is the perfect macro for
	avoiding the all-too-common failure mode of configure dying with:

	      checking if libxml2 is present... ./configure: line 11586: syntax
	 error
	 near unexpected token `LIBXML2,'
	      ./configure: line 11586: `PKG_CHECK_MODULES(LIBXML2, libxml-2.0>=
	 2.6.19,'

	for developers that forgot to install pkg-config.  While we don't
	necessarily advertise the use of PKG_CHECK_MODULES, it is a
	common enough situation that the manual should make it easier to
	help developers learn about missing third-party macros.

	Based on a mailing list report by Daniel Pocock:
	http://lists.gnu.org/archive/html/autoconf/2014-01/msg00030.html

	* doc/autoconf.texi (Forbidden Patterns): Add examples.

2014-01-01  Eric Blake  <eblake@redhat.com>

	tests: don't let config.site affect testsuite
	Test 236 "configure directories" failed for me on 64-bit Fedora 20;
	it boiled down to the system's config.site causing libdir to
	default to /usr/lib64 instead of the autoconf default of /usr/lib.

	* tests/base.at (configure directories): Neutralize any preinstalled
	config.site from the system.

2014-01-01  Eric Blake  <eblake@redhat.com>

	maint: fix 'make syntax-check' findings
	Fix syntax check warnings that are unrelated to the new copyright
	year.

	* lib/local.mk (lib/autoscan/autoscan.list): Reduce indent, to
	avoid mix of tab and 8 spaces.
	* bin/local.mk (bin/autoconf.in): Likewise.
	* lib/autoconf/c.m4 (_AC_CXX_CXX98_TEST_BODY): Use consistent case
	in message.

2014-01-01  Eric Blake  <eblake@redhat.com>

	maint: bump copyright to 2014
	Done via 'make update-copyright', since all files are effectively
	modified and distributed this year via public version control.

	* all files: Update copyright year.

2013-09-21  Zack Weinberg  <zackw@panix.com>

	Expose the checks done by AC_INCLUDES_DEFAULT as a public macro.
	 * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS):
	   Rename to AC_CHECK_INCLUDES_DEFAULT.  All callers changed.
	   (AC_HEADER_STDC, AC_UNISTD_H): Use AC_CHECK_INCLUDES_DEFAULT instead
	   of previous kludge.

	 * doc/autoconf.texi, NEWS: Document AC_CHECK_INCLUDES_DEFAULT.

2013-09-21  Zack Weinberg  <zackw@panix.com>

	Use AC_CHECK_{DECLS,FUNCS,HEADERS}_ONCE more in specific-check macros.
	 * lib/autoconf/functions.m4 (AC_FUNC_CHOWN): No need to check for unistd.h.
	   (_AC_LIBOBJ_FNMATCH): Use AC_CHECK_DECLS_ONCE and AC_CHECK_FUNCS_ONCE.
	   (_AC_LIBOBJ_GETLOADAVG): Use AC_CHECK_FUNCS_ONCE for setlocale.
	   (AC_FUNC_MMAP): Use AC_CHECK_FUNCS_ONCE for getpagesize.
	   (AC_FUNC_SELECT_ARGTYPES): Use AC_CHECK_HEADERS_ONCE for sys/select.h and
	   sys/socket.h.
	   (AC_FUNC_STRERROR_R): Use AC_CHECK_DECLS_ONCE + AC_CHECK_FUNCS_ONCE for
	   strerror_r.
	   (AC_FUNC_UTIME_NULL): Use AC_CHECK_HEADERS_ONCE for utime.h.
	   (AC_FUNC_FORK): Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE.
	   (AC_FUNC_VPRINTF): Use AC_CHECK_FUNCS_ONCE for vprintf (but not _doprnt).

	 * lib/autoconf/headers.m4 (AC_HEADER_TIME, AC_MEMORY_H): Use
	   AC_CHECK_HEADERS_ONCE.

2013-09-21  Zack Weinberg  <zackw@panix.com>

	Use AC_CHECK_HEADERS_ONCE for the tests done by AC_INCLUDES_DEFAULT.
	 * lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): Divide into a public
	   macro that AC_REQUIREs _AC_INCLUDES_DEFAULT_REQUIREMENTS, and ...
	   (_AC_CHECK_HEADERS_ONCE): ... a private macro, that doesn't.
	   (_AC_HEADERS_EXPANSION): Use $ac_includes_default, not
	   AC_INCLUDES_DEFAULT.
	   (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Use AC_CHECK_HEADERS_ONCE.

2013-09-21  Zack Weinberg  <zackw@panix.com>

	Modernize AC_INCLUDES_DEFAULT and friends.
	 * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS):
	   Include stddef.h, stdlib.h, and string.h unconditionally.
	   Don't include memory.h at all.
	   Don't use AC_HEADER_STDC.
	   Don't check for stddef.h, stdlib.h, string.h, or memory.h.
	   For compatibility, unconditionally define STDC_HEADERS,
	   HAVE_STDLIB_H, and HAVE_STRING_H.
	   (AN_HEADER list): Remove C89 headers, and memory.h from list.
	   (AC_HEADER_STDC, AC_UNISTD_H): AU_DEFUN to trigger
	   _AC_INCLUDES_DEFAULT_REQUIREMENTS if it hasn't already happened,
	   and do nothing else.
	   (AC_HEADER_TIME): AU_DEFUN, and define TIME_WITH_SYS_TIME unconditionally
	   as long as sys/time.h is present.
	   (AC_USG, AC_MEMORY_H): Assume existence of string.h.
	 * lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF):
	   Don't use AC_HEADER_STDC. Assume stdlib.h exists.
	   (AC_FUNC_MKTIME): Don't use AC_HEADER_TIME.  Assume time.h exists.
	   (AC_FUNC_ALLOCA): Assume stdlib.h exists.
	   (_AC_LIBOBJ_FNMATCH): Assume wchar.h and wctype.h exist.
	   (_AC_LIBOBJ_GETLOADAVG): Assume locale.h exists.
	   (AC_FUNC_MMAP): Assume stdlib.h exists.
	 * tests/tools.at: Use AC_WORDS_BIGENDIAN instead of AC_STDC_HEADERS in
	   autoupdate test.

	 * NEWS, doc/autoconf.texi: Document changes. Remove obsolete advice.

2013-09-21  Zack Weinberg  <zackw@panix.com>

	AC_CHECK_HEADER/AC_CHECK_HEADERS: complete transition to compile tests.
	* lib/autoconf/headers.m4 (AC_CHECK_HEADER): Use _AC_CHECK_HEADER_COMPILE
	  by default.  Continue to use _AC_CHECK_HEADER_PREPROC if fourth arg is '-'.
	  (_AC_CHECK_HEADER_PREPROC): Issue a deprecation warning.
	  (_AC_CHECK_HEADER_MONGREL, _AC_CHECK_HEADER_MONGREL_BODY): Remove.

	* tests/c.at, tests/semantics.at: Update uses of AC_CHECK_HEADER(S).
	* doc/autoconf.texi, NEWS: Document change.

2013-09-21  Zack Weinberg  <zackw@panix.com>

	* tests/local.at (AT_CHECK_M4): Support 'stderr' as fourth argument.

2013-09-21  Eric Blake  <eblake@redhat.com>

	admin: mention recent copyright assignments
	* AUTHORS: Update list.

2013-09-14  Eric Blake  <eblake@redhat.com>

	AC_INIT: add --runstatedir option to configure
	http://lwn.net/Articles/436012/ documents that many distros
	are now preferring to use /run rather than /var/run for
	storage of pid files and other per-process temporary files
	that must not be cleaned out during arbitrary TMPDIR sweeps.
	As such, the GNU Coding Standards were recently changed to
	recommend a new configure option to make it easy to choose
	this directory at configure time.  This patch adds support
	for the option to all configure scripts built by autoconf.

	* general.m4 (_AC_INIT_PARSE_ARGS): Add new directory option.
	(_AC_INIT_HELP): Document it.
	* doc/autoconf.texi (Installation Directory Variables): Document
	new option.
	(Site Defaults): Mention typical use within a distro.
	* NEWS: Mention the addition.

2013-09-12  Eric Blake  <eblake@redhat.com>

	AC_PROG_CC: also try $CC -version, for cl6x compiler
	Anaïs Bouque reported that the cl6x compiler only understands -version:
	https://lists.gnu.org/archive/html/bug-autoconf/2013-07/msg00003.html

	* c.m4 (AC_PROG_CC): Add another version probe.
	* THANKS: Update.

2013-09-05  Eric Blake  <eblake@redhat.com>

	doc: mention how to set early defaults
	Jonathan Lebon reported an issue to me off-list about a regression
	in libvirt's configure script, which I traced to a patch that
	rearranged code that was checking $with_library compared to the
	AC_ARG_WITH that actually set $with_library [1].  As the whole point
	of the libvirt patch was to refactor code to make maintenance
	easier by hiding the AC_ARG_WITH in a helper macro for a net
	reduction in lines, it makes sense to actually document how to
	check what value a variable has prior to the AC_ARG_WITH usage.

	Alas, although the functionality for this has been present in
	autoconf for ages, the documentation has been lacking.

	[1] libvirt.org/git/?p=libvirt.git;a=commitdiff;h=654c709

	* doc/autoconf.texi (Diversion support) <m4_divert_text>: Add
	anchor.
	(External Software) <AC_ARG_WITH>: Demonstrate how to use DEFAULTS
	diversion, for earlier defaults.
	(Package Options) <AC_ARG_ENABLE>: Likewise.
	* THANKS: Add Jonathan Lebon.

2013-08-10  Paul Eggert  <eggert@cs.ucla.edu>

	doc: 'configure && make', not 'configure; make' (Bug#15066)
	* doc/install.texi (Basic Installation): Say '&&', not ';'.

2013-06-29  Paul Eggert  <eggert@cs.ucla.edu>

	doc: don't push 'static inline'
	* doc/autoconf.texi (Function Portability): Use plain 'static',
	not 'static inline', in example.  These days, 'static' is enough;
	optimizing compilers can figure out the 'inline' on their own.

2013-06-21  Paul Eggert  <eggert@cs.ucla.edu>

	* lib/autoconf/functions.m4 (HAVE_DOPRNT): Fix missing-comma typo.
	Reported by Peter Breitenlohner in:
	http://lists.gnu.org/archive/html/autoconf-patches/2013-06/msg00007.html

2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>

	AC_PROG_CC: don't check whether $CC supports "-c -o" together
	This reverts commit ce48964f.  The extra code added by that commit was
	planned to be used by future version of Automake, but the implementation
	and future directions there have in the meantime be changed in a way
	that makes the extra code in Autoconf superfluous.  Just get rid of it.

	* lib/autoconf/c.m4 (AC_PROG_CC): Adjust.

2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>

	maint: sync few files from upstream
	* build-aux/config.guess: This file.
	* lib/Autom4te/Channels.pm: And this one.
	* maint.mk: And this one.

2013-05-06  Stefano Lattarini  <stefano.lattarini@gmail.com>

	build: remove refs to obsolescent 'mkinstalldir' script and variable
	* .gitignore: Here.
	* Makefile.am (check-coverage-run): Use $(MKDIR_P) rather than
	$(mkinstalldirs).

	build: remove last make recursion (for subdir 'man')
	* Makefile.am (SUBDIRS): Remove (its last component 'man' has just
	been removed).
	(SUFFIXES): New, defined to empty, to be updated later by included
	files.
	($(srcdir)/man/local.mk): Include this.
	* configure.ac (AC_CONFIG_FILES): Drop 'man/Makefile'.
	* lib/freeze.mk (SUFFIXES): Extend with '+=' rather than defining
	with '='.
	* man/Makefile.am: Rename ...
	* man/local.mk: ... like this, and adjust throughout.

	build: no more recursion for 'tests' subdir
	* Makefile.am (SUBDIRS): Drop 'tests'.  Adjust comments.
	(DISTCLEANFILES, MAINTAINERCLEANFILES): Define to empty, to be
	updated later.
	(MAINTAINERCLEANFILES): Adjust later definition to use '+='
	rather than '='.
	($(srcdir)/tests/local.mk): Include this.
	* configure.ac (AC_CONFIG_FILES): Drop 'tests/Makefile'.
	* lib/freeze.mk ($(AUTOM4TE_CFG)): Drop now-redundant remake rule.
	($(build_libdir)/m4sugar/version.m4): Likewise.
	* tests/Makefile.am: Rename ...
	* tests/local.mk: ... like this, and adjust (quite heavily).
	* tests/mktests.sh: Adjust to generate output files and temporary
	files in the tests subdirectory rather than in the current
	directory.

	build: fixup: don't define ETAGS_ARGS multiple times
	* Makefile.am (ETAGS_ARGS): Define to empty, to be updated later.
	* bin/local.mk (ETAGS_ARGS): Append to it, rather than re-defining it.
	* lib/local.mk (ETAGS_ARGS): Likewise.  Also, do not bother appending
	"--lang=perl" once again, as that is already done in 'bin/local.mk'.

	build: avoid repeating the same etags args several times
	* lib/local.mk: Here.

	build: no more recursion for lib 'subdir'
	* Makefile.am (SUBDIRS): Drop 'lib'.
	(edit): New, shared among the recipes in 'lib/local.mk' and
	'bin/local.mk'.
	(CLEANFILES): New, will be updated later in included files.
	($(srcdir)/lib/local.mk): Include it.
	($(srcdir)/lib/freeze.mk): Likewise.
	* lib/Makefile.am: Rename ...
	* lib/local.mk: .. like this, with several adjustments.  In
	particular ...
	(edit): Drop this definition, subsumed by the one in the
	top-level Makefile.am.
	* bin/local.mk (edit): Drop definition, that is already present
	in the top-level Makefile.am now.
	($(srcdir)/lib/freeze.mk): Drop inclusion; that is already done
	in the top-level Makefile.am now.
	* doc/local.mk (CLEANFILES): Adjust: append to it, do not define
	it.
	* lib/freeze.mk ($(AUTOM4TE_CFG)): Adjust recipe.
	* configure.ac (AC_CONFIG_FILES): Drop 'lib/Makefile'.

2013-05-06  Stefano Lattarini  <stefano.lattarini@gmail.com>

	build: define RELEASE_YEAR with AC_SUBST
	Rather than reading it dynamically from the ChangeLog -- that,
	remember, is only a dummy in a Git checkout!  To avoid risking
	the definition to get out-of-sync, let's enhance the maintainer
	target 'update-copyright' to update it automatically (the same
	way it's done in the Automake build system).

	* configure.ac (RELEASE_YEAR): New AC_SUBST'd variable.
	* cfg.mk (update-release-year): New maintainer-specific target
	to automatically update the value of that variable.
	(update-copyright): Depend on the new target.
	* bin/local.mk (RELEASE_YEAR): Drop definition.
	(edit): Simplify quoting of $(RELEASE_YEAR).
	* lib/Makefile.am (RELEASE_YEAR): Drop definition.
	(m4sugar/version.m4): Simplify quoting of $(RELEASE_YEAR).

2013-05-06  Stefano Lattarini  <stefano.lattarini@gmail.com>

	build: no more recursion for 'lib/Autom4te' subdir
	* lib/Autom4te/Makefile.am: Delete, its contents merged ...
	* lib/Makefile.am: ... in here, with proper adjustments.
	(SUBDIRS): Delete (last component 'Autom4te' has been dropped).
	* configure.ac (AC_CONFIG_FILES): Drop 'lib/Autom4te/Makefile'.

	build: no more recursion for' lib/autoconf' subdir
	* lib/autoconf/Makefile.am: Delete, its contents merged ...
	* lib/Makefile.am: ... in here, with proper adjustments.
	(SUBDIRS): Drop 'autoconf'.
	* configure.ac (AC_CONFIG_FILES): Drop 'lib/autoconf/Makefile'.

	build: no more recursion for 'lib/m4sugar' subdir
	* lib/m4sugar/Makefile.am: Delete, its contents merged ...
	* lib/Makefile.am: ... in here, with proper adjustments.
	(SUBDIRS): Drop 'lib/m4sugar'.
	Other related adjustments and re-organizations.
	* configure.ac (AC_CONFIG_FILES): Drop 'lib/m4sugar/Makefile'.
	* lib/freeze.mk ($(build_libdir)/m4sugar/version.m4): Adjust
	recipe.

	build: no more recursion for 'lib/autotest' subdir
	* lib/autotest/Makefile.am: Delete, its contents merged ...
	* lib/Makefile.am: ... in here, with proper adjustments.
	(SUBDIRS): Drop 'autotest'.
	Other minor related modifications.
	* configure.ac (AC_CONFIG_FILES): Drop 'lib/autotest/Makefile'.
	* lib/freeze.mk (MY_AUTOM4TE): Small required adjustments.

	build: no more recursion for 'lib/autoscan' subdir
	* lib/autoscan/Makefile.am: Delete, its contents merged ...
	* lib/Makefile.am: ... in here, with proper adjustments.
	(SUBDIRS): Drop 'autoscan'.
	* configure.ac (AC_CONFIG_FILES): Drop 'lib/autoscan/Makefile'.

	build: no more recursion for 'lib/emacs' subdir
	* lib/emacs/Makefile.am: Delete, its contents merged ...
	* lib/Makefile.am: ... in here, with proper adjustments.
	(SUBDIRS): Drop 'emacs'.
	* configure.ac (AC_CONFIG_FILES): Drop 'lib/emacs/Makefile'.

	build: no more make recursion for 'bin' subdir
	* Makefile.am (MOSTLYCLEANFILES): New, to be extended later by
	included files.
	($(srcdir)/doc/local.mk): New include.
	(SUBDIRS): Drop 'bin'.  Adjust comments.
	* bin/Makefile.am: Rename ...
	* bin/local.mk: ... like this, and adjust.
	* configure.ac (AC_CONFIG_FILES): Drop 'bin/Makefile'.

	build: no more make recursion for 'doc' subdir
	* .gitignore: Adjust.
	* Makefile.am ($(srcdir)/doc/local.mk): New include.
	(SUBDIRS): Drop 'doc'.
	(AM_MAKEINFOFLAGS): Rename ...
	(custom_MAKEINFOFLAGS): ... like this, to avoid conflicting with
	the AM_MAKEINFOFLAGS defined in the included 'doc/local.mk'
	($(srcdir)/INSTALL): Adjust recipe.
	* doc/Makefile.am: Rename ...
	* doc/local.mk: ... like this, and adjust.
	* configure.ac (AC_CONFIG_FILES): Drop 'doc/Makefile'.

2013-05-06  Stefano Lattarini  <stefano.lattarini@gmail.com>

	build: don't distribute lib/freeze.mk explicitly
	It is automatically distributed by Automake, being included by
	other Makefile.am files.

	* lib/Makefile.am (EXTRA_DIST): Drop 'freeze.mk'.

2013-05-05  Stefano Lattarini  <stefano.lattarini@gmail.com>

	sync: some files from upstream
	* build-aux/config.guess: This.
	* build-aux/config.sub: And this.
	* build-aux/gendocs.sh: And this.
	* build-aux/gnupload: And this.
	* build-aux/texinfo.tex: And this.
	* doc/standards.texi: And this.

2013-04-24  Paul Eggert  <eggert@cs.ucla.edu>

	doc: add missing semicolons to make rules
	Problem reported by Peter Eisentraut in
	<http://lists.gnu.org/archive/html/bug-autoconf/2013-04/msg00007.html>.
	* doc/autoconf.texi (Automatic Remaking): Append semicolons
	to rules that need empty commands.

2013-03-19  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CC etc: avoid warnings when removing conftest* on OS X
	I forgot one of the fixes Mr. Nakada reported for the 2013-03-08 fix.
	* lib/autoconf/general.m4 (AC_EGREP_CPP):
	Use rm -rf, not just rm -f, when removing conftest*.

2013-03-19  Akim Demaille  <akim@lrde.epita.fr>

	AC_PROG_YACC: don't force Bison to warn against its own features
	When invoked with -y/--yacc, Bison warns when its extensions over
	POSIX Yacc are used.  Yet many packages requiring GNU Bison use
	Autoconf/Automake's Yacc support, which passes -y to Bison.  It
	turns out that passing '-o y.tab.c' has exactly the desired
	effect: generating not only y.tab.c but also y.tab.h with -d and
	y.output with -v.  See:
	http://lists.gnu.org/archive/html/bison-patches/2013-02/msg00100.html
	* lib/autoconf/programs.m4 (AC_PROG_YACC): Use bison -o y.tab.c.
	* NEWS, doc/autoconf.texi: Document this change.

2013-03-08  Paul Eggert  <eggert@cs.ucla.edu>

	doc: explain why single-quoting is better
	* doc/autoconf.texi (Build Directories): Explain single-quoting.
	Reported by Markus Elfring in
	<http://savannah.gnu.org/support/?108262>.

	AC_PROG_CC etc: avoid warnings when removing conftest* on OS X
	Reported by Nobuyoshi Nakada in:
	http://lists.gnu.org/archive/html/autoconf-patches/2013-03/msg00003.html
	* lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CC_C_O, AC_PROG_CXX_C_O):
	* lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O):
	* lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES):
	Use rm -rf, not just rm -f, when removing conftest*.

2013-03-05  Pavel Raiskup  <praiskup@redhat.com>

	docs: configure.in still mentioned in manpages
	* man/autoupdate.x: Mention configure.ac as preferred name.
	* man/autoscan.x: Likewise.

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

	AC_FUNC_GETLOADAVG: doc fix
	* doc/autoconf.texi (Particular Functions):
	Omit incorrect mention of @var{dir} before getloadavg.c.
	Problem reported by Patricke Welche in:
	http://lists.gnu.org/archive/html/autoconf-patches/2013-02/msg00006.html

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

	AC_FUNC_SETPGRP: work even when cross-compiling
	* lib/autoconf/functions.m4 (AC_FUNC_SETPGRP):
	Use AC_COMPILE_IFELSE rather than AC_RUN_IFELSE.
	Problem reported by Alvaro Soliverez in
	<http://lists.gnu.org/archive/html/bug-autoconf/2013-02/msg00002.html>.

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

	AC_USE_SYSTEM_EXTENSIONS: improve port to HP-UX
	* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
	On hosts that need _XOPEN_SOURCE, define it when configuring, too,
	so that it's compatible with the value used when compiling.

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

	AC_USE_SYSTEM_EXTENSIONS: port to HP-UX, MINUX 3, OS X.
	* NEWS: Mention this.
	* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
	Define _NETBSD_HOST on MINUX, for MINUX 3.
	Define _DARWIN_C_SOURCE, for OS X.
	On HP-UX, define _XOPEN_SOURCE.

2013-01-29  Paul Eggert  <eggert@cs.ucla.edu>

	autoscan: port to perl 5.17
	* bin/autoscan.in (scan_sh_file): Escape '{'.  This avoids a
	feature that is deprecated in Perl 5.17.  Reported by Ray Lauff in
	<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00059.html>.

2013-01-29  Gary V. Vaughan  <gary@gnu.org>

	m4sugar: fix AS_VAR_GET regression.
	AS_VAR_GET expands AS_ECHO inside en evaled single quoted string,
	which causes the single quotes in "printf '%s\n'" to expose the
	%s\n to the shell which expands "\n" to simply "n" before passing
	it to printf.
	* lib/m4sugar/m4sh.m4 (AS_ECHO): Use double quotes around the
	format string.
	* doc/autoconf.texi (Limitations of Shell Builtins): Show double
	quotes to match AS_ECHO expansion.
	* NEWS: Likewise.

	m4sugar: factor away _AS_ECHO_PREPARE.
	"printf '%s\n' ..." has been a fine replacement for plain "echo"
	for at least 5 years (probably more like 10), even with most
	museum-piece shells.
	* lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Remove.
	(_AS_SHELL_SANITIZE): Keep as_nl setting originally from
	_AS_ECHO_PREPARE here where it more properly belongs.
	(AS_ECHO, AS_ECHO_N): Use printf unconditionally.
	* doc/autoconf.texi (Limitations of Shell Builtins): Document
	preference for 'printf' over working around 'echo' bugs.
	* NEWS: Updated.
	Reported by Jim Meyering.

2013-01-29  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CXX: document change
	* NEWS: Document recent change to AC_PROG_CXX.

2013-01-29  Roger Leigh  <rleigh@debian.org>

	AC_PROG_CXX: Add checks for C++11, C++98TR1 and C++98
	These checks are the C++ equivalent of the existing C
	standards checks.
	* doc/autoconf.texi (C++ Compiler): Document new behavior.
	* lib/autoconf/c.m4 (AC_PROG_CXX): Try for C++11,
	falling back to C++98.
	(_AC_CXX_STD_TRY, _AC_CXX_CXX98_TEST_HEADER, _AC_CXX_CXX98_TEST_BODY)
	(_AC_CXX_CXX11_TEST_HEADER, _AC_CXX_CXX11_TEST_BODY)
	(_AC_PROG_CXX_CXX98, _AC_PROG_CXX_CXX11):
	New macros.

2013-01-16  Eric Blake  <eblake@redhat.com>

	AT_TESTED: fix regression in word splitting
	Regression introduced in commit 851ef51.

	* lib/autotest/general.m4 (AT_TESTED): Rework loop to quote each
	element, not the entire argument.

2013-01-16  Paul Eggert  <eggert@cs.ucla.edu>

	AC_SYS_LARGEFILE: port better to Mac OS X 10.5.
	* lib/autoconf/specific.m4 (AC_SYS_LARGEFILE): Use AC_DEFINE, not
	AH_VERBATIM, to define _DARWIN_USE_64_BIT_INODE, to avoid problems
	with ino_t size being different for configuration time versus
	build/run time.  Problem reported by PHO in
	<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00040.html>.

2013-01-11  Stefano Lattarini  <stefano.lattarini@gmail.com>

	AC_PROG_CC: also check whether $CC supports "-c -o" together
	This is for Automake and its 'subdir-object' mode (see automake bug#13378,
	in particular <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#73>), so
	we make the new behavior available only if the special witness macro
	'_AM_PROG_CC_C_O_HELPME' is defined (future Automake versions will define
	it).  We might decide, at a later date, to make this behaviour public;
	but then we'll have to discuss its usefulness and design more in depth,
	and if they are agreed upon, adjust the documentation to match, and also
	decide what to do with the macro AC_PROG_CC_C_O, with its similar (but
	slightly incompatible) semantics; since doing so right now would bring us
	off-track (and Automake needs this change *today*, or better, yesterday),
	we proceed with this simpler hack.

	* lib/autoconf/c.m4 (AC_PROG_CC): Adjust.

2013-01-03  Eric Blake  <eblake@redhat.com>

	maint: resync files from upstream
	'make syntax-check' complained about something that was already
	fixed upstream in doc/standards.texi, so I ran 'make update', and
	omitted lib/Autom4te as that still has some issues to be sorted out.

	* GNUmakefile: Resync from upstream.
	* build-aux/announce-gen: Likewise.
	* build-aux/config.guess: Likewise.
	* build-aux/config.sub: Likewise.
	* build-aux/git-version-gen: Likewise.
	* build-aux/gitlog-to-changelog: Likewise.
	* build-aux/gnupload: Likewise.
	* build-aux/move-if-change: Likewise.
	* build-aux/texinfo.tex: Likewise.
	* build-aux/update-copyright: Likewise.
	* build-aux/useless-if-before-free: Likewise.
	* build-aux/vc-list-files: Likewise.
	* doc/gendocs_template: Likewise.
	* doc/standards.texi: Likewise.
	* m4/autobuild.m4: Likewise.
	* maint.mk: Likewise.

2013-01-03  Eric Blake  <eblake@redhat.com>

	maint: bump copyright to 2013
	Done via 'make update-copyright', since all files are effectively
	modified and distributed this year via public version control.

	* all files: Update copyright year.

2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>

	go: fix checks for about I/O functions
	Reference:
	<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00000.html>

	* lib/autoconf/go.m4 (_AC_LANG_IO_PROGRAM(Go), AC_LANG_INT_SAVE): Here,
	correctly use 'os.OpenFile()' <http://golang.org/pkg/os/#OpenFile>
	rather than 'os.Open()' <http://golang.org/pkg/os/#Open> (which has
	more restricted semantics and incompatible signature).

2012-12-29  Stefano Lattarini  <stefano.lattarini@gmail.com>

	preselections: update for Automake 1.13.
	Issue revealed by a failure in test "36: autom4te preselections".

	* autoconf/lib/autom4te.in (Automake-preselections): Add
	'AM_EXTRA_RECURSIVE_TARGETS', remove '_AM_EXTRA_RECURSIVE_TARGETS';
	this latter is not, and will not be, present in any *released*
	Automake version.

2012-12-29  Stefano Lattarini  <stefano.lattarini@gmail.com>

	maint: sync some files from gnulib
	* build-aux/config.guess: Synced by "make gnulib-update".
	* build-aux/config.sub: Likewise.
	* build-aux/gendocs.sh: Likewise.
	* build-aux/gnupload: Likewise.
	* build-aux/texinfo.tex: Likewise.
	* doc/gendocs_template: Likewise.
	* doc/standards.texi: Likewise.
	* maint.mk: Likewise.

2012-12-29  Stefano Lattarini  <stefano.lattarini@gmail.com>

	maint: don't sync the 'Autom4te::Configure_ac' module from Automake
	That file has been removed in the master branch of Automake, since
	Automake 1.14 will remove support for 'configure.in' as a name for
	Autoconf input files.  See commits 'v1.13-17-gbff57c8' and
	'v1.13-21-g7626e63' in the Automake repository.

	* cfg.mk (autom4te_files): Remove 'Autom4te/Configure_ac.pm'.

2012-12-27  Paul Eggert  <eggert@cs.ucla.edu>

	AC_C__GENERIC: New macro.
	* NEWS, doc/autoconf.texi (C Compiler): Document it.
	* lib/autoconf/c.m4 (AC_C__GENERIC): Implement it.

2012-12-22  Paolo Bonzini  <bonzini@gnu.org>

	autotest: enable usage of EXEEXT in AT_TESTED
	Together with Linux's binfmt-misc feature, Wine can be used to test
	cross-compiled programs as if they were native.  However, the shell
	will not perform the "magic" addition of the .exe extension after a
	program name when searching for an executable.  These simple patches
	let the user work around this by specifying $EXEEXT in the AT_CHECK
	and AT_TESTED argument.  (More care is needed because of carriage
	returns, but this is beyond the scope of this series).

	* tests/autotest.at (AT_INIT): Expand contents of $at_tested.
	(AT_TESTED): Quote each program that is passed to the function.
	* lib/autotest/general.m4 (C unit tests): Add AT_TESTED invocation
	and keyword.
	* doc/autoconf.texi (Writing testsuites): Document usage of variables
	in AT_TESTED.
	* NEWS: Document change.

2012-12-22  Paolo Bonzini  <bonzini@gnu.org>

	autotest: add a simple test suite that runs a C program
	* tests/autotest.at (C unit tests): New testcase.
	* NEWS: Document change.

	autotest: annotate tests that use AC_CONFIG_TESTDIR
	* tests/autotest.at (srcdir propagation, Erlang Eunit unit tests):
	Add a keyword for AC_CONFIG_TESTDIR.

2012-12-21  Paul Eggert  <eggert@cs.ucla.edu>

	AC_FUNC_ALLOCA: port to recent BSDs and remove obsolete AIX
	* doc/autoconf.texi (Particular Functions): Remove the AIX case
	from the recommended code, as the most recent version of the AIX
	compiler that IBM still supports (V10.1 as of this writing) has
	<alloca.h> and thus longer needs this, and the old suggestion
	wasn't completely working anyway.  Remove obsolete discussion of
	SVR3 libPW alloca and of SVR4 libucb alloca.
	* lib/autoconf/functions.m4 (AC_FUNC_ALLOCA):
	Rework to match documentation, including abovementioned AIX change.
	Inconsistency with documentation reported by Steven G. Johnson in
	<http://lists.gnu.org/archive/html/autoconf/2003-03/msg00179.html>.
	As this adds stdlib.h, it should also fix the problems on recent
	BSD platforms noted by Patrick Welche in
	http://lists.gnu.org/archive/html/autoconf-patches/2012-12/msg00009.html
	though the fix differs from NetBSD's current workaround.
	Also, don't bother checking for alloca if <alloca.h> works,
	as the latter implies the former.

2012-12-10  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CC_C99: avoid unused-var warning
	* lib/autoconf/c.m4 (_AC_C_C99_TEST_HEADER): Rewrite to use vars.
	Problem reported by ChangZhuo Chen in
	<http://lists.gnu.org/archive/html/bug-autoconf/2012-12/msg00000.html>.

2012-12-07  Paolo Bonzini  <bonzini@gnu.org>

	autotest: define AT_DATA_UNQUOTED
	* lib/autotest/general.m4 (AT_DATA_UNQUOTED): New macro, paralleling
	AT_DATA but not quoting the contents.
	* doc/autoconf.texi (Writing Testsuites): Document it.
	* tests/autotest.at (AT_DATA_UNQUOTED): Test it.

2012-11-17  Paul Eggert  <eggert@cs.ucla.edu>

	AC_CHECK_FILES: improve documentation
	* doc/autoconf.texi (Files): Document AC_CHECK_FILES better.
	Reported by Christophe Curis in
	<http://savannah.gnu.org/support/?108182>.

2012-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>

	syntax-check: remove SPACE-TAB sequence
	* lib/autoconf/c.m4 (_AC_PROG_CC_C99): Here.  Was causing a
	failure in the 'space_tab' syntax check.

2012-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>

	build: fix unneeded workaround for AC_CONFIG_LINKS old bud
	* configure.ac: The Automake NEWS entry for version 1.11 states that

	    For AC_CONFIG_LINKS, if source and destination are equal, do
	    not remove the file in a non-VPATH build.  Such setups work
	    with Autoconf 2.62 or newer.

	Since our build system requires autoconf >= 2.62 and automake >= 1.11
	already, we can get rid of the workaround for that long-fixed bug.

2012-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>

	build: require autoconf >= 2.62, and related simplifications
	* configure.ac: Require 2.62, and remove obsolescent comments.
	We are not imposing an new restriction in doing so, since we already
	require Automake 1.11 or later, and that requires Autoconf 2.62.
	Simplify code for symlinking of GNUmakefile in VPATH builds, in
	accordance with the existing "TODO" comments.

2012-11-09  Eric Blake  <eblake@redhat.com>

	AC_CONFIG_MACRO_DIRS: improve tracing and add sanity checks
	Too many legacy tools exist for us to unilaterally quit supporting
	AC_CONFIG_MACRO_DIR - it is feasible for someone to want their
	package to bootstrap with both automake 1.13 and libtool 2.4.2,
	where the newer automake will only trace the new style of multiple
	directory listings, but the older libtool does a sed and settles
	on the one use of the old name.  So, we let both macros forward
	to a new tracing macro, which also has the benefit of sanitizing
	calls into one directory per trace; we also ensure that the old
	macro is always traced, and appears at most once and before any
	use of the new macro.

	* doc/autoconf.texi (Input) <AC_CONFIG_MACRO_DIRS>: Document how
	to trace this macro.
	* lib/autom4te.in (Autoreconf-preselections)
	(Automake-preselections): Preselect this trace.
	* lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR_TRACE): New trace.
	(_AC_CONFIG_MACRO_DIRS_USED, _AC_CONFIG_MACRO_DIRS): New internal
	macros.
	(AC_CONFIG_MACRO_DIRS, AC_CONFIG_MACRO_DIR): Use them.
	* tests/tools.at (autoconf --trace: AC_CONFIG_MACRO_DIRS): New
	test.

2012-11-09  Stefano Lattarini  <stefano.lattarini@gmail.com>

	warn: allow aclocal to silence m4_require warnings
	We introduce a new witness macro, m4_require_silent_probe, for use by
	aclocal during the Autoconf-without-aclocal-m4 language.  This will let
	aclocal process AC_CONFIG_MACRO_DIRS without emitting spurious warnings.
	In fact, if aclocal doesn't suppress require warnings, then, when some macro
	expanded in configure.ac calls AC_REQUIRE on another macro that is defined
	in one of the local m4 macro dirs specified with AC_CONFIG_MACRO_DIRS, the
	*first* autom4te invocation issued by aclocal, not yet being able to "see"
	the m4 macro definitions in the local m4 dirs, will print spurious
	warnings like:

	    configure.ac:4: warning: MY_BAR is m4_require'd but not m4_defun'd
	    configure.ac:3: MY_FOO is expanded from...

	Expose the use of this macro in our testsuite.

	Originally reported by Nick Bowler; see point (4) of:
	<http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00000.html>

	* lib/m4sugar/m4sugar.m4 (_m4_require_call): Make warnings in the
	-Wsyntax category depend on the witness macro.
	* tests/m4sugar.at (m4@&t@_require: warning message): New test.
	* doc/autoconf.texi (Prerequisite Macros): Document how aclocal
	can silence AC_REQUIRE (m4_require) warnings.

2012-11-09  Stefano Lattarini  <stefano.lattarini@gmail.com>

	docs: ACLOCAL_AMFLAGS will become obsolescent in Automake 1.13
	See commit 'v1.12.1-165-gcd1a9cc' "aclocal: deprecate ACLOCAL_AMFLAGS,
	trace AC_CONFIG_MACRO_DIR instead" in the Automake git repository.

	See also follow-up discussion at:
	<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00010.html>

	* doc/autoconf.texi (@node Input @defmac AC_CONFIG_MACRO_DIRS): Adjust.
	(autoreconf Invocation): Warn about the possible future removal of
	ACLOCAL_AMFLAGS support from Automake.

2012-11-09  Stefano Lattarini  <stefano.lattarini@gmail.com>

	AC_CONFIG_MACRO_DIRS: new macro, mostly for aclocal
	Similar to AC_CONFIG_MACRO_DIR, but accepts more than one argument.
	This will allow projects to use several m4 macro local dirs.  This is
	especially important for projects that are used as nested subpackages
	of larger projects.

	See also:
	<http://lists.gnu.org/archive/html/autoconf/2011-12/msg00037.html>
	<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00010.html>

	* lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIRS): New.  Expands to the
	empty anyway, since it is only meant to be traced by tools like aclocal
	and autoreconf.
	(AC_CONFIG_MACRO_DIR): Updated comments.
	* doc/autoconf.texi (@node "Input"): Document AC_CONFIG_MACRO_DIRS as
	preferred over AC_CONFIG_MACRO_DIR.
	* NEWS: Update.

	Suggested-by: Eric Blake <eblake@redhat.com>
	Helped-by: Nick Bowler <nbowler@elliptictech.com>

2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>

	cosmetics: slightly improve a comment
	* lib/autom4te.in: Here, the comment about 'AM_PROG_MKDIR_P'.

	Suggested-by: Eric Blake <eblake@redhat.com>

2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>

	autom4te: update Automake preselections to reflect upcoming 1.13
	Issue revealed by a failure in test "35: tools.at: autom4te preselections"

	* lib/autom4te.in ("Automake-preselections"): Add automake-provided
	macro '_AM_EXTRA_RECURSIVE_TARGETS'.

2012-10-24  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CC_C89, AC_PROG_CC_C99: Use AU_DEFUN
	* tests/mktests.sh (au_exclude_list): Exclude AC_PROG_CC_C89
	and AC_PROG_CC_C99 too.  Suggested by Adrian Bunk.

	AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC: Use AU_DEFUN
	This fixes a bug introduced by the most recent change to c.m4.
	Problem reported by Jim Meyering in
	<http://lists.gnu.org/archive/html/autoconf/2012-10/msg00048.html>.
	* lib/autoconf/c.m4 (AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC):
	Use AU_DEFUN and AC_REQUIRE, not AU_ALIAS, as the latter is not
	compatible with how Automake redefines AC_PROG_CC.

2012-10-16  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC: Use AU_ALIAS.
	Based on a suggestion by Adrian Bunk in
	http://lists.gnu.org/archive/html/autoconf-patches/2012-09/msg00040.html
	* lib/autoconf/c.m4 (AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC):
	Use AU_ALIAS, now that AC_PROG_CC is defined via AC_DEFUN_ONCE.

	AC_PROG_CC: define via AC_DEFUN_ONCE
	Suggested by Adrian Bunk in
	http://lists.gnu.org/archive/html/autoconf-patches/2012-09/msg00034.html
	* NEWS:
	* doc/autoconf.texi (C Compiler): Document it
	* lib/autoconf/c.m4 (AC_PROG_CC): Implement it.

2012-09-28  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CC: clarify documentation, encourage -qlanglvl=extc1x
	* doc/autoconf.texi (C Compiler): Document the intent of AC_PROG_CC
	better.  It's not meant to check for strict conformance, only to
	get the latest version with extensions.
	(Running the Preprocessor, Present But Cannot Be Compiled):
	Document new diagnostic wording.
	* lib/autoconf/c.m4 (_AC_C_STD_TRY): Change diagnostic wording from
	"checking for gcc option to accept ISO C11" to
	"checkint for gcc option to enable C11 features", as this better
	reflects what is actually happening.
	(_AC_PROG_CC_C99): Put -qlanglvl=extc1x here ...
	(_AC_PROG_CC_C11): ... rather than here, as it doesn't pass the C11
	test with IBM XL C V12.1, and the point is to enable features not to
	test for strict conformance.

2012-09-26  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CC: try -qlanglvl=extc1x, for IBM XL C V12.1
	* lib/autoconf/c.m4 (_AC_PROG_CC_C11): Add -qlanglvl=extc1x, for
	IBM XL C V12.1.  It shouldn't pass the C11 test yet, since it's not
	documented to support _Alignas, _Alignof, UTF-8 string literals,
	and duplicate typedefs, but presumably it will eventually.

2012-09-25  Adrian Bunk  <bunk@stusta.de>  (tiny change)

	maint: fix the comment at the end of _AC_FUNC_REALLOC_IF
	* lib/autoconf/functions.m4: fix the comment at the end of
	_AC_FUNC_REALLOC_IF

2012-09-21  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CC_C89, AC_PROG_CC_C99: now obsolete; defer to AC_PROG_CC
	* NEWS:
	* doc/autoconf.texi (C Compiler, Running the Preprocessor)
	(Limitations of Usual Tools, Present But Cannot Be Compiled)
	(Obsolete Macros):
	Document the changes described below.
	* lib/autoconf/c.m4 (_AC_PROG_CC_FORCE_VERSION): Remove.
	(AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC):
	Just do AC_PROG_CC, but mark as obsolete.  This replaces my recent
	ill-advised attempt to let AC_PROG_CC_C89 and AC_PROG_CC_C99 downgrade
	the version of C supported.
	* doc/autoconf.texi (Limitations of Usual Tools, Volatile Objects):
	Document C11 more accurately.  In some cases this involves removing
	some details about 'volatile', alas, since C11 changed this stuff.
	Again.

2012-09-21  Eric Blake  <eblake@redhat.com>

	tests: sort preselections to make test failures easier to read
	Prompted by Stefano Lattarini's report of a test failure due to
	a missing preselection for automake 1.12.

	* tests/tools.at (autom4te preselections): Sort before diffing.

2012-09-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	maint: resync most files from upstream
	The files in lib/Autom4te/ are intentionally not synced at this point,
	since automake commit v1.11-2114-g2d671e1 "perl refactor: use modern
	semantics of 'open'":
	<http://lists.gnu.org/archive/html/automake-patches/2012-03/msg00111.html>
	would require wider adaptation of our scripts to the new XFile API, and
	also exposes some latent bugs in autoconf where we use raw 'open' instead
	of XFile::open.  We'll take care of that in a later patches (maybe).

	* build-aux/announce-gen: Resync via 'make fetch'.
	* build-aux/config.guess: Likewise.
	* build-aux/config.sub: Likewise.
	* build-aux/gendocs.sh: Likewise.
	* build-aux/gitlog-to-changelog: Likewise.
	* build-aux/gnupload: Likewise.
	* build-aux/texinfo.tex: Likewise.
	* doc/make-stds.texi: Likewise.
	* doc/standards.texi: Likewise.
	* maint.mk: Likewise.

2012-09-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	build: quote 'like this', not `like this'
	As per updated GCS recommendations.

	* Makefile.am, configure.ac, lib/m4sugar/Makefile.am,
	tests/Makefile.am, m4/m4.m4: Here.

2012-09-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	autom4te: update Automake preselections to reflect the changes in 1.12.x
	Issue revealed by a failure in test "35: tools.at: autom4te preselections":
	<http://lists.gnu.org/archive/html/bug-autoconf/2012-09/msg00020.html>

	* lib/autom4te.in: Add 'AM_PROG_MKDIR_P'.

	Helped-by: Eric Blake <eblake@redhat.com>

2012-09-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	autoreconf: assume --force-missing automake option is supported
	According to Automake's NEWS file, it is since at least Automake 1.8,
	and in autoreconf we are already assuming aclocal >= 1.8 anyway.

	* bin/autoreconf.in (parse_args): Simplify a little by just assuming
	the automake option '--force-missing' is supported.
	($automake_supports_force_missing): Delete, no longer needed.
	* NEWS: Update.

2012-09-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	autoreconf: minor simplifying refactoring
	* bin/autoreconf.in (run_aclocal): After the previous commit, this has
	become just a useless wrapper around xsystem("$aclocal .."), so get rid
	of it, and inline its expansion in the two places where it was used ...
	(autoreconf_current_directory): ... in here.

2012-09-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	autoreconf: drop support for old (< 1.8) aclocal versions
	The minimal automake and aclocal version required by the "most"
	conservative important real world-projects (like Gnulib and Libvirt)
	is 1.9 anyway (which is the version installed on old but still
	supported installations of stable Distros like RHEL 5), so this
	change should be safe and justified by now.

	* bin/autoreconf.in (parse_args): Simplify by just assuming the aclocal
	options '--force' and '--no-force' are supported and works correctly.
	($aclocal_supports_force): Delete, no longer needed.
	(run_aclocal): Heavily simplify by assuming that aclocal properly creates
	'aclocal.m4' as lazily as possible.
	* NEWS: Update.

2012-09-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	scripts: quote 'like this', not `like this'
	As per updated GCS recommendations.

	* bin/autoconf.as, bin/autoreconf.in, bin/autoscan.in, ifnames.in,
	bin/autoupdate.in: Throughout these files.
	* bin/autoheader.in, bin/autom4te.in: Likewise.  Also, remove some
	useless escaping of the "'" single-quote characters, and reformat
	some message for better line wrapping.

2012-09-20  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CC_STDC: fold into AC_PROG_CC, removing C11 macro
	* NEWS:
	* doc/autoconf.texi (C Compiler): Document the following.
	* lib/autoconf/c.m4 (AC_PROG_CC): Check for the latest C version
	supported, not just C89.
	(_AC_C_STD_TRY): Keep track of the options we add to bring
	the C compiler up to standard, so that we can undo it if the
	user later requests some other C standard.
	(_AC_PROG_CC_FORCE_VERSION): New macro.
	(AC_PROG_CC_C89, AC_PROG_CC_C99): Use it.  These macros now
	have a documented side effect of changing the C version requested.
	(AC_PROG_CC_C11): Remove.  It wasn't useful.
	(AC_PROG_CC_STDC): Now an obsolescent alias for AC_PROG_CC.
	(AC_C_PROTOTYPES): Allow any standard C version, not just c89.
	Don't chatter, since we don't actually run any checking code.
	* lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT)
	(AC_TYPE_UNSIGNED_LONG_LONG_INT): Treat C11 like C99.
	* TODO: Remove the TODO item corresponding to the above.

2012-09-16  Paul Eggert  <eggert@cs.ucla.edu>

	AC_FUNC_VFORK: check for Solaris 2.4 signal-handling bug
	* NEWS:
	* doc/autoconf.texi (Particular Functions): Document this.
	* lib/autoconf/functions.m4 (_AC_FUNC_VFORK): Check for the bug.

2012-09-06  Paul Eggert  <eggert@cs.ucla.edu>

	AC_CHECK_ALIGNOF: fix cross-compilation bug with newer gcc
	* doc/autoconf.texi (Default Includes, Particular Functions)
	(Header Portability):
	* lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)):
	* lib/autoconf/headers.m4 (AC_HEADER_STDC):
	* lib/autoconf/types.m4 (_AC_CHECK_ALIGNOF):
	* lib/m4sugar/m4sugar.m4 (m4_require) [comment only]:
	Assume the existence of the C89 freestanding headers <float.h>,
	<limits.h>, <stdarg.h>, <stddef.h>, as that's safe nowadays.
	This is less likely to run into gotchas, and should fix a
	cross-compilation bug with newer GCC reported by Myke Frysinger in
	<http://lists.gnu.org/archive/html/bug-autoconf/2012-09/msg00001.html>.

2012-08-23  Paul Eggert  <eggert@cs.ucla.edu>

	AC_PROG_CC_C11: new macro, which AC_PROG_CC_STDC now defaults to
	* NEWS:
	* doc/autoconf.texi (C Compiler): Document this.
	(Gnulib, Function Portability, Particular Functions)
	(Header Portability, Particular Headers, Defining Symbols)
	(Printing Messages, Limitations of Usual Tools)
	(Preprocessor Arithmetic, Volatile Objects, Exiting Portably):
	Modernize wording for C11.
	* lib/autoconf/c.m4 (_AC_C_C99_TEST_HEADER, _AC_C_C99_TEST_BODY):
	New macros, taken from _AC_PROG_CC_C99.  These are so that we can
	also include the C99 tests in the C11 test program.
	(_AC_PROG_CC_C99): Use them.
	(_AC_PROG_CC_C11, AC_PROG_CC_C11): New macros.
	(AC_PROG_CC_STDC): Prefer C11 to C99 or C89.

2012-08-16  Eric Blake  <eblake@redhat.com>

	AC_SUBST: document and test previous patch
	Test that: invalid variable names are detected, that the variable
	name does not get macro expanded, that assignment to the variable
	works whether as part of AC_SUBST or independently, that the last
	assignment wins.

	* doc/autoconf.texi (Setting Output Variables) <AC_SUBST>: Mention
	that variable does not overlap with macros.
	* tests/base.at (AC_SUBST): New test.

2012-08-15  Nick Bowler  <nbowler@draconx.ca>

	AC_SUBST: don't underquote the variable name
	Consider the following:

	% cat >configure.ac <<'EOF'
	AC_INIT([test], [0])

	m4_define([FOO], [baz])
	AC_SUBST([FOO], [bar])

	AC_CONFIG_FILES([test])
	AC_OUTPUT
	EOF

	% cat >test.in <<'EOF'
	@FOO@
	EOF

	This produces no error messages at autoconf time and none at configure
	time.  Nevertheless, the substituted value of FOO is the empty string,
	instead of bar, as expected.  Sure enough, in the output variables
	section of config.log, we see FOO='' instead of FOO='bar'.  Looking
	at the generated configure script, we see that AC_SUBST has produced
	baz=bar in the output, instead of the expected FOO=bar.  But this is
	the only place: everywhere else is still using FOO.

	* lib/autoconf/general.m4 (AC_SUBST): Add another layer of
	quoting.
	* THANKS: Update.

2012-07-26  Akim Demaille  <akim@lrde.epita.fr>

	doc: fix style issues in the display of macro optional arguments
	* doc/autoconf.texi (@dvarv): New.
	Use it where optional macro arguments default to other arguments.

2012-07-22  Jim Meyering  <meyering@redhat.com>

	maint: avoid new syntax-check failure
	* cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
	Exempt autoconf.texi's test of "#if defined HAVE_DECL_MALLOC".

2012-07-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	tests: use configure.ac, not configure.in, with aclocal/automake involved
	Do so because future automake and aclocal versions (starting from 1.13)
	drop support for 'configure.in' as the name of the Autoconf input file.
	Without this patch, the Autoconf testsuite experiences some spurious
	failures when run with the development version of aclocal and automake
	installed early enough in $PATH.

	* tests/torture.at: Rename 'configure.in' to 'configure.ac' throughout.
	Remove an obsolete comment about backward-compatibility.

	Helped-by: Jim Meyering <jim@meyering.net>

2012-07-18  Eric Blake  <eblake@redhat.com>

	doc: mention trap pitfalls
	Document why the previous patch was useful.

	* doc/autoconf.texi (Limitations of Builtins) <trap>: Mention the
	need to be defensive in trap handlers.

2012-07-18  Andreas Schwab  <schwab@linux-m68k.org>  (tiny change)

	general: Sanitize IFS in EXIT trap
	IFS may be modified temporarily when the configure script receives a
	signal.  Make sure the EXIT trap uses the standard value.

	* lib/autoconf/general.m4: Sanitize IFS in trap.
	* THANKS: Update.

2012-07-18  Patrice Dumas  <pertusus@free.fr>  (tiny change)

	doc: fix texinfo macro usage
	The texinfo manual recommends avoiding the use of a trailing @c in
	any macro designed to be used inline (as is the case with our ovar
	and dvar macros).  Furthermore, passing '@\n' in the middle of a
	macro call is much different than passing '@\n' between arguments
	of a @defmac for line continuation.

	* doc/autoconf.texi (ovar, dvar): Don't end macro with @c, since
	these macros are designed to be embedded in one-line usage.
	(Fortran Compiler): Don't split @dvar.
	* THANKS: Update.
	Reported by Stefano Lattarini.

2012-07-17  Eric Blake  <eblake@redhat.com>

	doc: fix texinfo location reports
	Otherwise, newer texinfo parses this line as a line directive, and
	any error later in the file will claim to be from "conftest.c" instead
	of "autoconf.texi".

	* doc/autoconf.texi (Generating Sources): Avoid confusing newer
	texinfo into thinking we had a line directive.
	Reported by Stefano Lattarini, fix suggested by Patrice Dumas.

2012-07-13  Eric Blake  <eblake@redhat.com>

	m4sh: avoid // issues in _AS_PATH_WALK
	As reported by Paul Keir on the cygwin lists,
	http://cygwin.com/ml/cygwin/2012-07/msg00263.html,
	some people like to stick / in their $PATH, and if we then try
	to probe $as_dir/progname for existence, we can end up causing
	cygwin to have a several-second timeout per //name probe.  It
	is better to avoid inserting the extra slash when $as_dir is the
	root directory, and simpler to code by always having a trailing
	slash present than it is to strip a trailing slash.  Thankfully,
	_AS_PATH_WALK is an undocumented interface, and even if someone
	was using it in spite of the warnings, their use of $as_dir/foo
	will typically only lead to odd-looking /dir//foo probes, with
	only the case of / in $PATH causing slowdowns, and only when //
	is special.

	There was also a minor bug where the if-not-found code of
	_AS_PATH_WALK could be executed with $IFS still in the wrong state.

	* lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Always end as_dir in /.
	Avoid wrong IFS during if-not-found.  Minor optimization to avoid
	regex.
	(_AS_DETECT_BETTER_SHELL, _AS_SHELL_SANITIZE): Update clients.
	* lib/autotest/general.m4 (_AT_FINISH): Likewise.
	* lib/autoconf/programs.m4 (_AC_CHECK_PROG, _AC_PATH_PROG)
	(_AC_PATH_PROGS_FEATURE_CHECK, _AC_PATH_PROG_FLAVOR_GNU): Likewise.

2012-06-29  Eric Blake  <eblake@redhat.com>

	doc: avoid hard-coding usage of automake's missing
	Now that automake documents AM_MISSING_PROG, and given that automake
	has reserved the right to change the calling conventions of 'missing',
	we should not recommend a hard-coded use of 'missing --run'.

	* doc/autoconf.texi (Making testsuite Scripts): Recommend
	AM_MISSING_PROG when using automake, and avoid hard-coding use of
	'missing' otherwise.

2012-06-27  Eric Blake  <eblake@redhat.com>

	maint: don't sync elisp-comp or missing from gnulib
	Automake 1.13 will be changing the semantics of 'missing'; maintaining
	our own copy in version control risks problems if our version does
	not match automake's expectations.  As a result, gnulib no longer
	mirrors 'missing'.  Furthermore, gnulib originally added the
	'elisp-comp' module with the explanation that autoconf uses it, but
	we don't use it anywhere other than the manner in which automake
	will byte-compile our .el files; since we don't document the script,
	we should be just fine using the version that was installed by automake.

	See more discussion in the thread starting here:
	https://lists.gnu.org/archive/html/automake-patches/2012-06/msg00154.html

	* cfg.mk (gnulib-update): Drop files installed by automake and no
	longer present in gnulib.
	* .gitattributes: Delete references to files not in git.

2012-06-18  Eric Blake  <eblake@redhat.com>

	maint: add attribution
	* THANKS: Update.

2012-06-18  David Hill  <dhill@mindcry.org>

	functions: add Bitrig defaults
	Cater to the Bitrig OS, an OpenBSD fork.  config.guess and
	config.sub have been updated upstream.

	* lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF)
	(_AC_FUNC_REALLOC_IF): Bitrig inherits from BSD.

2012-05-29  Jim Meyering  <meyering@redhat.com>

	maint: fix typos in old ChangeLog files
	Culprits identified and fixed automatically using these commands:
	git ls-files | misspellings -f - |grep -v '^ERROR:' |perl -pe \
	's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'\
	|bash
	using http://github.com/lyda/misspell-check
	* ChangeLog.2, ChangeLog.3: Fix typos.

2012-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>

	general: deprecate 'configure.in' as autoconf input
	It has been years since that has been deprecated in the documentation,
	in favour of 'configure.ac':

	  Previous versions of Autoconf promoted the name configure.in, which
	  is somewhat ambiguous (the tool needed to process this file is not
	  described by its extension), and introduces a slight confusion with
	  config.h.in and so on (for which '.in' means "to be processed by
	  configure"). Using configure.ac is now preferred.

	It's now time to start giving runtime warning about the use of
	'configure.in', so that support for it can be removed in future
	versions of autoconf/automake.

	* lib/Autom4te/Configure_ac.pm: Issue a warning in the 'obsolete'
	category if 'configure.in' is detected.  Since this module is synced
	from Automake, this change is to be backported there (and will be
	soon).
	* doc/autoconf.texi: Update.
	* tests/tools.at: Adjust to avoid spurious failures.

2012-05-03  Bruno Haible  <bruno@clisp.org>

	functions: improve cross-compilation guesses for glibc system hosts
	Paul and Eric suggested that improving the cross-compilation guesses
	for targets that are glibc systems would be welcome here [1][2].

	This patch modifies the cross-compilation behaviour of
	  AC_FUNC_CHOWN
	  AC_FUNC_GETGROUPS
	  AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
	  AC_FUNC_MALLOC
	  AC_FUNC_MMAP
	  AC_FUNC_REALLOC
	  AC_FUNC_STRCOLL
	so that when the target is a glibc system (or, in case of AC_FUNC_MALLOC
	and AC_FUNC_REALLOC, any known "good" Unix system), the guess is
	"yes it works" rather than "guessing no".

	This is important because some of these macros are used in Gnulib, and
	in case of "guessing no" Gnulib provides extra workaround code, and
	  1) Generally, when targetting embedded systems, code size should be
	     minimized,
	  2) In [3], unnecessary workaround code will look like a Glibc bug.

	This patch also changes the configure output to "guessing yes" or
	"guessing no" in a case where the ac_cv_* variable is undocumented.

	[1] http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00010.html
	[2] http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00013.html
	[3] http://sourceware.org/glibc/wiki/Testing/Gnulib

	This patch was tested with the simple configure.ac file
	=============== configure.ac ==================
	AC_INIT([dummy], [0])
	AC_FUNC_CHOWN
	AC_FUNC_GETGROUPS
	AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
	AC_FUNC_MALLOC
	AC_FUNC_MMAP
	AC_FUNC_REALLOC
	AC_FUNC_STRCOLL
	AC_OUTPUT
	===============================================

	* lib/autoconf/functions.m4 (AC_FUNC_CHOWN): Require AC_CANONICAL_HOST.
	When cross-compiling to a glibc system, guess yes.
	(AC_FUNC_GETGROUPS): Likewise.
	(AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
	(AC_FUNC_STRCOLL): Likewise.
	(_AC_FUNC_MALLOC_IF): Require AC_CANONICAL_HOST. When cross-compiling
	to a know Unix system other than AIX and OSF/1, guess yes.
	(_AC_FUNC_REALLOC_IF): Likewise.
	(AC_FUNC_MMAP): Require AC_CANONICAL_HOST. When cross-compiling to a
	system with a Linux kernel, guess yes.

2012-05-03  Eric Blake  <eblake@redhat.com>

	doc: fix another bad @xref
	Obviously, I didn't fully test commit f35498d.

	* doc/autoconf.texi (Limitations of Builtins): Add a comma.

2012-04-24  Eric Blake  <eblake@redhat.com>

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

	Release Version 2.69.
	* NEWS: Mention the release.

2012-04-24  Eric Blake  <eblake@redhat.com>

	maint: drop bz2 tarball
	At 2.68b, I asked whether anyone would miss .gz and .bz2 formats.
	Consensus was overwhelming that .gz still holds a place in people's
	hearts, in spite of .xz compressing to smaller files, but no one
	was able to make a convincing argument for .bz2.

	* configure.ac (AM_INIT_AUTOMAKE): Drop bzip2; xz wins hands down.

2012-04-24  Eric Blake  <eblake@redhat.com>

	maint: resync files from upstream
	The files in lib/Autom4te/ are intentionally not synced at this
	point, since this recent Automake patch:
	https://lists.gnu.org/archive/html/automake-patches/2012-03/msg00111.html

	was buggy regarding '-' as stdout, and also exposes some latent
	bugs in autoconf where we use raw 'open' instead of XFile::open.

	* build-aux/announce-gen: Resync via 'make fetch'.
	* build-aux/config.sub: Likewise.
	* build-aux/git-version-gen: Likewise.
	* build-aux/gnupload: Likewise.
	* build-aux/move-if-change: Likewise.
	* build-aux/texinfo.tex: Likewise.
	* doc/standards.texi: Likewise.
	* maint.mk: Likewise.

2012-04-24  Eric Blake  <eblake@redhat.com>

	doc: fix bad @xref uses
	Upstream gnulib maint.mk improvements caught a few issues we
	should fix, as well as a few issues in files we copy from
	other sources that we will just ignore here.

	* doc/autoconf.texi (Generic Programs, Special Shell Variables)
	(Limitations of Builtins): Use references correctly.
	* cfg.mk
	(exclude_file_name_regexp--sc_prohibit_undesirable_word_seq)
	(exclude_file_name_regexp--sc_useless_cpp_parens): Add exemptions.

2012-04-24  Bruno Haible  <bruno@clisp.org>

	AC_INIT: remove a transitional warning
	On bi-arch systems (such as x86 / x86_64) it is often necessary to pass
	the --host option together with an appropriate value for CC. But this
	triggers a warning:

	$ ./configure --host=i686-pc-linux-gnu CC="gcc -m32 -march=i586"
	configure: WARNING: if you wanted to set the --build type, don't use --host.
	    If a cross compiler is detected then cross compile mode will be used
	..

	This warning was introduced on 2000-06-30, in commit
	<http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=cb2e761b8e1181f97e8e09d85526bd22078433db>
	with the remark "Re-enable the old behavior of --host and --build."

	This warning was meant to warn users about a changed semantics of
	--build and --host. This change is now 12 years in the past; users
	have had enough time to learn it. I therefore suggest to remove the
	warning.

	I've done lots of cross and bi-arch compilations in the last 10 years,
	all with --host and without --build, and have never observed a problem
	with it, except for the warning. Simply relying on config.guess is sufficient.

	* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Don't warn if --host
	given without --build.

2012-04-24  Bruno Haible  <bruno@clisp.org>

	doc: fix incorrect and incomplete doc about cross-compilation mode
	* doc/autoconf.texi (Runtime): Mention the effect of the cross-
	compilation mode on AC_RUN_IFELSE.
	(Specifying Target Triplets): Fix description of --host's effects.
	(Hosts and Cross-Compilation): Remove incorrect statement about
	--host's effects.

2012-04-23  Paul Eggert  <eggert@cs.ucla.edu>

	doc: document --build and cross-compilation better
	* doc/autoconf.texi (Specifying Target Triplets): Mention that
	specifying a build-type that differs from host-type enables
	cross-compilation.  Problem reported by Bruno Haible in:
	http://lists.gnu.org/archive/html/autoconf-patches/2012-04/msg00009.html

2012-04-11  Jim Meyering  <meyering@redhat.com>

	maint: avoid "make syntax-check" failure
	* cfg.mk (old_NEWS_hash): Update to reflect typo fix in old news.

2012-03-28  Stefano Lattarini  <stefano.lattarini@gmail.com>

	cosmetics fix imprecise comment in Autom4te::General
	* lib/Autom4te/General.pm: This file is *not* used by Automake;
	adjust comments accordingly.

2012-03-07  Paul Eggert  <eggert@cs.ucla.edu>

	tests: fix port of AT_CHECK_ENV to hosts with flaky grep
	* tests/local.at (AT_CHECK_ENV): Don't copy the buggy grep's
	diagnostics to stderr, as that causes AT_CHECK to fail.  They can
	be found in the stderr-* files if this is needed for debugging.

2012-03-07  Eric Blake  <eblake@redhat.com>

	docs: document set -n pitfalls
	* doc/autoconf.texi (Limitations of Builtins) <set>: Document
	issues with set -n.

2012-03-07  Eric Blake  <eblake@redhat.com>

	build: require perl 5.6
	This reduces the implicit requirement from 5.6.2 back to 5.6,
	while raising the explicit requirement to match the actual code.

	* configure.ac (PERL): Fail up front if perl is too old.
	* NEWS: Document this.
	* README: Likewise.
	* README-hacking: Likewise.
	* lib/Autom4te/ChannelDefs.pm: Bump requirement.
	* lib/Autom4te/General.pm: Relax requirement.

2012-03-07  Eric Blake  <eblake@redhat.com>

	tests: ignore ksh -n warnings
	Recent ksh is noisy:

	$ ksh -nc '``'; echo $?
	ksh: warning: line 1: `...` obsolete, use $(...)
	0

	* tests/local.at (AT_CHECK_SHELL_SYNTAX): Ignore noisy ksh on.
	Reported by Martin Zaun.

2012-03-07  Paul Eggert  <eggert@cs.ucla.edu>

	tests: port AT_CHECK_ENV to hosts with flaky grep
	* tests/local.at (AT_CHECK_ENV): Don't assume that if one grep
	fails, the other will too.  It could be that 'grep' is flaky,
	and fails somewhat at random.  This would explain the problems
	reported for autoconf-2.68b on FreeBSD and MacOS X, for example:
	<http://lists.gnu.org/archive/html/bug-autoconf/2012-03/msg00032.html>
	<http://lists.gnu.org/archive/html/bug-autoconf/2012-03/msg00035.html>
	<http://lists.gnu.org/archive/html/bug-autoconf/2012-03/msg00036.html>
	<http://lists.gnu.org/archive/html/bug-autoconf/2012-03/msg00044.html>

2012-03-06  Stefano Lattarini  <stefano.lattarini@gmail.com>

	maint: resync files from upstream
	Since the perl version required in Automake::Getopt has been
	recently lowered from 5.6.2 to 5.6.0, this change has the nice
	effect of making autoconf compatible again with all perls in
	the 5.6.x release series.

	* maint.mk: Resync via 'make fetch'.
	* lib/Autom4te/Channels.pm: Likewise.
	* lib/Autom4te/Configure_ac.pm: Likewise.
	* lib/Autom4te/FileUtils.pm: Likewise.
	* lib/Autom4te/Getopt.pm: Likewise.
	* lib/Autom4te/XFile.pm: Likewise.

2012-03-05  Stefano Lattarini  <stefano.lattarini@gmail.com>

	maint: drop syncing with Automake::Struct
	The module Automake::Struct has been removed in automake master
	branch (with yesterday's commit v1.11-2055-g74a7f49 "maint: drop
	'Automake::Struct' module"): since Automake now requires Perl 5.6,
	that module has become obsolete, being basically just a backport
	of Perl 5.6's 'Class::Struct' to Perl 5.5.  With this change, we
	follow suite in Autoconf, which syncs some of its internal modules
	with Automake.

	* lib/Autom4te/Struct.pm: Delete.
	* lib/Autom4te/Makefile.am (dist_perllib_DATA): Don't list it
	anymore.
	* cfg.mk: Don't sync it with the Automake repository anymore.
	* lib/Autom4te/Request.pm: Use 'Class::Struct' instead of
	'Autom4te::Struct'.

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

	doc: mention PATH bug with "ksh foo"
	* doc/autoconf.texi (Invoking the Shell): Mention ksh PATH bug.

2012-03-04  Stefano Lattarini  <stefano.lattarini@gmail.com>

	tests: fix spurious failure due to Solaris XPG4 sh bug
	On Solaris 10, the /usr/xpg4/bin/sh shell seems unable to execute
	a shell script named 'script':

	  $ touch script
	  $ /bin/sh script; echo status: $? # As expected.
	  status: 0
	  $ /usr/xpg4/bin/sh script; echo status: $? # Weirdness follows.
	  /usr/xpg4/bin/sh: script: cannot execute
	  status: 1

	This was causing a spurious testsuite failure for users which have
	/usr/xpg4/bin in $PATH before /bin and /usr/bin.  Fix that.

	* tests/m4sh.at (Configure re-execs self with CONFIG_SHELL): Rename
	the m4sh-produced script to 'script2', to avoid the just-described
	issue.

2012-03-04  Stefano Lattarini  <stefano.lattarini@gmail.com>

	tests: fix spurious failure when CONFIG_SITE is set
	* tests/m4sh.at (Configure re-execs self with CONFIG_SHELL): Export
	$CONFIG_SITE to "/dev/null", to avoid spurious diffs in expected
	stdout/stderr.

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

	fortran: clean up core files after AC_FC_CHECK_BOUNDS
	* lib/autoconf/fortran.m4 (AC_FC_CHECK_BOUNDS): Clean up core
	files, too.  Needed for Sun Fortran 95 8.2 2005/10/13 on Solaris 8.

	tests: port AS_TR_SH and AS_TR_CPP test to Solaris 8 wc
	* tests/m4sh.at (AS@&t@_TR_SH and AS@&t@_TR_CPP): Do not assume
	that "wc -l" outputs only digits; on Solaris 8 it also outputs
	blanks and POSIX allows this.

	tests: fix "#/bin/sh" typo
	* tests/m4sh.at (AS@&t@_EXECUTABLE): "#!/bin/sh", not "#/bin/sh".
	Typo reported by Tim Rice in:
	http://lists.gnu.org/archive/html/autoconf-patches/2012-03/msg00009.html

	tests: port AS_EXECUTABLE_P test to Solaris 8 /bin/sh
	* tests/m4sh.at (AS@&t@_EXECUTABLE): Treat any nonzero exit
	status as failure.  This is needed for Solaris 8 /bin/sh,
	where executing a nonexecutable file causes the shell
	to say the file had exit status 1.

2012-03-03  Stefano Lattarini  <stefano.lattarini@gmail.com>

	configure: don't infloop when re-executing with $CONFIG_SHELL
	It turns out our guard against infinite recursion wasn't good
	enough when shells without $LINENO support were involved, since
	the creation-and-sourcing of configure.lineno broke the guard's
	expectations.  Reports by Tim Rice and Paul Eggert.

	* lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Export '_as_can_reexec'
	to "no" before sourcing the just-created configure.lineno.

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

	maint: spelling fixes

2012-03-01  Eric Blake  <eblake@redhat.com>

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

2012-03-01  Eric Blake  <eblake@redhat.com>

	Release Version 2.68b.
	It's been more than a year since 2.68; time for a beta release
	to shake out any last minute bugs, before a release of 2.69
	in the near future.

	* NEWS: Mention the release.
	* HACKING: Update some instructions.

2012-03-01  Eric Blake  <eblake@redhat.com>

	maint: resync files from upstream
	* GNUmakefile: Resync via 'make fetch'.
	* build-aux/config.guess: Likewise.
	* build-aux/config.sub: Likewise.
	* build-aux/texinfo.tex: Likewise.
	* build-aux/update-copyright: Likewise.
	* doc/standards.texi: Likewise.
	* lib/Autom4te/Channels.pm: Likewise.
	* lib/Autom4te/Configure_ac.pm: Likewise.
	* lib/Autom4te/FileUtils.pm: Likewise.
	* lib/Autom4te/Getopt.pm: Likewise.
	* lib/Autom4te/Struct.pm: Likewise.
	* lib/Autom4te/XFile.pm: Likewise.
	* maint.mk: Likewise.

2012-02-25  Eric Blake  <eblake@redhat.com>

	tests: add test for AS_EXECUTABLE_P
	Now that this is public, we should regression test it.

	* tests/m4sh.at (AS@&t@_EXECUTABLE): New test.

2012-02-25  Eric Blake  <eblake@redhat.com>

	m4sh: make AS_EXECUTABLE_P public
	In the process of making it public, factor it into a reusable
	function.  This makes constructs like AC_CHECK_PROGRAM smaller,
	as well as making libtool's naughty use of $as_executable_p safer.

	* lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Add a shell function.
	(AS_EXECUTABLE_P): Forward to shell function.
	* doc/autoconf.texi (Common Shell Constructs): Document it.
	* NEWS: Mention this.

2012-02-24  Eric Blake  <eblake@redhat.com>

	m4sh: require that 'test -x' works
	4.3BSD is no longer a reasonable portability target; and we are
	pretty sure that these days we can find at least one shell on any
	platform that supports 'test -x'.  Drop a horribly unsafe use of
	eval as a result. :)

	Libtool still uses $as_executable_p without so much as calling
	either AS_TEST_X or AS_EXECUTABLE_P; even though the latter has
	existed, although undocumented, since at least 2.59; furthermore,
	libtool uses it in a context where filtering out directories
	would have been desirable.  Shame on them.

	* lib/m4sugar/m4sh.m4 (_AS_TEST_X_WORKS): New probe.
	(AS_SHELL_SANITIZE, AS_INIT): Use it in shell searching.
	(AS_TEST_X, AS_EXECUTABLE_P): Simplify.

2012-02-24  Eric Blake  <eblake@redhat.com>

	doc: mention more pitfalls of file mode tests
	4.3BSD is museum-ware now, so we can assume that test -x exists;
	however, we still can't assume that it always does what we want.

	* doc/autoconf.texi (Limitations of Builtins) <test (files)>:
	Treat 'test -x' as mostly portable, but mention problems with
	root user, ACLs, and TOCTTOU races.

2012-02-16  Eric Blake  <eblake@redhat.com>

	docs: tweak 'rm -f' limitations
	Based on http://debbugs.gnu.org/10819 and
	http://austingroupbugs.net/view.php?id=542

	* doc/autoconf.texi (Limitations of Usual Tools) <rm>: More
	details on 'rm -f' without files.

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

	maint: replace FSF snail-mail addresses with URLs
	* tests/erlang.at, tests/go.at, tests/statesave.m4:
	Replace FSF snail mail addresses with URLs, as per GNU coding
	standards, and for consistency with other tests.

2012-01-28  Jim Meyering  <meyering@redhat.com>

	maint: avoid "make syntax-check" failure
	* Makefile.am ($(srcdir)/INSTALL): Remove spurious space-before-TAB.

2012-01-23  Eric Blake  <eblake@redhat.com>

	tests: fix test regression due to additional output
	This test has been failing since commit 5285ea8c (sadly, since
	last July; thankfully, unreleased).

	* tests/m4sugar.at (m4@&t@_require: nested): Fix test.

2012-01-23  Eric Blake  <eblake@redhat.com>

	INSTALL: convert to '' quoting, drop blank line at end
	This is allowed by recent GNU Coding Standards changes, and
	mirrors recent gnulib changes:
	https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00267.html
	https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00298.html

	I've confirmed that after these changes, the INSTALL generated and
	installed by autoconf matches the INSTALL.ISO in gnulib.

	* Makefile.am ($(srcdir)/INSTALL): Match gnulib INSTALL.ISO.

2012-01-23  Jim Meyering  <meyering@redhat.com>

	maint: convert .x-sc_* into exclude_file_name_regexp--sc_* exemptions
	Many of the .x-sc_* exemptions were no long necessary.  Remove those
	files and instead, provide exemptions via variable definitions in
	cfg.mk to address the few remaining exceptions.
	* .x-sc_prohibit_atoi_atof: Remove file.
	* .x-sc_space_tab: Likewise.
	* .x-sc_sun_os_names: Likewise.
	* .x-sc_trailing_blank: Likewise.
	* .x-sc_two_space_separator_in_usage: Likewise.
	* .x-sc_useless_cpp_parens: Likewise.
	* cfg.mk: Add minimal exemptions.
	* cfg.mk: Add minimal exemptions.
	* doc/standards.texi (Standard C): Address the sole useless-cpp-parens
	violation in this file:
	-#if defined (__STDC__) || defined (WINDOWSNT)
	+#if defined __STDC__ || defined WINDOWSNT
	With that, the only remaining offender is config.guess, whose name
	is now listed in cfg.mk.
	Suggested by Eric Blake.

2012-01-23  Paul Eggert  <eggert@cs.ucla.edu>

	doc: work around mingw-w64 alloca problem with example
	* doc/autoconf.texi (Particular Functions): In example code for
	alloca, do not re-#define alloca.  This works around a mingw-w64
	problem reported by Vincent Torri in
	<http://lists.gnu.org/archive/html/autoconf/2012-01/msg00018.html>.

2012-01-21  Jim Meyering  <meyering@redhat.com>

	maint: fix or disable failing syntax-check rules
	* cfg.mk (local-checks-to-skip): List failing tests, so we skip
	them, for now.
	(old_NEWS_hash): Update.
	* doc/autoconf.texi: Per suggestion from Eric Blake, obfuscate
	the first word of "Filesystem Hierarchy Standard" as File@/system
	so it continues to render as one word, yet doesn't trigger the
	syntax-check prohibition.

	maint: also sync maint.mk and useless-if-before-free from gnulib
	* cfg.mk (gnulib-update): Add them to the list.
	* maint.mk: Update from gnulib.
	* build-aux/gitlog-to-changelog: Likewise.
	* build-aux/useless-if-before-free: New file, from gnulib.
	* doc/gnu-oids.texi: Update.

	maint.mk: update from gnulib
	* maint.mk: Update.

	maint: placate syntax-check rules: exempt some false positives
	* cfg.mk: Exempt maint.mk from the "undesirable word seq" check.
	Exempt maint.mk and autoconf.texi from the test_minus_ao check.

	maint: tweak to avoid triggering space-tab-prohibiting syntax-check
	* tests/m4sh.at (nargs): Use TAB-SP, not SP-TAB in abusive file name,
	to avoid triggering the space-tab-prohibiting syntax-check.

	maint: remove empty lines at EOF
	* man/autoconf.x: Remove empty line at EOF.
	* man/autoheader.x: Likewise.
	* man/autoscan.x: Likewise.
	* man/autoupdate.x: Likewise.
	* man/ifnames.x: Likewise.
	* tests/compile.at: Likewise.
	* doc/fdl.texi: Likewise.

	doc: fix grammar/doubled-word errors
	* doc/autoconf.texi: Remove/fix doubled-word errors.
	Also, s/can not/cannot/.
	* lib/m4sugar/m4sh.m4: Reword "if IF" comment to avoid triggering
	the doubled-word warning.

2012-01-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	maint: sync files from gnulib
	* GNUmakefile: Sync from gnulib.
	* build-aux/announce-gen: Likewise.
	* build-aux/config.guess: Likewise.
	* build-aux/config.sub: Likewise.
	* build-aux/git-version-gen: Likewise.
	* build-aux/gnupload: Likewise.
	* build-aux/move-if-change: Likewise.
	* build-aux/texinfo.tex: Likewise.
	* build-aux/update-copyright: Likewise.
	* build-aux/vc-list-files: Likewise.
	* doc/gendocs_template: Likewise.
	* doc/standards.texi: Likewise.
	* m4/autobuild.m4: Likewise.

2012-01-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	maint: make position of gnulib checkout configurable
	Some gnulib-related tools (most prominently, the gnulib-provided
	'bootstrap' script) allow the user to define the position of his
	gnulib's repository checkout through the use of the 'GNULIB_SRCDIR'
	environment variable.  We should do the same, for consistency and
	to easily support slightly unusual layouts in developers' source
	trees.

	* cfg.mk (gnulib_dir): Define to "$GNULIB_SRCDIR" if that's set,
	and to default value of "'$(abs_srcdir)'/../gnulib" otherwise.
	Update comments.

2012-01-20  Stefano Lattarini  <stefano.lattarini@gmail.com>

	getopt: sync from Automake repository
	* lib/Autom4te/Getopt.am: The master copy of this file has
	been moved to the  Automake repository (see Automake commit
	'v1.11-662-g52246cc' 2012-01-18, "cmdline parsing: move into
	a dedicated perl module").  So we now we sync it from there,
	by listing it ...
	* cfg.mk (autom4te_files): ... in this variable.

2012-01-20  Stefano Lattarini  <stefano.lattarini@gmail.com>

	build: fix automake error due to missing ChangeLog
	Apparently, Automake does not accept the '$(srcdir)/ChangeLog'
	target in Makefile.am as a declaration that ChangeLog is
	automatically generated (and thus does not need to exist at
	automake time).  One has to use a *literal* 'ChangeLog' target.

	Problem introduced in commit v2.68-118-g6ed5195 of 2012-01-17,
	"maint: generate ChangeLog from git log".

	* Makefile.ma ($(srcdir)/ChangeLog): Renamed ...
	(ChangeLog): ... to this.

2012-01-17  Stefano Lattarini  <stefano.lattarini@gmail.com>

	getopt: new Autom4te::Getopt module
	* lib/Autom4te/General.pm (getopt): Move the guts of its
	implementation ...
	* lib/Autom4te/Getopt.pm (parse_options): .. into this function
	in the new Autom4te::Getopt module.  This will make it simpler
	for the implementation to be shared with other projects (right
	now, Automake).
	* lib/Automake/Makefile.am (dist_perllib_DATA): Add the new
	module.

2012-01-17  Jim Meyering  <meyering@redhat.com>

	tests: avoid spurious failure for each gnu-fortran-using test
	The tests compare pre- and post-run lists of envvars, which must
	be the same, modulo a list of known, filtered-out exceptions.
	However, when running fortran-checking tests with GNU fortran, each
	would fail due to the post-run addition of the GFC symbol added in
	v2.68-97-gbd962ac.
	* tests/local.at (AT_CHECK_ENV): Add GFC to the list of symbols
	that we ignore in pre-/post-run environment diffs.

2012-01-17  Stefano Lattarini  <stefano.lattarini@gmail.com>

	maint: generate ChangeLog from git log
	Following the practice set by various other GNU projects, we start
	to automatically generate the ChangeLog file from the git commit
	messages.  This will avoid duplication (as the ChangeLog entries
	were always inserted both in the git commit message and in the
	version-controlled ChangeLog file), and potential problems with
	spurious merge conflicts (which, although greatly mitigated by
	Bruno Haible's `git-merge-changelog' helper program, have never
	been completely solved).

	* ChangeLog: Moved ...
	* ChangeLog.3: ... to this.
	* build-aux/gitlog-to-changelog: New script, synced from gnulib.
	* cfg.mk (gnulib-update): Also sync gitlog-to-changelog.
	* Makefile.am (gen-ChangeLog): New .PHONY rule, generate the
	ChangeLog for distribution.
	(dist-hook): Depend on it.
	($(srcdir)/ChangeLog): New dummy rule, to pacify automake "gnu"
	strictness.  Creates a dummy ChangeLog, that will be overridden
	by the proper one at distribution time.
	(gen_start_date): New variable, the date starting from which the
	git log entries are to be copied in the generated ChangeLog.
	(EXTRA_DIST): Add ChangeLog.3 and gitlog-to-changelog.
	* configure.ac (AC_CONFIG_SRCDIR): Use 'lib/autoconf/autoconf.m4'
	instead of 'ChangeLog' as the sentinel file.
	* .gitignore: Add ChangeLog.

2012-01-15  Stefano Lattarini  <stefano.lattarini@gmail.com>

	cosmetics: fix some typos in ChangeLog
