]> git.ipfire.org Git - thirdparty/autoconf.git/log
thirdparty/autoconf.git
12 days agoPort _AC_C_C99_TEST_MAIN to -Wc++-compat master
Paul Eggert [Thu, 7 Aug 2025 20:50:53 +0000 (13:50 -0700)] 
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.

12 days agoPort _AC_C_C99_TEST_GLOBALS to -Wc++-compat
Paul Eggert [Thu, 7 Aug 2025 20:27:29 +0000 (13:27 -0700)] 
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.

12 days agoMake _AC_C_C99_TEST_MAIN more robust with -Werror
Vincent Lefevre [Thu, 7 Aug 2025 15:22:25 +0000 (17:22 +0200)] 
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.

Copyright-paperwork-exempt: yes

12 days agoPort AC_C_CONST to GCC 16 -Wunused-but-set-variable
Paul Eggert [Thu, 7 Aug 2025 16:03:21 +0000 (09:03 -0700)] 
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.

3 weeks agoQuote $OLDPWD in doc
Paul Eggert [Mon, 28 Jul 2025 15:22:12 +0000 (08:22 -0700)] 
Quote $OLDPWD in doc

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

3 weeks agodoc: update cd info
Paul Eggert [Sun, 27 Jul 2025 17:29:42 +0000 (10:29 -0700)] 
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

4 weeks agodoc: omit confusing space before paren
Paul Eggert [Fri, 18 Jul 2025 18:00:17 +0000 (11:00 -0700)] 
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

7 weeks agoDocument s/a/\n/ etc
Paul Eggert [Wed, 25 Jun 2025 18:28:24 +0000 (11:28 -0700)] 
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.

2 months agoFix trap quoting (regression 2024-08-04).
Bruno Haible [Mon, 26 May 2025 13:17:57 +0000 (15:17 +0200)] 
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.

2 months agoAC_CHECK_DECL now ignores future Darwin functions
Bruno Haible [Sat, 24 May 2025 10:22:28 +0000 (12:22 +0200)] 
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.
Co-authored-by: Paul Eggert <eggert@cs.ucla.edu>
3 months agoMore shell patterns to avoid
Paul Eggert [Tue, 6 May 2025 12:04:04 +0000 (05:04 -0700)] 
More shell patterns to avoid

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

3 months agodoc: Document another pitfall of shell pattern matching.
Bruno Haible [Tue, 6 May 2025 07:57:56 +0000 (09:57 +0200)] 
doc: Document another pitfall of shell pattern matching.

* doc/autoconf.texi (Shell Pattern Matching): Mention non-portability of
patterns with braces.

3 months agoFall back on busybox awk
Paul Eggert [Sun, 20 Apr 2025 17:36:19 +0000 (10:36 -0700)] 
Fall back on busybox awk

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

4 months agoAvoid grep in minimal configure
Paul Eggert [Fri, 18 Apr 2025 21:01:38 +0000 (14:01 -0700)] 
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.

4 months agoconfig.status now checks for missing awk
Paul Eggert [Fri, 18 Apr 2025 20:32:03 +0000 (13:32 -0700)] 
config.status now checks for missing awk

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

4 months agoImprove list of 'configure' prereqs
Paul Eggert [Thu, 17 Apr 2025 19:14:41 +0000 (12:14 -0700)] 
Improve list of 'configure' prereqs

* doc/install.texi (Installation Prerequisites):
Use a more-accurate list.

4 months agoDocument that 'configure' needs awk etc
Paul Eggert [Thu, 17 Apr 2025 08:08:52 +0000 (01:08 -0700)] 
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.

4 months agoFix AC_DEFINE_UNQUOTED regexp
Paul Eggert [Mon, 7 Apr 2025 18:01:59 +0000 (11:01 -0700)] 
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.

6 months agoPort install_aux_file to OS/2
Paul Eggert [Sun, 9 Feb 2025 18:00:11 +0000 (10:00 -0800)] 
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

