Subject: | ActivePerl 5.10.1 breaks C/Makefile.PL |
The C/Makefile.PL doesn't allow for $Config{cc} having a '.exe'
extension. In ActivePerl 5.10.1 (build 1006), $Config{cc} has a '.exe'
extension, thus preventing the Makefile.PL from writing a Makefile for
Inline::C. (In earlier versions of ActivePerl the '.exe' extension was
absent and there was no such issue with the C/Makefile.PL.)
The attached patch to the C/Makefile.PL fixes the problem.
Cheers,
Rob
Subject: | C_Makefile.PL.diff |
--- C/Makefile.PL Mon Nov 10 21:35:43 2008
+++ C/Makefile.PL_fixed Fri Sep 4 14:25:33 2009
@@ -5,18 +5,19 @@
my ($cc, $exe) = @Config{'cc', '_exe'};
$cc =~ s/\s+-.+$//; #remove possible trailing options
+my $comp = (split /\./, $cc)[0]; # $comp definitely has no file extension
my $found = 0;
my $delim = $Config::Config{path_sep};
if ($cc =~ m|/:\[|) {
- $found = -f "$cc$exe";
+ $found = -f "$comp$exe";
}
elsif ($cc =~ m|/|) {
- $found = -f "$cc$exe" || -l $cc;
+ $found = -f "$comp$exe" || -l $cc;
}
else {
for my $lib (split $delim, $ENV{PATH}) {
- $found = -f File::Spec->catfile($lib,"$cc$exe") and last;
+ $found = -f File::Spec->catfile($lib,"$comp$exe") and last;
}
}
@@ -31,7 +32,7 @@
Config.pm indicates that your version of Perl was built with this C compiler:
- $cc$exe
+ $comp$exe
END