diff options
| author | Jason Evans <jasone@canonware.com> | 2016-11-04 04:57:17 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2016-11-04 08:11:48 (GMT) |
| commit | cb3ad659f0e5c909b7df5c9cbe84ff429754c669 (patch) | |
| tree | fe603ecb3a14f435bbc82709e68cb2f0480f034e | |
| parent | 213667fe26ee30cb724d390c6047821960c57a34 (diff) | |
| download | jemalloc-cb3ad659f0e5c909b7df5c9cbe84ff429754c669.zip jemalloc-cb3ad659f0e5c909b7df5c9cbe84ff429754c669.tar.gz jemalloc-cb3ad659f0e5c909b7df5c9cbe84ff429754c669.tar.bz2 | |
Use -std=gnu11 if available.
This supersedes -std=gnu99, and enables C11 atomics.
| -rw-r--r-- | configure.ac | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 3a4f150..104fd99 100644 --- a/configure.ac +++ b/configure.ac @@ -171,9 +171,15 @@ fi if test "x$CFLAGS" = "x" ; then no_CFLAGS="yes" if test "x$GCC" = "xyes" ; then - JE_CFLAGS_APPEND([-std=gnu99]) - if test "x$je_cv_cflags_appended" = "x-std=gnu99" ; then +dnl JE_CFLAGS_APPEND([-std=gnu99]) + JE_CFLAGS_APPEND([-std=gnu11]) + if test "x$je_cv_cflags_appended" = "x-std=gnu11" ; then AC_DEFINE_UNQUOTED([JEMALLOC_HAS_RESTRICT]) + else + JE_CFLAGS_APPEND([-std=gnu99]) + if test "x$je_cv_cflags_appended" = "x-std=gnu99" ; then + AC_DEFINE_UNQUOTED([JEMALLOC_HAS_RESTRICT]) + fi fi JE_CFLAGS_APPEND([-Wall]) JE_CFLAGS_APPEND([-Werror=declaration-after-statement]) |
