From: Marek Rouchal Date: Mon, 2 Aug 2004 07:00:33 +0000 (+0000) Subject: [perl #30914] ExtUtils::Embed should use libperl name from Config X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9720141bbbaf9dc75f85beae2c8d043b2ab26492;p=p5sagit%2Fp5-mst-13.2.git [perl #30914] ExtUtils::Embed should use libperl name from Config From: Marek Rouchal (via RT) Message-ID: p4raw-id: //depot/perl@23186 --- diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm index eedb268..2d6470e 100644 --- a/lib/ExtUtils/Embed.pm +++ b/lib/ExtUtils/Embed.pm @@ -18,7 +18,7 @@ use vars qw(@ISA @EXPORT $VERSION ); use strict; -$VERSION = 1.2506_01; +$VERSION = 1.26; @ISA = qw(Exporter); @EXPORT = qw(&xsinit &ldopts @@ -226,7 +226,10 @@ sub ldopts { $libperl = $Config{libperl}; } else { - $libperl = (grep(/^-l\w*perl\w*$/, @link_args))[0] || "-lperl"; + $libperl = (grep(/^-l\w*perl\w*$/, @link_args))[0] + || ($Config{libperl} =~ /^lib(\w+)(\Q$lib_ext\E|\.\Q$Config{dlext}\E)$/ + ? "-l$1" : '') + || "-lperl"; } my $lpath = File::Spec->catdir($Config{archlibexp}, 'CORE');