5 use ExtUtils::MakeMaker;
9 eval { require Config };
10 die 'OS unsupported' if $@;
11 Config->import(qw<%Config>);
18 print "Checking if this is gcc 3.4 on Windows trying to link against an import library... ";
19 if ($^O eq 'MSWin32' and not grep /^LD[A-Z]*=/, @ARGV) {
20 my ($libperl, $gccversion) = map $_ || '', @Config{qw<libperl gccversion>};
21 if ($gccversion =~ /^3\.4\.[0-9]+/ and $libperl =~ s/\.lib$//) {
23 my ($lddlflags, $ldflags) = @Config{qw<lddlflags ldflags>};
24 $_ ||= '', s/-L(?:".*?"|\S+)//g for $lddlflags, $ldflags;
25 $libperl = "-l$libperl";
26 my $libdirs = join ' ',
27 map { s/(?<!\\)((?:\\\\)*")/\\$1/g; qq[-L"$_"] }
28 @Config{qw<bin sitebin>};
29 $macro{LDDLFLAGS} = "$lddlflags $libdirs $libperl";
30 $macro{LDFLAGS} = "$ldflags $libdirs $libperl";
31 $macro{PERL_ARCHIVE} = '',
34 print $is_gcc_34 ? "yes\n" : "no\n";
36 # Threads, Windows and 5.8.x don't seem to be best friends
37 if ($^O eq 'MSWin32' && "$]" < 5.009) {
38 push @DEFINES, '-DA_MULTIPLICITY=0';
41 # Fork emulation got "fixed" in 5.10.1
42 if ($^O eq 'MSWin32' && "$]" < 5.010001) {
43 push @DEFINES, '-DA_FORKSAFE=0';
46 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
47 %macro = (macro => { %macro }) if %macro; # Beware of the circle
49 my $dist = 'autovivification';
51 (my $name = $dist) =~ s{-}{::}g;
53 (my $file = $dist) =~ s{-}{/}g;
54 $file = "lib/$file.pm";
61 configure_requires => {
62 'ExtUtils::MakeMaker' => 0,
65 'ExtUtils::MakeMaker' => 0,
71 bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
72 homepage => "http://search.cpan.org/dist/$dist/",
73 license => 'http://dev.perl.org/licenses/',
74 repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
80 AUTHOR => 'Vincent Pit <perl@profvince.com>',
82 VERSION_FROM => $file,
83 ABSTRACT_FROM => $file,
86 PREREQ_PM => \%PREREQ_PM,
87 MIN_PERL_VERSION => '5.008003',
90 PREOP => "pod2text -u $file > \$(DISTVNAME)/README",
91 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
94 FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt"