[evolution-mapi] Use version-based GLib/GDK/GTK+ warnings.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Use version-based GLib/GDK/GTK+ warnings.
- Date: Wed, 28 Nov 2012 22:10:21 +0000 (UTC)
commit 5f88ac45b079eaae3419f97aa2a8b555f05b2377
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Nov 28 17:04:57 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 no deprecation warnings.
configure.ac | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7c63ccd..fcb4c69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,8 +28,14 @@ dnl *******************
m4_define([eds_minimum_version], [ema_version])
m4_define([evo_minimum_version], [ema_version])
m4_define([libmapi_minimum_version], [1.0])
-m4_define([glib_minimum_version], [2.32.0])
-m4_define([gtk_minimum_version], [2.99.2])
+
+dnl Keep these two definitions in agreement.
+m4_define([glib_minimum_version], [2.32])
+m4_define([glib_encoded_version], [GLIB_VERSION_2_32])
+
+dnl Keep these two definitions in agreement.
+m4_define([gdk_minimum_version], [3.0])
+m4_define([gdk_encoded_version], [GDK_VERSION_3_0])
dnl ***********************************
dnl Automake 1.11 - Silent Build Rules
@@ -53,6 +59,7 @@ dnl Compiler Warning Flags
dnl ***********************
AS_COMPILER_FLAGS(WARNING_FLAGS,
"-Wall -Wextra
+ -Wdeprecated-declarations
-Wno-missing-field-initializers
-Wno-sign-compare
-Wno-unused-parameter
@@ -96,6 +103,17 @@ if test "x$enable_strict" = xyes; then
CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DE_BOOK_DISABLE_DEPRECATED -DE_CAL_DISABLE_DEPRECATED"
fi
+dnl Warn about GLib/GTK+ API usage that violates our minimum requirements.
+CFLAGS="$CFLAGS -DGLIB_VERSION_MAX_ALLOWED=glib_encoded_version"
+CFLAGS="$CFLAGS -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.
+CFLAGS="$CFLAGS -DGLIB_VERSION_MIN_REQUIRED=glib_encoded_version"
+CFLAGS="$CFLAGS -DGDK_VERSION_MIN_REQUIRED=gdk_encoded_version"
+
dnl ************
dnl i18n stuff
dnl ************
@@ -122,7 +140,7 @@ dnl Check for GNOME Platform
dnl *****************************
PKG_CHECK_MODULES(GNOME_PLATFORM,
[glib-2.0 >= glib_minimum_version
- gtk+-3.0 >= gtk_minimum_version])
+ gtk+-3.0 >= gdk_minimum_version])
dnl ********************************
dnl Check for evolution-data-server
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]