Actually note that Shell.pm is deprecated for 5.13 and 5.14, so we can
[p5sagit/p5-mst-13.2.git] / cpan / Digest-SHA / Makefile.PL
CommitLineData
4eb6bdb8 1require 5.003000;
128cbdba 2
6bc89f92 3use ExtUtils::MakeMaker;
4use Getopt::Std;
5use Config;
6
4eb6bdb8 7my $PM = 'lib/Digest/SHA.pm';
8
fd72f444 9my $PERL_CORE = 0;
10$PERL_CORE = 1 if grep { $_ eq 'PERL_CORE=1' } @ARGV;
11
6bc89f92 12my %opts;
13getopts('tx', \%opts);
14
4eb6bdb8 15my @defines;
16push(@defines, '-DSHA_PERL_MODULE') if $] >= 5.004;
6bc89f92 17push(@defines, '-DSHA_THREAD_SAFE') if $opts{'t'};
18push(@defines, '-DNO_SHA_384_512') if $opts{'x'};
19
20 # Configure SHA source to use static arrays for
21 # message schedules if compiling on Intel platforms.
22 # This seems to speed things up a bit. However,
23 # DON'T do this if thread-safe option is in force.
24
25if ($Config{archname} =~ /^i[3456]86/) {
26 push(@defines, '-DSHA_STO_CLASS=static') unless $opts{'t'};
27}
28
29my $define = join(' ', @defines);
30
4eb6bdb8 31my %att = (
6bc89f92 32 'NAME' => 'Digest::SHA',
4eb6bdb8 33 'VERSION_FROM' => $PM,
6bc89f92 34 'LIBS' => [''],
6bc89f92 35 'DEFINE' => $define,
36 'INC' => '-I.',
fd72f444 37 $PERL_CORE ? () : (
38 'EXE_FILES' => [ 'shasum' ],
39 'INSTALLDIRS' => ($] >= 5.010) ? 'perl' : 'site',
40 ),
6bc89f92 41);
4eb6bdb8 42
43my $MMversion = $ExtUtils::MakeMaker::VERSION || 0;
44$att{NO_META} = 1 unless $MMversion < 6.10_03;
45
46WriteMakefile(%att);