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, '-DI_MULTIPLICITY=0';
45 # Fork emulation got "fixed" in 5.10.1
46 if ($^O eq 'MSWin32' and "$]" < 5.010_001) {
47 push @DEFINES, '-DI_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,
79 configure_requires => {
81 'ExtUtils::MakeMaker' => 0,
88 bugtracker => "http://rt.cpan.org/Dist/Display.html?Name=$dist",
89 homepage => "http://search.cpan.org/dist/$dist/",
90 license => 'http://dev.perl.org/licenses/',
91 repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
97 AUTHOR => 'Vincent Pit <perl@profvince.com>',
99 VERSION_FROM => $file,
100 ABSTRACT_FROM => $file,
103 BUILD_REQUIRES => \%BUILD_REQUIRES,
104 PREREQ_PM => \%PREREQ_PM,
105 MIN_PERL_VERSION => '5.008001',
106 META_MERGE => \%META,
108 PREOP => "pod2text -u $file > \$(DISTVNAME)/README",
109 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
112 FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt*"