This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
darwin can have libfoo.0.dylib, as opposed to libfoo.dylib.0
[perl5.git] / cpan / ExtUtils-MakeMaker / lib / ExtUtils / Liblist / Kid.pm
index 95e3dcc..ca12afd 100644 (file)
@@ -11,7 +11,7 @@ use 5.006;
 
 use strict;
 use warnings;
-our $VERSION = '6.86';
+our $VERSION = '6.98';
 
 use ExtUtils::MakeMaker::Config;
 use Cwd 'cwd';
@@ -28,10 +28,10 @@ sub _unix_os2_ext {
     my ( $self, $potential_libs, $verbose, $give_libs ) = @_;
     $verbose ||= 0;
 
-    if ( $^O =~ 'os2' and $Config{perllibs} ) {
+    if ( $^O =~ /os2|android/ and $Config{perllibs} ) {
 
         # Dynamic libraries are not transitive, so we may need including
-        # the libraries linked against perl.dll again.
+        # the libraries linked against perl.dll/libperl.so again.
 
         $potential_libs .= " " if $potential_libs;
         $potential_libs .= $Config{perllibs};
@@ -106,8 +106,10 @@ sub _unix_os2_ext {
             # For gcc-2.6.2 on linux (March 1995), DLD can not load
             # .sa libraries, with the exception of libm.sa, so we
             # deliberately skip them.
-            if ( @fullname = $self->lsdir( $thispth, "^\Qlib$thislib.$so.\E[0-9]+" ) ) {
-
+            if ((@fullname =
+                 $self->lsdir($thispth, "^\Qlib$thislib.$so.\E[0-9]+")) ||
+                (@fullname =
+                 $self->lsdir($thispth, "^\Qlib$thislib.\E[0-9]+\Q\.$so"))) {
                 # Take care that libfoo.so.10 wins against libfoo.so.9.
                 # Compare two libraries to find the most recent version
                 # number.  E.g.  if you have libfoo.so.9.0.7 and