diff --git a/configure.ac b/configure.ac index 2040d01857..98acf84225 100644 --- a/configure.ac +++ b/configure.ac @@ -268,6 +268,9 @@ fi AC_PATH_PROG(VALGRIND_PATH, valgrind, no) AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno") +dnl check for gobject-introspection +GOBJECT_INTROSPECTION_CHECK([0.6.3]) + dnl check for documentation tools AG_GST_DOCBOOK_CHECK GTK_DOC_CHECK([1.3]) diff --git a/gst/.gitignore b/gst/.gitignore index 606da2b3be..25cd4c86fc 100644 --- a/gst/.gitignore +++ b/gst/.gitignore @@ -18,3 +18,5 @@ gstconfig.h *.gcno *.gcov *.gcov.out +*.gir +*.typelib diff --git a/gst/Makefile.am b/gst/Makefile.am index 91ae69419c..5945e009d5 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -236,3 +236,44 @@ gstenumtypes.c: $(gst_headers) $(GCOV) -b -f -o $^ > $@.out gcov: $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES:=.gcov) + +if HAVE_INTROSPECTION +BUILT_GIRSOURCES = Gst-@GST_MAJORMINOR@.gir + +gir_headers=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_MAJORMINOR@include_HEADERS)) +gir_sources=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES)) + +Gst-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstreamer-@GST_MAJORMINOR@.la + $(INTROSPECTION_SCANNER) -v --namespace Gst \ + --nsversion=@GST_MAJORMINOR@ \ + -I$(top_srcdir) \ + --c-include='gst/gst.h' \ + --library=gstreamer-0.10 \ + --include=GLib-2.0 \ + --include=GObject-2.0 \ + --include=GModule-2.0 \ + --include=libxml2-2.0 \ + --libtool="$(top_builddir)/libtool" \ + --pkg glib-2.0 \ + --pkg gobject-2.0 \ + --pkg gmodule-no-export-2.0 \ + --pkg gthread-2.0 \ + --pkg libxml-2.0 \ + --output $@ \ + $(gir_headers) \ + $(gir_sources) + +# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to +# install anything - we need to install inside our prefix. +girdir = $(datadir)/gir-1.0 +gir_DATA = $(BUILT_GIRSOURCES) + +typelibsdir = $(libdir)/girepository-1.0/ + +typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) + +%.typelib: %.gir $(INTROSPECTION_COMPILER) + $(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=$(builddir) $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) + +CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) +endif diff --git a/gst/gst.c b/gst/gst.c index 89058034f4..95ec1e5443 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -468,8 +468,8 @@ gst_init_check (int *argc, char **argv[], GError ** err) /** * gst_init: - * @argc: pointer to application's argc - * @argv: pointer to application's argv + * @argc: (inout): pointer to application's argc + * @argv: (inout) (array length=argc) (allow-none): pointer to application's argv * * Initializes the GStreamer library, setting up internal path lists, * registering built-in elements, and loading standard plugins.