-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
SUBDIRS = po src tests docs
# check for gtk-doc
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
+GOBJECT_INTROSPECTION_CHECK([1.30.0])
+
IT_PROG_INTLTOOL
dnl ******************************
libgdaexgrid_la_LDFLAGS = -no-undefined
-libgdaexgrid_include_HEADERS = libgdaexgrid.h \
+gir_include = \
grid.h \
gridcolumn.h
+libgdaexgrid_include_HEADERS = libgdaexgrid.h \
+ $(gir_include)
+
libgdaexgrid_includedir = $(includedir)/libgdaexgrid
+
+CLEANFILES =
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all --accept-unprefixed --identifier-prefix=""
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(libgdaexgrid_la_SOURCES) $(gir_include)
+
+GdaexGrid-1.0.gir: libgdaexgrid.la
+GdaexGrid_1_0_gir_INCLUDES = GObject-2.0 GLib-2.0 Gda-5.0 Gdaex-1.0
+GdaexGrid_1_0_gir_CFLAGS = $(AM_CPPFLAGS)
+GdaexGrid_1_0_gir_LIBS = libgdaexgrid.la
+GdaexGrid_1_0_gir_FILES = $(introspection_sources)
+INTROSPECTION_GIRS += GdaexGrid-1.0.gir
+
+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