[gucharmap] Update the support for gobject-introspection.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gucharmap] Update the support for gobject-introspection.
- Date: Sat, 4 Dec 2010 12:47:24 +0000 (UTC)
commit 234c0b7dc02dc3523d086b6d713c2eb96a755c3c
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Dec 4 13:47:07 2010 +0100
Update the support for gobject-introspection.
configure.ac | 34 +++++++---------------------
gucharmap/Makefile.am | 58 +++++++++++++++++++++---------------------------
2 files changed, 34 insertions(+), 58 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 514b1c8..519ca18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,7 @@ esac
AC_SUBST([GTK_API_VERSION])
AC_SUBST([GUCHARMAP_API_VERSION])
+AC_SUBST([GUCHARMAP_API_VERSION_U],[AS_TR_SH([$GUCHARMAP_API_VERSION])])
AC_SUBST([GUCHARMAP_API_MAJOR_VERSION])
AC_SUBST([GUCHARMAP_API_MINOR_VERSION])
AC_SUBST([GUCHARMAP_API_PC_VERSION])
@@ -200,33 +201,16 @@ AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gucharmap gettext domain])
AM_GLIB_GNU_GETTEXT
-# ***
-# GIR
-# ***
-
-AC_MSG_CHECKING([whether GObject introspection is requested])
-AC_ARG_ENABLE([introspection],
- AS_HELP_STRING([--enable-introspection],[Enable GObject introspection]),
- [],[enable_introspection=no])
-AC_MSG_RESULT([$enable_introspection])
-
-if test "$enable_introspection" = "yes"; then
- GOBJECT_INTROSPECTION_REQUIRED=0.6
- PKG_CHECK_MODULES([GOBJECT_INTROSPECTION],[gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED])
-
- 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)"
- GIRTYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
- AC_SUBST([G_IR_SCANNER])
- AC_SUBST([G_IR_COMPILER])
- AC_SUBST([G_IR_GENERATE])
- AC_SUBST([GIRDIR])
- AC_SUBST([GIRTYPELIBDIR])
+# *************
+# Introspection
+# *************
+
+# No automagic please!
+if test -z "$enable_introspection"; then
+ enable_introspection=no
fi
-AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
+GOBJECT_INTROSPECTION_CHECK([0.9.0])
# ***************
# API & User Docs
diff --git a/gucharmap/Makefile.am b/gucharmap/Makefile.am
index 43a67d2..e4baeb7 100644
--- a/gucharmap/Makefile.am
+++ b/gucharmap/Makefile.am
@@ -205,37 +205,6 @@ gucharmap-type-builtins.c: gucharmap-type-builtins.c.template $(libgucharmapincl
# && (cmp -s xgen-$(@F) $@ || cp -f xgen-$(@F) $@) \
# && rm -f xgen-$(@F)
-if ENABLE_INTROSPECTION
-
-girdir = $(GIRDIR)
-gir_DATA = Gucharmap-$(GUCHARMAP_API_VERSION).gir
-
-typelibdir = $(GIRTYPELIBDIR)
-typelib_DATA = Gucharmap-$(GUCHARMAP_API_VERSION).typelib
-
-Gucharmap-$(GUCHARMAP_API_VERSION).gir: $(G_IR_SCANNER) libgucharmap GUCHARMAP_LIBRARY_SUFFIX_U@.la $(libgucharmapinclude_HEADERS) Makefile
- $(AM_V_GEN) PKG_CONFIG_PATH=$(top_builddir):$$PKG_CONFIG_PATH \
- $(G_IR_SCANNER) \
- --verbose \
- --namespace=Gucharmap \
- --nsversion=$(GUCHARMAP_API_VERSION) \
- --include=GLib-2.0 \
- --include=GObject-2.0 \
- --include=Gtk-$(GTK_API_VERSION) \
- --library=gucharmap GUCHARMAP_LIBRARY_SUFFIX_U@ \
- --libtool="$(LIBTOOL)" \
- --output $@ \
- --pkg gucharmap-$(GUCHARMAP_API_PC_VERSION) \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- -DGUCHARMAP_COMPILATION \
- $(filter %.h,$^)
-
-%.typelib: %.gir $(G_IR_COMPILER)
- $(AM_V_GEN) $(G_IR_COMPILER) --includedir=$(srcdir) --includedir=. $(G_IR_COMPILER_OPTS) $< -o $@
-
-endif # ENABLE_INTROSPECTION
-
EXTRA_DIST = \
gucharmap-marshal.list \
gucharmap-type-builtins.c.template \
@@ -246,10 +215,33 @@ EXTRA_DIST = \
CLEANFILES = \
stamp-gucharmap-type-builtins.h \
$(BUILT_SOURCES) \
- $(gir_DATA) \
- $(typelib_DATA) \
$(NULL)
+# introspection
+
+if HAVE_INTROSPECTION
+-include $(INTROSPECTION_MAKEFILE)
+
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+Gucharmap- GUCHARMAP_API_VERSION@.gir: libgucharmap GUCHARMAP_LIBRARY_SUFFIX_U@.la
+Gucharmap_ GUCHARMAP_API_VERSION_U@_gir_INCLUDES = Pango-1.0 Gdk-$(GTK_API_VERSION) Gtk-$(GTK_API_VERSION)
+Gucharmap_ GUCHARMAP_API_VERSION_U@_gir_CFLAGS = $(GTK_CFLAGS) -DGUCHARMAP_COMPILATION -I$(top_srcdir)
+Gucharmap_ GUCHARMAP_API_VERSION_U@_gir_LIBS = libgucharmap GUCHARMAP_LIBRARY_SUFFIX_U@.la
+Gucharmap_ GUCHARMAP_API_VERSION_U@_gir_FILES = $(filter-out unicode-%.h,$(libgucharmap GUCHARMAP_LIBRARY_SUFFIX_U@_la_SOURCES))
+
+INTROSPECTION_GIRS = Gucharmap-$(GUCHARMAP_API_VERSION).gir
+
+girdir = $(INTROSPECTION_GIRDIR)
+nodist_gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(INTROSPECTION_TYPELIBDIR)
+nodist_typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(nodist_gir_DATA) $(nodist_typelib_DATA)
+endif
+
if ENABLE_CHARMAP
# don't do the symlink stuff if this is windows
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]