guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 03/13: Use autoconf's ability to choose the latest versi


From: Mike Gran
Subject: [Guile-commits] 03/13: Use autoconf's ability to choose the latest version of C
Date: Sat, 15 Oct 2022 15:16:31 -0400 (EDT)

mike121 pushed a commit to branch main
in repository guile.

commit 78a98062a4c8ef3bb13b6493951036e81369cf87
Author: Mike Gran <spk121@yahoo.com>
AuthorDate: Thu Sep 15 03:34:19 2022 -0700

    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
---
 configure.ac | 16 ++++------------
 1 file 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]