File: Makefile.PL

package info (click to toggle)
perl 5.42.0-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 128,392 kB
  • sloc: perl: 534,963; ansic: 240,563; sh: 72,042; pascal: 6,934; xml: 2,428; yacc: 1,360; makefile: 1,197; cpp: 208; lisp: 1
file content (38 lines) | stat: -rw-r--r-- 870 bytes parent folder | download | duplicates (4)
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
38
use 5.006;
use strict;
use warnings;
use ExtUtils::MakeMaker;

unless ($^O eq "MSWin32" || $^O eq "cygwin") {
    die "OS unsupported\n";
}

my %param = (
    NAME          => 'Win32',
    VERSION_FROM  => 'Win32.pm',
    INSTALLDIRS   => ($] >= 5.008004 && $] < 5.012 ? 'perl' : 'site'),
    PREREQ_PM     => {
        strict => 0,
        warnings => 0,
        vars => 0,
        Exporter => 0,
        DynaLoader => 0
    }
);
$param{NO_META} = 1 if eval "$ExtUtils::MakeMaker::VERSION" >= 6.10_03;

if ($^O eq 'cygwin') {
    $param{LIBS} = ['-L/lib/w32api -lole32 -lversion -luserenv -lnetapi32 -lwinhttp']
}
else {
    $param{LIBS} = ['-luserenv -lwinhttp']
}

my $test_requires = $ExtUtils::MakeMaker::VERSION >= 6.64
    ? 'TEST_REQUIRES'
    : 'PREREQ_PM';

$param{$test_requires}{'Test'} = 0;
$param{$test_requires}{'File::Temp'} = 0;

WriteMakefile(%param);