hv_fetchs() support
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_Cygwin.pm
CommitLineData
f89d6eaa 1package ExtUtils::MM_Cygwin;
2
b75c8c73 3use strict;
f6d6199c 4use vars qw($VERSION @ISA);
b75c8c73 5
7292dc67 6use ExtUtils::MakeMaker::Config;
ecf68df6 7use File::Spec;
8
f6d6199c 9require ExtUtils::MM_Any;
10require ExtUtils::MM_Unix;
11@ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
f89d6eaa 12
7292dc67 13$VERSION = '1.08';
479d2113 14
15
16=head1 NAME
17
18ExtUtils::MM_Cygwin - methods to override UN*X behaviour in ExtUtils::MakeMaker
19
20=head1 SYNOPSIS
21
22 use ExtUtils::MM_Cygwin; # Done internally by ExtUtils::MakeMaker if needed
23
24=head1 DESCRIPTION
25
26See ExtUtils::MM_Unix for a documentation of the methods provided there.
27
28=over 4
29
7292dc67 30=item os_flavor
dedf98bc 31
32We're Unix and Cygwin.
33
34=cut
35
36sub os_flavor {
37 return('Unix', 'Cygwin');
38}
39
7292dc67 40=item cflags
479d2113 41
42if configured for dynamic loading, triggers #define EXT in EXTERN.h
43
44=cut
f89d6eaa 45
46sub cflags {
47 my($self,$libperl)=@_;
48 return $self->{CFLAGS} if $self->{CFLAGS};
e0678a30 49 return '' unless $self->needs_linking();
f6d6199c 50
51 my $base = $self->SUPER::cflags($libperl);
f89d6eaa 52 foreach (split /\n/, $base) {
45bc4d3a 53 /^(\S*)\s*=\s*(\S*)$/ and $self->{$1} = $2;
f89d6eaa 54 };
55 $self->{CCFLAGS} .= " -DUSEIMPORTLIB" if ($Config{useshrplib} eq 'true');
f89d6eaa 56
57 return $self->{CFLAGS} = qq{
58CCFLAGS = $self->{CCFLAGS}
59OPTIMIZE = $self->{OPTIMIZE}
60PERLTYPE = $self->{PERLTYPE}
f89d6eaa 61};
62
63}
64
f89d6eaa 65
7292dc67 66=item replace_manpage_separator
f89d6eaa 67
479d2113 68replaces strings '::' with '.' in MAN*POD man page names
69
70=cut
71
72sub replace_manpage_separator {
73 my($self, $man) = @_;
74 $man =~ s{/+}{.}g;
75 return $man;
f89d6eaa 76}
77
479d2113 78=item init_linker
79
80points to libperl.a
81
82=cut
83
84sub init_linker {
85 my $self = shift;
86
f6d6199c 87 if ($Config{useshrplib} eq 'true') {
88 my $libperl = '$(PERL_INC)' .'/'. "$Config{libperl}";
a7d1454b 89 if( $] >= 5.006002 ) {
a884ca7c 90 $libperl =~ s/a$/dll.a/;
91 }
479d2113 92 $self->{PERL_ARCHIVE} = $libperl;
f6d6199c 93 } else {
479d2113 94 $self->{PERL_ARCHIVE} =
95 '$(PERL_INC)' .'/'. ("$Config{libperl}" or "libperl.a");
f6d6199c 96 }
f89d6eaa 97
479d2113 98 $self->{PERL_ARCHIVE_AFTER} ||= '';
99 $self->{EXPORT_LIST} ||= '';
100}
1cab015a 101
102=back
103
104=cut
105
479d2113 1061;