From: Spider Boardman Date: Thu, 13 Dec 2001 15:32:51 +0000 (-0500) Subject: [ID 20011213.009] Not OK: perl v5.7.2 +DEVEL13660 on alpha-dec_osf-perlio-ld 5.1... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=88eeb692732a0bedeb3c070280522395f40efbd7;p=p5sagit%2Fp5-mst-13.2.git [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 --- diff --git a/lib/ExtUtils/Embed.t b/lib/ExtUtils/Embed.t index b6ddd0f..24b6a17 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`