guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] allow specifying a required version in GUILE_PROGS


From: Ludovic Courtès
Subject: Re: [PATCH] allow specifying a required version in GUILE_PROGS
Date: Mon, 14 Oct 2013 23:05:56 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Hi Aleix,

(Second try.)

Aleix Conchillo Flaqué <address@hidden> skribis:

> From 66fdc5ff8c0fea6c285c5de01cd8efc12ba58e02 Mon Sep 17 00:00:00 2001
> From: Aleix Conchillo Flaque <address@hidden>
> Date: Thu, 3 Oct 2013 15:49:07 -0700
> Subject: [PATCH] allow specifying a required version in GUILE_PROGS
>
> * meta/guile.m4: GUILE_PROGS now takes an optional argument to specify a
>   required Guile version. By default, it requires Guile >= 2.0. A micro
>   version can also be specified (e.g. GUILE_PROGS([2.0.10])).

The patch looks good to me.

> +  _guile_prog_version=`$GUILE -c "(display (version))"`
> +  _guile_major_version=`$GUILE -c "(display (major-version))"`
> +  _guile_minor_version=`$GUILE -c "(display (minor-version))"`
> +  _guile_micro_version=`$GUILE -c "(display (micro-version))"`
> +
> +  AC_MSG_CHECKING([for Guile version >= $_guile_required_version])
> +  _major_version=`echo $_guile_required_version | cut -d . -f 1`
> +  _minor_version=`echo $_guile_required_version | cut -d . -f 2`
> +  _micro_version=`echo $_guile_required_version | cut -d . -f 3`
> +  if test "$_guile_major_version" -ge "$_major_version"; then
> +    if test "$_guile_minor_version" -ge "$_minor_version"; then
> +      if test -n "$_micro_version"; then
> +        if test "$_guile_micro_version" -lt "$_micro_version"; then
> +          AC_MSG_ERROR([Guile $_guile_required_version required, but 
> $_guile_prog_version found])

Perhaps error messages should show
$_guile_major_version.$_guile_minor_version.$_guile_micro_version since
that could differ from $_guile_prog_version (for instance in Debian
$_guile_prog_version is something like 2.0.9-deb42.)

For code contributed to Guile, we ask for a copyright assignment to the
FSF.  Would that be OK with you?  If yes, I can send you the form
off-list, and then we can proceed (you might even be able to avoid snail
mail entirely.)

TIA,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]