This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
blead is upstream for Math-BigInt
[perl5.git] / cpan / Digest-SHA / Makefile.PL
1 require 5.003000;
2
3 use ExtUtils::MakeMaker;
4 use Getopt::Std;
5 use Config;
6
7 my $PM = 'lib/Digest/SHA.pm';
8
9 my %opts;
10 getopts('tx', \%opts);
11
12 my @defines;
13 push(@defines, '-DSHA_PERL_MODULE') if $] >= 5.004;
14 push(@defines, '-DSHA_THREAD_SAFE') if $opts{'t'};
15 push(@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         
22 if ($Config{archname} =~ /^i[3456]86/) {
23         push(@defines, '-DSHA_STO_CLASS=static') unless $opts{'t'};
24 }
25
26 my $define = join(' ', @defines);
27
28 my %att = (
29         'NAME'          => 'Digest::SHA',
30         'VERSION_FROM'  => $PM,
31         'LIBS'          => [''],
32         'DEFINE'        => $define,
33         'INC'           => '-I.',
34         'EXE_FILES'     => [ 'shasum' ],
35         'INSTALLDIRS'   => ($] >= 5.010) ? 'perl' : 'site',
36 );
37
38 my $MMversion = $ExtUtils::MakeMaker::VERSION || 0;
39 $att{NO_META} = 1 unless $MMversion < 6.10_03;
40
41 WriteMakefile(%att);