1
# This Makefile.PL for was generated by Dist::Zilla.
2
# Don't edit it but the dist.ini used to construct it.
3
BEGIN { require 5.008; }
6
use ExtUtils::MakeMaker 6.30;
8
my %WriteMakefileArgs = (
9
'ABSTRACT' => 'Minimal XML parser implemented via a C state engine',
10
'AUTHOR' => 'David Helkowski <cpan@codechild.com>, Nigel Metheringham <nigelm@cpan.org>',
12
'Data::Dumper' => '0',
16
'Scalar::Util' => '0',
17
'Test::Harness' => '0',
18
'Test::More' => '0.94'
20
'CONFIGURE_REQUIRES' => {
21
'ExtUtils::MakeMaker' => '6.30'
23
'DISTNAME' => 'XML-Bare',
26
'NAME' => 'XML::Bare',
27
'OBJECT' => 'Bare.o parser.o',
37
'XSOPT' => '-nolinenumbers',
2
use ExtUtils::MakeMaker;
5
AUTHOR => 'David Helkowski <cpan@codechild.com>',
6
ABSTRACT => 'A minimal XML parser / schema checker / pretty-printer using C internally.',
8
VERSION_FROM => 'Bare.pm',
9
XSOPT => '-nolinenumbers', # line number defines were causing issues on some platforms
17
'Test::More' => '0.94'
19
CONFIGURE_REQUIRES => {
20
'ExtUtils::MakeMaker' => '6.30'
44
unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
45
my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
46
my $pp = $WriteMakefileArgs{PREREQ_PM};
47
for my $mod ( keys %$br ) {
48
if ( exists $pp->{$mod} ) {
49
$pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
52
$pp->{$mod} = $br->{$mod};
57
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
58
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
60
WriteMakefile(%WriteMakefileArgs);
31
push( @basics, CC => $cc );
33
if( $ExtUtils::MakeMaker::VERSION >= 6.31 ) {
34
push( @basics, LICENSE => 'perl' );
37
if( $^O eq 'MSWin32' && !$cc ) {
38
gen_msvc(); # special case for msvc
40
elsif( $^O eq 'darwin' ) {
43
elsif( $^O eq 'solaris' ) {
47
gen_cc(); # all others
51
my $libpath = Config->{'archlibexp'};
53
my $sub = $ver % 1000;
56
my $minor = $ver % 1000;
58
my $major = $ver / 1000;
59
WriteMakefile( @basics,
60
CCFLAGS => "/MT /DWIN32 /TP /DNOSTRING",
61
LIBS => ["$libpath\\core\\perl$major$minor.lib"],
62
OBJECT => 'Bare.o parser.o',
63
LDDLFLAGS => '/DLL /NODEFAULTLIB:libcmt',
64
#OPTIMIZE => '-Zl -DNDEBUG -O1', # Because -MD is included by default BLEH
68
WriteMakefile( @basics,
69
OBJECT => 'Bare.o parser.o',
70
LDDLFLAGS => '-shared -L/usr/local/lib',
74
WriteMakefile( @basics,
76
OBJECT => 'Bare.o parser.o',
77
LDDLFLAGS => '-G -L/usr/local/lib', # -G is equiv of -shared
81
if( substr(`which gcc`,0,2) eq 'no' ) {
82
print "XCode must be installed.\n";
85
WriteMakefile( @basics,
87
OBJECT => 'Bare.o parser.o',
88
CCFLAGS => "-dynamiclib -DDARWIN -fno-common",
93
my $div = (substr($ENV{'PATH'},0,1) eq '/') ? ':' : ';';
94
my @path = split($div,$ENV{'PATH'});
95
foreach my $dir ( @path ) {
96
return 'gcc' if( -e "$dir/gcc" || -e "$dir/gcc.exe" ); # prefer gcc
97
return 'cc' if( -e "$dir/cc" || -e "$dir/cc.exe" );
102
# The following are hacks to force static linking and so remove need for msvcr## dll
106
my $res = shift->SUPER::cflags( @_ );
107
if( $^O eq 'MSWin32' ) {
115
my $res = shift->SUPER::const_loadlibs( @_ );
116
if( $^O eq 'MSWin32' ) {
117
$res =~ s/msvcrt\.lib/libcmt\.lib/gi;