[perl #49780] [config] m4 doesn't hang, it does its job...

2008-01-16 Thread James Keenan via RT
Barney:  auto::m4 is one of a small number of 'auto' config step classes
for which I have *not* yet written any unit tests in t/steps/.  So feel
free to apply your combination of Simon's and your patches whenever
you've resolved the issues that Bruno raised on list.  You're guaranteed
to have all current tests passing ;=)

Of course, if anyone would like to contribute some tests for this step
class, be my guest!

kid51


Re: [perl #49780] [config] m4 doesn't hang, it does its job...

2008-01-15 Thread Bernhard Schmalhofer

Simon Cozens (via RT) schrieb:
# 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:
  

Looks good to me.
Under Linux it seems to still do the right thing.
BTW you can also get rid of:

-my $archname = $conf-data-get_p5('archname');
-my ( $cpuarch, $osname ) = split m/-/, $archname, 2;
-if ( !defined $osname ) {
-( $osname, $cpuarch ) = ( $cpuarch,  );
-}

Regards,
 Bernhard



[perl #49780] [config] m4 doesn't hang, it does its job...

2008-01-15 Thread James Keenan via RT
Since we're on the subject of m4 ...

Are the concerns raised in this ticket still valid?

http://rt.perl.org/rt3/Ticket/Display.html?id=43857


Re: [perl #49780] [config] m4 doesn't hang, it does its job...

2008-01-15 Thread Bernhard Schmalhofer

James Keenan via RT schrieb:

Since we're on the subject of m4 ...

Are the concerns raised in this ticket still valid?

http://rt.perl.org/rt3/Ticket/Display.html?id=43857

  

Yes,

that's still a very sensible TODO.

http://rt.perl.org/rt3/Public/Bug/Display.html?id=31633 is also related 
to that issue.


Regards,
 Bernhard



[perl #49780] [config] m4 doesn't hang, it does its job...

2008-01-14 Thread via RT
# 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' );