X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=configure.ac;h=237189cf9449c8e63bb4566c3afb271994e69693;hb=refs%2Fheads%2F841143-bugfix;hp=932c741efeaefa3746545e6767f0d15f37298150;hpb=5c0ca5b715ab6b35b44df738153e05daa592d859;p=gnupg2.git diff --git a/configure.ac b/configure.ac index 932c741..237189c 100644 --- a/configure.ac +++ b/configure.ac @@ -1575,6 +1575,15 @@ if test "$GCC" = yes; then if test x"$_gcc_wopt" = xyes ; then mycflags="$mycflags -Wdeclaration-after-statement" fi + + AC_MSG_CHECKING([if gcc supports -Wlogical-op and -Wvla]) + CFLAGS="-Wlogical-op -Wvla" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no) + AC_MSG_RESULT($_gcc_wopt) + if test x"$_gcc_wopt" = xyes ; then + mycflags="$mycflags -Wlogical-op -Wvla" + fi + else mycflags="$mycflags -Wall" fi