summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-11 02:01:31 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-19 22:24:50 +0300
commitd7c3cd215f25380cd5db1e93ac549bbb441c60c5 (patch)
treefbb82466765dfb7227a3ff48e1d194d3b62f0841 /configure
parent1243ccae245b12134f841703957221c3157dda9a (diff)
downloadhercules-d7c3cd215f25380cd5db1e93ac549bbb441c60c5.tar.gz
hercules-d7c3cd215f25380cd5db1e93ac549bbb441c60c5.tar.bz2
hercules-d7c3cd215f25380cd5db1e93ac549bbb441c60c5.tar.xz
hercules-d7c3cd215f25380cd5db1e93ac549bbb441c60c5.zip
Add -Wvla flag into configure.
This flag prevent usage of variable length arrays.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure51
1 files changed, 50 insertions, 1 deletions
diff --git a/configure b/configure
index 4f85787af..7296be978 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac 8f7af789e.
+# From configure.ac 150dff284.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -7585,6 +7585,55 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wvla" >&5
+$as_echo_n "checking whether $CC supports -Wvla... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wvla"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wvla"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wvla" >&5
+$as_echo_n "checking whether $CC can actually use -Wvla... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wvla"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wvla"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-format-nonliteral" >&5
$as_echo_n "checking whether $CC supports -Wno-format-nonliteral... " >&6; }
OLD_CFLAGS="$CFLAGS"