summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure18
1 files changed, 16 insertions, 2 deletions
diff --git a/configure b/configure
index 561976e6..68ceb513 100755
--- a/configure
+++ b/configure
@@ -167,8 +167,9 @@ nm='$(cross)$(tool_prefix)nm'
opt_flags='-O2 -fno-stack-protector'
lang_flags='-D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200112 -D_GNU_SOURCE'
diag_flags="-Wall -Wextra -Werror=implicit-function-declaration \
- -Werror=missing-prototypes -Werror=strict-prototypes -Werror=vla \
- -Werror=old-style-definition -Werror=declaration-after-statement"
+ -Werror=missing-prototypes -Werror=strict-prototypes \
+ -Werror=old-style-definition"
+diag_flags_given=
debug_flags=-g
debug_only_flags=-DTXR_DEBUG
debug_also=
@@ -1055,6 +1056,19 @@ else
printf "okay\n"
fi
+if ! [ $diag_flags_given ] ; then
+ for opt in -Werror=vla -Werror=declaration-after-statement ; do
+ printf "Checking for %s ... " $opt
+
+ if conftest EXTRA_FLAGS="-Werror $opt" ; then
+ printf "yes\n"
+ diag_flags="$diag_flags $opt"
+ else
+ printf "no\n"
+ fi
+ done
+fi
+
printf "Checking compiler version for various workarounds ... "
output=$($make conftest.ccver)