]> git.vpit.fr Git - perl/modules/autovivification.git/blobdiff - Makefile.PL
Add a basic thread safety test in t/50-threads.t
[perl/modules/autovivification.git] / Makefile.PL
index 01f62934a7f22953ed2a952f86565c557a742711..3c510a82b90fc9325639337739b662a6c6eefba6 100644 (file)
@@ -1,9 +1,23 @@
-use 5.008;
+use 5.008001;
 
 use strict;
 use warnings;
 use ExtUtils::MakeMaker;
 
+my @DEFINES;
+
+# Threads, Windows and 5.8.x don't seem to be best friends
+if ($^O eq 'MSWin32' && $^V lt v5.9.0) {
+ push @DEFINES, '-DA_MULTIPLICITY=0';
+}
+
+# Fork emulation got "fixed" in 5.10.1
+if ($^O eq 'MSWin32' && $^V lt v5.10.1) {
+ push @DEFINES, '-DA_FORKSAFE=0';
+}
+
+@DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
+
 my $dist = 'autovivification';
 
 (my $name = $dist) =~ s{-}{::}g;
@@ -24,7 +38,7 @@ my %META = (
   'Test::More'          => 0,
   %PREREQ_PM,
  },
- dynamic_config => 0,
+ dynamic_config => 1,
  resources => {
   bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
   homepage   => "http://search.cpan.org/dist/$dist/",
@@ -40,8 +54,9 @@ WriteMakefile(
  VERSION_FROM     => $file,
  ABSTRACT_FROM    => $file,
  PL_FILES         => {},
+ @DEFINES,
  PREREQ_PM        => \%PREREQ_PM,
- MIN_PERL_VERSION => 5.008,
+ MIN_PERL_VERSION => 5.008001,
  META_MERGE       => \%META,
  dist             => {
   PREOP    => "pod2text $file > \$(DISTVNAME)/README",