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";
26 $macro{PERL_ARCHIVE} = '',
29 print $is_gcc_34 ? "yes\n" : "no\n";
31 # Threads, Windows and 5.8.x don't seem to be best friends
32 if ($^O eq 'MSWin32' and "$]" < 5.009) {
33 push @DEFINES, '-DI_MULTIPLICITY=0';
36 # Fork emulation got "fixed" in 5.10.1
37 if ($^O eq 'MSWin32' and "$]" < 5.010_001) {
38 push @DEFINES, '-DI_FORKSAFE=0';
41 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
42 %macro = (macro => { %macro }) if %macro; # Beware of the circle
44 my $dist = 'indirect';
46 (my $name = $dist) =~ s{-}{::}g;
48 (my $file = $dist) =~ s{-}{/}g;
49 $file = "lib/$file.pm";
58 'ExtUtils::MakeMaker' => 0,
64 configure_requires => {
66 'ExtUtils::MakeMaker' => 0,
73 bugtracker => "http://rt.cpan.org/Dist/Display.html?Name=$dist",
74 homepage => "http://search.cpan.org/dist/$dist/",
75 license => 'http://dev.perl.org/licenses/',
76 repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
82 AUTHOR => 'Vincent Pit <perl@profvince.com>',
84 VERSION_FROM => $file,
85 ABSTRACT_FROM => $file,
88 BUILD_REQUIRES => \%BUILD_REQUIRES,
89 PREREQ_PM => \%PREREQ_PM,
90 MIN_PERL_VERSION => '5.008001',
93 PREOP => "pod2text -u $file > \$(DISTVNAME)/README",
94 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
97 FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt*"