[evolution] Use version-based GLib/GDK/GTK+ warnings.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Use version-based GLib/GDK/GTK+ warnings.
- Date: Wed, 28 Nov 2012 21:00:58 +0000 (UTC)
commit 19b26e86d0f995ef1b508a982a0c0ade605023b2
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Nov 28 14:54:24 2012 -0500
Use version-based GLib/GDK/GTK+ warnings.
Use GLIB_VERSION_MAX_ALLOWED and GDK_VERSION_MAX_ALLOWED to warn if we
accidentally use symbols that were introduced in versions subsequent to
our minimum requirement.
Use GLIB_VERSION_MIN_REQUIRED and GDK_VERSION_MIN_REQUIRED to suppress
deprecation warnings by version so we can clean them up incrementally.
The initial values produce a few deprecation warnings which should not
be terribly difficult to clean up.
configure.ac | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3b9ba33..7f5f844 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,8 +31,15 @@ dnl Automake 1.11 - Silent Build Rules
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl Required Packages
+
+dnl Keep these two definitions in agreement.
m4_define([glib_minimum_version], [2.34.0])
-m4_define([gtk_minimum_version], [3.4.0])
+m4_define([glib_encoded_version], [GLIB_VERSION_2_34])
+
+dnl Keep these two definitions in agreement.
+m4_define([gdk_minimum_version], [3.4.0])
+m4_define([gdk_encoded_version], [GDK_VERSION_3_4])
+
m4_define([eds_minimum_version], [evo_version])
m4_define([gtkhtml_minimum_version], [4.5.2])
m4_define([gnome_desktop_minimum_version], [2.91.3])
@@ -65,10 +72,10 @@ dnl Compiler Warning Flags
dnl ******************************
AS_COMPILER_FLAGS(WARNING_FLAGS,
"-Wall -Wextra
+ -Wdeprecated-declarations
-Wno-missing-field-initializers
-Wno-sign-compare
-Wno-unused-parameter
- -Wno-deprecated-declarations
-Wdeclaration-after-statement
-Werror-implicit-function-declaration
-Wformat-security -Winit-self
@@ -114,6 +121,17 @@ if test "x$enable_strict" = xyes; then
AM_CPPFLAGS="$AM_CPPFLAGS -DG_DISABLE_DEPRECATED -DE_BOOK_DISABLE_DEPRECATED -DE_CAL_DISABLE_DEPRECATED"
fi
+dnl Warn about GLib/GTK+ API usage that violates our minimum requirements.
+AM_CPPFLAGS="$AM_CPPFLAGS -DGLIB_VERSION_MAX_ALLOWED=glib_encoded_version"
+AM_CPPFLAGS="$AM_CPPFLAGS -DGDK_VERSION_MAX_ALLOWED=gdk_encoded_version"
+
+dnl These will suppress warnings about newly-deprecated symbols. Ideally
+dnl these settings should match our minimum requirements and we will clean
+dnl up any new deprecation warnings after bumping our minimum requirements.
+dnl But if the warnings get to be overwhelming, use fixed versions instead.
+AM_CPPFLAGS="$AM_CPPFLAGS -DGLIB_VERSION_MIN_REQUIRED=glib_encoded_version"
+AM_CPPFLAGS="$AM_CPPFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_0"
+
AC_SUBST(AM_CPPFLAGS)
AC_CANONICAL_HOST
@@ -260,8 +278,8 @@ PKG_CHECK_MODULES([GNOME_PLATFORM],
[gio-2.0 >= glib_minimum_version
gmodule-2.0 >= glib_minimum_version
cairo-gobject
- gtk+-3.0 >= gtk_minimum_version
- gail-3.0 >= gtk_minimum_version
+ gtk+-3.0 >= gdk_minimum_version
+ gail-3.0 >= gdk_minimum_version
libxml-2.0 >= libxml_minimum_version
shared-mime-info >= shared_mime_info_minimum_version
gnome-desktop-3.0 >= gnome_desktop_minimum_version
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]