If this point was reached, it would break Win32, plus
any other system which didn't have an ldd in the PATH.
Perhaps Apache::TestConfig::which() could be used to
see if an ldd() [or otool()] is present, and skip this
part if it's not found?
I guess qx{} is different on win32 ?
Take from example on my FBSD box which does not have 'otool'
% perl -e 'my $command = "otool -L /bin/ls"; qx{$command}; print "\ndone.\n"'
done.
I don't think it matters, but at rate, Apache::TestConfig::which() will better
find ldd/otool.
Does win32 have an equivalent? Also, I fixed the DARWIN constant from the
previous patch.
If this looks good, I'll make similar for A-T and apply both.
[EMAIL PROTECTED] /home/pgollucci/dev/repos/asf/perl/modperl/trunk rv=0 142 >svn diff
lib/ModPerl/Config.pm
Index: lib/ModPerl/Config.pm
===================================================================
--- lib/ModPerl/Config.pm (revision 279773)
+++ lib/ModPerl/Config.pm (working copy)
@@ -21,6 +21,7 @@
use File::Spec ();
use constant WIN32 => Apache2::Build::WIN32;
+use constant DARWIN => Apache2::Build::DARWIN;
sub as_string {
my $build = Apache2::Build->build_config;
@@ -53,6 +54,22 @@
$command = "$httpd -V";
$cfg .= "\n\n*** $command\n";
$cfg .= qx{$command};
+
+ my $command;
+
+ if (DARWIN) {
+ my $otool = Apache::TestConfig::which('otool');
+ $command = " -L $otool" if $otool;
+ }
+ elsif (!WIN32) {
+ my $ldd = Apache::TestConfig::which('ldd');
+ $command = "$ldd $httpd" if $ldd;
+ }
+
+ if ($command) {
+ $cfg .= "\n*** $command\n";
+ $cfg .= qx{$command};
+ }
}
else {
$cfg .= "\n\n*** The httpd binary was not found\n";
--
END
------------------------------------------------------------
What doesn't kill us can only make us stronger.
Nothing is impossible.
Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
http://www.liquidityservicesinc.com
http://www.liquidation.com
http://www.uksurplus.com
http://www.govliquidation.com
http://www.gowholesale.com