mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Use autoconf's ability to choose the latest version of C
Modern AC_PROG_CC will add flags to enable C11 when necessary. * configure.ac: remove AC_PROG_CC_C99, rely on updated AC_PROG_CC
This commit is contained in:
parent
bec1918b38
commit
78a98062a4
1 changed files with 4 additions and 12 deletions
16
configure.ac
16
configure.ac
|
@ -106,19 +106,11 @@ case "$enable_lto" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Sadly, there is no released version of Autoconf with a nice
|
AC_MSG_CHECKING([compiler's C standard])
|
||||||
# C11-ensuring macro. This should work for gcc/clang within the last 5
|
if test "$ac_prog_cc_stdc" = "c89"; then
|
||||||
# years though.
|
AC_MSG_ERROR([Support for C99 required but not found.])
|
||||||
AC_MSG_CHECKING([how to enable C11 support])
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
AC_MSG_RESULT([-std=gnu11])
|
|
||||||
CC="$CC -std=gnu11"
|
|
||||||
else
|
else
|
||||||
dnl Guile requires C99 or later.
|
AC_MSG_RESULT([$ac_prog_cc_stdc])
|
||||||
AC_PROG_CC_C99
|
|
||||||
if test "$ac_cv_prog_cc_c99" = "xno"; then
|
|
||||||
AC_MSG_ERROR([Support for C99 required but not found.])
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Gnulib uses gperf when building from git
|
# Gnulib uses gperf when building from git
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue