This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow explicit '-lperl' in link arguments
authorDoug MacEachern <dougm@opengroup.org>
Thu, 27 Feb 1997 16:25:04 +0000 (11:25 -0500)
committerChip Salzenberg <chip@atlantic.net>
Tue, 25 Feb 1997 01:12:02 +0000 (13:12 +1200)
private-msgid: <199702271625.LAA25402@postman.osf.org>

lib/ExtUtils/Embed.pm

index 4a37184..4d2ed6a 100644 (file)
@@ -17,7 +17,7 @@ use vars qw(@ISA @EXPORT $VERSION
            );
 use strict;
 
-$VERSION = sprintf("%d.%02d", q$Revision: 1.22 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 1.2201 $ =~ /(\d+)\.(\d+)/);
 #for the namespace change
 $Devel::embed::VERSION = "99.99";
 
@@ -199,9 +199,11 @@ sub ldopts {
     }
     #print STDERR "\@potential_libs = @potential_libs\n";
 
+    my $libperl = (grep(/^(-l\w+perl)$/, @link_args))[0] || "-lperl";
+
     my($extralibs, $bsloadlibs, $ldloadlibs, $ld_run_path) =
        $MM->ext(join ' ', 
-                $MM->catdir("-L$Config{archlibexp}", "CORE"), " -lperl", 
+                $MM->catdir("-L$Config{archlibexp}", "CORE"), " $libperl", 
                 @potential_libs);
 
     my $ld_or_bs = $bsloadlibs || $ldloadlibs;