adds automatic c11 detection to configure.ac

Sun, 03 Nov 2019 15:35:29 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 03 Nov 2019 15:35:29 +0100
changeset 362
39cef8f37eb5
parent 361
8ee9e23adbd2
child 363
8175ba2b3bcb

adds automatic c11 detection to configure.ac

configure.ac file | annotate | diff | comparison | revisions
--- a/configure.ac	Sat Oct 05 17:07:16 2019 +0200
+++ b/configure.ac	Sun Nov 03 15:35:29 2019 +0100
@@ -52,8 +52,11 @@
 # in modern versions of autoconf, this is done by AC_PROG_CC
 AM_PROG_CC_C_O
 
-# we require the current C standard
-AC_PROG_CC_STDC
+# we want c11, and may fall back to c99
+AX_CHECK_COMPILE_FLAG([-std=c11],
+    [AX_APPEND_FLAG([-std=c11])],
+    [AC_PROG_CC_C99]
+)
 
 # where to place config macros
 AC_CONFIG_HEADERS([config.h])

mercurial