If the LHS of an "expr LHS : RHS" expression has an X added to avoid

confusing expr if the LHS is an empty string, the RHS needs it as well.

Also, fix some typoes ("$X" rather than "X$"), and use lower-case "x",
as that's what's used elsewhere when doing that sort of thing.

svn path=/trunk/; revision=50331
This commit is contained in:
Guy Harris 2013-07-02 23:56:32 +00:00
parent b4dca0fbd2
commit f4361b8e38
1 changed files with 4 additions and 4 deletions

View File

@ -1653,10 +1653,10 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
#
AC_MSG_CHECKING(whether we can add $GCC_OPTION to CFLAGS)
CFLAGS_saved="$CFLAGS"
if expr "X$GCC_OPTION" : "-W.*" >/dev/null
if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
then
CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
elif expr "X$GCC_OPTION" : "-f.*" >/dev/null
elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
then
CFLAGS="$CFLAGS -Werror $GCC_OPTION"
fi
@ -1722,10 +1722,10 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
#
AC_MSG_CHECKING(whether we can add $GCC_OPTION to CXXFLAGS)
CXXFLAGS_saved="$CXXFLAGS"
if expr "$XGCC_OPTION" : "-W.*" >/dev/null
if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
then
CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
elif expr "$XGCC_OPTION" : "-f.*" >/dev/null
elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
then
CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
fi