diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-08-07 12:20:37 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-08-26 19:50:40 +0200 |
commit | 28db0b43c2bd6f6605373733a164a372315d61a7 (patch) | |
tree | b1a327a0187d8d3820cbe192ffda19a97c7fbaa2 | |
parent | c5eb229e653458ba8b94adb6aac8ca2572e85e21 (diff) |
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.
-rw-r--r-- | configure.ac | 3 |
1 files changed, 2 insertions, 1 deletions
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]) |