Author: bernhard
Date: Sun May 1 14:59:56 2005
New Revision: 7952
Added:
trunk/config/auto/m4.pl
Modified:
trunk/MANIFEST
trunk/config/auto/bc.pl
trunk/lib/Parrot/Configure/RunSteps.pm
Log:
Add a config check fro GNU m4.
This will be used for doublechecking Parrot m4.
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST (original)
+++ trunk/MANIFEST Sun May 1 14:59:56 2005
@@ -171,6 +171,7 @@
config/auto/memalign.pl []
config/auto/memalign/test_c.in []
config/auto/memalign/test_c2.in []
+config/auto/m4.pl []
config/auto/pack.pl []
config/auto/perldoc.pl []
config/auto/python.pl []
Modified: trunk/config/auto/bc.pl
==============================================================================
--- trunk/config/auto/bc.pl (original)
+++ trunk/config/auto/bc.pl Sun May 1 14:59:56 2005
@@ -3,11 +3,13 @@
=head1 NAME
-config/auto/bc - Check whether bc works
+config/auto/bc.pl - Check whether GNU bc works
=head1 DESCRIPTION
-Determines whether bc, the basic calculator, exists on the system.
+Determines whether GNU bc, the basic calculator, exists on the system.
+It is OK when it doesn't exist. Currently GNU bc is only used for
doublechecking
+Parrot bc.
=cut
Added: trunk/config/auto/m4.pl
==============================================================================
--- (empty file)
+++ trunk/config/auto/m4.pl Sun May 1 14:59:56 2005
@@ -0,0 +1,36 @@
+# Copyright: 2005 The Perl Foundation. All Rights Reserved.
+# $Id$
+
+=head1 NAME
+
+config/auto/m4 - Check whether GNU m4 works
+
+=head1 DESCRIPTION
+
+Determines whether GNU m4 exists on the system.
+It is OK when it doesn't exist. Currently GNU m4 is only used for
doublechecking
+Parrot m4.
+
+=cut
+
+package Configure::Step;
+
+use strict;
+use vars qw($description @args);
+use Parrot::Configure::Step ':auto', 'capture_output';
+
+$description = "Determining whether GNU m4 is installed...";
+
[EMAIL PROTECTED] = qw(verbose);
+
+sub runstep {
+ # This seems to work for GNU m4 1.4.2
+ my $a = capture_output( 'm4', '--version' ) || '';
+ my $has_gnu_m4 = ( $a =~ m/^GNU m4 / ) ? 1 : 0;
+
+ Configure::Data->set(has_gnu_m4 => $has_gnu_m4);
+
+ $Configure::Step::result = $has_gnu_m4 ? 'yes' : 'no';
+}
+
+1;
Modified: trunk/lib/Parrot/Configure/RunSteps.pm
==============================================================================
--- trunk/lib/Parrot/Configure/RunSteps.pm (original)
+++ trunk/lib/Parrot/Configure/RunSteps.pm Sun May 1 14:59:56 2005
@@ -63,6 +63,7 @@
auto/python.pl
auto/antlr.pl
auto/bc.pl
+ auto/m4.pl
gen/icu.pl
gen/revision.pl
gen/config_h.pl
@@ -90,7 +91,7 @@
my $verbose = $args{verbose};
my $n = 0;
- for(@steps) {
+ for (@steps) {
undef $Configure::Step::result;
die "No config/$_" unless -e "config/$_";