From: Jerry Hedden Date: Tue, 3 Oct 2006 07:49:37 +0000 (-0700) Subject: threads-shared 1.03 - Changes, Makefile.PL X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b30ea4af1eb31dd77630f331817dfe421bf8b269;p=p5sagit%2Fp5-mst-13.2.git threads-shared 1.03 - Changes, Makefile.PL Message-ID: <20061003144937.58522.qmail@web30202.mail.mud.yahoo.com> p4raw-id: //depot/perl@28931 --- diff --git a/MANIFEST b/MANIFEST index 9ee58ba..7ffa3d8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1115,6 +1115,7 @@ ext/threads/hints/linux.pl Hint file for Linux ext/threads/Makefile.PL ithreads ext/Thread/specific.tx Test thread-specific user data ext/threads/README ithreads +ext/threads/shared/Changes Changes for threads::shared ext/threads/shared/hints/linux.pl thread shared variables ext/threads/shared/Makefile.PL thread shared variables ext/threads/shared/README thread shared variables diff --git a/ext/threads/shared/Changes b/ext/threads/shared/Changes new file mode 100644 index 0000000..97d7f97 --- /dev/null +++ b/ext/threads/shared/Changes @@ -0,0 +1,37 @@ +Revision history for Perl extension threads::shared. + +1.03 Fri Sep 15 15:09:26 EDT 2006 + - Fix memory leak caused blessed shared objects + - Upgraded ppport.h to Devel::PPPort 3.10 + +1.02 Fri Jul 14 08:56:03 EDT 2006 + - Skip failing thread/wait tests on HP-UX 10.20 (patch 27920) + - Check for 'C' compiler when building module + - Remove BEGIN block in .pm file + - Upgraded ppport.h to Devel::PPPort 3.09 + +1.01 Sat Mar 25 18:46:44 EST 2006 + - Restoration of 'core' build parameters + +0.99 Sun Mar 19 17:38:52 EST 2006 + - Use $ENV{PERL_CORE} in tests + - More XS code cleanups + - Eliminated use of Exporter + +0.98 Fri Mar 17 13:25:34 EST 2006 + - XS code cleanup + +0.97 Mon Mar 13 14:30:50 EST 2006 + - Cleaned up shared.h as part of the ppport.h upgrade + - Cleaned up tests + - Compatible with 5.9.3 + +0.96 Mon Feb 27 16:50:07 EST 2006 + - Added 'is_shared' as alias to '_id' + - Upgraded ppport.h to v3.08 + - Updated POD with discussion of bless() + +0.95 Fri Feb 03 16:46:00 2006 + - Initial (re-)release to CPAN + - 'bless' is now supported on shared refs + diff --git a/ext/threads/shared/Makefile.PL b/ext/threads/shared/Makefile.PL index 18ac115..b9f5944 100755 --- a/ext/threads/shared/Makefile.PL +++ b/ext/threads/shared/Makefile.PL @@ -1,23 +1,88 @@ +# Module makefile for threads::shared (using ExtUtils::MakeMaker) + +require 5.008; + +use strict; +use warnings; + use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. + +# Used to check for a 'C' compiler +sub check_cc +{ + require File::Spec; + + my $cmd = $_[0]; + if (-x $cmd or MM->maybe_command($cmd)) { + return (1); # CC command found + } + for my $dir (File::Spec->path(), '.') { + my $abs = File::Spec->catfile($dir, $cmd); + if (-x $abs or MM->maybe_command($abs)) { + return (1); # CC command found + } + } + return; +} + +sub have_cc +{ + eval { require Config_m; }; # ExtUtils::FakeConfig (+ ActivePerl) + if ($@) { + eval { require Config; }; # Everyone else + } + my @chunks = split(/ /, $Config::Config{cc}); + # $Config{cc} may contain args; try to find out the program part + while (@chunks) { + if (check_cc("@chunks")) { + return (1); # CC command found + } + pop(@chunks); + } + return; +} + + +# Build options for different environments +my @conditional_params; +if (grep { $_ eq 'PERL_CORE=1' } @ARGV) { + # Core + push(@conditional_params, 'MAN3PODS' => {}); + +} else { + # CPAN + + # Verify that a 'C' compiler is available + if (! have_cc()) { + die("No 'C' compiler found to build 'threads'\n"); + } + + push(@conditional_params, 'DEFINE' => '-DHAS_PPPORT_H'); +} + + +# Create Makefile WriteMakefile( - 'NAME' => 'threads::shared', - 'VERSION_FROM' => 'shared.pm', # finds $VERSION - 'PM' => { - 'shared.pm' => '$(INST_LIBDIR)/shared.pm', - }, - 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 - ($] >= 5.005 ? ## Add these new keywords supported since 5.005 - (ABSTRACT_FROM => 'shared.pm', # retrieve abstract from module - AUTHOR => 'Arthur Bergman ') : ()), - 'MAN3PODS' => {}, # Pods will be built by installman - 'LIBS' => [''], # e.g., '-lm' - 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' - # Insert -I. if you add *.h files later: - 'INC' => '', # e.g., '-I/usr/include/other' - # Un-comment this if you add C files to link with later: - # 'OBJECT' => '$(O_FILES)', # link all the C files too + 'NAME' => 'threads::shared', + 'AUTHOR' => 'Artur Bergman, Jerry D. Hedden ', + 'VERSION_FROM' => 'shared.pm', + 'ABSTRACT_FROM' => 'shared.pm', + 'PM' => { + 'shared.pm' => '$(INST_LIBDIR)/shared.pm', + }, + 'PREREQ_PM' => { + 'threads' => 0, + 'XSLoader' => 0, + }, + 'INSTALLDIRS' => 'perl', + + ((ExtUtils::MakeMaker->VERSION() lt '6.25') ? + ('PL_FILES' => { }) : ()), + ((ExtUtils::MakeMaker->VERSION() gt '6.30') ? + ('LICENSE' => 'perl') : ()), + @conditional_params ); + +# EOF