[babl] Build Vala support (.vapi file) by default
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] Build Vala support (.vapi file) by default
- Date: Wed, 3 Aug 2011 21:23:57 +0000 (UTC)
commit dc292138a3d2817a2086d5ea2847ad8ea4c62271
Author: Jon Nordby <jononor gmail com>
Date: Wed Aug 3 23:13:29 2011 +0200
Build Vala support (.vapi file) by default
Generated from .gir file.
babl/.gitignore | 1 +
babl/Makefile.am | 8 ++++++++
configure.ac | 21 +++++++++++++++++++++
3 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/babl/.gitignore b/babl/.gitignore
index c7aeff3..42ebfdb 100644
--- a/babl/.gitignore
+++ b/babl/.gitignore
@@ -4,6 +4,7 @@
/.libs
/Babl-0.1.gir
/Babl-0.1.typelib
+/*.vapi
/Makefile
/Makefile.in
/babl-version.h
diff --git a/babl/Makefile.am b/babl/Makefile.am
index e526e8a..8b48f10 100644
--- a/babl/Makefile.am
+++ b/babl/Makefile.am
@@ -121,5 +121,13 @@ CLEANFILES = $(gir_DATA) $(typelibs_DATA)
$(G_IR_COMPILER_OPTS) \
$< -o $@
+if HAVE_VALA
+babl-$(BABL_API_VERSION).vapi: Babl-$(BABL_API_VERSION).gir
+ $(VAPIGEN) --library=babl-$(BABL_API_VERSION) Babl-$(BABL_API_VERSION).gir
+
+vapidir= vapidir@
+vapi_DATA = babl-$(BABL_API_VERSION).vapi
+
+endif # HAVE_VALA
endif # HAVE_INTROSPECTION
diff --git a/configure.ac b/configure.ac
index 0c6c392..126b5e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,6 +67,27 @@ AC_SUBST(BABL_RELEASE)
# GObject Introspection
GOBJECT_INTROSPECTION_CHECK([0.6.8])
+# 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)
+
dnl The symbol BABL_UNSTABLE is defined above for substitution in
dnl Makefiles and conditionally defined here as a preprocessor symbol
dnl and automake conditional.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]