From 99566443fdc919aa0216efe78d68a2b1f781d307 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 5 Oct 2010 23:36:39 +0000 Subject: [PATCH] (trunk) #3602 "GCC option not supported" -- only use -Wvariadic-macros if gcc >= 4.3 --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 98adeae72..ce780616a 100644 --- a/configure.ac +++ b/configure.ac @@ -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