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 = 'Lexical-Types';
77 (my $name = $dist) =~ s{-}{::}g;
79 (my $file = $dist) =~ s{-}{/}g;
80 $file = "lib/$file.pm";
87 my %BUILD_REQUIRES = (
89 'ExtUtils::MakeMaker' => 0,
97 configure_requires => {
99 'ExtUtils::MakeMaker' => 0,
106 bugtracker => "http://rt.cpan.org/Dist/Display.html?Name=$dist",
107 homepage => "http://search.cpan.org/dist/$dist/",
108 license => 'http://dev.perl.org/licenses/',
109 repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
115 AUTHOR => 'Vincent Pit <perl@profvince.com>',
117 VERSION_FROM => $file,
118 ABSTRACT_FROM => $file,
121 BUILD_REQUIRES => \%BUILD_REQUIRES,
122 PREREQ_PM => \%PREREQ_PM,
123 MIN_PERL_VERSION => '5.008004',
124 META_MERGE => \%META,
126 PREOP => "pod2text -u $file > \$(DISTVNAME)/README",
127 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
130 FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt*"