6 months agoFix dependency issue for autoscan.list
Paul Eggert [Thu, 30 Jan 2025 04:10:09 +0000 (20:10 -0800)] 
Fix dependency issue for autoscan.list

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

6 months agotests/local.mk: fix dependencies for generating the wrapper template
Yann E. MORIN [Wed, 29 Jan 2025 22:29:18 +0000 (15:29 -0700)] 
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.

Copyright-paperwork-exempt: yes

6 months agoDocument AIX 7.3 find exec + bug
Paul Eggert [Thu, 30 Jan 2025 04:02:25 +0000 (20:02 -0800)] 
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 ... +’.

6 months agoUpdate doc for POSIX, OS versions
Paul Eggert [Sun, 19 Jan 2025 18:14:31 +0000 (10:14 -0800)] 
Update doc for POSIX, OS versions

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

7 months agoPort better to NVHPC
Paul Eggert [Thu, 16 Jan 2025 19:24:12 +0000 (11:24 -0800)] 
Port better to NVHPC

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

7 months agoKeep "-lmingwex" and "-lmoldname" in linker flags for MinGW
Markus Mützel [Sun, 5 Jan 2025 18:14:19 +0000 (18:14 +0000)] 
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.

7 months agoAC_USE_SYSTEM_EXTENSIONS: Set _COSMO_SOURCE
Jack Kelly [Sun, 5 Jan 2025 06:19:09 +0000 (22:19 -0800)] 
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.

7 months agoFix test failure on macOS 15.1.1
Paul Eggert [Wed, 1 Jan 2025 21:30:26 +0000 (13:30 -0800)] 
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.

7 months agomaint: update all copyright dates via "make update-copyright"
Paul Eggert [Wed, 1 Jan 2025 20:24:04 +0000 (12:24 -0800)] 
maint: update all copyright dates via "make update-copyright"

7 months agoUpdate timestamp doc
Paul Eggert [Sun, 29 Dec 2024 00:04:09 +0000 (16:04 -0800)] 
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.

8 months agodoc: mention tr issues in multi-byte locales
Paul Eggert [Mon, 2 Dec 2024 20:47:54 +0000 (12:47 -0800)] 
doc: mention tr issues in multi-byte locales

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

8 months agobootstrap: Disallow use of undefined shell variables, if possible.
R. Diez [Mon, 2 Dec 2024 16:01:25 +0000 (11:01 -0500)] 
bootstrap: Disallow use of undefined shell variables, if possible.

9 months agoFurther improvements for C23 tests
Paul Eggert [Sun, 17 Nov 2024 17:00:49 +0000 (09:00 -0800)] 
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.

9 months agoFix comment typo re malloc
Paul Eggert [Tue, 5 Nov 2024 22:46:53 +0000 (14:46 -0800)] 
Fix comment typo re malloc

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

9 months agoFix use of $3 in _AC_FUNC_MALLOC_IF etc
Paul Eggert [Fri, 1 Nov 2024 01:29:54 +0000 (18:29 -0700)] 
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.

9 months agoAC_FUNC_MALLOC now guesses yes when cross-compiling
Bruno Haible [Fri, 1 Nov 2024 00:19:21 +0000 (17:19 -0700)] 
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.

9 months agoSay malloc/realloc cache vars can have spaces
Paul Eggert [Fri, 1 Nov 2024 00:17:11 +0000 (17:17 -0700)] 
Say malloc/realloc cache vars can have spaces

9 months ago* functions.m4: Fix typos in previous change.
Paul Eggert [Tue, 29 Oct 2024 23:27:45 +0000 (16:27 -0700)] 
* functions.m4: Fix typos in previous change.

9 months agoUpdate ‘volatile’ doc for C23
Paul Eggert [Tue, 29 Oct 2024 20:37:19 +0000 (13:37 -0700)] 
Update ‘volatile’ doc for C23

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

9 months agoMatch Gnulib INSTALL for quoting
Paul Eggert [Tue, 29 Oct 2024 20:32:25 +0000 (13:32 -0700)] 
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.

