aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-02-23 19:29:22 +0000
committerPeter Wu <peter@lekensteyn.nl>2016-02-24 12:14:13 +0000
commite8e084a05295b3694bdc1b8f3af801ae18cea1c9 (patch)
tree7aecc4b515aa0af62cef3abd928f79fe49f06bb9 /configure.ac
parent7c15566fa1a92c2970cfd00331efad9b08c50241 (diff)
Check for clang before trying to add -Q flag
Change-Id: I91a9d8fd4ae6623b3719a3927da1d1b714f08b04 Reviewed-on: https://code.wireshark.org/review/14106 Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 62027cb36e..0b24b2481d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -844,6 +844,16 @@ AC_CHECK_PROG(have_sw_vers, sw_vers, "yes", "no")
AM_CONDITIONAL(NOT_OS_X, test "x$have_sw_vers" = "xno")
#
+# Check compiler vendor. For GCC this will be 'gnu' and for Clang 'clang'.
+#
+AX_COMPILER_VENDOR
+if test "x$CXX" != "x" ; then
+ AC_LANG_PUSH(C++)
+ AX_COMPILER_VENDOR
+ AC_LANG_POP
+fi
+
+#
# Some compilers have to be told to fail when passed an unknown -W flag;
# make sure we do that.
#
@@ -1039,7 +1049,12 @@ AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wshorten-64-to-32, C)
# Clang only. Avoid "argument unused during compilation" warnings
# (for example, when getting the -gsplit-dwarf option or
# when combining -fwrapv with -fno-strict-overflow)
-AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Qunused-arguments)
+if test x"$ax_cv_c_compiler_vendor" = xclang; then
+ AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Qunused-arguments, C)
+fi
+if test x"$ax_cv_cxx_compiler_vendor" = xclang; then
+ AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Qunused-arguments, CXX)
+fi
#
# Use the faster pre gcc 4.5 floating point precision if available.