[libgsf] Add gobject introspection support. [#610340]
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsf] Add gobject introspection support. [#610340]
- Date: Mon, 6 Feb 2012 19:44:04 +0000 (UTC)
commit 51cc3c1256c3e68d8988139706e989897ff67c1d
Author: Jean Brefort <jean brefort normalesup org>
Date: Mon Feb 6 20:43:07 2012 +0100
Add gobject introspection support. [#610340]
ChangeLog | 6 ++++++
NEWS | 3 +++
configure.in | 26 ++++++++++++++++++++++++++
gsf/Makefile.am | 35 +++++++++++++++++++++++++++++++++++
4 files changed, 70 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ef3cd03..ba3c12e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-06 Jean Brefort <jean brefort normalesup org>
+
+ * configure.in: apply patch from Alan Knowles to add gobject introspection
+ support. [#610340]
+ * gsf/Makefile.am:
+
2011-12-15 Morten Welinder <terra gnome org>
* configure.in: Post-release bump.
diff --git a/NEWS b/NEWS
index 200b733..9e254fe 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
libgsf 1.14.23
+Alan Knowles:
+ * Add gobject introspection support. [#610340]
+
Antoine Jacoutot:
* OpenBSD portability fix.
diff --git a/configure.in b/configure.in
index 8b2ac6f..283c714 100644
--- a/configure.in
+++ b/configure.in
@@ -61,6 +61,32 @@ GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
+
+
+# GObject Introspection
+have_introspection=false
+PKG_CHECK_MODULES(INTROSPECTION, gobject-introspection-1.0 >= 0.6.4, have_introspection=true, have_introspection=false)
+AM_CONDITIONAL(HAVE_INTROSPECTION, $have_introspection)
+
+G_IR_SCANNER=
+G_IR_COMPILER=
+G_IR_GENERATE=
+GIRDIR=
+TYPELIBDIR=
+if $have_introspection; then
+ G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+ G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+ G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+ GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+ TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+fi
+AC_SUBST(G_IR_SCANNER)
+AC_SUBST(G_IR_COMPILER)
+AC_SUBST(G_IR_GENERATE)
+AC_SUBST(GIRDIR)
+AC_SUBST(TYPELIBDIR)
+
+
dnl Checks for libraries.
ifelse([
If we defined the module lists on the M4 level, we could have problems
diff --git a/gsf/Makefile.am b/gsf/Makefile.am
index d933b34..3bdf0a3 100644
--- a/gsf/Makefile.am
+++ b/gsf/Makefile.am
@@ -149,3 +149,38 @@ gsf-1.lib: libgsf-1.la lib.def
CLEANFILES = gsf-1.exp gsf-1.lib
endif
+BUILT_GIRSOURCES = Gsf-1.gir
+
+Gsf-1.gir: $(libgsf_1_include_HEADERS)
+Gsf-1.gir: $(NOINST_H_FILES)
+Gsf-1.gir: $(libgsf_1_la_SOURCES)
+Gsf-1.gir: libgsf-1.la
+Gsf-1.gir: $(G_IR_SCANNER) Makefile
+ $(AM_V_GEN) $(G_IR_SCANNER) -v --namespace Gsf --nsversion=1 \
+ --add-include-path=$(srcdir) --add-include-path=. \
+ --include=GObject-2.0 \
+ --include=Gio-2.0 \
+ --include=libxml2-2.0 \
+ --library=libgsf-1.la \
+ --libtool="$(LIBTOOL)" \
+ --output $@ \
+ --pkg libgsf-1 \
+ -I$(top_srcdir) \
+ $(libgsf_1_include_HEADERS) $(libgsf_1_la_SOURCES)
+
+if HAVE_INTROSPECTION
+
+girdir = $(GIRDIR)
+gir_DATA = $(BUILT_GIRSOURCES)
+
+typelibsdir = $(TYPELIBDIR)
+typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+
+%.typelib: %.gir $(G_IR_COMPILER)
+ $(AM_V_GEN) LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(G_IR_COMPILER) --includedir=$(srcdir) --includedir=. $(G_IR_COMPILER_OPTS) $< -o $(builddir)/$(@F)
+
+endif # HAVE_INTROSPECTION
+
+
+
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]