aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2015-09-13 19:10:55 -0400
committerMichael Mann <mmann78@netscape.net>2015-09-18 01:37:25 +0000
commitcf0d762d7304aa569ea25faf999c74bbe94f9023 (patch)
tree31db57e26f7fde0b7219023b5056640d5bb1aec5
parent72f3b9f74cdf6dbc880c02c5af0315c323c5b7ea (diff)
do not clobber user CFLAGS
Bug: 10791 Change-Id: I58c35c757039e69111a39100f5ccb306e098d591 Reviewed-on: https://code.wireshark.org/review/10519 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--acinclude.m428
1 files changed, 14 insertions, 14 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 82b288a999..704d92408e 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1645,15 +1645,15 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
CFLAGS_saved="$CFLAGS"
if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
then
- CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
+ CFLAGS="$ac_wireshark_unknown_warning_option_error $GCC_OPTION $CFLAGS"
elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
then
- CFLAGS="$CFLAGS -Werror $GCC_OPTION"
+ CFLAGS="-Werror $GCC_OPTION $CFLAGS"
elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
then
- CFLAGS="$CFLAGS -Werror $GCC_OPTION"
+ CFLAGS="-Werror $GCC_OPTION $CFLAGS"
else
- CFLAGS="$CFLAGS $GCC_OPTION"
+ CFLAGS="$GCC_OPTION $CFLAGS"
fi
AC_COMPILE_IFELSE(
[
@@ -1682,14 +1682,14 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# added them, by setting CFLAGS to the saved value plus
# just the new option.
#
- CFLAGS="$CFLAGS_saved $GCC_OPTION"
+ CFLAGS="$GCC_OPTION $CFLAGS_saved"
if test "$CC" = "$CC_FOR_BUILD"; then
#
# We're building the build tools with the same compiler
# with which we're building Wireshark, so add the flags
# to the flags for that compiler as well.
#
- CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD $GCC_OPTION"
+ CFLAGS_FOR_BUILD="$GCC_OPTION $CFLAGS_FOR_BUILD"
fi
],
[
@@ -1702,14 +1702,14 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# added them, by setting CFLAGS to the saved value plus
# just the new option.
#
- CFLAGS="$CFLAGS_saved $GCC_OPTION"
+ CFLAGS="$GCC_OPTION $CFLAGS_saved"
if test "$CC" = "$CC_FOR_BUILD"; then
#
# We're building the build tools with the same compiler
# with which we're building Wireshark, so add the flags
# to the flags for that compiler as well.
#
- CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD $GCC_OPTION"
+ CFLAGS_FOR_BUILD="$GCC_OPTION $CFLAGS_FOR_BUILD"
fi
fi
],
@@ -1743,15 +1743,15 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
CXXFLAGS_saved="$CXXFLAGS"
if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
then
- CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
+ CXXFLAGS="$ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION $CXXFLAGS"
elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
then
- CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
+ CXXFLAGS="-Werror $GCC_OPTION $CXXFLAGS"
elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
then
- CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
+ CXXFLAGS="-Werror $GCC_OPTION $CXXFLAGS"
else
- CXXFLAGS="$CXXFLAGS $GCC_OPTION"
+ CXXFLAGS="$GCC_OPTION $CXXFLAGS"
fi
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(
@@ -1781,7 +1781,7 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# added them, by setting CXXFLAGS to the saved value plus
# just the new option.
#
- CXXFLAGS="$CXXFLAGS_saved $GCC_OPTION"
+ CXXFLAGS="$GCC_OPTION $CXXFLAGS_saved"
],
[
AC_MSG_RESULT(yes)
@@ -1793,7 +1793,7 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# added them, by setting CXXFLAGS to the saved value plus
# just the new option.
#
- CXXFLAGS="$CXXFLAGS_saved $GCC_OPTION"
+ CXXFLAGS="$GCC_OPTION $CXXFLAGS_saved"
fi
],
[