[libpeas] Enable building with older gobject-introspection



commit 73dcebbbf5693d4a72e1b22fe475d61bc8449185
Author: Chris Lord <chris linux intel com>
Date:   Fri Aug 6 17:20:40 2010 +0100

    Enable building with older gobject-introspection
    
    Reduce the version requirement of gobject-introspection to 0.6.9.

 configure.ac          |   13 +++++++++++--
 libpeas/Makefile.am   |    2 +-
 libpeasui/Makefile.am |    2 +-
 3 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 121ee81..c53eb03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,7 +72,7 @@ PKG_CHECK_MODULES(PEAS, [
 	glib-2.0 >= 2.18.0
 	gobject-2.0 >= 2.23.6
 	gmodule-2.0 >= 2.18.0
-	gobject-introspection-1.0 >= 0.9.0
+	gobject-introspection-1.0 >= 0.6.9
 ])
 
 dnl ================================================================
@@ -134,7 +134,16 @@ dnl ================================================================
 dnl GObject Introspection
 dnl ================================================================
 
-GOBJECT_INTROSPECTION_REQUIRE([0.9.0])
+GOBJECT_INTROSPECTION_REQUIRE([0.6.9])
+
+PKG_CHECK_EXISTS([gobject-introspection >= 0.9.0],
+                 [enable_gir_args=yes],
+                 [enable_gir_args=no])
+
+if test "$enable_gi_flags" = "yes"; then
+	PEAS_GIR_SCANNER_ARGS="--warn-all"
+	AC_SUBST(PEAS_GIR_SCANNER_ARGS)
+fi
 
 dnl ================================================================
 dnl Seed Javascript Engine
diff --git a/libpeas/Makefile.am b/libpeas/Makefile.am
index 885d950..f272fce 100644
--- a/libpeas/Makefile.am
+++ b/libpeas/Makefile.am
@@ -82,7 +82,7 @@ if HAVE_INTROSPECTION
   INTROSPECTION_SCANNER_ARGS = \
 	-I$(top_srcdir) 		\
 	--c-include=libpeas/peas.h	\
-	--warn-all
+	$(PEAS_GIR_SCANNER_ARGS)
 
   introspection_sources = $(INST_H_FILES) $(C_FILES)
 
diff --git a/libpeasui/Makefile.am b/libpeasui/Makefile.am
index 6dbc41e..411c9cc 100644
--- a/libpeasui/Makefile.am
+++ b/libpeasui/Makefile.am
@@ -46,7 +46,7 @@ if HAVE_INTROSPECTION
   INTROSPECTION_SCANNER_ARGS = \
 	--add-include-path=$(top_builddir)/libpeas	\
 	--c-include=libpeasui/peas-ui.h			\
-	--warn-all
+	$(PEAS_GIR_SCANNER_ARGS)
   INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir)/libpeas
 
   introspection_sources = $(INST_H_FILES) $(C_FILES)



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