[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/09: Use autoconf's ability to choose the latest versi
From: |
Mike Gran |
Subject: |
[Guile-commits] 03/09: Use autoconf's ability to choose the latest version of C |
Date: |
Fri, 16 Sep 2022 00:44:02 -0400 (EDT) |
mike121 pushed a commit to branch wip-modernize-autotools
in repository guile.
commit d831b8733a1195ba95fa83d587032a25db629f15
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 cc2260ab1..ac25615c7 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
- [Guile-commits] branch wip-modernize-autotools created (now eb9e547e6), Mike Gran, 2022/09/16
- [Guile-commits] 02/09: Presume const is always available, Mike Gran, 2022/09/16
- [Guile-commits] 03/09: Use autoconf's ability to choose the latest version of C,
Mike Gran <=
- [Guile-commits] 01/09: Update libtool initialization in configure script, Mike Gran, 2022/09/16
- [Guile-commits] 04/09: Remove obsolete macro AM_PROG_CC_C_O in configure script, Mike Gran, 2022/09/16
- [Guile-commits] 07/09: Presume ISO C90 functions are always available, Mike Gran, 2022/09/16
- [Guile-commits] 09/09: Remove special logic for the obscure CMU C library's libc.h, Mike Gran, 2022/09/16
- [Guile-commits] 05/09: Remove AC_HEADER_STDC from configure.ac, Mike Gran, 2022/09/16
- [Guile-commits] 06/09: Presume ISO C90 headers are always available, Mike Gran, 2022/09/16
- [Guile-commits] 08/09: Presume time.h and sys/time.h don't conflict when included, Mike Gran, 2022/09/16