summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-08-07 13:54:41 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-08-07 13:54:41 +0200
commit247d9c0b5c2315bc5fb9826fbcd168ad3bda63de (patch)
treec50deb9b9f5b7a8e6c94d138c374ed24b6f1e602
parentcb71a67c1224c0c2f8ce475f2ae620e8a8d9db88 (diff)
Use AC_PROG_CC_C99 to discover C99-compliant compiler.
Instead of just checking if the compiler supports -std=gnu99 option, make use of the autoconf macro for discovering C99. This way other non-GCC compiler could be used in C99 mode too. If the compiler does not support gnu99 it falls back to c99, giving more chances that it would work than leaving it to default.
-rw-r--r--configure.ac5
1 files changed, 2 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index b97467a..cb475e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,7 @@ fi
# Checks for programs.
AC_PROG_CC
+AC_PROG_CC_C99 dnl This enable gnu99 if present
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CXX
AC_PROG_MAKE_SET
@@ -54,9 +55,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])