3 use ExtUtils::MakeMaker;
7 my $PM = 'lib/Digest/SHA.pm';
10 getopts('tx', \%opts);
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'};
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.
22 if ($Config{archname} =~ /^i[3456]86/) {
23 push(@defines, '-DSHA_STO_CLASS=static') unless $opts{'t'};
26 my $define = join(' ', @defines);
29 'NAME' => 'Digest::SHA',
30 'VERSION_FROM' => $PM,
34 'EXE_FILES' => [ 'shasum' ],
35 'INSTALLDIRS' => ($] >= 5.010) ? 'perl' : 'site',
38 my $MMversion = $ExtUtils::MakeMaker::VERSION || 0;
39 $att{NO_META} = 1 unless $MMversion < 6.10_03;