[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
- [Guile-commits] branch main updated (bc3b1a4e2 -> 1ddc4eb96), Mike Gran, 2022/10/15
- [Guile-commits] 01/13: Update libtool initialization in configure script, Mike Gran, 2022/10/15
- [Guile-commits] 02/13: Presume const is always available, Mike Gran, 2022/10/15
- [Guile-commits] 05/13: Remove AC_HEADER_STDC from configure.ac, Mike Gran, 2022/10/15
- [Guile-commits] 06/13: Presume ISO C90 headers are always available, Mike Gran, 2022/10/15
- [Guile-commits] 13/13: Fixes arg type for scm_integer_from_mpz, Mike Gran, 2022/10/15
- [Guile-commits] 10/13: Modernizes labels-as-values.m4, Mike Gran, 2022/10/15
- [Guile-commits] 11/13: Presumes signal handler return void, Mike Gran, 2022/10/15
- [Guile-commits] 08/13: Presume time.h and sys/time.h don't conflict when included, Mike Gran, 2022/10/15
- [Guile-commits] 03/13: Use autoconf's ability to choose the latest version of C,
Mike Gran <=
- [Guile-commits] 07/13: Presume ISO C90 functions are always available, Mike Gran, 2022/10/15
- [Guile-commits] 04/13: Remove obsolete macro AM_PROG_CC_C_O in configure script, Mike Gran, 2022/10/15
- [Guile-commits] 09/13: Remove special logic for the obscure CMU C library's libc.h, Mike Gran, 2022/10/15
- [Guile-commits] 12/13: autoupdate acinclude.m4, Mike Gran, 2022/10/15