$coredir =~ tr/./_/;
map { s|^$coredir/||i; } @corefiles = <$coredir/*.*>;
}
-else {
+elsif ($Is_Cygwin) { # On Cygwin symlink it to CORE to make Makefile happy
+ my $coredll = "$installarchlib/CORE/$libperl";
+ ( $Config{'d_link'} eq 'define' &&
+ eval { CORE::link "$installbin/$libperl", $coredll } ) ||
+ eval { symlink "$installbin/$libperl", $coredll } ||
+ copy("$installbin/$libperl", $coredll);
+ @corefiles = <*.h libperl*.* perl*$Config{lib_ext}>;
+} else {
# [als] hard-coded 'libperl' name... not good!
@corefiles = <*.h libperl*.* perl*$Config{lib_ext}>;
sub link {
my ($self, %args) = @_;
- # libperl.dll.a fails with -Uusedl. -L../CORE -lperl is better
$args{extra_linker_flags} = [
- '-L'.$self->perl_inc().' -lperl',
+ $self->perl_inc().'/'.($self->{config}{useshrplib} ? 'libperl.dll.a' : 'libperl.a'),
$self->split_like_shell($args{extra_linker_flags})
];
s!-bE:(\S+)!-bE:$perl_exp!;
}
}
+ elsif ($^O eq 'cygwin') { # Cygwin needs no special treatment like below
+ ;
+ }
elsif ($Config{'libperl'} !~ /\Alibperl\./) {
# Everyone needs libperl copied if it's not found by '-lperl'.
$testlib = $Config{'libperl'};