]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
configure: make the C99 detection more resiliant
authorRoss Burton <ross.burton@arm.com>
Thu, 5 Mar 2026 11:33:57 +0000 (11:33 +0000)
committerRoss Burton <ross.burton@arm.com>
Thu, 5 Mar 2026 11:33:57 +0000 (11:33 +0000)
autoconf 2.73 will default to C23 by default, which means that the >C99
detection logic in configure.ac will fail because it only handles c11
and c99.

Instead of adding c23 to the list and then breaking again in the future,
flip the logic around (as suggested by Zack Weinberg) and check
explicitly for just c89.

Closes #1806.

Signed-off-by: Ross Burton <ross.burton@arm.com>
configure.ac

index 740fb633932c423863ded235914b9ac51d618aa8..c708d8f5e274ea352fa6152ceabb662b2de8f670 100644 (file)
@@ -54,9 +54,9 @@ AC_USE_SYSTEM_EXTENSIONS
 # Require C99 support
 #
 AS_CASE([$ac_prog_cc_stdc],
-  [c11 | c99], [AC_DEFINE([C99_MACROS], 1, [C99 macros are supported])],
-  [AC_MSG_WARN([[Compiler does not support C99. It may not be able to compile the project.]])]
-)
+  [c89],
+  [AC_MSG_WARN([[Compiler does not support C99. It may not be able to compile the project.]])],
+  [AC_DEFINE([C99_MACROS], 1, [C99 macros are supported])])
 
 AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = yes)