[evolution-ews] Use version-based GLib/GDK/GTK+ warnings.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Use version-based GLib/GDK/GTK+ warnings.
- Date: Wed, 28 Nov 2012 22:05:34 +0000 (UTC)
commit 5ab53bbb3a42799245d6a4bbf3292b0209eae6f1
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Nov 28 16:54:29 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 cleam 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 5d8027d..1de9e26 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,8 +18,15 @@ dnl Required Packages
dnl *******************
m4_define([eds_minimum_version], [3.2.0])
m4_define([evo_minimum_version], [3.2.0])
+
+dnl Keep these two definitions in agreement.
m4_define([glib_minimum_version], [2.28])
-m4_define([gtk_minimum_version], [3.0])
+m4_define([glib_encoded_version], [GLIB_VERSION_2_28])
+
+dnl Keep these two definitions in agreement.
+m4_define([gdk_minimum_version], [3.0])
+m4_define([gdk_encoded_version], [GDK_VERSION_3_0])
+
m4_define([libsoup_minimum_version], [2.30])
@@ -69,10 +76,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-nonliteral -Wformat-security -Winit-self
@@ -113,6 +120,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 ************
@@ -146,7 +164,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])
PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= libsoup_minimum_version)
AC_SUBST(SOUP_CFLAGS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]