diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-01-29 00:51:45 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-03-31 16:22:33 +0200 |
| commit | 8aa42b826c2037ddc68a32712caf2dfbda9981f8 (patch) | |
| tree | a70e29158d9699644665202f233d1ceb431fa676 | |
| parent | fbd0bae6d6dfa0af786c906b419e01bb389ead3e (diff) | |
build: bump to C11
Funnily enough, "gnu11" is gcc's default in 5.x if you don't specify
anything, yet there is no "AC_PROG_CC_C11" in autoconf.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| -rwxr-xr-x | configure.ac | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a8e820a237..b8cebd8d23 100755 --- a/configure.ac +++ b/configure.ac @@ -82,6 +82,7 @@ AM_PROG_CC_C_O dnl remove autoconf default "-g -O2" CFLAGS="$orig_cflags" AC_PROG_CC_C99 +dnl NB: see C11 below AC_PROG_EGREP PKG_PROG_PKG_CONFIG @@ -119,6 +120,13 @@ dnl ICC won't bail on unknown options without -diag-error 10006 dnl need to do this first so we get useful results for the other options AC_C_FLAG([-diag-error 10006]) +dnl AC_PROG_CC_C99 may change CC to include -std=gnu99 or something +ac_cc="$CC" +CC="${CC% -std=gnu99}" +CC="${CC% -std=c99}" + +AC_C_FLAG([-std=gnu11], [CC="$ac_cc"], [CC="$CC -std=gnu11"]) + dnl if the user specified any CFLAGS, we don't add "-g -Os/-O2" here if test "z$orig_cflags" = "z"; then AC_C_FLAG([-g]) |
