diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2011-02-09 18:02:18 +0000 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2011-10-11 15:26:06 -0400 |
commit | 3ebc62d310bf31db6931ccfe1a1d5ea11588c0e0 (patch) | |
tree | 92fb3b44db99cb6a0d6c181731bea51481ab7435 | |
parent | 09b6afa0ade08c64c201a2ee8d458f493a027720 (diff) | |
download | farstream-3ebc62d310bf31db6931ccfe1a1d5ea11588c0e0.tar.gz |
Build introspection data
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rwxr-xr-x | autogen.sh | 2 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | gst-libs/gst/farsight/Makefile.am | 23 | ||||
-rw-r--r-- | m4/introspection.m4 | 94 |
6 files changed, 124 insertions, 2 deletions
@@ -12,6 +12,8 @@ Makefile.in *.stamp *.gcno *.gcda +*.typelib +*.gir gst/fsrtpconference/fs-rtp-marshal.[ch] gst/fsrtpconference/fs-rtp-marshal.list diff --git a/Makefile.am b/Makefile.am index 4fea98b8..7acedaab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc +DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-introspection SUBDIRS_EXT = @@ -22,7 +22,7 @@ then fi . common/gst-autogen.sh -CONFIGURE_DEF_OPT='--enable-gtk-doc' +CONFIGURE_DEF_OPT='--enable-gtk-doc --enable-introspection' autogen_options $@ diff --git a/configure.ac b/configure.ac index 0d3f6463..c08303b6 100644 --- a/configure.ac +++ b/configure.ac @@ -193,6 +193,9 @@ AC_PROG_CC 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.10.1]) + dnl check for documentation tools GTK_DOC_CHECK([1.8]) AM_PATH_PYTHON([2.4]) diff --git a/gst-libs/gst/farsight/Makefile.am b/gst-libs/gst/farsight/Makefile.am index 27e9ae7d..b8e3cec8 100644 --- a/gst-libs/gst/farsight/Makefile.am +++ b/gst-libs/gst/farsight/Makefile.am @@ -94,3 +94,26 @@ glib_gen_prefix=_fs glib_gen_basename=fs include $(top_srcdir)/common-modified/gst-glib-gen.mak + +if HAVE_INTROSPECTION +include $(INTROSPECTION_MAKEFILE) +introspection_sources = \ + $(libgstfarsight_@GST_MAJORMINOR@_la_SOURCES) \ + $(nodist_libgstfarsightinclude_HEADERS) \ + $(libgstfarsightinclude_HEADERS) + +INTROSPECTION_GIRS = Farsight-0.0.gir +Farsight_0_0_gir_NAMESPACE = Farsight +Farsight_0_0_gir_VERSION = 0.0 +Farsight_0_0_gir_LIBS = libgstfarsight-@GST_MAJORMINOR@.la +Farsight_0_0_gir_FILES = $(introspection_sources) +Farsight_0_0_gir_INCLUDES = GObject-2.0 Gst-0.10 +Farsight_0_0_gir_CFLAGS = $(FS2_INTERNAL_CFLAGS) +Farsight_0_0_gir_SCANNERFLAGS = --identifier-prefix=fs_ --identifier-prefix=Fs + +girdir = $(datadir)/gir-1.0 +dist_gir_DATA = Farsight-0.0.gir +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA = Farsight-0.0.typelib +CLEANFILES += $(dist_gir_DATA) $(typelib_DATA) +endif diff --git a/m4/introspection.m4 b/m4/introspection.m4 new file mode 100644 index 00000000..589721c5 --- /dev/null +++ b/m4/introspection.m4 @@ -0,0 +1,94 @@ +dnl -*- mode: autoconf -*- +dnl Copyright 2009 Johan Dahlin +dnl +dnl This file is free software; the author(s) gives unlimited +dnl permission to copy and/or distribute it, with or without +dnl modifications, as long as this notice is preserved. +dnl + +# serial 1 + +m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], +[ + AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([LT_INIT],[$0])dnl setup libtool first + + dnl enable/disable introspection + m4_if([$2], [require], + [dnl + enable_introspection=yes + ],[dnl + AC_ARG_ENABLE(introspection, + AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], + [Enable introspection for this build]),, + [enable_introspection=auto]) + ])dnl + + AC_MSG_CHECKING([for gobject-introspection]) + + dnl presence/version checking + AS_CASE([$enable_introspection], + [no], [dnl + found_introspection="no (disabled, use --enable-introspection to enable)" + ],dnl + [yes],[dnl + PKG_CHECK_EXISTS([gobject-introspection-1.0],, + AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) + PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], + found_introspection=yes, + AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) + ],dnl + [auto],[dnl + PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) + ],dnl + [dnl + AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) + ])dnl + + AC_MSG_RESULT([$found_introspection]) + + INTROSPECTION_SCANNER= + INTROSPECTION_COMPILER= + INTROSPECTION_GENERATE= + INTROSPECTION_GIRDIR= + INTROSPECTION_TYPELIBDIR= + if test "x$found_introspection" = "xyes"; then + INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` + INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` + INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` + INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` + INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" + INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` + INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` + INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection + fi + AC_SUBST(INTROSPECTION_SCANNER) + AC_SUBST(INTROSPECTION_COMPILER) + AC_SUBST(INTROSPECTION_GENERATE) + AC_SUBST(INTROSPECTION_GIRDIR) + AC_SUBST(INTROSPECTION_TYPELIBDIR) + AC_SUBST(INTROSPECTION_CFLAGS) + AC_SUBST(INTROSPECTION_LIBS) + AC_SUBST(INTROSPECTION_MAKEFILE) + + AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") +]) + + +dnl Usage: +dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) + +AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], +[ + _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) +]) + +dnl Usage: +dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) + + +AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], +[ + _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) +]) |