summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-08-07 16:20:44 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-08-07 16:31:25 +0200
commit23e52b565fefcbe503395b618e58dfa5a98dd6e2 (patch)
tree93b359e24534f52bdc71322b396ba93c13d34612
parent29dc3d7df0a28c5296d6cae1bcaed5101ec75519 (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.ac6
1 files changed, 2 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index ebd9114..48aec92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,7 @@ fi
# CC
AC_PROG_CC
+AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL
AC_GNU_SOURCE
@@ -65,10 +66,7 @@ test_gcc_flag() {
# If using GCC specify some additional parameters
if test "x$GCC" = "xyes" ; then
-
- # We use gnu99 instead of c99 because many have interpreted the standard
- # in a way that int64_t isn't defined on non-64 bit platforms.
- DESIRED_FLAGS="-std=gnu99 -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 -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math"
+ 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 -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math"
for flag in $DESIRED_FLAGS ; do
AC_MSG_CHECKING([whether $CC accepts $flag])