diff --git a/configure.ac b/configure.ac index 2fb058ffdd72931a08204144c552ce94510636ad..8911e25c8b6b8ff1ec1d8b25cdf7f6de9f83e0ec 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,7 @@ m4_define([hb_libtool_current], HB_LIBTOOL_VERSION_INFO=hb_libtool_current:hb_libtool_revision:hb_libtool_age AC_SUBST(HB_LIBTOOL_VERSION_INFO) +GOBJECT_INTROSPECTION_CHECK([0.9.0]) dnl GTK_DOC_CHECK([1.15],[--flavour no-tmpl]) # Functions and headers diff --git a/src/Makefile.am b/src/Makefile.am index 98c6cd5758185c24f244e8ebe1fe39f5125d66af..2326b409e476baf5b2ef1a46950bad37bfc9e10c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,6 +6,7 @@ EXTRA_DIST = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = +DISTCHECK_CONFIGURE_FLAGS = --enable-introspection # The following warning options are useful for debugging: -Wpadded -Wcast-align #AM_CXXFLAGS = @@ -208,8 +209,26 @@ TESTS_ENVIRONMENT = \ HBHEADERS="$(HBHEADERS)" \ $(NULL) -scan: - g-ir-scanner $(HBCFLAGS) $(HBHEADERS) -n hb --strip-prefix=hb --library libharfbuzz.la +-include $(INTROSPECTION_MAKEFILE) +INTROSPECTION_GIRS = hb-1.0.gir +INTROSPECTION_SCANNER_ARGS = -I$(srcdir) -n hb --identifier-prefix=hb_ +INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) +if HAVE_INTROSPECTION + +hb-1.0.gir: libharfbuzz.la +hb_1_0_gir_INCLUDES = GObject-2.0 +hb_1_0_gir_CFLAGS = $(INCLUDES) $(HBCFLAGS) -DHB_H -DHB_H_IN -DHB_OT_H -DHB_OT_H_IN +hb_1_0_gir_LIBS = libharfbuzz.la +hb_1_0_gir_FILES = $(HBHEADERS) + +girdir = $(datadir)/gir-1.0 +gir_DATA = $(INTROSPECTION_GIRS) + +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + +CLEANFILES += $(gir_DATA) $(typelib_DATA) +endif -include $(top_srcdir)/git.mk