[grilo] build: detect new versions of vala
- From: Victor Manuel Jaquez Leal <vjaquez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] build: detect new versions of vala
- Date: Wed, 22 Sep 2010 11:06:00 +0000 (UTC)
commit e80fe473ef640c6577ce32d5fea4964f3f310598
Author: VÃctor Manuel Jáquez Leal <vjaquez igalia com>
Date: Fri Sep 17 12:22:57 2010 +0200
build: detect new versions of vala
Recently vala has multiversion support, so it would be possible have installed
different versions of it. But downstream still using the old setup. So we
shall handle both situations.
First we check for upstream version and then we go downstream.
Signed-off-by: VÃctor Manuel Jáquez Leal <vjaquez igalia com>
configure.ac | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0b3416f..2495fd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -135,15 +135,31 @@ AC_ARG_ENABLE([vala],
[enable_vala=autodetect have_vala=yes])
AC_MSG_RESULT([$enable_vala])
if test "x$enable_vala" != "xno"; then
- PKG_CHECK_MODULES(VALA, vala-1.0 >= $VALA_REQS, with_vala=yes,
- with_vala=no)
+ PKG_CHECK_EXISTS([ vala-0.12 ],
+ [ valapkg="vala-0.12" ],
+ [ PKG_CHECK_EXISTS([ vala-0.10 ],
+ [ valapkg="vala-0.10" ],
+ [ PKG_CHECK_EXISTS([ vala-1.0 >= $VALA_REQS ],
+ [ valapkg="vala-1.0" ],
+ [ valapkg="" ] )
+ ] )
+ ] )
+
+ if test "x$valapkg" != "x"; then
+ PKG_CHECK_MODULES([VALA], [ ${valapkg} ],
+ [ with_vala="yes" ],
+ [ with_vala="no" ])
+ else
+ with_vala="no"
+ fi
+
if test "x$with_vala" = "xyes"; then
- AC_PATH_PROG([VALAC], [valac], [])
+ AC_PATH_PROG([VALAC], [valac])
if test "x$VALAC" = "x"; then
AC_MSG_ERROR([No Vala compiler found.])
fi
- VAPIDIR=`$PKG_CONFIG --variable=vapidir vala-1.0`
+ VAPIDIR=`$PKG_CONFIG --variable=vapidir $valapkg`
AC_SUBST([VAPIDIR])
AC_PATH_PROG([VALA_GEN_INTROSPECT], [vala-gen-introspect])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]