1use 5.006; 2use strict; 3use warnings; 4use ExtUtils::MakeMaker; 5 6unless ($^O eq "MSWin32" || $^O eq "cygwin") { 7 die "OS unsupported\n"; 8} 9 10my %param = ( 11 NAME => 'Win32', 12 VERSION_FROM => 'Win32.pm', 13 INSTALLDIRS => ($] >= 5.008004 && $] < 5.012 ? 'perl' : 'site'), 14 PREREQ_PM => { 15 strict => 0, 16 warnings => 0, 17 vars => 0, 18 Exporter => 0, 19 DynaLoader => 0 20 } 21); 22$param{NO_META} = 1 if eval "$ExtUtils::MakeMaker::VERSION" >= 6.10_03; 23 24if ($^O eq 'cygwin') { 25 $param{LIBS} = ['-L/lib/w32api -lole32 -lversion -luserenv -lnetapi32 -lwinhttp'] 26} 27else { 28 $param{LIBS} = ['-luserenv -lwinhttp'] 29} 30 31my $test_requires = $ExtUtils::MakeMaker::VERSION >= 6.64 32 ? 'TEST_REQUIRES' 33 : 'PREREQ_PM'; 34 35$param{$test_requires}{'Test'} = 0; 36$param{$test_requires}{'File::Temp'} = 0; 37 38WriteMakefile(%param); 39