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