5 use ExtUtils::MakeMaker;
13 print "Checking if this is gcc 3.4 on Windows trying to link against an import library... ";
14 if ($^O eq 'MSWin32' and not grep /^LD[A-Z]*=/, @ARGV) {
15 my ($libperl, $gccversion) = map $_ || '', @Config{qw<libperl gccversion>};
16 if ($gccversion =~ /^3\.4\.[0-9]+/ and $libperl =~ s/\.lib$//) {
18 my ($lddlflags, $ldflags) = @Config{qw<lddlflags ldflags>};
19 $_ ||= '', s/-L(?:".*?"|\S+)//g for $lddlflags, $ldflags;
20 $libperl = "-l$libperl";
21 my $libdirs = join ' ',
22 map { s/(?<!\\)((?:\\\\)*")/\\$1/g; qq[-L"$_"] }
23 @Config{qw<bin sitebin>};
24 $macro{LDDLFLAGS} = "$lddlflags $libdirs $libperl";
25 $macro{LDFLAGS} = "$ldflags $libdirs $libperl";
30 my $inherited = $self->SUPER::dynamic_lib(@_);
31 $inherited =~ s/"?\$\(PERL_ARCHIVE\)"?//g;
38 print $is_gcc_34 ? "yes\n" : "no\n";
40 # Threads, Windows and 5.8.x don't seem to be best friends
41 if ($^O eq 'MSWin32' and "$]" < 5.009) {
42 push @DEFINES, '-DXSH_MULTIPLICITY=0';
45 # Fork emulation got "fixed" in 5.10.1
46 if ($^O eq 'MSWin32' and "$]" < 5.010_001) {
47 push @DEFINES, '-DXSH_FORKSAFE=0';
50 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
51 %macro = (macro => { %macro }) if %macro; # Beware of the circle
53 my $dist = 'indirect';
55 (my $name = $dist) =~ s{-}{::}g;
57 (my $file = $dist) =~ s{-}{/}g;
58 $file = "lib/$file.pm";
67 'ExtUtils::MakeMaker' => 0,
80 configure_requires => {
82 'ExtUtils::MakeMaker' => 0,
89 bugtracker => "http://rt.cpan.org/Dist/Display.html?Name=$dist",
90 homepage => "http://search.cpan.org/dist/$dist/",
91 license => 'http://dev.perl.org/licenses/',
92 repository => "http://git.vpit.fr/?p=perl%2Fmodules%2F$dist.git",
98 AUTHOR => 'Vincent Pit <vpit@cpan.org>',
100 VERSION_FROM => $file,
101 ABSTRACT_FROM => $file,
104 BUILD_REQUIRES => \%BUILD_REQUIRES,
105 PREREQ_PM => \%PREREQ_PM,
106 MIN_PERL_VERSION => '5.008001',
107 META_MERGE => \%META,
109 PREOP => "pod2text -u $file > \$(DISTVNAME)/README",
110 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
113 FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt*"