]> git.vpit.fr Git - perl/modules/re-engine-Plugin.git/blob - Makefile.PL
Protect against d_cplusplus perls
[perl/modules/re-engine-Plugin.git] / Makefile.PL
1 use 5.010;
2
3 use strict;
4 use warnings;
5 use ExtUtils::MakeMaker;
6
7 use Config;
8
9 if ($Config{d_cplusplus}) {
10  print STDERR <<'FAILPLUSPLUS';
11 Configuration aborted: C++ compilers are not supported
12
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
16     built with your perl.
17
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.
23
24     This text will be displayed 10 seconds, and then the configuration
25     script will exit.
26 FAILPLUSPLUS
27  sleep 10;
28  exit 0;
29 }
30
31 my @DEFINES;
32
33 # Fork emulation got "fixed" in 5.10.1
34 if ($^O eq 'MSWin32' && "$]" < 5.010_001) {
35  push @DEFINES, '-DXSH_FORKSAFE=0';
36 }
37
38 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
39
40 my $dist = 're-engine-Plugin';
41
42 (my $name = $dist) =~ s{-}{::}g;
43
44 my %PREREQ_PM = (
45  'XSLoader' => 0,
46 );
47
48 my %META = (
49  configure_requires => {
50   'ExtUtils::MakeMaker' => 0,
51  },
52  build_requires => {
53   'ExtUtils::MakeMaker' => 0,
54   'Test::More'          => 0,
55   %PREREQ_PM,
56  },
57  dynamic_config => 1,
58  resources => {
59   bugtracker => "http://rt.cpan.org/Dist/Display.html?Name=$dist",
60   homepage   => "http://search.cpan.org/dist/$dist/",
61   license    => 'http://dev.perl.org/licenses/',
62   repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
63  },
64 );
65
66 my @AUTHORS = (
67  "\x{C6}var Arnfj\x{F6}r\x{F0} Bjarmason <avar\@cpan.org>",
68  'Vincent Pit <perl@profvince.com>',
69 );
70
71 my $AUTHOR = $ExtUtils::MakeMaker::VERSION < 6.58 ? $AUTHORS[0]
72                                                   : \@AUTHORS;
73
74 WriteMakefile(
75  NAME             => $name,
76  AUTHOR           => $AUTHOR,
77  LICENSE          => 'perl',
78  ABSTRACT_FROM    => 'Plugin.pod',
79  VERSION_FROM     => 'Plugin.pm',
80  PL_FILES         => {},
81  @DEFINES,
82  PREREQ_PM        => \%PREREQ_PM,
83  MIN_PERL_VERSION => '5.010',
84  META_MERGE       => \%META,
85  dist             => {
86   PREOP    => 'pod2text -u Plugin.pod > $(DISTVNAME)/README',
87   COMPRESS => 'gzip -9f', SUFFIX => 'gz'
88  },
89  clean            => {
90   FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt"
91  },
92  test             => {
93   TESTS => 't/*.t t/*/*.t t/*/*/*.t',
94  },
95 );