From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] allow specifying a required version in GUILE_PROGS Date: Mon, 14 Oct 2013 23:05:56 +0200 Message-ID: <87vc0zh8az.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1381785078 32681 80.91.229.3 (14 Oct 2013 21:11:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Oct 2013 21:11:18 +0000 (UTC) Cc: guile-devel@gnu.org To: Aleix Conchillo =?utf-8?Q?Flaqu=C3=A9?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Oct 14 23:11:21 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VVpQ8-0006YZ-W8 for guile-devel@m.gmane.org; Mon, 14 Oct 2013 23:11:21 +0200 Original-Received: from localhost ([::1]:38771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVpQ8-00034y-I4 for guile-devel@m.gmane.org; Mon, 14 Oct 2013 17:11:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVpPv-000314-CN for guile-devel@gnu.org; Mon, 14 Oct 2013 17:11:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VVpPo-0005s2-1i for guile-devel@gnu.org; Mon, 14 Oct 2013 17:11:07 -0400 Original-Received: from hera.aquilenet.fr ([141.255.128.1]:40515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVpPn-0005rw-S0 for guile-devel@gnu.org; Mon, 14 Oct 2013 17:10:59 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id CB9E21343; Mon, 14 Oct 2013 23:05:57 +0200 (CEST) Original-Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t18DUwMEDgl0; Mon, 14 Oct 2013 23:05:57 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 7102E11F7; Mon, 14 Oct 2013 23:05:57 +0200 (CEST) In-Reply-To: ("Aleix Conchillo \=\?utf-8\?Q\?Flaqu\=C3\=A9\=22's\?\= message of "Thu, 3 Oct 2013 15:55:27 -0700") User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 =?utf-8?Q?Vend=C3=A9miaire?= an 222 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Cancel-Lock: sha1:w5AIOj8AgJbkLiOa6aARsm9ZscE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 141.255.128.1 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16677 Archived-At: Hi Aleix, (Second try.) Aleix Conchillo Flaqu=C3=A9 skribis: > From 66fdc5ff8c0fea6c285c5de01cd8efc12ba58e02 Mon Sep 17 00:00:00 2001 > From: Aleix Conchillo Flaque > 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 >=3D 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=3D`$GUILE -c "(display (version))"` > + _guile_major_version=3D`$GUILE -c "(display (major-version))"` > + _guile_minor_version=3D`$GUILE -c "(display (minor-version))"` > + _guile_micro_version=3D`$GUILE -c "(display (micro-version))"` > + > + AC_MSG_CHECKING([for Guile version >=3D $_guile_required_version]) > + _major_version=3D`echo $_guile_required_version | cut -d . -f 1` > + _minor_version=3D`echo $_guile_required_version | cut -d . -f 2` > + _micro_version=3D`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 $_g= uile_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=E2=80=99.