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
     1.1 --- a/configure.ac	Sat Oct 05 17:07:16 2019 +0200
     1.2 +++ b/configure.ac	Sun Nov 03 15:35:29 2019 +0100
     1.3 @@ -52,8 +52,11 @@
     1.4  # in modern versions of autoconf, this is done by AC_PROG_CC
     1.5  AM_PROG_CC_C_O
     1.6  
     1.7 -# we require the current C standard
     1.8 -AC_PROG_CC_STDC
     1.9 +# we want c11, and may fall back to c99
    1.10 +AX_CHECK_COMPILE_FLAG([-std=c11],
    1.11 +    [AX_APPEND_FLAG([-std=c11])],
    1.12 +    [AC_PROG_CC_C99]
    1.13 +)
    1.14  
    1.15  # where to place config macros
    1.16  AC_CONFIG_HEADERS([config.h])

mercurial