Add -std=gnu99 to CFLAGS if the compiler supports it.

This commit is contained in:
Erik de Castro Lopo 2005-09-24 07:11:19 +00:00
parent 403c5b55d9
commit dfa8b4998b
2 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,8 @@
* configure.ac
Make -Wdeclaration-after-statement work with --enable-gcc-werror configure
option.
Add -std=gnu99 (C99 plus posix style stuff like gmtime_r) to CFLAGS if the
compiler supports it.
2005-09-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>

View File

@ -395,6 +395,8 @@ else
# Now use the information from the checking stage.
if test x$ac_cv_c_compiler_gnu = xyes ; then
AC_ADD_CFLAGS(-std=gnu99)
CFLAGS="$CFLAGS -W -Wall"
AC_ADD_CFLAGS(-Wdeclaration-after-statement)