[gtksourceview] Build with deprecations and GSEAL enabled



commit f642c6303da1243a0465ab67d874fb73db23e133
Author: Garrett Regier <alias301 gmail com>
Date:   Mon May 31 10:11:14 2010 -0700

    Build with deprecations and GSEAL enabled

 configure.ac                                       |   23 +++++++++++++++++++-
 gtksourceview/.cvsignore                           |    7 ------
 gtksourceview/Makefile.am                          |    2 +-
 .../completion-providers/words/Makefile.am         |    2 +-
 gtksourceview/gseal-gtk-compat.h                   |    2 +-
 tests/Makefile.am                                  |    2 +-
 6 files changed, 26 insertions(+), 12 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 336f16e..ef1c435 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,28 @@ AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
 
 # Compile warnings
 GNOME_COMPILE_WARNINGS([maximum])
-#GNOME_MAINTAINER_MODE_DEFINES
+
+if test "$USE_MAINTAINER_MODE" = "yes"; then
+	enable_deprecations=yes
+else
+	enable_deprecations=no
+fi
+
+AC_ARG_ENABLE(deprecations,
+              [AS_HELP_STRING([--enable-deprecations],
+                              [warn about deprecated usages [default=no]])],
+              [enable_deprecations=$enableval], [])
+
+if test "$enable_deprecations" = "yes"; then
+   DISABLE_DEPRECATED_CFLAGS="\
+-DGSEAL_ENABLE \
+-DG_DISABLE_DEPRECATED \
+-DGDK_DISABLE_DEPRECATED \
+-DGTK_DISABLE_DEPRECATED \
+-DGDK_PIXBUF_DISABLE_DEPRECATED \
+-DGNOME_DISABLE_DEPRECATED"
+   AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
+fi
 
 PKG_CHECK_EXISTS([gtk+-3.0 >= 2.90],
 		 [
diff --git a/gtksourceview/Makefile.am b/gtksourceview/Makefile.am
index 64675fa..6e1dfd7 100644
--- a/gtksourceview/Makefile.am
+++ b/gtksourceview/Makefile.am
@@ -6,7 +6,7 @@ INCLUDES = 				\
 	-DDATADIR=\""$(datadir)"\" 	\
 	-DG_LOG_DOMAIN=\"GtkSourceView\"\
 	-I$(top_srcdir) -I$(srcdir) 	\
-	$(DISABLE_DEPRECATED)		\
+	$(DISABLE_DEPRECATED_CFLAGS)	\
 	$(WARN_CFLAGS) 			\
 	$(IGE_MAC_CFLAGS)		\
 	$(DEP_CFLAGS)
diff --git a/gtksourceview/completion-providers/words/Makefile.am b/gtksourceview/completion-providers/words/Makefile.am
index 231e558..3c9e07f 100644
--- a/gtksourceview/completion-providers/words/Makefile.am
+++ b/gtksourceview/completion-providers/words/Makefile.am
@@ -2,7 +2,7 @@ INCLUDES = 				\
 	-DDATADIR=\""$(datadir)"\" 	\
 	-DG_LOG_DOMAIN=\"GtkSourceView\"\
 	-I$(top_srcdir) -I$(srcdir) 	\
-	$(DISABLE_DEPRECATED)		\
+	$(DISABLE_DEPRECATED_CFLAGS)	\
 	$(WARN_CFLAGS) 			\
 	$(DEP_CFLAGS)
 
diff --git a/gtksourceview/gseal-gtk-compat.h b/gtksourceview/gseal-gtk-compat.h
index 81602a0..7ca287b 100644
--- a/gtksourceview/gseal-gtk-compat.h
+++ b/gtksourceview/gseal-gtk-compat.h
@@ -23,7 +23,7 @@
 
 G_BEGIN_DECLS
 
-#if !GTK_CHECK_VERSION (2, 22, 0)
+#if !GTK_CHECK_VERSION (2, 21, 0)
 #define gtk_text_view_im_context_filter_keypress(view, event)   (gtk_im_context_filter_keypress (GTK_TEXT_VIEW (view)->im_context, event))
 #define gtk_text_view_get_hadjustment(view)                     (GTK_TEXT_VIEW (view)->hadjustment)
 #endif /* GTK < 2.22.0 */
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 440eff1..0abffd7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -3,7 +3,7 @@ INCLUDES = 				\
 	-DG_LOG_DOMAIN=\"GtkSourceView\"\
 	-I$(top_srcdir) -I$(srcdir) 	\
 	-DTOP_SRCDIR=\""$(ABS_TOP_SRCDIR)"\"\
-	$(DISABLE_DEPRECATED)		\
+	$(DISABLE_DEPRECATED_CFLAGS)	\
 	$(WARN_CFLAGS) 			\
 	$(DEP_CFLAGS)			\
 	$(TESTS_CFLAGS)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]