1 # Module makefile for threads (using ExtUtils::MakeMaker)
8 use ExtUtils::MakeMaker;
11 # Used to check for a 'C' compiler
17 if (-x $cmd or MM->maybe_command($cmd)) {
18 return (1); # CC command found
20 for my $dir (File::Spec->path(), '.') {
21 my $abs = File::Spec->catfile($dir, $cmd);
22 if (-x $abs or MM->maybe_command($abs)) {
23 return (1); # CC command found
31 eval { require Config_m; }; # ExtUtils::FakeConfig (+ ActivePerl)
33 eval { require Config; }; # Everyone else
35 my @chunks = split(/ /, $Config::Config{cc});
36 # $Config{cc} may contain args; try to find out the program part
38 if (check_cc("@chunks")) {
39 return (1); # CC command found
47 # Build options for different environments
48 my @conditional_params;
49 if (grep { $_ eq 'PERL_CORE=1' } @ARGV) {
51 push(@conditional_params, 'MAN3PODS' => {},
56 # Verify that a 'C' compiler is available
58 die("No 'C' compiler found to build 'threads'\n");
61 push(@conditional_params, 'DEFINE' => '-DHAS_PPPORT_H');
68 'AUTHOR' => 'Artur Bergman <sky AT crucially DOT net>',
69 'VERSION_FROM' => 'threads.pm',
70 'ABSTRACT_FROM' => 'threads.pm',
72 'threads.pm' => '$(INST_LIBDIR)/threads.pm',
75 'threads::shared' => 0,
78 'INSTALLDIRS' => 'perl',
80 ((ExtUtils::MakeMaker->VERSION() lt '6.25') ?
81 ('PL_FILES' => { }) : ()),
82 ((ExtUtils::MakeMaker->VERSION() gt '6.30') ?
83 ('LICENSE' => 'perl') : ()),