9 months agoMerge from Gnulib for malloc, realloc checking
Paul Eggert [Tue, 29 Oct 2024 04:27:35 +0000 (21:27 -0700)] 
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*.

9 months agoGo back to using “POSIX” not “Posix”
Paul Eggert [Sun, 27 Oct 2024 00:17:00 +0000 (17:17 -0700)] 
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”.

9 months agoRemove some doc for no-longer-used systems; update URLs
Paul Eggert [Sun, 27 Oct 2024 00:00:31 +0000 (17:00 -0700)] 
Remove some doc for no-longer-used systems; update URLs

9 months agoDocument realloc (p, 0) gotchas
Paul Eggert [Sat, 26 Oct 2024 23:29:49 +0000 (16:29 -0700)] 
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.

9 months agoAvoid some echo '...\...' gotchas
Paul Eggert [Mon, 21 Oct 2024 17:49:30 +0000 (10:49 -0700)] 
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.

10 months agoMention autogen.sh sooner in doc
Paul Eggert [Sat, 28 Sep 2024 23:27:16 +0000 (16:27 -0700)] 
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

10 months agodoc: remove IRIX from manual
Paul Eggert [Sun, 22 Sep 2024 05:56:14 +0000 (22:56 -0700)] 
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.

11 months agoGive a URL for COPYING.EXCEPTION in notices
Paul Eggert [Fri, 6 Sep 2024 01:19:36 +0000 (18:19 -0700)] 
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.

12 months agoStop documenting Tru64
Paul Eggert [Wed, 7 Aug 2024 00:57:32 +0000 (17:57 -0700)] 
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.

12 months agoImprove coverage of ‘echo’ in manual
Paul Eggert [Tue, 6 Aug 2024 17:13:05 +0000 (10:13 -0700)] 
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).

12 months agoMore defense against bad echo
Paul Eggert [Tue, 6 Aug 2024 17:00:26 +0000 (10:00 -0700)] 
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.

12 months agoAllow shell metachars in CONFIG_STATUS
Paul Eggert [Tue, 6 Aug 2024 15:06:33 +0000 (08:06 -0700)] 
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 ‘/’.

12 months agoSupport more special chars in $(LIBDIR) etc
Paul Eggert [Tue, 6 Aug 2024 06:09:58 +0000 (23:09 -0700)] 
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.

12 months agoMinor AC_FUNC_SELECT_ARGTYPES speedups
Paul Eggert [Tue, 6 Aug 2024 06:05:53 +0000 (23:05 -0700)] 
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.

12 months agoDon’t mishandle ‘\’ in VERSION
Paul Eggert [Tue, 6 Aug 2024 03:43:36 +0000 (20:43 -0700)] 
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 ‘\’.

12 months agoFollow own advice about \ in shell double-quoted strings
Paul Eggert [Sun, 4 Aug 2024 23:55:05 +0000 (16:55 -0700)] 
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.

12 months agoFix typos in previous $@ doc change
Paul Eggert [Sat, 3 Aug 2024 15:44:18 +0000 (08:44 -0700)] 
Fix typos in previous $@ doc change

Problem reported in <https://savannah.gnu.org/support/?111102>.

12 months agoPort to AIX 7.2 ksh93
Paul Eggert [Sat, 3 Aug 2024 03:42:57 +0000 (20:42 -0700)] 
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.

13 months agoFix syntax-check complaints
Zack Weinberg [Wed, 17 Jul 2024 20:26:26 +0000 (16:26 -0400)] 
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.

13 months agoAdjust set size correctly in all cases of m4_set_add_all.
Zack Weinberg [Mon, 8 Jul 2024 18:26:11 +0000 (14:26 -0400)] 
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.

13 months agoQuote separators in foreach.m4 version of m4_joinall.
Zack Weinberg [Mon, 8 Jul 2024 15:22:44 +0000 (11:22 -0400)] 
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.

