diff options
author | Mike Gran <spk121@yahoo.com> | 2022-09-15 03:34:19 -0700 |
---|---|---|
committer | Mike Gran <spk121@yahoo.com> | 2022-10-14 08:40:23 -0700 |
commit | 78a98062a4c8ef3bb13b6493951036e81369cf87 (patch) | |
tree | c694dee4d4c65e5871313acdbc4d3d3d108ba737 | |
parent | bec1918b38b26e233caf8f1d2cf3929563a328f5 (diff) | |
download | guile-78a98062a4c8ef3bb13b6493951036e81369cf87.tar.gz |
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
-rw-r--r-- | configure.ac | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index b322a75bf..e78d3c8a7 100644 --- a/configure.ac +++ b/configure.ac @@ -106,19 +106,11 @@ case "$enable_lto" in ;; esac -# 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" +AC_MSG_CHECKING([compiler's C standard]) +if test "$ac_prog_cc_stdc" = "c89"; then + AC_MSG_ERROR([Support for C99 required but not found.]) else - dnl Guile requires C99 or later. - AC_PROG_CC_C99 - if test "$ac_cv_prog_cc_c99" = "xno"; then - AC_MSG_ERROR([Support for C99 required but not found.]) - fi + AC_MSG_RESULT([$ac_prog_cc_stdc]) fi # Gnulib uses gperf when building from git |