Version 1 (modified by 16 years ago) ( diff ) | ,
---|
271c271 < foreach (Text::ParseWords::quotewords('\s+', 0, $potential_libs)){ ---
foreach (Text::ParseWords::quotewords('\s+', 0, $potential_libs)) {
308,315c308,312 < # handle possible library arguments < if (s/-l and $GC and !/lib/i) { < $_ = "lib$_"; < } < $_ .= $libext if !/\Q$libext\E$/i; < < my $secondpass = 0; < LOOKAGAIN: ---
# try , $_.dll$libext, lib$_.dll$libext, $_$libext, lib$_$libext # the order is important since we want to use .dll.a before .a s/-l; my $found_lib = 0; for my $libname ('lib'.$_.'.dll'.$libext, $_.'.dll'.$libext, 'lib'.$_.$libext, $_.$libext) {
318,319c315,316 < if (-f) { < warn "'$thislib' found as '$_'\n" if $verbose; ---
if (-f $libname) {
warn "'$thislib' found as '$libname'\n" if $verbose;
321,322c318,320 < push(@extralibs, $_); < next; ---
$found_lib++; push(@extralibs, $libname); last;
325,327c323,324
< my $found_lib = 0;
< foreach my $thispth (@searchpath, @libpath){
< unless (-f ($fullname="$thispth
$_")) {
---
foreach my $thispth (reverse @searchpath, @libpath) {
unless (-f ($fullname="$thispth
$libname")) {
339,347c336 < # do another pass with (or without) leading 'lib' if they used -l < if (!$found_lib and $thislib =~ /-l/ and !$secondpass++) { < if ($GC) { < goto LOOKAGAIN if s/libi; < } < elsif (!/lib/i) { < $_ = "lib$_"; < goto LOOKAGAIN; < } ---
last if $found_lib;
350c339 < # give up ---
# express frustration