Subject: | Respect overridden config values |
If the user overrides %Config flags like 'ccflags' or 'ldflags' (which seems to be necessary in
order to build on OS X for some reason), the Makefile.PL testing process won't see the new
values. The attached patch corrects it.
Subject: | patch.txt |
--- Makefile.PL~ 2007-10-17 09:06:22.000000000 -0500
+++ Makefile.PL 2009-09-06 23:02:44.000000000 -0500
@@ -5,7 +5,7 @@
use Config;
use File::Spec;
-my %config;
+my %config = %Config;
my $ok;
my $devnull = File::Spec->devnull();
@@ -102,7 +102,7 @@
my $incs = shift;
my $file = 'linktest';
- my $obj_ext = $Config{_o};
+ my $obj_ext = $config{_o};
my $prog = <<EOT;
#include <iconv.h>
@@ -119,12 +119,12 @@
{
# It is admittedly a bit simplistic to simply concatenate all
# flags, but it seems to work in most cases.
- $compile = join ' ', $Config{cc}, $incs, $Config{ccflags},
- $Config{ldflags}, $libs;
+ $compile = join ' ', $config{cc}, $incs, $config{ccflags},
+ $config{ldflags}, $libs;
}
else
{
- $compile = join ' ', $Config{cc}, $incs, $Config{ccflags}, $libs;
+ $compile = join ' ', $config{cc}, $incs, $config{ccflags}, $libs;
}
if (exists $config{verbose})