X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=9c341ac75c8d01642bec9de93d712f4847e45be6;hb=bddcde2284b61783c010ede67cd122c17508d598;hp=7c80f4c6b1203f69c560ee02386b201a189accb9;hpb=bfbeb6fd919a8d504c82e743d8c3483cddc9869c;p=p5sagit%2Fstrictures.git diff --git a/Makefile.PL b/Makefile.PL index 7c80f4c..9c341ac 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,6 +4,15 @@ use ExtUtils::MakeMaker; (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; +my %extra_prereqs = ( + indirect => 0, + multidimensional => 0, + 'bareword::filehandles' => 0, +); +my $have_compiler + = eval { require ExtUtils::CBuilder; 1 } + && ExtUtils::CBuilder->new->have_compiler; + WriteMakefile( NAME => 'strictures', VERSION_FROM => 'lib/strictures.pm', @@ -11,7 +20,7 @@ WriteMakefile( META_MERGE => { 'meta-spec' => { version => 2 }, - dynamic_config => 0, + dynamic_config => 1, resources => { # r/w: p5sagit@git.shadowcat.co.uk:strictures.git @@ -26,10 +35,19 @@ WriteMakefile( }, }, - recommends => { - indirect => 0, - multidimensional => 0, - 'bareword::filehandles' => 0, + prereqs => { + configure => { + requires => { + 'ExtUtils::CBuilder' => 0, + }, + }, + runtime => { + ( $] >= 5.008004 && !$have_compiler + ? ( recommends => \%extra_prereqs ) : () ), + }, }, }, + + ($] >= 5.008004 && $have_compiler + ? ( PREREQ_PM => \%extra_prereqs ) : () ), );