diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2013-01-04 02:12:51 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2013-01-04 02:12:51 +0000 |
commit | 3be49bedd126c4a4446d6f05fafe653fa2578b03 (patch) | |
tree | 22502b2c5c29ef9b000979ad6a6759d0bbf35204 /acinclude.m4 | |
parent | 6ea36c51c3b912d139833f033bd5d23649e9aea3 (diff) |
In AC_WIRESHARK_GCC_CFLAGS_CHECK() don't check if $3 (the program to be run)
exists by doing:
if test "x$3" != "x" ; then
because if the program contains quotes it breaks the shell's parsing.
Instead test for the existence of $4 (which is mandatory if $3 is given).
Fix up the test program for -Wlogical-op so that it actually compiles
warning-free (at least on my system) when the compiler doesn't have the bug
we're checking for.
svn path=/trunk/; revision=46926
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index a17c7a1328..c1d1704f34 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -785,10 +785,10 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[ LIBS="$LIBS -L$lua_dir/lib -llua -lm" wireshark_save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$lua_dir/lib" - + # # Determine Lua version by reading the LUA_VERSION_NUM definition - # from lua.h under the given Lua directory. The value is 501 for + # from lua.h under the given Lua directory. The value is 501 for # Lua 5.1, 502 for Lua 5.2, etc. # AC_MSG_CHECKING(Lua version) @@ -1641,7 +1641,10 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then # whether it fails with this option and -Werror, # and, if so, don't include it. # - if test "x$3" != "x" ; then + # We test arg 4 here because arg 3 is a program which + # could contain quotes (breaking the comparison). + # + if test "x$4" != "x" ; then CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(whether $GCC_OPTION $4) AC_COMPILE_IFELSE([ @@ -1705,7 +1708,10 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then # whether it fails with this option and -Werror, # and, if so, don't include it. # - if test "x$3" != "x" ; then + # We test arg 4 here because arg 3 is a program which + # could contain quotes (breaking the comparison). + # + if test "x$4" != "x" ; then CXXFLAGS="$CXXFLAGS -Werror" AC_MSG_CHECKING(whether $GCC_OPTION $4) AC_COMPILE_IFELSE([ |