---
Makefile.am | 2 +-
configure.ac | 19 +++++++++++++++++++
vapi/Makefile.am | 37 +++++++++++++++++++++++++++++++++++++
vapi/libvirt-gobject-1.0.deps | 1 +
vapi/libvirt-gobject-1.0.metada | 2 ++
5 files changed, 60 insertions(+), 1 deletions(-)
create mode 100644 vapi/Makefile.am
create mode 100644 vapi/libvirt-gobject-1.0.deps
create mode 100644 vapi/libvirt-gobject-1.0.metada
diff --git a/Makefile.am b/Makefile.am
index 3df8626..8d082c0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
-SUBDIRS = libvirt-glib libvirt-gconfig libvirt-gobject python examples
+SUBDIRS = libvirt-glib libvirt-gconfig libvirt-gobject python vapi examples
ACLOCAL_AMFLAGS = -I m4
diff --git a/configure.ac b/configure.ac
index 0581874..c474f0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,12 +198,31 @@ if test "x$enable_introspection" != "xno" ;
then
fi
AM_CONDITIONAL([WITH_GOBJECT_INTROSPECTION], [test "x$enable_introspection" =
"xyes"])
+AC_ARG_ENABLE([vala],
+ AS_HELP_STRING([--enable-vala], [enable Vala binding generation]),
+ [], [enable_vala=check])
+if test "x$enable_introspection" = "xyes" ; then
+ if test "x$enable_vala" != "xno" ; then
+ AC_PATH_PROG(VAPIGEN, vapigen, no)
+ if test "x$VAPIGEN" != "xno"; then
+ if test "x$enable_vala" == "xcheck" ; then
+ enable_vala=yes
+ AC_SUBST(VAPIGEN)
+ fi
+ else
+ AC_MSG_ERROR([Cannot find the "vapigen" binary in your
PATH])
+ fi
+ fi
+fi
+AM_CONDITIONAL([WITH_VALA], [test "x$enable_vala" = "xyes"])
+
AC_OUTPUT(Makefile
libvirt-glib/Makefile
libvirt-gconfig/Makefile
libvirt-gobject/Makefile
examples/Makefile
python/Makefile
+ vapi/Makefile
libvirt-glib-1.0.pc
libvirt-gconfig-1.0.pc
libvirt-gobject-1.0.pc
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
new file mode 100644
index 0000000..f844576
--- /dev/null
+++ b/vapi/Makefile.am
@@ -0,0 +1,37 @@
+NULL =
+
+if WITH_VALA
+vapidir = $(datadir)/vala/vapi
+vapi_DATA = \
+ libvirt-gconfig-1.0.vapi \
+ libvirt-glib-1.0.vapi \
+ libvirt-gobject-1.0.vapi \
+ $(NULL)
+
+libvirt-glib-1.0.vapi: $(top_builddir)/libvirt-glib/LibvirtGLib-1.0.gir
+ $(AM_V_GEN)$(VAPIGEN) \
+ --vapidir=. \
+ --pkg gobject-2.0 \
+ --pkg gio-2.0 \
+ --library libvirt-glib-1.0 \
+ $<
+
+libvirt-gobject-1.0.vapi: $(top_builddir)/libvirt-gobject/LibvirtGObject-1.0.gir
+ $(AM_V_GEN)$(VAPIGEN) \
+ --vapidir=. \
+ --pkg gobject-2.0 \
+ --pkg gio-2.0 \
+ --pkg libvirt-glib-1.0 \
+ --library libvirt-gobject-1.0 \
+ $<
+
+libvirt-gconfig-1.0.vapi: $(top_builddir)/libvirt-gconfig/LibvirtGConfig-1.0.gir
+ $(AM_V_GEN)$(VAPIGEN) \
+ --vapidir=. \
+ --pkg gobject-2.0 \
+ --library libvirt-gconfig-1.0 \
+ $<
+
+endif
+
+CLEANFILES = $(vapi_DATA)
diff --git a/vapi/libvirt-gobject-1.0.deps b/vapi/libvirt-gobject-1.0.deps
new file mode 100644
index 0000000..899e8e8
--- /dev/null
+++ b/vapi/libvirt-gobject-1.0.deps
@@ -0,0 +1 @@
+libvirt-gconfig-1.0
diff --git a/vapi/libvirt-gobject-1.0.metada b/vapi/libvirt-gobject-1.0.metada
new file mode 100644
index 0000000..90e5197
--- /dev/null
+++ b/vapi/libvirt-gobject-1.0.metada
@@ -0,0 +1,2 @@
+init_object.argv unowned
+init_object_check.argv unowned
--
1.7.6.2