(trunk) #3602 "GCC option not supported" -- only use -Wvariadic-macros if gcc >= 4.3

This commit is contained in:
Charles Kerr 2010-10-05 23:36:39 +00:00
parent 0b7d2b25a1
commit 99566443fd
1 changed files with 5 additions and 1 deletions

View File

@ -85,7 +85,7 @@ AC_PROG_CXX
AC_C_INLINE
if test "x$GCC" = "xyes" ; then
CFLAGS="$CFLAGS -std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings -Wvariadic-macros -Waggregate-return -Winline -Wfloat-equal"
CFLAGS="$CFLAGS -std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings -Waggregate-return -Winline -Wfloat-equal"
dnl figure out gcc version
AC_MSG_CHECKING([gcc version])
@ -99,6 +99,10 @@ if test "x$GCC" = "xyes" ; then
dnl these were added in 3.4
CFLAGS="$CFLAGS -Wextra -Wdeclaration-after-statement -Winit-self"
fi
if test $GCC_VERSION_NUM -ge 403; then
dnl these were added in 4.3
CFLAGS="$CFLAGS -Wvariadic-macros"
fi
fi
AC_HEADER_STDC