Skip to content

Commit

Permalink
Assume that there is no GNU m4 on FreeBSP, because calling
Browse files Browse the repository at this point in the history
'm4 --version' hangs on FreeBSD.

Thanks to link@redbrick.dcu.ie for pointing this out,
http://rt.perl.org/rt3/Ticket/Display.html?id=36087


git-svn-id: https://svn.parrot.org/parrot/trunk@8255 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
bschmalhofer committed Jun 2, 2005
1 parent 95110b2 commit 1a2f5ed
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions config/auto/m4.pl
Expand Up @@ -24,12 +24,27 @@ package Configure::Step;
@args = 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 [mM]4 / ) ? 1 : 0;
my $archname = $Config{archname};
my ($cpuarch, $osname) = split('-', $archname);
if (!defined $osname) {
($osname, $cpuarch) = ($cpuarch, "");
}

my $has_gnu_m4;

# Calling 'm4 --version' hangs under FreeBSD
my %m4_hangs = ( freebsd => 1
);

if ( $m4_hangs{$osname} ) {
$has_gnu_m4 = 0;
} else {
# This seems to work for GNU m4 1.4.2
my $output = capture_output( 'm4', '--version' ) || '';
$has_gnu_m4 = ( $output =~ m/^GNU [mM]4 / ) ? 1 : 0;
}

Configure::Data->set(has_gnu_m4 => $has_gnu_m4);

$Configure::Step::result = $has_gnu_m4 ? 'yes' : 'no';
}

Expand Down

0 comments on commit 1a2f5ed

Please sign in to comment.