forked from kmx/perl-Crypt-OpenSSL-DSA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.PL
37 lines (35 loc) · 1.11 KB
/
Makefile.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use ExtUtils::MakeMaker;
my $lib = '-lcrypto';
my $inc = '';
my $nul = $^O eq 'MSWin32' ? 'nul' : '/dev/null';
if (my $dir = $ENV{OPENSSL_PREFIX}) {
$lib = "-L$dir/lib -lcrypto";
$inc = "-I$dir/include";
}
elsif ($ENV{OPENSSL_LIB}) {
$lib = $ENV{OPENSSL_LIB};
$inc = $ENV{OPENSSL_INCLUDE};
}
elsif (`pkg-config --modversion libcrypto 2>$nul`) {
$lib = `pkg-config --libs libcrypto 2> $nul`;
$inc = `pkg-config --cflags libcrypto 2> $nul`;
}
elsif ($^O eq 'MSWin32') {
$lib = ['-llibeay32'] if $Config{cc} =~ /cl/;
$lib = ['-leay32'] if $Config{cc} =~ /gcc/;
}
WriteMakefile(
'NAME' => 'Crypt::OpenSSL::DSA',
'VERSION_FROM' => 'lib/Crypt/OpenSSL/DSA.pm', # finds $VERSION
'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
'AUTHOR' => 'T.J. Mather',
'LIBS' => [ $lib ],
'INC' => $inc,
'DEFINE' => '-DPERL5', # perl-5.8/gcc-3.2 needs this
'META_MERGE' => {
resources => {
repository => 'https://github.com/kmx/perl-Crypt-OpenSSL-DSA',
},
},
dist => { TARFLAGS => '--owner=0 --group=0 -cvf' },
);