diff options
author | Haru <haru@dotalux.com> | 2018-08-26 15:03:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-26 15:03:22 +0200 |
commit | 42f36d1ee5dcc89e288c6ac128be0ff6ed0985e0 (patch) | |
tree | 4b164ce3b338c216787403e79898facb00834231 /configure | |
parent | 234189f34e5f055c82654b8cd35330822e8aa4d7 (diff) | |
parent | 4da22050a04f9cd45097dbdc678ab20971f5570b (diff) | |
download | hercules-42f36d1ee5dcc89e288c6ac128be0ff6ed0985e0.tar.gz hercules-42f36d1ee5dcc89e288c6ac128be0ff6ed0985e0.tar.bz2 hercules-42f36d1ee5dcc89e288c6ac128be0ff6ed0985e0.tar.xz hercules-42f36d1ee5dcc89e288c6ac128be0ff6ed0985e0.zip |
Merge pull request #2189 from MishimaHaruna/c11
Change the language specification to C11 in the autoconf-based builds
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 47 |
1 files changed, 45 insertions, 2 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac 515eed8ee. +# From configure.ac 234189f34. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -4776,7 +4776,50 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # -Werror-implicit-function-declaration -Wtrampolines # -Wjump-misses-init -CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c11" >&5 +$as_echo_n "checking whether $CC supports -std=c11... " >&6; } +OLD_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -std=c11" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c1x" >&5 +$as_echo_n "checking whether $CC supports -std=c1x... " >&6; } + CFLAGS="$OLD_CFLAGS -std=c1x" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, falling back to -std=c99" >&5 +$as_echo "no, falling back to -std=c99" >&6; } + CFLAGS="$OLD_CFLAGS -std=c99" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare" CPPFLAGS="$CPPFLAGS -I../common" LDFLAGS="$LDFLAGS" |