Use *, not *.*, as the wildcard pattern on UN*X.
[metze/wireshark/wip.git] / configure.ac
index 62027cb36e1b77be25aac192d3fc6f7805cdecb2..719ae06cefdfe05bcf9a5515b60bc406630c489f 100644 (file)
@@ -843,6 +843,16 @@ AC_SUBST(HAVE_OSX_PACKAGING)
 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.
@@ -1576,13 +1591,6 @@ GLIB_CFLAGS="$GLIB_CONFIG $GLIB_CFLAGS"
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
-# Check for GResource support
-PKG_CHECK_EXISTS([gio-2.0 >= 2.32 gdk-pixbuf-2.0 >= 2.26], [have_gresource=yes], [have_gresource=no])
-AM_CONDITIONAL(HAVE_GRESOURCE, test "x$have_gresource" = "xyes")
-if test "x$have_gresource" = "xyes"; then
-       AC_DEFINE(HAVE_GRESOURCE, 1, [Defined if GLib GResource is supported])
-fi
-
 GTK2_MIN_VERSION=2.12.0
 AC_SUBST(GTK2_MIN_VERSION)
 GTK3_MIN_VERSION=3.0.0
@@ -1816,6 +1824,20 @@ AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
 AC_SUBST(GUI_CONFIGURE_FLAGS)
 
+# Check for GTK GUI support for GResource pixbufs
+have_gresource_pixbuf=no
+if test "x$have_gtk" = "xyes"; then
+       AC_MSG_CHECKING(whether GDK-Pixbuf can load data using GResource)
+       PKG_CHECK_EXISTS([gio-2.0 >= 2.32 gdk-pixbuf-2.0 >= 2.26],
+         [
+          AC_MSG_RESULT(yes)
+          AC_DEFINE(HAVE_GDK_GRESOURCE, 1, [Defined if GResource is supported])
+          have_gresource_pixbuf=yes
+         ],
+         [AC_MSG_RESULT(no)])
+fi
+AM_CONDITIONAL(HAVE_GRESOURCE_PIXBUF, test "x$have_gresource_pixbuf" = "xyes")
+
 if test "$have_gtk" = "yes" -a "$have_qt" = "yes" ; then
        # We have both GTK and Qt and thus will be building both wireshark
        # and wireshark-gtk.
@@ -3481,4 +3503,4 @@ echo "                 Use libssh library : $libssh_message"
 echo "            Have ssh_userauth_agent : $ssh_userauth_agent_message"
 echo "                     Use nl library : $libnl_message"
 echo "              Use SBC codec library : $have_sbc"
-#echo "                      Use GResource : $have_gresource"
+#echo "       Use GDK-Pixbuf with GResource: $have_gresource_pixbuf"