diff options
author | Spider Boardman <spider@orb.nashua.nh.us> | 2001-12-13 10:32:51 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-13 21:30:14 +0000 |
commit | 88eeb692732a0bedeb3c070280522395f40efbd7 (patch) | |
tree | 3c72baf9f73311e3b5fe12d88bcac041aa1997ca | |
parent | ec83e90939bd2859e7f2a0fa60cd4249358debdf (diff) | |
download | perl-88eeb692732a0bedeb3c070280522395f40efbd7.tar.gz |
[ID 20011213.009] Not OK: perl v5.7.2 +DEVEL13660 on alpha-dec_osf-perlio-ld 5.1 (UNINSTALLED)
Message-Id: <200112132032.PAA203491@leggy.zk3.dec.com>
p4raw-id: //depot/perl@13680
-rw-r--r-- | lib/ExtUtils/Embed.t | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/ExtUtils/Embed.t b/lib/ExtUtils/Embed.t index b6ddd0fc3e..24b6a17362 100644 --- a/lib/ExtUtils/Embed.t +++ b/lib/ExtUtils/Embed.t @@ -20,6 +20,8 @@ my $exe = 'embed_test' . $Config{'exe_ext'}; my $obj = 'embed_test' . $Config{'obj_ext'}; my $inc = File::Spec->updir; my $lib = File::Spec->updir; +my $libperl_copied; +my $testlib; my @cmd; my (@cmd2) if $^O eq 'VMS'; @@ -77,12 +79,27 @@ if ($^O eq 'VMS') { for (@cmd) { s!-bE:(\S+)!-bE:$perl_exp!; } - } elsif ($^O eq 'cygwin') { # Cygwin needs the libperl copied + } + elsif ($^O eq 'cygwin') { # Cygwin needs the libperl copied my $v_e_r_s = $Config{version}; $v_e_r_s =~ tr/./_/; system("cp ../libperl$v_e_r_s.dll ./"); # for test 1 system("cp ../$Config{'libperl'} ../libperl.a"); # for test 1 } + elsif ($Config{'libperl'} !~ /\Alibperl\./) { + # Everyone needs libperl copied if it's not found by '-lperl'. + $testlib = $Config{'libperl'}; + my $srclib = $testlib; + $testlib =~ s/^[^.]+/libperl/; + $testlib = File::Spec::->catfile($lib, $testlib); + $srclib = File::Spec::->catfile($lib, $srclib); + if (-f $srclib) { + unlink $testlib if -f $testlib; + my $lncmd = "$Config{'ln'} $srclib $testlib"; + #print "# $lncmd\n"; + $libperl_copied = 1 unless system($lncmd); + } + } } my $status; my $display_cmd = "@cmd"; @@ -104,6 +121,7 @@ unlink($exe,"embed_test.c",$obj); unlink("embed_test.map","embed_test.lis") if $^O eq 'VMS'; unlink(glob("./libperl*.dll")) if $^O eq 'cygwin'; unlink("../libperl.a") if $^O eq 'cygwin'; +unlink($testlib) if $libperl_copied; # gcc -g -I.. -L../ -o perl_test perl_test.c -lperl `../perl -I../lib -MExtUtils::Embed -I../ -e ccopts -e ldopts` |