[libchamplain] Added GIR-based vala bindings generaton.
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Added GIR-based vala bindings generaton.
- Date: Fri, 1 Apr 2011 00:01:34 +0000 (UTC)
commit 37ed857aacac5c28db9d2247c2db79c2c7e46495
Author: Lorenzo Masini <rugginoso develer com>
Date: Wed Mar 30 00:34:01 2011 +0200
Added GIR-based vala bindings generaton.
champlain-gtk/Makefile.am | 14 ++++++++++++++
champlain/Makefile.am | 14 ++++++++++++++
configure.ac | 32 ++++++++++++++++++++++++++------
3 files changed, 54 insertions(+), 6 deletions(-)
---
diff --git a/champlain-gtk/Makefile.am b/champlain-gtk/Makefile.am
index 0261d1d..b88cd45 100644
--- a/champlain-gtk/Makefile.am
+++ b/champlain-gtk/Makefile.am
@@ -99,3 +99,17 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif
+
+if ENABLE_VALA
+
+vapidir = $(datadir)/vala/vapi
+dist_vapi_DATA = champlain-gtk- CHAMPLAIN_API_VERSION@.vapi
+
+EXTRA_DIST += champlain-gtk- CHAMPLAIN_API_VERSION@.vapi
+CLEANFILES += $(dist_vapi_DATA)
+
+champlain-gtk- CHAMPLAIN_API_VERSION@.vapi: GtkChamplain- CHAMPLAIN_API_VERSION@.gir
+ $(AM_V_GEN) ( $(VAPIGEN) --library champlain-gtk- CHAMPLAIN_API_VERSION@ --vapidir=$(top_srcdir)/champlain --pkg champlain-0.10 --pkg clutter-gtk-1.0 --pkg gtk+-3.0 --pkg atk $(srcdir)/GtkChamplain- CHAMPLAIN_API_VERSION@.gir )
+
+endif
+
diff --git a/champlain/Makefile.am b/champlain/Makefile.am
index e0b18bd..a8de113 100644
--- a/champlain/Makefile.am
+++ b/champlain/Makefile.am
@@ -196,3 +196,17 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif
+
+if ENABLE_VALA
+
+vapidir = $(datadir)/vala/vapi
+dist_vapi_DATA = champlain- CHAMPLAIN_API_VERSION@.vapi
+
+EXTRA_DIST += champlain- CHAMPLAIN_API_VERSION@.vapi
+CLEANFILES += $(dist_vapi_DATA)
+
+champlain- CHAMPLAIN_API_VERSION@.vapi: Champlain- CHAMPLAIN_API_VERSION@.gir
+ $(AM_V_GEN) ( $(VAPIGEN) --library champlain- CHAMPLAIN_API_VERSION@ --pkg clutter-1.0 --pkg atk $(srcdir)/Champlain- CHAMPLAIN_API_VERSION@.gir )
+
+endif
+
diff --git a/configure.ac b/configure.ac
index c891b10..f1a9458 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,18 +164,38 @@ AC_SUBST(MEMPHIS_LIBS)
AM_CONDITIONAL(ENABLE_MEMPHIS, test "x$enable_memphis" = "xyes")
# -----------------------------------------------------------
-# Enable vala demos (default to "no")
+# Enable vala bindings (default to "no")
# -----------------------------------------------------------
-AC_PATH_PROG(VAPIGEN, vapigen, vapigen)
-AC_SUBST(VAPIGEN)
+AC_ARG_ENABLE(vala,
+ AS_HELP_STRING([--enable-vala], [Build Vala bindings [default=no]]),
+ enable_vala=$enableval, enable_vala=no )
+
+if test "x$enable_vala" = "xyes"; then
+ if test "x$enable_introspection" = "xno"; then
+ AC_MSG_ERROR([Cannot build vala bindings without gobject introspection])
+ fi
+
+ AC_PATH_PROG(VAPIGEN, vapigen, vapigen)
+ AC_SUBST(VAPIGEN)
+fi
+
+AM_CONDITIONAL(ENABLE_VALA, test "x$enable_vala" = "xyes")
+
+# -----------------------------------------------------------
+# Enable vala demos (default to "no")
+# -----------------------------------------------------------
AC_ARG_ENABLE(vala-demos,
- AS_HELP_STRING([--enable-vala-demos],[Build vala bindings demos]),
+ AS_HELP_STRING([--enable-vala-demos],[Build vala demos [default=no]]),
enable_vala_demos=$enableval, enable_vala_demos=no )
if test "x$enable_vala_demos" = "xyes"; then
- AM_PROG_VALAC([0.8.0])
+ AM_PROG_VALAC([0.11.0])
+
+ if test "x$enable_vala" = "xno"; then
+ AC_MSG_ERROR([Cannot build demos without vala support])
+ fi
if test "x$VALAC" = "x" ; then
AC_MSG_ERROR([Cannot find the "valac" compiler in your PATH])
@@ -256,7 +276,7 @@ echo "Extra tile sources:"
echo " Memphis source: ${enable_memphis}"
echo ""
echo "Bindings:"
-echo " Vala bindings: yes"
+echo " Vala bindings: ${enable_vala}"
echo " Vala demos: ${enable_vala_demos}"
echo " gobject-introspection: ${enable_introspection}"
echo ""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]