Author: bernhard
Date: Fri Apr 22 11:30:09 2005
New Revision: 7914
Modified:
trunk/config/auto/bc.pl
Log:
'config/auto/bc.pl' now uses Parrot::Configure::Step::capture_output()
and now checks only for GNU bc.
Modified: trunk/config/auto/bc.pl
==============================================================================
--- trunk/config/auto/bc.pl (original)
+++ trunk/config/auto/bc.pl Fri Apr 22 11:30:09 2005
@@ -15,20 +15,21 @@
use strict;
use vars qw($description @args);
-use Parrot::Configure::Step ':auto';
+use Parrot::Configure::Step ':auto', 'capture_output';
-$description = "Determining whether bc is installed...";
+$description = "Determining whether GNU bc is installed...";
@args = qw(verbose);
sub runstep {
- my $a = `bc -v` || '';
# This seems to work for GNU bc 1.06
- my $has_bc = ($a =~ m/^bc /) ? 1 : 0;
+ my $a = capture_output( 'bc', '-v' ) || '';
+ my $has_gnu_bc = ( $a =~ m/^bc / &&
+ $a =~ m/Free Software Foundation/ ) ? 1 : 0;
- Configure::Data->set(has_bc => $has_bc);
+ Configure::Data->set(has_gnu_bc => $has_gnu_bc);
- $Configure::Step::result = $has_bc ? 'yes' : 'no';
+ $Configure::Step::result = $has_gnu_bc ? 'yes' : 'no';
}
1;