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,
71 'Perl::Destruct::Level' => 0,
79 my $dist = 'Test-Valgrind';
82 configure_requires => {
85 'ExtUtils::MakeMaker' => 0,
94 'ExtUtils::MakeMaker' => 0,
103 bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
104 homepage => "http://search.cpan.org/dist/$dist/",
105 license => 'http://dev.perl.org/licenses/',
106 repository => "http://git.profvince.com/?p=perl/modules/$dist.git",
111 NAME => 'Test::Valgrind',
112 AUTHOR => 'Vincent Pit <perl@profvince.com>',
114 VERSION_FROM => 'lib/Test/Valgrind.pm',
115 ABSTRACT_FROM => 'lib/Test/Valgrind.pm',
118 PREREQ_PM => \%PREREQ_PM,
119 MIN_PERL_VERSION => 5.006,
120 META_MERGE => \%META,
122 PREOP => 'pod2text lib/Test/Valgrind.pm > $(DISTVNAME)/README',
123 COMPRESS => 'gzip -9f', SUFFIX => 'gz',
126 FILES => "$dist-* Makefile.bak *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt"