]> code.delx.au - pulseaudio/commitdiff
Use AC_PROG_CC_C99 to discover C99-compliant compiler.
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 8 Aug 2008 11:04:27 +0000 (13:04 +0200)
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 8 Aug 2008 13:09:32 +0000 (15:09 +0200)
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

index 4fa171f382bf086a61134a733e4b63579f6122f6..a7fbd1a1f6e5691f5ff1c1ffd77507b9e8ff7ff3 100644 (file)
@@ -86,6 +86,7 @@ AC_PROG_MKDIR_P
 # CC
 
 AC_PROG_CC
 # CC
 
 AC_PROG_CC
+AC_PROG_CC_C99
 AM_PROG_CC_C_O
 AC_PROG_GCC_TRADITIONAL
 AC_GNU_SOURCE
 AM_PROG_CC_C_O
 AC_PROG_GCC_TRADITIONAL
 AC_GNU_SOURCE
@@ -109,10 +110,7 @@ test_gcc_flag() {
 
 # If using GCC specify some additional parameters
 if test "x$GCC" = "xyes" ; then
 
 # 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])
 
     for flag in $DESIRED_FLAGS ; do
         AC_MSG_CHECKING([whether $CC accepts $flag])