5 use ExtUtils::MakeMaker;
8 eval { require Config };
9 die 'OS unsupported' if $@;
10 Config->import(qw/%Config/);
11 eval { require File::Spec };
12 die 'OS unsupported' if $@;
15 # Inspired from Module::Install::Can
16 print "Checking for a valid C compiler in the PATH... ";
17 my @ccs = ($Config{cc});
18 unshift @ccs, $ENV{CC} if $ENV{CC};
22 for my $dir (split /$Config{path_sep}/, $ENV{PATH}) {
23 my $abs = File::Spec->catfile($dir, $c);
24 if (-x $abs or MM->maybe_command($abs)) {
38 my $arch = $Config{archname} || '';
39 my ($cpu) = $arch =~ /^([^-]+)/;
43 if (unpack("h*", pack("s", 0x1234)) != 4321) {
44 print "Forcing unit size of 8 on non-little-endian systems.\n";
46 my $align = int($Config{alignbytes} || 0);
47 print "Checking unit size in bits... ";
49 push @s, 64 unless $^O eq 'MSWin32';
51 my $size = int($Config{'u' . $_ . 'size'} || 0);
52 $unit = $_ if $size && $size <= $align;
56 push @DEFINES, DEFINE => '-DBV_UNIT="'
57 . ($unit == 64 ? 'uint64_t' : 'U' . $unit)
59 . ' -DSVU_SIZE=' . $unit;
61 my $dist = 'Scalar-Vec-Util';
64 configure_requires => {
66 'ExtUtils::MakeMaker' => 0,
71 'ExtUtils::MakeMaker' => 0,
75 bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
76 homepage => "http://search.cpan.org/dist/$dist/",
77 license => 'http://dev.perl.org/licenses/',
78 repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
83 NAME => 'Scalar::Vec::Util',
84 AUTHOR => 'Vincent Pit <perl@profvince.com>',
86 VERSION_FROM => 'lib/Scalar/Vec/Util.pm',
87 ABSTRACT_FROM => 'lib/Scalar/Vec/Util.pm',
96 MIN_PERL_VERSION => 5.006,
99 PREOP => 'pod2text lib/Scalar/Vec/Util.pm > $(DISTVNAME)/README',
100 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
103 FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt"
112 my $cv = join ' -coverage ', 'cover',
113 qw/statement branch condition path subroutine time/;