# New Ticket Created by Simon Cozens
# Please include the string: [perl #49780]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=49780 >
There's some code in config to detect 'm4 --version' "hanging" on FreeBSD.
It doesn't hang, it just silently ignores the option and starts
preprocessing the input from stdin.
This is true for all BSD-derived m4s - I'm actually running on *cough*
Minix, and the same behaviour is true there.
I think this patch will DTRT, but I'm not applying it because I'd like
someone else who's done configure stuff to have a look at it first:
Index: config/auto/m4.pm
===================================================================
--- config/auto/m4.pm (revision 24866)
+++ config/auto/m4.pm (working copy)
@@ -46,20 +46,11 @@
my $has_gnu_m4;
- # Calling 'm4 --version' hangs under FreeBSD
- my %m4_hangs = ( freebsd => 1 );
+ # This seems to work for GNU m4 1.4.2
+ my $output = capture_output( 'echo "foo" | m4 --version' ) || '';
+ print $output, "\n" if $verbose;
+ $has_gnu_m4 = ( $output =~ m/GNU\s+[mM]4/ ) ? 1 : 0;
- 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' ) || '';
- print $output, "\n" if $verbose;
- $has_gnu_m4 = ( $output =~ m/GNU\s+[mM]4/ ) ? 1 : 0;
- }
-
$conf->data->set( has_gnu_m4 => $has_gnu_m4 );
$self->set_result( $has_gnu_m4 ? 'yes' : 'no' );