5 use ExtUtils::MakeMaker;
9 if ($Config{d_cplusplus}) {
10 print STDERR <<'FAILPLUSPLUS';
11 Configuration aborted: C++ compilers are not supported
13 Your perl has been built with a C++ compiler, which is then handed to
14 XS extensions as if it were a proper C compiler. This extension is
15 written in C, and naturally only supports C compilers, so it cannot be
18 Note that building perl with a C++ compiler is only supposed to be done
19 by core developers in order to check that the perl headers can be
20 included from C++ code. Its use in the wild is not supported by the
21 perl5 porters. If your vendor has built its perl binary with a C++
22 compiler, please consider reporting this issue to them.
24 This text will be displayed 10 seconds, and then the configuration
35 print "Checking if this is gcc 3.4 on Windows trying to link against an import library... ";
36 if ($^O eq 'MSWin32' and not grep /^LD[A-Z]*=/, @ARGV) {
37 my ($libperl, $gccversion) = map $_ || '', @Config{qw<libperl gccversion>};
38 if ($gccversion =~ /^3\.4\.[0-9]+/ and $libperl =~ s/\.lib$//) {
40 my ($lddlflags, $ldflags) = @Config{qw<lddlflags ldflags>};
41 $_ ||= '', s/-L(?:".*?"|\S+)//g for $lddlflags, $ldflags;
42 $libperl = "-l$libperl";
43 my $libdirs = join ' ',
44 map { s/(?<!\\)((?:\\\\)*")/\\$1/g; qq[-L"$_"] }
45 @Config{qw<bin sitebin>};
46 $macro{LDDLFLAGS} = "$lddlflags $libdirs $libperl";
47 $macro{LDFLAGS} = "$ldflags $libdirs $libperl";
52 my $inherited = $self->SUPER::dynamic_lib(@_);
53 $inherited =~ s/"?\$\(PERL_ARCHIVE\)"?//g;
60 print $is_gcc_34 ? "yes\n" : "no\n";
62 # Threads, Windows and 5.8.x don't seem to be best friends
63 if ($^O eq 'MSWin32' && "$]" < 5.009) {
64 push @DEFINES, '-DXSH_MULTIPLICITY=0';
67 # Fork emulation got "fixed" in 5.10.1
68 if ($^O eq 'MSWin32' && "$]" < 5.010_001) {
69 push @DEFINES, '-DXSH_FORKSAFE=0';
72 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
73 %macro = (macro => { %macro }) if %macro; # Beware of the circle
75 my $dist = 'autovivification';
77 (my $name = $dist) =~ s{-}{::}g;
79 (my $file = $dist) =~ s{-}{/}g;
80 $file = "lib/$file.pm";
86 my %BUILD_REQUIRES = (
89 'ExtUtils::MakeMaker' => 0,
96 configure_requires => {
97 'ExtUtils::MakeMaker' => 0,
104 bugtracker => "http://rt.cpan.org/Dist/Display.html?Name=$dist",
105 homepage => "http://search.cpan.org/dist/$dist/",
106 license => 'http://dev.perl.org/licenses/',
107 repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
113 AUTHOR => 'Vincent Pit <perl@profvince.com>',
115 VERSION_FROM => $file,
116 ABSTRACT_FROM => $file,
119 BUILD_REQUIRES => \%BUILD_REQUIRES,
120 PREREQ_PM => \%PREREQ_PM,
121 MIN_PERL_VERSION => '5.008003',
122 META_MERGE => \%META,
124 PREOP => "pod2text -u $file > \$(DISTVNAME)/README",
125 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
128 FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt*"
136 return <<'POSTAMBLE';
138 PERL_DL_NONLAZY=1 PERLDB_OPTS="NonStop=1" $(FULLPERLRUN) -MTAP::Harness -e 'TAP::Harness->new({verbosity => q{$(VERBOSE)}, lib => [ q{$(INST_LIB)}, q{$(INST_ARCHLIB)} ], switches => [ q{-d} ]})->runtests(@ARGV)' $(TEST_FILES)