Upgrade to Digest-SHA-5.47
[p5sagit/p5-mst-13.2.git] / ext / 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
6bc89f92 9my %opts;
10getopts('tx', \%opts);
11
4eb6bdb8 12my @defines;
13push(@defines, '-DSHA_PERL_MODULE') if $] >= 5.004;
6bc89f92 14push(@defines, '-DSHA_THREAD_SAFE') if $opts{'t'};
15push(@defines, '-DNO_SHA_384_512') if $opts{'x'};
16
17 # Configure SHA source to use static arrays for
18 # message schedules if compiling on Intel platforms.
19 # This seems to speed things up a bit. However,
20 # DON'T do this if thread-safe option is in force.
21
22if ($Config{archname} =~ /^i[3456]86/) {
23 push(@defines, '-DSHA_STO_CLASS=static') unless $opts{'t'};
24}
25
26my $define = join(' ', @defines);
27
4eb6bdb8 28my %att = (
6bc89f92 29 'NAME' => 'Digest::SHA',
4eb6bdb8 30 'VERSION_FROM' => $PM,
6bc89f92 31 'LIBS' => [''],
6bc89f92 32 'DEFINE' => $define,
33 'INC' => '-I.',
4eb6bdb8 34 'EXE_FILES' => [ 'shasum' ],
35 'INSTALLDIRS' => ($] >= 5.010) ? 'perl' : 'site',
6bc89f92 36);
4eb6bdb8 37
38my $MMversion = $ExtUtils::MakeMaker::VERSION || 0;
39$att{NO_META} = 1 unless $MMversion < 6.10_03;
40
41WriteMakefile(%att);