[gegl-gtk] Build Vala support (vapi file) by default
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl-gtk] Build Vala support (vapi file) by default
- Date: Wed, 3 Aug 2011 23:03:04 +0000 (UTC)
commit f8d546a6b553035f225c86c724a4c62a4658edb7
Author: Jon Nordby <jononor gmail com>
Date: Thu Aug 4 00:54:31 2011 +0200
Build Vala support (vapi file) by default
Note that there seems to be several issues with
typical GTK+ vapi/gir files that can make this fail,
so it might need to be disabled.
configure.ac | 24 ++++++++++++++++++++++++
gegl-gtk/Makefile.am | 16 +++++++++++++++-
2 files changed, 39 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5b4958f..2acef67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -237,6 +237,30 @@ fi
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$enable_introspection" = "xyes")
+########################
+# Check Vala
+########################
+
+AC_ARG_WITH(vala, [ --without-vala build without Vala support])
+
+have_vapigen="no"
+if test "x$with_vala" != "xno"; then
+
+ AC_PATH_PROG(VAPIGEN, vapigen, no)
+ if test "$VAPIGEN" = "no"; then
+ have_vapigen="no (vapigen executable not found)"
+ AC_MSG_RESULT([*** Check for vapigen failed.])
+ else
+ have_vapigen="yes"
+ fi
+fi
+
+have_vala=$have_vapigen
+AM_CONDITIONAL(HAVE_VALA, test "$have_vala" = "yes")
+
+vapidir=$(pkg-config --variable vapidir vala-1.0)
+AC_SUBST(vapidir)
+
######################################
# Checks for gtk-doc and docbook-tools
######################################
diff --git a/gegl-gtk/Makefile.am b/gegl-gtk/Makefile.am
index 71236e0..7578d0b 100644
--- a/gegl-gtk/Makefile.am
+++ b/gegl-gtk/Makefile.am
@@ -56,4 +56,18 @@ typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
-endif
+
+if HAVE_VALA
+gegl-gtk GEGL_GTK_GTK_VERSION@- GEGL_GTK_API_VERSION@.vapi: \
+ GeglGtk GEGL_GTK_GTK_VERSION@- GEGL_GTK_API_VERSION@.gir
+
+ $(VAPIGEN) --pkg gtk+- GEGL_GTK_GTK_VERSION@.0 \
+ --library=gegl-gtk GEGL_GTK_GTK_VERSION@- GEGL_GTK_API_VERSION@ \
+ GeglGtk GEGL_GTK_GTK_VERSION@- GEGL_GTK_API_VERSION@.gir
+
+vapidir=$(datadir)/vala/vapi
+vapi_DATA = gegl-gtk GEGL_GTK_GTK_VERSION@- GEGL_GTK_API_VERSION@.vapi
+
+endif # HAVE_VALA
+
+endif # HAVE_INTROSPECTION
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]