13 months agoAdd a FLAGS argument to AT_CHECK_M4SUGAR_TEXT.
Zack Weinberg [Mon, 8 Jul 2024 18:43:53 +0000 (14:43 -0400)] 
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.

13 months agoEmit compat shims less often for old AS_ECHO implementation details.
Zack Weinberg [Mon, 24 Jun 2024 17:51:07 +0000 (13:51 -0400)] 
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.

13 months agoPort AC_PROG_OBJC to RHEL 9
Bruno Haible [Tue, 16 Jul 2024 15:56:21 +0000 (15:56 +0000)] 
Port AC_PROG_OBJC to RHEL 9

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

13 months agoDetect Android 5.0 strnlen bug
Paul Eggert [Tue, 16 Jul 2024 15:25:36 +0000 (08:25 -0700)] 
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.

13 months agodoc: mention ACLOCAL_AMFLAGS and #
Paul Eggert [Fri, 5 Jul 2024 19:32:40 +0000 (20:32 +0100)] 
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

13 months agoautoconf.texi: Don’t say that Darwin is “derived from FreeBSD.”
Zack Weinberg [Mon, 24 Jun 2024 01:10:50 +0000 (21:10 -0400)] 
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.

13 months agoautoconf.texi: Move ‘Systemology’ to ‘Portable Shell Programming’ section.
Zack Weinberg [Mon, 24 Jun 2024 00:59:35 +0000 (20:59 -0400)] 
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’).

13 months agoAdd ‘shell.nix’ defining Autoconf’s build dependencies in NixOS terms.
Zack Weinberg [Sun, 23 Jun 2024 19:11:35 +0000 (15:11 -0400)] 
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.

13 months agodoc/autoconf.texi (Systemology): Update Darwin.
Sevan Janiyan [Sat, 6 Jan 2024 21:49:59 +0000 (21:49 +0000)] 
doc/autoconf.texi (Systemology): Update Darwin.

Catch up with changes in Darwin since 2002 when the section was added.

13 months agobootstrap: Allow 'ln -s' to be overridden by the user.
KO Myung-Hun [Sun, 23 Jun 2024 17:39:16 +0000 (13:39 -0400)] 
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'.

14 months agoImprove wording for Y2038 and largefile probes
Paul Eggert [Tue, 18 Jun 2024 04:01:59 +0000 (21:01 -0700)] 
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.

14 months agoProcess C23 #elifdef and #elifndef
Paul Eggert [Sat, 15 Jun 2024 15:24:05 +0000 (08:24 -0700)] 
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.

14 months agoDocument Solaris ‘make’ glitch with ‘!’
Paul Eggert [Sat, 1 Jun 2024 16:07:38 +0000 (09:07 -0700)] 
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.

14 months agoAC_PROG_CXX no longer adjusts C++ language version
Paul Eggert [Tue, 28 May 2024 16:31:11 +0000 (09:31 -0700)] 
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.

14 months agoAC_PROG_CXX now tries C++23, C++20, C++17, C++14
Paul Eggert [Sun, 26 May 2024 16:20:56 +0000 (09:20 -0700)] 
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.

14 months agoPort C11 test to C++20
Paul Eggert [Sun, 26 May 2024 14:04:19 +0000 (07:04 -0700)] 
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.

15 months agoAC_FUNC_MALLOC: fix cross compilation to musl
Alyssa Ross [Wed, 15 May 2024 11:49:08 +0000 (13:49 +0200)] 
AC_FUNC_MALLOC: fix cross compilation to musl

This check returned yes for me on musl 1.2.3 on
aarch64-unknown-linux-musl.

15 months agoImprove VLA wording in NEWS
Paul Eggert [Tue, 30 Apr 2024 18:48:31 +0000 (11:48 -0700)] 
Improve VLA wording in NEWS

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

15 months agoMention C keywords in NEWS
Paul Eggert [Tue, 30 Apr 2024 18:41:36 +0000 (11:41 -0700)] 
Mention C keywords in NEWS

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

