[Xfce4-commits] <xfce4-vala:master> Add --with-vala-api option to allow packagers select vala api version
Mike Massonnet
noreply at xfce.org
Tue Jul 23 22:32:01 CEST 2013
Updating branch refs/heads/master
to 6d0ef92197b94c1b1722b02e5f730e6af80ded6f (commit)
from 440fad49c3e30edfe57f70fbe86e08e4beda5619 (commit)
commit 6d0ef92197b94c1b1722b02e5f730e6af80ded6f
Author: Natanael Copa <ncopa at alpinelinux.org>
Date: Tue Jul 23 11:57:22 2013 +0200
Add --with-vala-api option to allow packagers select vala api version
Let packagers set what vala API version they want build the bindings,
rather than require the they use whatever the xfce4-vala maintainer's
distro happens to use.
acinclude.m4 | 18 +++++++++---------
configure.ac.in | 9 +++++++--
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index b47cb49..fc456cf 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -18,31 +18,31 @@ PKG_CHECK_EXISTS([$2 >= $3], [],
dnl # M8T_CHECK_VALA(minimum_version)
dnl #
-dnl # Check for the package vala-0.16 and substitutes useful Vala variables.
+dnl # Check for the package libvala and substitutes useful Vala variables.
dnl #
AC_DEFUN([M8T_CHECK_VALA],
[
-PKG_CHECK_MODULES([VALA], [libvala-0.16 >= $1])
-M8T_VALA_PROGS()
-M8T_VAPI_DIR()
+PKG_CHECK_MODULES([VALA], [libvala-$1])
+M8T_VALA_PROGS([$1])
+M8T_VAPI_DIR([$1])
])
dnl # M8T_VALA_PROGS()
dnl #
-dnl # Substitutes VALAC, VAPIGEN and VALAGI from vala-0.16 pkgconfig file.
+dnl # Substitutes VALAC, VAPIGEN and VALAGI from libvala pkgconfig file.
dnl #
AC_DEFUN([M8T_VALA_PROGS],
[
AC_PATH_PROG([VALAC], [valac], [valac])
-AC_SUBST([VAPIGEN], `$PKG_CONFIG --variable=vapigen libvala-0.16`)
-AC_SUBST([VALAGI], `$PKG_CONFIG --variable=vala_gen_introspect libvala-0.16`)
+AC_SUBST([VAPIGEN], `$PKG_CONFIG --variable=vapigen libvala-$1`)
+AC_SUBST([VALAGI], `$PKG_CONFIG --variable=vala_gen_introspect libvala-$1`)
])
dnl # M8T_VAPI_DIR()
dnl #
-dnl # Substitutes vapidir from vala-0.16 pkgconfig file.
+dnl # Substitutes vapidir from libvala pkgconfig file.
dnl #
AC_DEFUN([M8T_VAPI_DIR],
[
-AC_SUBST([vapidir], `$PKG_CONFIG --variable=vapidir libvala-0.16`)
+AC_SUBST([vapidir], `$PKG_CONFIG --variable=vapidir libvala-$1`)
])
diff --git a/configure.ac.in b/configure.ac.in
index a8241d3..c29cde0 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -29,14 +29,19 @@ M8T_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0])
M8T_CHECK_PACKAGE([EXO], [exo-1], [0.8.0])
dnl Check for Vala
-M8T_CHECK_VALA([0.16.0])
+AC_ARG_WITH([vala-api],
+ AC_HELP_STRING([--with-vala-api=VERSION],
+ [Use Vala API version VERSION]),
+ [vala_api=$withval],
+ [vala_api='0.16'])
+M8T_CHECK_VALA([$vala_api])
AC_ARG_WITH([default-vapidir],
AC_HELP_STRING([--with-default-vapidir],
[Use default VAPI prefix from Vala installation]),
[],
[with_default_vapidir=no])
if test x"$with_default_vapidir" == xno ; then
- AC_SUBST([vapidir], [${datarootdir}/vala-0.16/vapi])
+ AC_SUBST([vapidir], [${datarootdir}/vala-${vala_api}/vapi])
fi
dnl Makefile outputs
More information about the Xfce4-commits
mailing list