From 28db0b43c2bd6f6605373733a164a372315d61a7 Mon Sep 17 00:00:00 2001 From: Diego 'Flameeyes' Pettenò Date: Thu, 7 Aug 2008 12:20:37 +0200 Subject: Use AC_PROG_CC_C99 to discover C99-compliant compiler. Instead of just checking if the compiler supports -std=c99 option, make use of the autoconf macro for discovering C99. This way other non-GCC compiler could be used in C99 mode too. --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 00a3910..b76b6d5 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,7 @@ fi # Checks for programs. AC_PROG_CC +AC_PROG_CC_C99 AC_PROG_CPP AC_USE_SYSTEM_EXTENSIONS @@ -57,7 +58,7 @@ test_gcc_flag() { # If using GCC specify some additional parameters if test "x$GCC" = "xyes" ; then - DESIRED_FLAGS="-std=c99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter" + DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter" for flag in $DESIRED_FLAGS ; do AC_MSG_CHECKING([whether $CC accepts $flag]) -- cgit