aboutsummaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m424
1 files changed, 16 insertions, 8 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index ced7921a21..ff611b8162 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1675,10 +1675,14 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# just the new option.
#
CFLAGS="$CFLAGS_saved $GCC_OPTION"
- #
- # Add it to the flags we use when building build tools.
- #
- CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD $GCC_OPTION"
+ 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"
+ fi
],
[
AC_MSG_RESULT(yes)
@@ -1691,10 +1695,14 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# just the new option.
#
CFLAGS="$CFLAGS_saved $GCC_OPTION"
- #
- # Add it to the flags we use when building build tools.
- #
- CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD $GCC_OPTION"
+ 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"
+ fi
fi
],
[