[Rd] Re: [R] Perl v5.6.0 breaks the configure script

Kurt Hornik Kurt.Hornik@ci.tuwien.ac.at
Fri, 7 Apr 2000 12:44:44 +0200 (CEST)

>>>>> Prof Brian D Ripley writes:

> On Fri, 7 Apr 2000, Kurt Hornik wrote:
>> Anyway, I tried adding a line of code to configure.in which uses $], but
>> I failed miserably ... I would either get M4 syntax errors or not get
>> the `]'.  Hence, I changed the test to
>> AC_CACHE_CHECK([whether perl version is at least 5],
>> r_cv_prog_perl_v5,
>> [ ${PERL} -e 'require 5' 2>/dev/null
>> if test ${?} -eq 0; then
>> r_cv_prog_perl_v5=yes
>> else
>> r_cv_prog_perl_v5=no
>> fi
>> ])
>> which I think should also do the job.

> Can anyone test this?  Again, I thought of that, and `require number'
> is not in my Perl 4 book.  So although I think it will fail on Perl4,
> I am not sure.  In any case, it is safer than what went before.

My idea was that if it fails in v4 it is fine anyway.  (Testing for a
feature only present in v5 is also a good test for v5.)

In fact:

khornik@sim:~$ perl4 -v

This is perl, version 4.0

$RCSfile: perl.c,v $$Revision: $$Date: 1993/02/05 19:39:30 $
Patch level: 36

Copyright (c) 1989, 1990, 1991, Larry Wall

khornik@sim:~$ perl4 -e 'require 5'            
Can't locate 5 in @INC at /tmp/perl-ea22225 line 1.


khornik@sim:~$ perl4 -e 'require 5' 2>/dev/null
khornik@sim:~$ echo $?

>> Changed in r-devel only.  If anyone thinks we should also do this in
>> r-release for 1.0.1, pls let me know && I will make the change (assuming
>> that the fix is correct).

> Yes, I think it should be changed. We want 1.0.1 to configure under
> the current Perl, which is the only easy one to find.

Good enough?

r-devel 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-devel-request@stat.math.ethz.ch