From e611f9129311ccd3cff32e420a06a072843ccac9 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Wed, 18 Jun 1997 17:40:14 +1200 Subject: [PATCH] [MM] [PATCH] Re: Liblist problems for MSWin32 On Wed, 18 Jun 1997 14:57:37 EDT, Owen Stenseth wrote: >>>>>> "Sarathy" == Gurusamy Sarathy writes: > Sarathy> On 18 Jun 1997 12:01:59 MDT, Owen Stenseth wrote: > >> When building the extension on NT I ran into a problem with > >> the Liblist. The linker supported on NT does not understand -L > >> or -l switches so the contents of LDLOADLIBS and EXTLIBS cause > >> an error in the linker. > > Sarathy> You should try 5.004_01. I added Liblist support for > Sarathy> win32 in that version. It handles -l and -L flags, as > Sarathy> well as default libraries that are sufficient for most > Sarathy> purposes. Let me know if it doesn't work for you. > >I guess my latest.tgz was not the latest. > > Sarathy> If the problems you describe are with 5.004_01, please do > Sarathy> send us your changes. Thanks. > >No but you do use $verbose instead of $Verbose at the very end of the >_win32_ext sub in the 5.004_01 version. Aak, that was a poor cut-and-paste job from the VMS code (where $Verbose is rightfully called $verbose). Here's a patch, that also incidentally corrects a typo in the VMS code. p5p-msgid: 199706182152.RAA20273@aatma.engin.umich.edu --- lib/ExtUtils/Liblist.pm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm index 9d15fe9..90186d8 100644 --- a/lib/ExtUtils/Liblist.pm +++ b/lib/ExtUtils/Liblist.pm @@ -15,7 +15,7 @@ sub ext { } sub _unix_os2_ext { - my($self,$potential_libs, $Verbose) = @_; + my($self,$potential_libs, $verbose) = @_; if ($^O =~ 'os2' and $Config{libs}) { # Dynamic libraries are not transitive, so we may need including # the libraries linked against perl.dll again. @@ -24,7 +24,7 @@ sub _unix_os2_ext { $potential_libs .= $Config{libs}; } return ("", "", "", "") unless $potential_libs; - print STDOUT "Potential libraries are '$potential_libs':\n" if $Verbose; + print STDOUT "Potential libraries are '$potential_libs':\n" if $verbose; my($so) = $Config{'so'}; my($libs) = $Config{'libs'}; @@ -50,7 +50,7 @@ sub _unix_os2_ext { my($ptype) = $1; unless (-d $thislib){ print STDOUT "$ptype$thislib ignored, directory does not exist\n" - if $Verbose; + if $verbose; next; } unless ($self->file_name_is_absolute($thislib)) { @@ -125,10 +125,10 @@ sub _unix_os2_ext { # # , the compilation tools expand the environment variables.) } else { - print STDOUT "$thislib not found in $thispth\n" if $Verbose; + print STDOUT "$thislib not found in $thispth\n" if $verbose; next; } - print STDOUT "'-l$thislib' found at $fullname\n" if $Verbose; + print STDOUT "'-l$thislib' found at $fullname\n" if $verbose; my($fullnamedir) = dirname($fullname); push @ld_run_path, $fullnamedir unless $ld_run_path_seen{$fullnamedir}++; $found++; @@ -183,7 +183,7 @@ sub _unix_os2_ext { } sub _win32_ext { - my($self, $potential_libs, $Verbose) = @_; + my($self, $potential_libs, $verbose) = @_; # If user did not supply a list, we punt. # (caller should probably use the list in $Config{libs}) @@ -202,7 +202,7 @@ sub _win32_ext { $potential_libs .= " " if $potential_libs; $potential_libs .= $libs; } - print STDOUT "Potential libraries are '$potential_libs':\n" if $Verbose; + print STDOUT "Potential libraries are '$potential_libs':\n" if $verbose; # compute $extralibs from $potential_libs @@ -219,7 +219,7 @@ sub _win32_ext { # Handle possible linker path arguments. if ($thislib =~ s/^-L// and not -d $thislib) { print STDOUT "-L$thislib ignored, directory does not exist\n" - if $Verbose; + if $verbose; next; } elsif (-d $thislib) { @@ -238,10 +238,10 @@ sub _win32_ext { my($found_lib)=0; foreach $thispth (@searchpath, @libpath){ unless (-f ($fullname="$thispth\\$thislib")) { - print STDOUT "$thislib not found in $thispth\n" if $Verbose; + print STDOUT "$thislib not found in $thispth\n" if $verbose; next; } - print STDOUT "'$thislib' found at $fullname\n" if $Verbose; + print STDOUT "'$thislib' found at $fullname\n" if $verbose; $found++; $found_lib++; push(@extralibs, $fullname); @@ -370,7 +370,7 @@ sub _vms_ext { if ($ctype) { eval '$' . $ctype . "{'$cand'}++"; die "Error recording library: $@" if $@; - print STDOUT "\tFound as $cand (really $ctest), type $ctype\n" if $verbose > 1; + print STDOUT "\tFound as $cand (really $test), type $ctype\n" if $verbose > 1; next LIB; } } @@ -403,7 +403,7 @@ ExtUtils::Liblist - determine libraries to use and how to use them C -C +C =head1 DESCRIPTION -- 2.7.4