3232 Commits

Author SHA1 Message Date
Zack Weinberg
9a6c58cf40
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 16:03:52 -05:00
Zack Weinberg
7943c65db0
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 15:39:32 -05:00
Zack Weinberg
0c777e326b
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-26 14:29:49 -05:00
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
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
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
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
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
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
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
afdbe47bd8 maint: update all copyright dates via "make update-copyright" 2025-01-01 13:30:49 -08: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
74df3c6733 * functions.m4: Fix typos in previous change. 2024-10-29 16:27:45 -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
85b81c91fc Remove some doc for no-longer-used systems; update URLs 2024-10-26 17:23:13 -07:00
Paul Eggert
53c23bb4e1 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-10-21 10:50:25 -07:00
Paul Eggert
93b3d33c1d 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-09-05 18:20:01 -07:00
Paul Eggert
12ecf0f467 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.
2024-08-06 17:59:36 -07:00
Paul Eggert
5ec931ffa3 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 ‘/’.
2024-08-06 17:59:36 -07:00
Paul Eggert
d675dd3451 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.
2024-08-06 17:59:36 -07:00
Paul Eggert
2160962cf7 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.
2024-08-06 17:59:36 -07:00
Paul Eggert
a245b8525a 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-06 17:59:36 -07:00
Paul Eggert
e1c7713496 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-08-02 20:44:06 -07:00
Zack Weinberg
cffe0a3468 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 13:16:21 -04:00
Zack Weinberg
cfc73b4d68 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 13:16:21 -04:00
Zack Weinberg
9737d7d985 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-17 12:17:18 -04:00
Bruno Haible
8d969839ab 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 15:56:21 +00:00
Paul Eggert
2fb09fae28 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-16 08:26:28 -07:00
Paul Eggert
c5b83b2613 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-17 21:06:43 -07:00
Paul Eggert
056518b94e 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-28 09:44:25 -07:00
Paul Eggert
f6522328c7 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.
2024-05-26 09:24:02 -07:00
Paul Eggert
e6c9cb69c8 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-26 07:18:32 -07:00
Alyssa Ross
605ba028a7 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-05-15 10:57:14 -04:00
Paul Eggert
653956f446 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.
2024-04-30 10:33:37 -07:00
Paul Eggert
e9fee73dba 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.
2024-04-30 10:33:37 -07:00