Track /etc/gitconfig
[msysgit/mtrensch.git] / lib / perl5 / 5.8.8 / ExtUtils / MM_Msys.pm
bloba55e0b1cede350e004ca2eb69934797146db7787
1 package ExtUtils::MM_Msys;
3 use strict;
4 use vars qw($VERSION @ISA);
6 use ExtUtils::MakeMaker::Config;
7 use File::Spec;
9 require ExtUtils::MM_Any;
10 require ExtUtils::MM_Unix;
11 @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
13 $VERSION = '1.08';
16 =head1 NAME
18 ExtUtils::MM_Msys - methods to override UN*X behaviour in ExtUtils::MakeMaker
20 =head1 SYNOPSIS
22 use ExtUtils::MM_Msys; # Done internally by ExtUtils::MakeMaker if needed
24 =head1 DESCRIPTION
26 See ExtUtils::MM_Unix for a documentation of the methods provided there.
28 =over 4
30 =item os_flavor
32 We're Unix and Msys.
34 =cut
36 sub os_flavor {
37 return('Unix', 'Msys');
40 =item cflags
42 if configured for dynamic loading, triggers #define EXT in EXTERN.h
44 =cut
46 sub cflags {
47 my($self,$libperl)=@_;
48 return $self->{CFLAGS} if $self->{CFLAGS};
49 return '' unless $self->needs_linking();
51 my $base = $self->SUPER::cflags($libperl);
52 foreach (split /\n/, $base) {
53 /^(\S*)\s*=\s*(\S*)$/ and $self->{$1} = $2;
55 $self->{CCFLAGS} .= " -DUSEIMPORTLIB" if ($Config{useshrplib} eq 'true');
57 return $self->{CFLAGS} = qq{
58 CCFLAGS = $self->{CCFLAGS}
59 OPTIMIZE = $self->{OPTIMIZE}
60 PERLTYPE = $self->{PERLTYPE}
66 =item replace_manpage_separator
68 replaces strings '::' with '.' in MAN*POD man page names
70 =cut
72 sub replace_manpage_separator {
73 my($self, $man) = @_;
74 $man =~ s{/+}{.}g;
75 return $man;
78 =item init_linker
80 points to libperl.a
82 =cut
84 sub init_linker {
85 my $self = shift;
87 if ($Config{useshrplib} eq 'true') {
88 my $libperl = '$(PERL_INC)' .'/'. "$Config{libperl}";
89 if( $] >= 5.006002 ) {
90 $libperl =~ s/a$/dll.a/;
92 $self->{PERL_ARCHIVE} = $libperl;
93 } else {
94 $self->{PERL_ARCHIVE} =
95 '$(PERL_INC)' .'/'. ("$Config{libperl}" or "libperl.a");
98 $self->{PERL_ARCHIVE_AFTER} ||= '';
99 $self->{EXPORT_LIST} ||= '';
102 =back
104 =cut