[R] Perl v5.6.0 breaks the configure script

Prof Brian D Ripley ripley at stats.ox.ac.uk
Wed Apr 5 11:31:57 CEST 2000

On Wed, 5 Apr 2000, tom kennedy wrote:

> Hi,
> The new version of perl v5.6.0 breaks the configure script.
> When it tests for the version the current test
> perl -v| sed -n 's/^.*perl.*version \(.\).*/\1/p'
> returns null.
> perl -v now returns:
> This is perl, v5.6.0 built for ppc-linux
> Copyright 1987-2000, Larry Wall
> Perl may be copied only under the terms of either the Artistic License
> or the
> GNU General Public License, which may be found in the Perl 5.0 source
> kit.
> Complete documentation for Perl, including FAQ lists, should be found on
> this system using `man perl' or `perldoc perl'.  If you have access to
> the
> Internet, point your browser at http://www.perl.com/, the Perl Home
> Page.
> I don't profess to be a sed expert, so I am not sure how to modify
> this test so as to keep backward compatibility.

I think the trick is to use perl itself, as in

perl_version=`${PERL} -e '$v=$]; $v =~ s/(.)\..*/\1/;print $v'`

as perl is guaranteed to return its version as a number like 5.006
even for `v5.6.0'.

Unfortunately the "]" in there confuses m4 when building configure
from aclocal.m4, but I am sure the experts can fix that.

One could even do the whole test in Perl:

`${PERL} -e 'if($] >= 5) {print "yes";} else {print "no"}'`

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list