[gegl] Build Vala support (.vapi file) by default
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Build Vala support (.vapi file) by default
- Date: Wed, 3 Aug 2011 21:26:08 +0000 (UTC)
commit 7707579e21a91ad4e04618c30366471397367fbe
Author: Jon Nordby <jononor gmail com>
Date: Wed Aug 3 23:11:10 2011 +0200
Build Vala support (.vapi file) by default
This can now be generated from the .gir file.
configure.ac | 25 +++++++++++++++++++++++++
gegl/.gitignore | 1 +
gegl/Gegl-0.1.metadata | 1 +
gegl/Makefile.am | 12 +++++++++++-
4 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2f11ab1..ffc38c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -395,6 +395,30 @@ CFLAGS="$CFLAGS $MMX_EXTRA_CFLAGS $SSE_EXTRA_CFLAGS"
GOBJECT_INTROSPECTION_CHECK([0.6.7])
########################
+# 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)
+
+########################
# Check for fsync
########################
AC_CHECK_FUNCS(fsync)
@@ -1063,6 +1087,7 @@ Optional features:
Build workshop: $enable_workshop
Build website: $have_asciidoc
SIMD: sse:$enable_sse mmx:$enable_mmx
+ Vala support: $have_vala
Optional dependencies:
asciidoc: $have_asciidoc
diff --git a/gegl/.gitignore b/gegl/.gitignore
index ac5bfd3..5dcef1e 100644
--- a/gegl/.gitignore
+++ b/gegl/.gitignore
@@ -8,3 +8,4 @@
/Makefile.in
/*.gir
/*.typelib
+/*.vapi
diff --git a/gegl/Gegl-0.1.metadata b/gegl/Gegl-0.1.metadata
new file mode 100644
index 0000000..a399d64
--- /dev/null
+++ b/gegl/Gegl-0.1.metadata
@@ -0,0 +1 @@
+module_register_type skip
diff --git a/gegl/Makefile.am b/gegl/Makefile.am
index e822c3a..a08f41f 100644
--- a/gegl/Makefile.am
+++ b/gegl/Makefile.am
@@ -123,5 +123,15 @@ typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
-endif
+
+if HAVE_VALA
+gegl- GEGL_API_VERSION@.vapi: Gegl- GEGL_API_VERSION@.gir
+ $(VAPIGEN) --library=gegl- GEGL_API_VERSION@ Gegl- GEGL_API_VERSION@.gir
+
+vapidir= vapidir@
+vapi_DATA = gegl- GEGL_API_VERSION@.vapi
+
+endif # HAVE_VALA
+
+endif # HAVE_INTROSPECTION
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]