15 months agoAC_PROG_CC now tries C23 too
Paul Eggert [Tue, 30 Apr 2024 17:26:50 +0000 (10:26 -0700)] 
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.

15 months agoPort better to MSVC
Paul Eggert [Thu, 25 Apr 2024 21:47:20 +0000 (14:47 -0700)] 
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.

15 months agoFix doc typo with " {"
Paul Eggert [Tue, 30 Apr 2024 16:06:03 +0000 (09:06 -0700)] 
Fix doc typo with " {"

Problem reported by Brad Smith
<https://savannah.gnu.org/support/?111054>.

15 months agoAdjust tests to match new Automake files
Paul Eggert [Thu, 25 Apr 2024 15:26:17 +0000 (08:26 -0700)] 
Adjust tests to match new Automake files

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

15 months agomake fetch
Paul Eggert [Thu, 25 Apr 2024 15:24:22 +0000 (08:24 -0700)] 
make fetch

15 months agoPort AC_SYS_LARGEFILE to C++
Paul Eggert [Wed, 24 Apr 2024 21:47:56 +0000 (14:47 -0700)] 
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.

16 months agoImprove “possibly undefined macro” diagnostic
Paul Eggert [Sat, 6 Apr 2024 20:01:12 +0000 (13:01 -0700)] 
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.

18 months agoRemove incorrect check in AC_CHECK_SIZEOF
Paul Eggert [Wed, 7 Feb 2024 20:42:04 +0000 (12:42 -0800)] 
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.

18 months agoDocument ‘cp’ limitations better
Paul Eggert [Sun, 4 Feb 2024 05:37:49 +0000 (21:37 -0800)] 
Document ‘cp’ limitations better

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

19 months agoFix typo in previous patch
Paul Eggert [Wed, 17 Jan 2024 05:19:31 +0000 (21:19 -0800)] 
Fix typo in previous patch

19 months agoFix ‘long long’ checks on ancient platforms
Paul Eggert [Wed, 17 Jan 2024 04:20:06 +0000 (20:20 -0800)] 
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.

19 months agomake fetch
Paul Eggert [Wed, 17 Jan 2024 03:54:17 +0000 (19:54 -0800)] 
make fetch

19 months agodoc: mention join bug
Paul Eggert [Thu, 11 Jan 2024 01:45:34 +0000 (17:45 -0800)] 
doc: mention join bug

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

19 months agomaint: update all copyright dates via "make update-copyright"
Jim Meyering [Fri, 5 Jan 2024 17:11:48 +0000 (09:11 -0800)] 
maint: update all copyright dates via "make update-copyright"

19 months agomaint: post-release administrivia
Zack Weinberg [Fri, 22 Dec 2023 18:45:16 +0000 (13:45 -0500)] 
maint: post-release administrivia

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

19 months agoFinalize NEWS for release 2.72. v2.72
Zack Weinberg [Fri, 22 Dec 2023 17:39:49 +0000 (12:39 -0500)] 
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.

19 months agoSave/restore AC_LANG setting in AC_PROG_CC_C_O.
Zack Weinberg [Fri, 22 Dec 2023 16:22:36 +0000 (11:22 -0500)] 
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.

19 months agoRemove bashism from tests/local.at.
Zack Weinberg [Fri, 22 Dec 2023 15:05:27 +0000 (10:05 -0500)] 
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 ==.

19 months agoRevert debugging change committed by mistake
Zack Weinberg [Fri, 22 Dec 2023 14:56:44 +0000 (09:56 -0500)] 
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.

19 months agoAddress “autom4te preselections” testsuite failure
Zack Weinberg [Fri, 22 Dec 2023 14:48:30 +0000 (09:48 -0500)] 
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.

19 months agoAvoid a spurious test failure with shells that ignore write errors.
Zack Weinberg [Fri, 22 Dec 2023 13:47:36 +0000 (08:47 -0500)] 
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.