| 1 | package ExtUtils::Liblist::Kid; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | # XXX Splitting this out into its own .pm is a temporary solution. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | # This kid package is to be used by MakeMaker. It will not work if | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | # $self is not a Makemaker. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 97 | ▶ | use 5.006; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | # Broken out of MakeMaker from version 4.11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 97 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 97 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 97 | our $VERSION = '7.78'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 97 | $VERSION =~ tr/_//d; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 97 | ▶ | use ExtUtils::MakeMaker::Config; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 97 | ▶ | use Cwd 'cwd'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 97 | ▶ | use File::Basename; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 97 | ▶ | use File::Spec; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 229 | ▶ | sub ext { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
ext: called CC=3 SCAR=14.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | if ( $^O eq 'VMS' ) { goto &_vms_ext; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | elsif ( $^O eq 'MSWin32' ) { goto &_win32_ext; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 229 | else { goto &_unix_os2_ext; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 17 | ▶ | sub _space_dirs_split { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_space_dirs_split: called CC=7 SCAR=19.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 17 | my ($libpth) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 17 | ▶ | return if !length $libpth; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 9 | my (@chunks, @ret); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 9 | ▶ | push @chunks, [$1,$2] while $libpth =~ /(\S+)(\s*)/g; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 9 | ▶ | CHUNK: while (@chunks) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 34 | my ($c, $ind) = (shift(@chunks), 0); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 34 | ▶ | if (-d $c->[0]) { push @ret, $c->[0]; next CHUNK; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 2 | my $sofar = join '', @$c; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 2 | ▶ | while ($ind < @chunks) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 1 | my ($this_word, $this_space) = @{ $chunks[$ind] }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 1 | $sofar .= $this_word; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 1 | ▶ | if (-d $sofar) { push @ret, $sofar; next CHUNK; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | 0 | $sofar .= $this_space; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 0 | $ind++; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 9 | @ret; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 229 | ▶ | sub _unix_os2_ext { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_unix_os2_ext: called CC=69 SCAR=59.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 229 | my ( $self, $potential_libs, $verbose, $give_libs ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 229 | ▶ | $verbose ||= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$verbose ||= 0
MC/DC0%0/1
$verbose ||= 0
$verbose
Truth table50%1/2
A
A= $verbose
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 229 | ▶ | if ( $^O =~ /os2|android/ and $Config{perllibs} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$^O =~ /os2|android/ and $ExtUtils::Liblist::Kid::Config{"perllibs"}
MC/DC0%0/2
$^O =~ /os2|android/ and $ExtUtils::Liblist::Kid::Config{"perllibs"}
$^O =~ /os2|android/
$ExtUtils::Liblist::Kid::Config{"perllibs"}
Truth table33%1/3
A and B
A= $^O =~ /os2|android/B= $ExtUtils::Liblist::Kid::Config{"perllibs"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | # Dynamic libraries are not transitive, so we may need including | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | # the libraries linked against perl.dll/libperl.so again. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | ▶ | $potential_libs .= " " if $potential_libs; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 0 | $potential_libs .= $Config{perllibs}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 229 | ▶ | return ( "", "", "", "", ( $give_libs ? [] : () ) ) unless $potential_libs; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 17 | ▶ | warn "Potential libraries are '$potential_libs':\n" if $verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 17 | my ( $so ) = $Config{so}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | 17 | ▶ | my ( $libs ) = defined $Config{perllibs} ? $Config{perllibs} : $Config{libs}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 17 | ▶ | my $Config_libext = $Config{lib_ext} || ".a"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$ExtUtils::Liblist::Kid::Config{'lib_ext'} || '.a'
MC/DC100%1/1
$ExtUtils::Liblist::Kid::Config{'lib_ext'} || '.a'
$ExtUtils::Liblist::Kid::Config{'lib_ext'}
Truth table100%2/2
A
A= $ExtUtils::Liblist::Kid::Config{'lib_ext'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 17 | my $Config_dlext = $Config{dlext}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | # compute $extralibs, $bsloadlibs and $ldloadlibs from | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | # $potential_libs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | # this is a rewrite of Andy Dougherty's extliblist in perl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 17 | require Text::ParseWords; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 17 | my @searchpath; # from "-L/path" entries in $potential_libs | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 17 | ▶ | my @libpath = _space_dirs_split($Config{libpth} || ''); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$ExtUtils::Liblist::Kid::Config{'libpth'} || ''
MC/DC100%1/1
$ExtUtils::Liblist::Kid::Config{'libpth'} || ''
$ExtUtils::Liblist::Kid::Config{'libpth'}
Truth table100%2/2
A
A= $ExtUtils::Liblist::Kid::Config{'libpth'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 17 | my ( @ldloadlibs, @bsloadlibs, @extralibs, @ld_run_path, %ld_run_path_seen ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | 17 | my ( @libs, %libs_seen ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 17 | my ( $fullname, @fullname ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 17 | my ( $pwd ) = cwd(); # from Cwd.pm | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 17 | my ( $found ) = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 17 | ▶ | if ($Config{gccversion}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 8 | chomp(my @incpath = grep s/^ //, grep { /^#include </ .. /^End of search / } `$Config{cc} -E -v - </dev/null 2>&1 >/dev/null`); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | 8 | unshift @libpath, map { s{/include[^/]*}{/lib}; $_ } @incpath | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 17 | @libpath = grep -d, @libpath; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 17 | ▶ | if ($^O eq 'darwin') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | # 'escape' Mach-O ld -framework and -F flags, so they aren't dropped later on | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 0 | ▶ | $found++ if $potential_libs =~ s/(^|\s)(-(?:weak_|reexport_|lazy_)?framework)\s+(\S+)/$1-Wl,$2 -Wl,$3/g; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 0 | ▶ | $found++ if $potential_libs =~ s/(^|\s)(-F)\s*(\S+)/$1-Wl,$2 -Wl,$3/g; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 17 | foreach my $thislib ( Text::ParseWords::shellwords($potential_libs) ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 26 | my ( $custom_name ) = ''; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | # Handle possible linker path arguments. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 26 | ▶ | if ( $thislib =~ s/^(-[LR]|-Wl,-R|-Wl,-rpath,)// ) { # save path flag type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 9 | my ( $ptype ) = $1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 9 | ▶ | unless ( -d $thislib ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 2 | ▶ | warn "$ptype$thislib ignored, directory does not exist\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | if $verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 2 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 7 | my ( $rtype ) = $ptype; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 7 | ▶ | if ( ( $ptype eq '-R' ) or ( $ptype =~ m!^-Wl,-[Rr]! ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$ptype eq "-R" or $ptype =~ /^-Wl,-[Rr]/
MC/DC0%0/2
$ptype eq "-R" or $ptype =~ /^-Wl,-[Rr]/
$ptype eq "-R"
$ptype =~ /^-Wl,-[Rr]/
Truth table33%1/3
A or B
A= $ptype eq "-R"B= $ptype =~ /^-Wl,-[Rr]/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | ▶ | if ( $Config{'lddlflags'} =~ /-Wl,-[Rr]/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | $rtype = '-Wl,-R'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | elsif ( $Config{'lddlflags'} =~ /-R/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | $rtype = '-R'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 7 | ▶ | unless ( File::Spec->file_name_is_absolute( $thislib ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 7 | warn "Warning: $ptype$thislib changed to $ptype$pwd/$thislib\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 7 | $thislib = $self->catdir( $pwd, $thislib ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 7 | push( @searchpath, $thislib ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 7 | ▶ | $thislib = qq{"$thislib"} if $thislib =~ / /; # protect spaces if there | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 7 | push( @extralibs, "$ptype$thislib" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | 7 | push( @ldloadlibs, "$rtype$thislib" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 7 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | 17 | ▶ | if ( $thislib =~ m!^-Wl,! ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | push( @extralibs, $thislib ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | push( @ldloadlibs, $thislib ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | # Handle possible library arguments. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 17 | ▶ | if ( $thislib =~ s/^-l(:)?// ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | # Handle -l:foo.so, which means that the library will | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | # actually be called foo.so, not libfoo.so. This | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | # is used in Android by ExtUtils::Depends to allow one XS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | # module to link to another. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 15 | ▶ | $custom_name = $1 || ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$1 || ''
MC/DC0%0/1
$1 || ''
$1
Truth table50%1/2
A
A= $1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | 2 | warn "Unrecognized argument in LIBS ignored: '$thislib'\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 2 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 15 | my ( $found_lib ) = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 15 | foreach my $thispth ( @searchpath, @libpath ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | # Try to find the full name of the library. We need this to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | # determine whether it's a dynamically-loadable library or not. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | # This tends to be subject to various os-specific quirks. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | # For gcc-2.6.2 on linux (March 1995), DLD can not load | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | # .sa libraries, with the exception of libm.sa, so we | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | # deliberately skip them. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | 64 | ▶ | if ((@fullname = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 12 branches
Condition33%1/3
@fullname = $self->lsdir($thispth, "^\Qlib$thislib.$so.\E[0-9]+") or @fullname = $self->lsdir($thispth, "^\Qlib$thislib.\E[0-9]+\Q.$so\E")
MC/DC0%0/2
@fullname = $self->lsdir($thispth, "^\Qlib$thislib.$so.\E[0-9]+") or @fullname = $self->lsdir($thispth, "^\Qlib$thislib.\E[0-9]+\Q.$so\E")
@fullname = $self->lsdir($thispth, "^\Qlib$thislib.$so.\E[0-9]+")
@fullname = $self->lsdir($thispth, "^\Qlib$thislib.\E[0-9]+\Q.$so\E")
Truth table33%1/3
A or B
A= @fullname = $self->lsdir($thispth, "^\Qlib$thislib.$so.\E[0-9]+")B= @fullname = $self->lsdir($thispth, "^\Qlib$thislib.\E[0-9]+\Q.$so\E")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | $self->lsdir($thispth, "^\Qlib$thislib.$so.\E[0-9]+")) || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | (@fullname = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | $self->lsdir($thispth, "^\Qlib$thislib.\E[0-9]+\Q\.$so"))) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | # Take care that libfoo.so.10 wins against libfoo.so.9. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | # Compare two libraries to find the most recent version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | # number. E.g. if you have libfoo.so.9.0.7 and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | # libfoo.so.10.1, first convert all digits into two | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | # decimal places. Then we'll add ".00" to the shorter | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | # strings so that we're comparing strings of equal length | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | # Thus we'll compare libfoo.so.09.07.00 with | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | # libfoo.so.10.01.00. Some libraries might have letters | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | # in the version. We don't know what they mean, but will | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | # try to skip them gracefully -- we'll set any letter to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | # '0'. Finally, sort in reverse so we can take the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | # first element. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | #TODO: iterate through the directory instead of sorting | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | $fullname = "$thispth/" . ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | my ( $ma ) = $a; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | my ( $mb ) = $b; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | $ma =~ tr/A-Za-z/0/s; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | $ma =~ s/\b(\d)\b/0$1/g; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | $mb =~ tr/A-Za-z/0/s; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | $mb =~ s/\b(\d)\b/0$1/g; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 0 | ▶ | while ( length( $ma ) < length( $mb ) ) { $ma .= ".00"; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | ▶ | while ( length( $mb ) < length( $ma ) ) { $mb .= ".00"; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | # Comparison deliberately backwards | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | $mb cmp $ma; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | } @fullname | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | )[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | elsif ( -f ( $fullname = "$thispth/lib$thislib.$so" ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | ▶ | elsif (-f ( $fullname = "$thispth/lib${thislib}_s$Config_libext" ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition40%2/5
-f ($fullname = "$thispth/lib${thislib}_s$Config_libext") and not $ExtUtils::Liblist::Kid::Config{"archname"} =~ /RM\d\d\d-svr4/ and $thislib .= '_s'
-f ($fullname = "$thispth/lib${thislib}_s$Config_libext") and not $ExtUtils::Liblist::Kid::Config{"archname"} =~ /RM\d\d\d-svr4/
MC/DC0%0/2
-f ($fullname = "$thispth/lib${thislib}_s$Config_libext") and not $ExtUtils::Liblist::Kid::Config{"archname"} =~ /RM\d\d\d-svr4/ and $thislib .= '_s'
-f ($fullname = "$thispth/lib${thislib}_s$Config_libext")
not $ExtUtils::Liblist::Kid::Config{"archname"} =~ /RM\d\d\d-svr4/
Truth table33%1/3
A and not(B)
A= -f ($fullname = "$thispth/lib${thislib}_s$Config_libext")B= not $ExtUtils::Liblist::Kid::Config{"archname"} =~ /RM\d\d\d-svr4/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | && ( $Config{'archname'} !~ /RM\d\d\d-svr4/ ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | && ( $thislib .= "_s" ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | { # we must explicitly use _s version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | elsif ( -f ( $fullname = "$thispth/lib$thislib$Config_libext" ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | ▶ | elsif ( defined( $Config_dlext ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
defined $Config_dlext and -f ($fullname = "$thispth/lib$thislib.$Config_dlext")
MC/DC0%0/2
defined $Config_dlext and -f ($fullname = "$thispth/lib$thislib.$Config_dlext")
defined $Config_dlext
-f ($fullname = "$thispth/lib$thislib.$Config_dlext")
Truth table66%2/3
A and B
A= defined $Config_dlextB= -f ($fullname = "$thispth/lib$thislib.$Config_dlext")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | && -f ( $fullname = "$thispth/lib$thislib.$Config_dlext" ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | ▶ | elsif ( $^O eq 'darwin' && require DynaLoader && defined &DynaLoader::dl_load_file | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%3/9
$^O eq "darwin" and require DynaLoader and defined &DynaLoader::dl_load_file and DynaLoader::dl_load_file($fullname = "$thispth/lib$thislib.$so", 0)
$^O eq "darwin" and require DynaLoader and defined &DynaLoader::dl_load_file
$^O eq "darwin" and require DynaLoader
MC/DC0%0/4
$^O eq "darwin" and require DynaLoader and defined &DynaLoader::dl_load_file and DynaLoader::dl_load_file($fullname = "$thispth/lib$thislib.$so", 0)
$^O eq "darwin"
require DynaLoader
defined &DynaLoader::dl_load_file
DynaLoader::dl_load_file($fullname = "$thispth/lib$thislib.$so", 0)
Truth table20%1/5
A and B and C and D
A= $^O eq "darwin"B= require DynaLoaderC= defined &DynaLoader::dl_load_fileD= DynaLoader::dl_load_file($fullname = "$thispth/lib$thislib.$so", 0)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | && DynaLoader::dl_load_file( $fullname = "$thispth/lib$thislib.$so", 0 ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | elsif ( -f ( $fullname = "$thispth/$thislib$Config_libext" ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | elsif ( -f ( $fullname = "$thispth/lib$thislib.dll$Config_libext" ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | ▶ | elsif ( $^O eq 'cygwin' && -f ( $fullname = "$thispth/$thislib.dll" ) ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$^O eq "cygwin" and -f ($fullname = "$thispth/$thislib.dll")
MC/DC0%0/2
$^O eq "cygwin" and -f ($fullname = "$thispth/$thislib.dll")
$^O eq "cygwin"
-f ($fullname = "$thispth/$thislib.dll")
Truth table33%1/3
A and B
A= $^O eq "cygwin"B= -f ($fullname = "$thispth/$thislib.dll")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | elsif ( -f ( $fullname = "$thispth/Slib$thislib$Config_libext" ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | ▶ | elsif ($^O eq 'dgux' | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
$^O eq "dgux" and -l ($fullname = "$thispth/lib$thislib$Config_libext") and readlink($fullname) =~ /^elink:/s
$^O eq "dgux" and -l ($fullname = "$thispth/lib$thislib$Config_libext")
MC/DC0%0/3
$^O eq "dgux" and -l ($fullname = "$thispth/lib$thislib$Config_libext") and readlink($fullname) =~ /^elink:/s
$^O eq "dgux"
-l ($fullname = "$thispth/lib$thislib$Config_libext")
readlink($fullname) =~ /^elink:/s
Truth table25%1/4
A and B and C
A= $^O eq "dgux"B= -l ($fullname = "$thispth/lib$thislib$Config_libext")C= readlink($fullname) =~ /^elink:/s
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | && -l ( $fullname = "$thispth/lib$thislib$Config_libext" ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | && readlink( $fullname ) =~ /^elink:/s ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | # Some of DG's libraries look like misconnected symbolic | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | # links, but development tools can follow them. (They | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | # look like this: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | # libm.a -> elink:${SDE_PATH:-/usr}/sde/\ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | # ${TARGET_BINARY_INTERFACE:-m88kdgux}/usr/lib/libm.a | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | # , the compilation tools expand the environment variables.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | ▶ | elsif ( $custom_name && -f ( $fullname = "$thispth/$thislib" ) ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$custom_name and -f ($fullname = "$thispth/$thislib")
MC/DC0%0/2
$custom_name and -f ($fullname = "$thispth/$thislib")
$custom_name
-f ($fullname = "$thispth/$thislib")
Truth table33%1/3
A and B
A= $custom_nameB= -f ($fullname = "$thispth/$thislib")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | 59 | ▶ | warn "$thislib not found in $thispth\n" if $verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | 59 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | 5 | ▶ | warn "'-l$thislib' found at $fullname\n" if $verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | 5 | ▶ | push @libs, $fullname unless $libs_seen{$fullname}++; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | 5 | $found++; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | 5 | $found_lib++; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | # Now update library lists | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | # what do we know about this library... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | # "Sounds like we should always assume it's a dynamic library on AIX." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | 5 | ▶ | my $is_dyna = $^O eq 'aix' ? 1 : ( $fullname !~ /\Q$Config_libext\E\z/ ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | 5 | my $in_perl = ( $libs =~ /\B-l:?\Q${thislib}\E\b/s ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | # include the path to the lib once in the dynamic linker path | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | # but only if it is a dynamic lib and not in Perl itself | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | 5 | my ( $fullnamedir ) = dirname( $fullname ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | push @ld_run_path, $fullnamedir | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | if $is_dyna | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | && !$in_perl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | 5 | ▶ | && !$ld_run_path_seen{$fullnamedir}++; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
$is_dyna and not $in_perl and not $ld_run_path_seen{$fullnamedir}++
$is_dyna and not $in_perl
MC/DC0%0/3
$is_dyna and not $in_perl and not $ld_run_path_seen{$fullnamedir}++
$is_dyna
not $in_perl
not $ld_run_path_seen{$fullnamedir}++
Truth table25%1/4
A and not(B) and not(C)
A= $is_dynaB= not $in_perlC= not $ld_run_path_seen{$fullnamedir}++
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | # Do not add it into the list if it is already linked in | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | # with the main perl executable. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | 5 | ▶ | push( @extralibs, "-l$custom_name$thislib" ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | unless $in_perl; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | 5 | ▶ | if ( $is_dyna ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | # For SunOS4, do not add in this shared library if | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | # it is already linked in the main perl executable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | 5 | ▶ | push( @ldloadlibs, "-l$custom_name$thislib" ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$in_perl and $^O eq "sunos"
MC/DC0%0/2
$in_perl and $^O eq "sunos"
$in_perl
$^O eq "sunos"
Truth table33%1/3
A and B
A= $in_perlB= $^O eq "sunos"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | unless ( $in_perl and $^O eq 'sunos' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 0 | push( @ldloadlibs, "-l$custom_name$thislib" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | 5 | last; # found one here so don't bother looking further | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | 15 | ▶ | warn "Warning (mostly harmless): " . "No library found for -l$thislib\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | unless $found_lib > 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | 17 | ▶ | return ( '', '', '', '', ( $give_libs ? \@libs : () ) ) unless $found; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | 5 | ▶ | ( "@extralibs", "@bsloadlibs", "@ldloadlibs", join( ":", @ld_run_path ), ( $give_libs ? \@libs : () ) ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | 0 | ▶ | sub _win32_ext { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_win32_ext: not called CC=23 SCAR=63.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | require Text::ParseWords; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | 0 | my ( $self, $potential_libs, $verbose, $give_libs ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | 0 | ▶ | $verbose ||= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$verbose ||= 0
MC/DC0%0/1
$verbose ||= 0
$verbose
Truth table0%0/2
A
A= $verbose
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | # If user did not supply a list, we punt. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | # (caller should probably use the list in $Config{libs}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | 0 | ▶ | return ( "", "", "", "", ( $give_libs ? [] : () ) ) unless $potential_libs; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | # TODO: make this use MM_Win32.pm's compiler detection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | 0 | my %libs_seen; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | my @extralibs; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | 0 | ▶ | my $cc = $Config{cc} || ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$ExtUtils::Liblist::Kid::Config{'cc'} || ''
MC/DC0%0/1
$ExtUtils::Liblist::Kid::Config{'cc'} || ''
$ExtUtils::Liblist::Kid::Config{'cc'}
Truth table0%0/2
A
A= $ExtUtils::Liblist::Kid::Config{'cc'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | 0 | my $VC = $cc =~ /\bcl\b/i; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | 0 | my $GC = $cc =~ /\bgcc\b/i; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | 0 | my $libext = _win32_lib_extensions(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | 0 | my @searchpath = ( '' ); # from "-L/path" entries in $potential_libs | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | 0 | my @libpath = _win32_default_search_paths( $VC, $GC ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | 0 | my $pwd = cwd(); # from Cwd.pm | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | 0 | my $search = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | # compute @extralibs from $potential_libs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | 0 | my @lib_search_list = _win32_make_lib_search_list( $potential_libs, $verbose ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | 0 | for ( @lib_search_list ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | my $thislib = $_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | # see if entry is a flag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | 0 | ▶ | if ( /^:\w+$/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | 0 | ▶ | $search = 0 if lc eq ':nosearch'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | 0 | ▶ | $search = 1 if lc eq ':search'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | 0 | ▶ | _debug( "Ignoring unknown flag '$thislib'\n", $verbose ) if !/^:(no)?(search|default)$/i; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | # if searching is disabled, do compiler-specific translations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | 0 | ▶ | unless ( $search ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | 0 | ▶ | s/^-l(.+)$/$1.lib/ unless $GC; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | 0 | ▶ | s/^-L/-libpath:/ if $VC; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | 0 | push( @extralibs, $_ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | # handle possible linker path arguments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | 0 | ▶ | if ( s/^-L// and not -d ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/3
s/^-L// and not -d $_
MC/DC0%0/2
s/^-L// and not -d $_
s/^-L//
not -d $_
Truth table0%0/3
A and not(B)
A= s/^-L//B= not -d $_
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | 0 | _debug( "$thislib ignored, directory does not exist\n", $verbose ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | elsif ( -d ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | 0 | ▶ | unless ( File::Spec->file_name_is_absolute( $_ ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | 0 | warn "Warning: '$thislib' changed to '-L$pwd/$_'\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | 0 | $_ = $self->catdir( $pwd, $_ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | 0 | push( @searchpath, $_ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | 0 | my @paths = ( @searchpath, @libpath ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | 0 | my ( $fullname, $path ) = _win32_search_file( $thislib, $libext, \@paths, $verbose, $GC ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | 0 | ▶ | if ( !$fullname ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | 0 | warn "Warning (mostly harmless): No library found for $thislib\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | 0 | _debug( "'$thislib' found as '$fullname'\n", $verbose ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | 0 | push( @extralibs, $fullname ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | 0 | ▶ | $libs_seen{$fullname} = 1 if $path; # why is this a special case? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | 0 | my @libs = sort keys %libs_seen; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | 0 | ▶ | return ( '', '', '', '', ( $give_libs ? \@libs : () ) ) unless @extralibs; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | # make sure paths with spaces are properly quoted | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | 0 | @extralibs = map { qq["$_"] } @extralibs; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | 0 | @libs = map { qq["$_"] } @libs; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | 0 | my $lib = join( ' ', @extralibs ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | # normalize back to backward slashes (to help braindead tools) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | # XXX this may break equally braindead GNU tools that don't understand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | # backslashes, either. Seems like one can't win here. Cursed be CP/M. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | 0 | $lib =~ s,/,\\,g; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | 0 | _debug( "Result: $lib\n", $verbose ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | 0 | ▶ | wantarray ? ( $lib, '', $lib, '', ( $give_libs ? \@libs : () ) ) : $lib; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | 0 | ▶ | sub _win32_make_lib_search_list { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_win32_make_lib_search_list: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | 0 | my ( $potential_libs, $verbose ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | 0 | _debug( "Potential libraries are '$potential_libs':\n", $verbose ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | 0 | $potential_libs =~ s,\\,/,g; # normalize to forward slashes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | 0 | Text::ParseWords::quotewords( '\s+', 0, $potential_libs ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | 0 | ▶ | sub _win32_default_search_paths { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_win32_default_search_paths: not called CC=7 SCAR=40.3
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | 0 | my ( $VC, $GC ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | 0 | ▶ | my $libpth = $Config{'libpth'} || ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$ExtUtils::Liblist::Kid::Config{'libpth'} || ''
MC/DC0%0/1
$ExtUtils::Liblist::Kid::Config{'libpth'} || ''
$ExtUtils::Liblist::Kid::Config{'libpth'}
Truth table0%0/2
A
A= $ExtUtils::Liblist::Kid::Config{'libpth'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | 0 | $libpth =~ s,\\,/,g; # normalize to forward slashes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | 0 | my @libpath = _space_dirs_split($libpth); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | 0 | push @libpath, "$Config{installarchlib}/CORE"; # add "$Config{installarchlib}/CORE" to default search path | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | 0 | ▶ | push @libpath, split /;/, $ENV{LIB} if $VC and $ENV{LIB}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$VC and $ENV{"LIB"}
MC/DC0%0/2
$VC and $ENV{"LIB"}
$VC
$ENV{"LIB"}
Truth table0%0/3
A and B
A= $VCB= $ENV{"LIB"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | 0 | ▶ | push @libpath, split /;/, $ENV{LIBRARY_PATH} if $GC and $ENV{LIBRARY_PATH}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$GC and $ENV{"LIBRARY_PATH"}
MC/DC0%0/2
$GC and $ENV{"LIBRARY_PATH"}
$GC
$ENV{"LIBRARY_PATH"}
Truth table0%0/3
A and B
A= $GCB= $ENV{"LIBRARY_PATH"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | 0 | ▶ | push @libpath, "$ENV{SYSTEMROOT}\\system32" if $ENV{SYSTEMROOT}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | 0 | return @libpath; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | 0 | ▶ | sub _win32_search_file { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_win32_search_file: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | 0 | my ( $thislib, $libext, $paths, $verbose, $GC ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | 0 | my @file_list = _win32_build_file_list( $thislib, $GC, $libext ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | 0 | for my $lib_file ( @file_list ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | 0 | for my $path ( @{$paths} ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | 0 | my $fullname = $lib_file; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | 0 | ▶ | $fullname = "$path\\$fullname" if $path; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | 0 | ▶ | return ( $fullname, $path ) if -f $fullname; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | 0 | _debug( "'$thislib' not found as '$fullname'\n", $verbose ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | 0 | ▶ | sub _win32_build_file_list { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_win32_build_file_list: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | 0 | my ( $lib, $GC, $extensions ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | 0 | my @pre_fixed = _win32_build_prefixed_list( $lib, $GC ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | 0 | return map _win32_attach_extensions( $_, $extensions ), @pre_fixed; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | 0 | ▶ | sub _win32_build_prefixed_list { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_win32_build_prefixed_list: not called CC=6 SCAR=37.4
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | 0 | my ( $lib, $GC ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | 0 | ▶ | return $lib if $lib !~ s/^-l//; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | 0 | ▶ | return $lib if $lib =~ /^lib/ and !$GC; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$lib =~ /^lib/ and not $GC
MC/DC0%0/2
$lib =~ /^lib/ and not $GC
$lib =~ /^lib/
not $GC
Truth table0%0/3
A and not(B)
A= $lib =~ /^lib/B= not $GC
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | 0 | ( my $no_prefix = $lib ) =~ s/^lib//i; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | 0 | ▶ | $lib = "lib$lib" if $no_prefix eq $lib; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | 0 | ▶ | return ( $lib, $no_prefix ) if $GC; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | 0 | return ( $no_prefix, $lib ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | 0 | ▶ | sub _win32_attach_extensions { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_win32_attach_extensions: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | 0 | my ( $lib, $extensions ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | 0 | return map _win32_try_attach_extension( $lib, $_ ), @{$extensions}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | 0 | ▶ | sub _win32_try_attach_extension { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_win32_try_attach_extension: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | 0 | my ( $lib, $extension ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | 0 | ▶ | return $lib if $lib =~ /\Q$extension\E$/i; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | 0 | return "$lib$extension"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | 0 | ▶ | sub _win32_lib_extensions { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_win32_lib_extensions: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | 0 | my @extensions = grep $_, @Config{qw(lib_ext)}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | 0 | push @extensions, map ".$_", grep $_, @Config{qw(dlext so)}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | 0 | ▶ | push @extensions, '.dll.a' if grep { m!^\.a$! } @extensions; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | 0 | ▶ | push @extensions, '.lib' unless grep { m!^\.lib$! } @extensions; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | 0 | return \@extensions; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | 0 | ▶ | sub _debug { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_debug: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | 0 | my ( $message, $verbose ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | 0 | ▶ | return if !$verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | 0 | warn $message; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 459 | 0 | ▶ | sub _vms_ext { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_vms_ext: not called CC=62 SCAR=82.7
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 460 | 0 | my ( $self, $potential_libs, $verbose, $give_libs ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 461 | 0 | ▶ | $verbose ||= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$verbose ||= 0
MC/DC0%0/1
$verbose ||= 0
$verbose
Truth table0%0/2
A
A= $verbose
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 462 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 463 | 0 | my ( @crtls, $crtlstr ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 464 | 0 | ▶ | @crtls = ( ( $Config{'ldflags'} =~ m-/Debug-i ? $Config{'dbgprefix'} : '' ) . 'PerlShr/Share' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 465 | 0 | push( @crtls, grep { not /\(/ } split /\s+/, $Config{'perllibs'} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 466 | 0 | push( @crtls, grep { not /\(/ } split /\s+/, $Config{'libc'} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 467 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 468 | # In general, we pass through the basic libraries from %Config unchanged. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 469 | # The one exception is that if we're building in the Perl source tree, and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 470 | # a library spec could be resolved via a logical name, we go to some trouble | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 471 | # to insure that the copy in the local tree is used, rather than one to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 472 | # which a system-wide logical may point. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 473 | 0 | ▶ | if ( $self->{PERL_SRC} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 474 | 0 | my ( $locspec, $type ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 475 | 0 | foreach my $lib ( @crtls ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 476 | 0 | ▶ | if ( ( $locspec, $type ) = $lib =~ m{^([\w\$-]+)(/\w+)?} and $locspec =~ /perl/i ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
() = $lib =~ m[^([\w\$-]+)(/\w+)?] and $locspec =~ /perl/i
MC/DC0%0/2
() = $lib =~ m[^([\w\$-]+)(/\w+)?] and $locspec =~ /perl/i
() = $lib =~ m[^([\w\$-]+)(/\w+)?]
$locspec =~ /perl/i
Truth table0%0/3
A and B
A= () = $lib =~ m[^([\w\$-]+)(/\w+)?]B= $locspec =~ /perl/i
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 477 | 0 | ▶ | if ( lc $type eq '/share' ) { $locspec .= $Config{'exe_ext'}; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 478 | 0 | elsif ( lc $type eq '/library' ) { $locspec .= $Config{'lib_ext'}; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 479 | 0 | else { $locspec .= $Config{'obj_ext'}; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 480 | 0 | $locspec = $self->catfile( $self->{PERL_SRC}, $locspec ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 481 | 0 | ▶ | $lib = "$locspec$type" if -e $locspec; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 482 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 483 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 484 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 485 | 0 | ▶ | $crtlstr = @crtls ? join( ' ', @crtls ) : ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 486 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 487 | 0 | ▶ | unless ( $potential_libs ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 488 | 0 | ▶ | warn "Result:\n\tEXTRALIBS: \n\tLDLOADLIBS: $crtlstr\n" if $verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 489 | 0 | ▶ | return ( '', '', $crtlstr, '', ( $give_libs ? [] : () ) ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 490 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 491 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 492 | 0 | my ( %found, @fndlibs, $ldlib ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 493 | 0 | my $cwd = cwd(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 494 | 0 | my ( $so, $lib_ext, $obj_ext ) = @Config{ 'so', 'lib_ext', 'obj_ext' }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 495 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 496 | # List of common Unix library names and their VMS equivalents | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 497 | # (VMS equivalent of '' indicates that the library is automatically | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 498 | # searched by the linker, and should be skipped here.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 499 | 0 | my ( @flibs, %libs_seen ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 500 | 0 | my %libmap = ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 501 | 'm' => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 502 | 'f77' => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 503 | 'F77' => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 504 | 'V77' => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 505 | 'c' => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 506 | 'malloc' => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 507 | 'crypt' => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 508 | 'resolv' => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 509 | 'c_s' => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 510 | 'socket' => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 511 | 'X11' => 'DECW$XLIBSHR', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 512 | 'Xt' => 'DECW$XTSHR', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 513 | 'Xm' => 'DECW$XMLIBSHR', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 514 | 'Xmu' => 'DECW$XMULIBSHR' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 515 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 516 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 517 | 0 | ▶ | warn "Potential libraries are '$potential_libs'\n" if $verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 518 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 519 | # First, sort out directories and library names in the input | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 520 | 0 | my ( @dirs, @libs ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 521 | 0 | foreach my $lib ( split ' ', $potential_libs ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 522 | 0 | ▶ | push( @dirs, $1 ), next if $lib =~ /^-L(.*)/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 523 | 0 | ▶ | push( @dirs, $lib ), next if $lib =~ /[:>\]]$/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 524 | 0 | ▶ | push( @dirs, $lib ), next if -d $lib; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 525 | 0 | ▶ | push( @libs, $1 ), next if $lib =~ /^-l(.*)/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 526 | 0 | push( @libs, $lib ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 527 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 528 | 0 | push( @dirs, split( ' ', $Config{'libpth'} ) ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 529 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 530 | # Now make sure we've got VMS-syntax absolute directory specs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 531 | # (We don't, however, check whether someone's hidden a relative | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 532 | # path in a logical name.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 533 | 0 | foreach my $dir ( @dirs ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 534 | 0 | ▶ | unless ( -d $dir ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 535 | 0 | ▶ | warn "Skipping nonexistent Directory $dir\n" if $verbose > 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 536 | 0 | $dir = ''; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 537 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 538 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 539 | 0 | ▶ | warn "Resolving directory $dir\n" if $verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 540 | 0 | ▶ | if ( File::Spec->file_name_is_absolute( $dir ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 541 | 0 | $dir = VMS::Filespec::vmspath( $dir ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 542 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 543 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 544 | 0 | $dir = $self->catdir( $cwd, $dir ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 545 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 546 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 547 | 0 | @dirs = grep { length( $_ ) } @dirs; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 548 | 0 | unshift( @dirs, '' ); # Check each $lib without additions first | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 549 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 550 | 0 | LIB: foreach my $lib ( @libs ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 551 | 0 | ▶ | if ( exists $libmap{$lib} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 552 | 0 | ▶ | next unless length $libmap{$lib}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 553 | 0 | $lib = $libmap{$lib}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 554 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 555 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 556 | 0 | my ( @variants, $cand ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 557 | 0 | my ( $ctype ) = ''; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 558 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 559 | # If we don't have a file type, consider it a possibly abbreviated name and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 560 | # check for common variants. We try these first to grab libraries before | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 561 | # a like-named executable image (e.g. -lperl resolves to perlshr.exe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 562 | # before perl.exe). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 563 | 0 | ▶ | if ( $lib !~ /\.[^:>\]]*$/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 564 | 0 | push( @variants, "${lib}shr", "${lib}rtl", "${lib}lib" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 565 | 0 | ▶ | push( @variants, "lib$lib" ) if $lib !~ /[:>\]]/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 566 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 567 | 0 | push( @variants, $lib ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 568 | 0 | ▶ | warn "Looking for $lib\n" if $verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 569 | 0 | foreach my $variant ( @variants ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 570 | 0 | my ( $fullname, $name ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 571 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 572 | 0 | foreach my $dir ( @dirs ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 573 | 0 | my ( $type ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 574 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 575 | 0 | $name = "$dir$variant"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 576 | 0 | ▶ | warn "\tChecking $name\n" if $verbose > 2; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 577 | 0 | $fullname = VMS::Filespec::rmsexpand( $name ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 578 | 0 | ▶ | if ( defined $fullname and -f $fullname ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
Condition0%0/3
defined $fullname and -f $fullname
MC/DC0%0/2
defined $fullname and -f $fullname
defined $fullname
-f $fullname
Truth table0%0/3
A and B
A= defined $fullnameB= -f $fullname
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 579 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 580 | # It's got its own suffix, so we'll have to figure out the type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 581 | 0 | ▶ | if ( $fullname =~ /(?:$so|exe)$/i ) { $type = 'SHR'; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 582 | 0 | elsif ( $fullname =~ /(?:$lib_ext|olb)$/i ) { $type = 'OLB'; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 583 | elsif ( $fullname =~ /(?:$obj_ext|obj)$/i ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 584 | 0 | warn "Warning (mostly harmless): " . "Plain object file $fullname found in library list\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 585 | 0 | $type = 'OBJ'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 586 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 587 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 588 | 0 | warn "Warning (mostly harmless): " . "Unknown library type for $fullname; assuming shared\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 589 | 0 | $type = 'SHR'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 590 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 591 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 592 | ▶ | elsif (-f ( $fullname = VMS::Filespec::rmsexpand( $name, $so ) ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
-f ($fullname = VMS::Filespec::rmsexpand($name, $so)) or -f ($fullname = VMS::Filespec::rmsexpand($name, ".exe"))
MC/DC0%0/2
-f ($fullname = VMS::Filespec::rmsexpand($name, $so)) or -f ($fullname = VMS::Filespec::rmsexpand($name, ".exe"))
-f ($fullname = VMS::Filespec::rmsexpand($name, $so))
-f ($fullname = VMS::Filespec::rmsexpand($name, ".exe"))
Truth table0%0/3
A or B
A= -f ($fullname = VMS::Filespec::rmsexpand($name, $so))B= -f ($fullname = VMS::Filespec::rmsexpand($name, ".exe"))
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 593 | or -f ( $fullname = VMS::Filespec::rmsexpand( $name, '.exe' ) ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 594 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 595 | 0 | $type = 'SHR'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 596 | 0 | ▶ | $name = $fullname unless $fullname =~ /exe;?\d*$/i; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 597 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 598 | ▶ | elsif ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
not length $ctype and -f ($fullname = VMS::Filespec::rmsexpand($name, $lib_ext)) || -f ($fullname = VMS::Filespec::rmsexpand($name, ".olb"))
-f ($fullname = VMS::Filespec::rmsexpand($name, $lib_ext)) or -f ($fullname = VMS::Filespec::rmsexpand($name, ".olb"))
MC/DC0%0/3
not length $ctype and -f ($fullname = VMS::Filespec::rmsexpand($name, $lib_ext)) || -f ($fullname = VMS::Filespec::rmsexpand($name, ".olb"))
not length $ctype
-f ($fullname = VMS::Filespec::rmsexpand($name, $lib_ext))
-f ($fullname = VMS::Filespec::rmsexpand($name, ".olb"))
Truth table0%0/4
not(A) and B or C
A= not length $ctypeB= -f ($fullname = VMS::Filespec::rmsexpand($name, $lib_ext))C= -f ($fullname = VMS::Filespec::rmsexpand($name, ".olb"))
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 599 | not length( $ctype ) and # If we've got a lib already, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 600 | # don't bother | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 601 | ( -f ( $fullname = VMS::Filespec::rmsexpand( $name, $lib_ext ) ) or -f ( $fullname = VMS::Filespec::rmsexpand( $name, '.olb' ) ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 602 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 603 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 604 | 0 | $type = 'OLB'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 605 | 0 | ▶ | $name = $fullname unless $fullname =~ /olb;?\d*$/i; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 606 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 607 | ▶ | elsif ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
not length $ctype and -f ($fullname = VMS::Filespec::rmsexpand($name, $obj_ext)) || -f ($fullname = VMS::Filespec::rmsexpand($name, ".obj"))
-f ($fullname = VMS::Filespec::rmsexpand($name, $obj_ext)) or -f ($fullname = VMS::Filespec::rmsexpand($name, ".obj"))
MC/DC0%0/3
not length $ctype and -f ($fullname = VMS::Filespec::rmsexpand($name, $obj_ext)) || -f ($fullname = VMS::Filespec::rmsexpand($name, ".obj"))
not length $ctype
-f ($fullname = VMS::Filespec::rmsexpand($name, $obj_ext))
-f ($fullname = VMS::Filespec::rmsexpand($name, ".obj"))
Truth table0%0/4
not(A) and B or C
A= not length $ctypeB= -f ($fullname = VMS::Filespec::rmsexpand($name, $obj_ext))C= -f ($fullname = VMS::Filespec::rmsexpand($name, ".obj"))
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 608 | not length( $ctype ) and # If we've got a lib already, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 609 | # don't bother | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 610 | ( -f ( $fullname = VMS::Filespec::rmsexpand( $name, $obj_ext ) ) or -f ( $fullname = VMS::Filespec::rmsexpand( $name, '.obj' ) ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 611 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 612 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 613 | 0 | warn "Warning (mostly harmless): " . "Plain object file $fullname found in library list\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 614 | 0 | $type = 'OBJ'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 615 | 0 | ▶ | $name = $fullname unless $fullname =~ /obj;?\d*$/i; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 616 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 617 | 0 | ▶ | if ( defined $type ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 618 | 0 | $ctype = $type; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 619 | 0 | $cand = $name; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 620 | 0 | ▶ | last if $ctype eq 'SHR'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 621 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 622 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 623 | 0 | ▶ | if ( $ctype ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 624 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 625 | 0 | push @{ $found{$ctype} }, $cand; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 626 | 0 | ▶ | warn "\tFound as $cand (really $fullname), type $ctype\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 627 | if $verbose > 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 628 | 0 | ▶ | push @flibs, $name unless $libs_seen{$fullname}++; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 629 | 0 | next LIB; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 630 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 631 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 632 | 0 | warn "Warning (mostly harmless): " . "No library found for $lib\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 633 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 634 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 635 | 0 | ▶ | push @fndlibs, @{ $found{OBJ} } if exists $found{OBJ}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 636 | 0 | ▶ | push @fndlibs, map { "$_/Library" } @{ $found{OLB} } if exists $found{OLB}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 637 | 0 | ▶ | push @fndlibs, map { "$_/Share" } @{ $found{SHR} } if exists $found{SHR}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 638 | 0 | my $lib = join( ' ', @fndlibs ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 639 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 640 | 0 | ▶ | $ldlib = $crtlstr ? "$lib $crtlstr" : $lib; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 641 | 0 | $ldlib =~ s/^\s+|\s+$//g; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 642 | 0 | ▶ | warn "Result:\n\tEXTRALIBS: $lib\n\tLDLOADLIBS: $ldlib\n" if $verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 643 | 0 | ▶ | wantarray ? ( $lib, '', $ldlib, '', ( $give_libs ? \@flibs : () ) ) : $lib; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 644 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 645 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 646 | 97 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||