Re: [PATCH v2] build: detect new versions of vala



On Fri, Sep 17, 2010 at 01:36:49PM +0200, Víctor Manuel Jáquez Leal wrote:
> 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])

pushed

vmjl


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