1 # Module makefile for threads::shared (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 (not grep { $_ eq 'PERL_CORE=1' } @ARGV) {
52 # Verify that a 'C' compiler is available
54 die("OS unsupported: ERROR: No 'C' compiler found to build 'threads::shared'\n");
57 push(@conditional_params, 'DEFINE' => '-DHAS_PPPORT_H',
69 'ExtUtils::testlib' => 0,
76 'NAME' => 'threads::shared',
77 'AUTHOR' => 'Artur Bergman, Jerry D. Hedden <jdhedden AT cpan DOT org>',
78 'VERSION_FROM' => 'shared.pm',
79 'ABSTRACT_FROM' => 'shared.pm',
81 'shared.pm' => '$(INST_LIBDIR)/shared.pm',
83 'INSTALLDIRS' => 'perl',
85 ((ExtUtils::MakeMaker->VERSION() lt '6.25') ?
86 ('PL_FILES' => { }) : ()),
87 ((ExtUtils::MakeMaker->VERSION() gt '6.30') ?
88 ('LICENSE' => 'perl') : ()),
93 # Additional 'make' targets
98 @dos2unix `cat MANIFEST`
99 @$(CHMOD) 644 `cat MANIFEST`
100 @$(CHMOD) 755 examples/*.pl
103 @( cd /tmp; perl -e 'use Devel::PPPort; Devel::PPPort::WriteFile("ppport.h");' )
104 @if ! cmp -s ppport.h /tmp/ppport.h; then \
105 ( tkdiff ppport.h /tmp/ppport.h & ); \
106 perl /tmp/ppport.h; \