[Spice-commits] 2 commits - configure.ac gtk/Makefile.am m4/spice-compile-warnings.m4
Marc-André Lureau
elmarco at kemper.freedesktop.org
Wed Feb 6 10:28:53 PST 2013
configure.ac | 13 ++++++++++++-
gtk/Makefile.am | 1 -
m4/spice-compile-warnings.m4 | 16 +++++++---------
3 files changed, 19 insertions(+), 11 deletions(-)
New commits:
commit b96f7bc26c92c400435144cd0f751820e67af33b
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Wed Feb 6 19:28:00 2013 +0100
build-sys: don't use -Wstrict-prototypes with Gtk+ 2.0
diff --git a/configure.ac b/configure.ac
index 2a5c72c..f02552f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -627,7 +627,18 @@ fi
dnl ===========================================================================
dnl check compiler flags
-SPICE_COMPILE_WARNINGS
+# We want to enable these, but need to sort out the
+# decl mess with gtk/generated_*.c
+dontwarn="-Wmissing-prototypes -Wmissing-declarations"
+
+# We want to enable these, but Gtk+2.0 has a bad decl
+# gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function declaration
+# isn't a prototype.
+if test "$with_gtk" = "2.0"; then
+ dontwarn="$dontwarn -Wstrict-prototypes"
+fi
+
+SPICE_COMPILE_WARNINGS([$dontwarn])
SPICE_CFLAGS="$SPICE_CFLAGS $WARN_CFLAGS"
diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
index 3c7e0d3..31fc0fc 100644
--- a/m4/spice-compile-warnings.m4
+++ b/m4/spice-compile-warnings.m4
@@ -1,7 +1,8 @@
-dnl
-dnl Enable all known GCC compiler warnings, except for those
-dnl we can't yet cope with
-dnl
+# SPICE_COMPILE_WARNINGS(DONTWARN)
+# --------------------------------------------------------
+# Enable all known GCC compiler warnings, except for those
+# we can't yet cope with
+#
AC_DEFUN([SPICE_COMPILE_WARNINGS],[
dnl ******************************
dnl More compiler warnings
@@ -19,6 +20,8 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
# List of warnings that are not relevant / wanted
+ dontwarn=$1
+
# Don't care about C++ compiler compat
dontwarn="$dontwarn -Wc++-compat"
dontwarn="$dontwarn -Wabi"
@@ -59,11 +62,6 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
dontwarn="$dontwarn -Wbad-function-cast"
dontwarn="$dontwarn -Wshadow"
- # We want to enable thse, but need to sort out the
- # decl mess with gtk/generated_*.c
- dontwarn="$dontwarn -Wmissing-prototypes"
- dontwarn="$dontwarn -Wmissing-declarations"
-
# Get all possible GCC warnings
gl_MANYWARN_ALL_GCC([maybewarn])
commit 15bd7ceba1434b5d710bfd16078044f30693467b
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Wed Feb 6 18:47:35 2013 +0100
build-sys: remove GTK_DISABLE_DEPRECATED
Gtk 3.0 no longer includes deprecated headers if it's defined:
http://git.gnome.org/browse/gtk+/commit/?id=a1de67f438f057711353a55b322babce7044226f
We added it as a workaround for Gtk 2.0 build issue.
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index d7cdbc5..eb64b13 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -69,7 +69,6 @@ KEYMAP_GEN = $(srcdir)/keymap-gen.pl
SPICE_COMMON_CPPFLAGS = \
-DG_LOG_DOMAIN=\"GSpice\" \
-DSPICE_NO_DEPRECATED \
- -DGTK_DISABLE_DEPRECATED \
-DSW_CANVAS_CACHE \
-DSPICE_GTK_LOCALEDIR=\"${SPICE_GTK_LOCALEDIR}\" \
-DPNP_IDS=\""$(PNP_IDS)"\" \
More information about the Spice-commits
mailing list