# fi
fi
+
+dnl -----------------------------------
+dnl checks for compilers
+
+AM_PROG_CC_C_O
+AC_PROG_CC_C99
+AC_PROG_CXX
+AC_PROG_OBJC
+
+AC_C_INLINE
+
dnl ===========================================================================
dnl Set GCC compiler flags
if [test "${GCC}" == "yes"]
then
- # Enable c99
- CFLAGS="${CFLAGS} -std=c99"
-
- # When enabling c99 on this codebase, this POSIX version should be defined
- CFLAGS="${CFLAGS} -D_POSIX_C_SOURCE=200112L"
-
# Enable common warnings flags
CFLAGS="${CFLAGS} -Wall"
# Enable specific warning flags not included by -Wall or -Wextra
CFLAGS="${CFLAGS} -Wmissing-include-dirs -Wswitch-default -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs"
-# FIXME - The are not available of centos [6] - need smarter config:
-# -Wdouble-promotion -Wtrampolines -Wlogical-op
-
+ # if C99, then enable additional warnings
+ if [test "${ac_cv_prog_cc_c99}" != "no"]
+ then
+ # When enabling c99 on this codebase, this POSIX version should be defined
+ CFLAGS="${CFLAGS} -D_POSIX_C_SOURCE=200112L -Wdouble-promotion -Wtrampolines -Wlogical-op"
+ fi
fi
-
-dnl -----------------------------------
-dnl checks for compilers
-
-AM_PROG_CC_C_O
-#AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_OBJC
-
-AC_C_INLINE
-
# Workaround for native compilers
# HP : http://bugs.gnome.org/db/31/3163.html
# DEC : Enable NaN/Inf