5 use ExtUtils::MakeMaker;
9 eval { require Config };
10 die 'OS unsupported' if $@;
11 Config->import(qw/%Config/);
12 eval { require File::Spec };
13 die 'OS unsupported' if $@;
14 $has_version_pm = eval "require version; 1" || 0;
18 print 'Checking for valgrind ' . ('>= 3.1.0 ' x $has_version_pm) .'in PATH... ';
19 require Test::Valgrind::Session;
21 Test::Valgrind::Session->new((min_version => '3.1.0') x $has_version_pm)
31 # Inspired from Module::Install::Can
32 print "Checking for a valid C compiler in the PATH... ";
33 my @ccs = ($Config{cc});
34 unshift @ccs, $ENV{CC} if $ENV{CC};
35 my @path = File::Spec->path;
38 File::Spec->file_name_is_absolute($cc)
40 : map File::Spec->catfile($_, $cc), @path
45 if (-x $cc or MM->maybe_command($cc)) {
52 my $xs = 'Valgrind.xs';
53 (my $c = $xs) =~ s/\.xs$/.c/;
64 'File::HomeDir' => '0.86',
67 'File::Temp' => '0.14', # OO interface
68 'Filter::Util::Call' => 0,
72 'Perl::Destruct::Level' => 0,
81 my $dist = 'Test-Valgrind';
84 configure_requires => {
87 'ExtUtils::MakeMaker' => 0,
96 'ExtUtils::MakeMaker' => 0,
105 bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
106 homepage => "http://search.cpan.org/dist/$dist/",
107 license => 'http://dev.perl.org/licenses/',
108 repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
113 NAME => 'Test::Valgrind',
114 AUTHOR => 'Vincent Pit <perl@profvince.com>',
116 VERSION_FROM => 'lib/Test/Valgrind.pm',
117 ABSTRACT_FROM => 'lib/Test/Valgrind.pm',
120 PREREQ_PM => \%PREREQ_PM,
121 MIN_PERL_VERSION => 5.006,
122 META_MERGE => \%META,
124 PREOP => 'pod2text lib/Test/Valgrind.pm > $(DISTVNAME)/README',
125 COMPRESS => 'gzip -9f', SUFFIX => 'gz',
128 FILES => "$dist-* Makefile.bak *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt"