[libgweather] Add vala support, which is enabled by default



commit 61b77d59de3a6dd0469121d0cd05b011d2badab6
Author: Evgeny Bobkin <evgen ibqn gmail com>
Date:   Fri Aug 30 14:57:13 2013 +0200

    Add vala support, which is enabled by default
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693471

 configure.ac            |   14 ++++++++++++++
 libgweather/Makefile.am |   20 +++++++++++++++++++-
 2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5930cd1..8d9bb35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -181,6 +181,19 @@ GTK_DOC_CHECK([1.11],[--flavour no-tmpl])
 GOBJECT_INTROSPECTION_CHECK([0.9.5])
 
 dnl ***************************************************************************
+dnl *** Vala bindings support                                               ***
+dnl ***************************************************************************
+AC_ARG_ENABLE([vala],
+       [AS_HELP_STRING([--enable-vala],
+               [Install vala bindings [default=auto]])],
+       [enable_vala=$enableval],
+       [enable_vala=auto])
+
+m4_ifdef([VAPIGEN_CHECK],
+       [VAPIGEN_CHECK([0.18],,,[no])],
+       [AM_CONDITIONAL([ENABLE_VAPIGEN],[false])])
+
+dnl ***************************************************************************
 dnl *** Output Makefiles et al                                              ***
 dnl ***************************************************************************
 AC_CONFIG_FILES([
@@ -208,4 +221,5 @@ libgweather-$VERSION configure summary:
        Source code location:           ${srcdir}
        Compiler:                       ${CC}
        Introspection support:          ${found_introspection}
+       Build Vala bindings:            ${enable_vala}
 " >&2
diff --git a/libgweather/Makefile.am b/libgweather/Makefile.am
index afe336b..325019a 100644
--- a/libgweather/Makefile.am
+++ b/libgweather/Makefile.am
@@ -122,6 +122,24 @@ typelibdir = $(INTROSPECTION_TYPELIBDIR)
 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
 CLEANFILES += $(gir_DATA) $(typelib_DATA)
-endif
+
+if ENABLE_VAPIGEN
+-include $(VAPIGEN_MAKEFILE)
+
+VAPIGEN_VAPIS = gweather-3.0.vapi
+
+gweather-3.0.vapi: GWeather-3.0.gir
+gweather_3_0_vapi_DEPS = gobject-2.0 gtk+-3.0
+gweather_3_0_vapi_METADATADIRS = $(srcdir)
+gweather_3_0_vapi_VAPIDIRS = $(datadir)/vala/vapi
+gweather_3_0_vapi_FILES = GWeather-3.0.gir
+
+vapidir = $(VAPIGEN_VAPIDIR)
+nodist_vapi_DATA = $(VAPIGEN_VAPIS)
+
+CLEANFILES += $(nodist_vapi_DATA)
+
+endif # ENABLE_VAPIGEN
+endif # HAVE_INTROSPECTION
 
 -include $(top_srcdir)/git.mk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]