7046 Commits

Author SHA1 Message Date
Paul Eggert
9513bc15f7 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-09 14:10:12 -08:00
Paul Eggert
c3705f11bc maint: update all copyright dates via "make update-copyright" 2026-01-01 12:57:34 -08:00
Paul Eggert
e22aa0a999 Update Solaris commentary 2025-12-12 22:26:12 -08:00
Christian Feld
8ac9edd1a7 Fix bug in Fortran implicit int handling
* lib/autoconf/fortran.m4 (_AC_FC_IMPLICIT_NONE):
Fix typo in argument numbering.
Copyright-paperwork-exempt: yes
2025-11-20 08:14:44 -08:00
Jose E. Marchesi
cf8b90f6ff 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-26 08:24:20 -07:00
Basil L. Contovounesios
f9fea549bd 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.

Copyright-paperwork-exempt: yes
2025-10-15 11:13:43 -07:00
Paul Eggert
d1984e795a 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-30 14:52:28 -07:00
Paul Eggert
69ebe8fe97 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.
2025-08-07 13:51:19 -07:00
Paul Eggert
45b38c225b 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 13:51:19 -07:00
Vincent Lefevre
cce1af1a7c 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
2025-08-07 09:10:03 -07:00
Paul Eggert
6fc6066df1 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-08-07 09:10:03 -07:00
Paul Eggert
13698e2554 Quote $OLDPWD in doc
Problem reported by Florian Weimer in:
https://lists.gnu.org/r/autoconf/2025-07/msg00008.html
2025-07-28 08:22:12 -07:00
Paul Eggert
b1eb59a78a 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-27 10:30:35 -07:00
Paul Eggert
0179d2354b 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-07-18 11:00:17 -07:00
Paul Eggert
cbfc5f6cd1 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-06-25 11:28:57 -07:00
Bruno Haible
416b8f50c9 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 11:04:30 -07:00
Bruno Haible
e1bbc9b93c 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>
2025-05-26 10:55:19 -07:00
Paul Eggert
63ffa8e950 More shell patterns to avoid
* doc/autoconf.texi (Shell Pattern Matching):
Improve on the recent discussion about brace expansion.
2025-05-06 05:05:55 -07:00
Bruno Haible
3ff6b64bbe doc: Document another pitfall of shell pattern matching.
* doc/autoconf.texi (Shell Pattern Matching): Mention non-portability of
patterns with braces.
2025-05-06 05:05:55 -07:00
Paul Eggert
fa76d00401 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-20 10:38:45 -07:00
Paul Eggert
3d79cd9ff4 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.
2025-04-18 15:17:11 -07:00
Paul Eggert
b73f28c519 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-18 15:17:11 -07:00
Paul Eggert
95b849dd83 Improve list of 'configure' prereqs
* doc/install.texi (Installation Prerequisites):
Use a more-accurate list.
2025-04-17 12:14:41 -07:00
Paul Eggert
56860215d1 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-17 01:09:33 -07:00
Paul Eggert
79ab6ccf4f 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-04-07 11:02:57 -07:00
Paul Eggert
2f64dcd048 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-02-09 10:18:35 -08:00
Paul Eggert
220e939e5c 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 20:13:20 -08:00
Yann E. MORIN
a10ce78ead 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
2025-01-29 20:13:20 -08:00
Paul Eggert
4c8c67c444 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 ... +’.
2025-01-29 20:13:20 -08:00
Paul Eggert
cbb9e1e834 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-29 20:13:20 -08:00
Paul Eggert
632282145b 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-16 11:25:29 -08:00
Markus Mützel
9ff9c567b1 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 14:02:15 -08:00
Jack Kelly
059e5fc473 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-04 22:20:35 -08:00
Paul Eggert
1a46ea8915 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.
2025-01-01 13:30:49 -08:00
Paul Eggert
afdbe47bd8 maint: update all copyright dates via "make update-copyright" 2025-01-01 13:30:49 -08:00
Paul Eggert
7fe75b236c 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-28 16:04:33 -08:00
Paul Eggert
b40645caa9 doc: mention tr issues in multi-byte locales
* doc/autoconf.texi (tr): Mention multi-byte issues.
2024-12-02 12:47:54 -08:00
R. Diez
71afdbc878
bootstrap: Disallow use of undefined shell variables, if possible. 2024-12-02 11:02:19 -05:00
Paul Eggert
d5d33c5991 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-17 09:17:24 -08:00
Paul Eggert
1f38316f6a Fix comment typo re malloc
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2024-11/msg00048.html
2024-11-05 14:46:53 -08:00
Paul Eggert
f8c82d2926 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 19:01:05 -07:00
Bruno Haible
9ae3a35b19 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 17:20:03 -07:00
Paul Eggert
ebfccbf750 Say malloc/realloc cache vars can have spaces 2024-10-31 17:17:11 -07:00
Paul Eggert
74df3c6733 * functions.m4: Fix typos in previous change. 2024-10-29 16:27:45 -07:00
Paul Eggert
dc328e3978 Update ‘volatile’ doc for C23
* doc/autoconf.texi (Volatile Objects): Update for C23.
2024-10-29 15:56:35 -07:00
Paul Eggert
30ee10e273 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.
2024-10-29 15:56:35 -07:00
Paul Eggert
1a449f4d79 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-29 15:56:35 -07:00
Paul Eggert
c40517146a 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”.
2024-10-26 17:23:13 -07:00
Paul Eggert
85b81c91fc Remove some doc for no-longer-used systems; update URLs 2024-10-26 17:23:13 -07:00
Paul Eggert
36fa24859f 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-26 16:32:22 -07:00