resolve problems with tools_other() and htmlifypods
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / Liblist.pm
index aa3ba0c..c7c6f77 100644 (file)
@@ -21,7 +21,7 @@ package ExtUtils::Liblist::Kid;
 # This kid package is to be used by MakeMaker.  It will not work if
 # $self is not a Makemaker.
 
-use 5.005_64;
+use 5.006_001;
 # Broken out of MakeMaker from version 4.11
 
 our $VERSION = substr q$Revision: 1.27 $, 10;
@@ -68,20 +68,28 @@ sub _unix_os2_ext {
     foreach $thislib (split ' ', $potential_libs){
 
        # Handle possible linker path arguments.
-       if ($thislib =~ s/^(-[LR])//){  # save path flag type
+       if ($thislib =~ s/^(-[LR]|-Wl,-R)//){   # save path flag type
            my($ptype) = $1;
            unless (-d $thislib){
                warn "$ptype$thislib ignored, directory does not exist\n"
                        if $verbose;
                next;
            }
+           my($rtype) = $ptype;
+           if (($ptype eq '-R') or ($ptype eq '-Wl,-R')) {
+               if ($Config{'lddlflags'} =~ /-Wl,-R/) {
+                   $rtype = '-Wl,-R';
+               } elsif ($Config{'lddlflags'} =~ /-R/) {
+                   $rtype = '-R';
+               }
+           }
            unless ($self->file_name_is_absolute($thislib)) {
              warn "Warning: $ptype$thislib changed to $ptype$pwd/$thislib\n";
              $thislib = $self->catdir($pwd,$thislib);
            }
            push(@searchpath, $thislib);
            push(@extralibs,  "$ptype$thislib");
-           push(@ldloadlibs, "$ptype$thislib");
+           push(@ldloadlibs, "$rtype$thislib");
            next;
        }