Build typelib for gobject-introspection
authorRob Taylor <rob.taylor@codethink.co.uk>
Mon, 12 Jul 2010 18:41:44 +0000 (20:41 +0200)
committerMaciej Piechotka <uzytkownik2@gmail.com>
Mon, 12 Jul 2010 18:41:44 +0000 (20:41 +0200)
.gitignore
autogen.sh
configure.ac
gee/Makefile.am

index eae47ea..e274fdf 100644 (file)
@@ -7,6 +7,7 @@ Makefile
 *.h
 *.stamp
 *.gir
+*.typelib
 .deps
 .libs
 config.*
index ba9dc30..6c62fd1 100755 (executable)
@@ -9,7 +9,7 @@ cd $srcdir
 # Automake requires that ChangeLog exists.
 touch ChangeLog
 
-gnome-autogen.sh || exit 1
+REQUIRED_M4MACROS=introspection.m4 gnome-autogen.sh || exit 1
 cd $ORIGDIR || exit $?
 
 if test -z "$NOCONFIGURE"; then
index e622d72..ead59fb 100644 (file)
@@ -59,6 +59,8 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
+GOBJECT_INTROSPECTION_CHECK([0.9.0])
+
 AC_CONFIG_FILES([Makefile
            gee-1.0.pc
            benchmark/Makefile
index 6da6e0e..5757425 100644 (file)
@@ -92,10 +92,20 @@ dist_vapi_DATA = \
        gee-1.0.vapi \
        $(NULL)
 
-girdir = $(datadir)/gir-1.0
+if HAVE_INTROSPECTION
+girdir = @INTROSPECTION_GIRDIR@
 
-dist_gir_DATA = \
+gir_DATA = \
        Gee-1.0.gir \
        $(NULL)
 
+typelibdir = @INTROSPECTION_TYPELIBDIR@
+typelib_DATA = \
+       Gee-1.0.typelib \
+       $(NULL)
+
+Gee-1.0.typelib: Gee-1.0.gir
+       @INTROSPECTION_COMPILER@ --shared-library=libgee -o $@ $^
+endif
+
 EXTRA_DIST += $(libgee_la_VALASOURCES) gee-1.0.vapi Gee-1.0.gir gee.vala.stamp