mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 13:30:26 +02:00
Ensure autoconf doesn't downgrade us to C99
* configure.ac: Add -std=gnu11 if the compiler is GCC (or clang). This prevents AC_PROG_CC_C99 from downgrading us by adding -std=gnu99. Fixes regression whereby we were always using the fallback implementation of atomics.
This commit is contained in:
parent
668153dbb6
commit
7b6b86f255
1 changed files with 12 additions and 0 deletions
12
configure.ac
12
configure.ac
|
@ -66,6 +66,18 @@ AC_LIBTOOL_WIN32_DLL
|
|||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CC
|
||||
|
||||
# Sadly, there is no released version of Autoconf with a nice
|
||||
# C11-ensuring macro. This should work for gcc/clang within the last 5
|
||||
# years though.
|
||||
AC_MSG_CHECKING([how to enable C11 support])
|
||||
if test "$GCC" = yes; then
|
||||
AC_MSG_RESULT([-std=gnu11])
|
||||
CC="$CC -std=gnu11"
|
||||
else
|
||||
AC_MSG_RESULT([assuming $CC supports C11 by default])
|
||||
fi
|
||||
|
||||
gl_EARLY
|
||||
AC_PROG_CPP
|
||||
AC_PROG_SED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue