Subject: | ExtUtils-ParseXS-2.02 cygwin patch |
The attached patch fixes the cygwin test problem.
see http://www.mail-archive.com/cgi-bin/htsearch?config=cpan-testers_perl_org&restrict=&exclude=&words=ExtUtils-ParseXS-2.02+cygwin
However, I don't see the reason why not the MakeMaker module is used
in t/basic.t to compile the stuff.
--- ExtUtils-ParseXS-2.02/t/basic.t~ 2003-02-23 23:26:15.000000000 +0100
+++ ExtUtils-ParseXS-2.02/t/basic.t 2003-08-16 20:53:13.000000000 +0200
@@ -20,6 +20,7 @@
my $BCC = $Is_MSWin32 && $Config{cc} =~ /bcc32(\.exe)?$/;
my $MSVC = $Is_MSWin32 && $Config{cc} =~ /cl(\.exe)?$/;
my $MinGW = $Is_MSWin32 && $Config{cc} =~ /gcc(\.exe)?$/;
+my $Cygwin = $^O eq 'cygwin';
#########################
@@ -98,10 +99,10 @@
my $lddlflags = $Config{lddlflags};
my $ld_out = '-o ';
- if ( $Is_MSWin32 ) {
+ if ( $Is_MSWin32 or $Cygwin ) {
require ExtUtils::Mksymlists;
ExtUtils::Mksymlists::Mksymlists(
- 'NAME' => $module, 'DLBASE' => $module, 'IMPORTS' => {} );
+ 'NAME' => $module, 'DLBASE' => $module, 'IMPORTS' => {} ) unless $Cygwin;
if ( $MSVC ) { # Microsoft
$ld_out = '-out:';
@@ -120,6 +121,10 @@
do_system("$Config{ld} $lddlflags -Wl,--base-file -Wl,$module.base $objs $ld_out$module_lib $libs $module.exp");
do_system("dlltool --def $module.def --output-exp $module.exp --base-file $module.base");
$module_def = "$module.exp";
+ } elsif ( $Cygwin ) { # MinGW GCC
+ (my $libperl = $Config{libperl}) =~ s/^(?:lib)?([^.]+).*$/$1/;
+ $libs = "-L$Config{archlibexp}/CORE -l$libperl $libs";
+ do_system("$Config{shrpenv} $Config{ld} $lddlflags -Wl,--base-file -Wl,$module.base $objs $ld_out$module_lib $libs");
}
}