summaryrefslogtreecommitdiff
path: root/utils/perlivp.PL
diff options
context:
space:
mode:
authorPeter Prymmer <PPrymmer@factset.com>2002-06-12 14:58:50 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2002-06-12 23:05:29 +0000
commit345d73cfd9677ddcbcfc43412ba14d8c2d2004dd (patch)
tree8c16ed4b0a1882eb36e0222be44d1fb3e079707f /utils/perlivp.PL
parent9fdc1d08de8a9ed0db39af3bd6a0da02e31a7029 (diff)
downloadperl-345d73cfd9677ddcbcfc43412ba14d8c2d2004dd.tar.gz
add skipping of threads and threads::shared on default builds
Message-ID: <OF3EE94CDE.1E9C1D28-ON85256BD6.007CC091@55.25.11> p4raw-id: //depot/perl@17211
Diffstat (limited to 'utils/perlivp.PL')
-rw-r--r--utils/perlivp.PL19
1 files changed, 15 insertions, 4 deletions
diff --git a/utils/perlivp.PL b/utils/perlivp.PL
index fa7a8396ad..fd58e87824 100644
--- a/utils/perlivp.PL
+++ b/utils/perlivp.PL
@@ -14,9 +14,9 @@ use Cwd;
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
+my $origdir = cwd;
chdir dirname($0);
-$file = basename($0, '.PL');
+my $file = basename($0, '.PL');
$file .= '.com' if $^O eq 'VMS';
# Create output file.
@@ -37,7 +37,7 @@ $Config{'startperl'}
print OUT <<'!NO!SUBS!';
-# perlivp V 0.01
+# perlivp V 0.02
sub usage {
@@ -56,7 +56,7 @@ Usage:
exit;
}
-use vars (%opt); # allow testing with older versions (do not use our)
+use vars qw(%opt); # allow testing with older versions (do not use our)
@opt{ qw/? H h P p V v/ } = qw(0 0 0 0 0 0 0);
@@ -88,8 +88,15 @@ if (defined($Config{'perlpath'})) { $perlpath = $Config{'perlpath'}; }
# Of course some platforms are distinct...
if ($^O eq 'VMS') { $perlpath = $^X; }
+# The useithreads Config variable plays a role in whether or not
+# threads and threads/shared work when C<use>d. They apparently always
+# get installed on systems that can run Configure.
+my $useithreads = '';
+if (defined($Config{'useithreads'})) { $useithreads = $Config{'useithreads'}; }
+
print OUT <<"!GROK!THIS!";
my \$perlpath = '$perlpath';
+my \$useithreads = '$useithreads';
!GROK!THIS!
print OUT <<'!NO!SUBS!';
@@ -199,6 +206,10 @@ if (defined($Config{'extensions'})) {
my @extensions = split(/\s+/,$Config{'extensions'});
foreach (@extensions) {
next if ($_ eq '');
+ if ( $useithreads !~ /define/i ) {
+ next if ($_ eq 'threads');
+ next if ($_ eq 'threads/shared');
+ }
next if ($_ eq 'Devel/DProf');
# VMS$ perl -e "eval ""require \""Devel/DProf.pm\"";"" print $@"
# \NT> perl -e "eval \"require 'Devel/DProf.pm'\"; print $@"