blib/lib/ExtUtils/F77.pm

filter: Statementstmt 49.5% 174 / 351 Branchbran 19.8% 29 / 146 Conditioncond 5.6% 4 / 71 MC/DCmcdc 0.0% 0 / 41 Subroutinesub 63.6% 21 / 33 Podpod 37.5% 6 / 16 totaltotal 35.5% 234 / 658 CC 82 SCAR 42.2
CC
82
Cov
36%
__ANON__
178.0
gcclibs
132.0
validate_libs
110.0
CRAP 67.9
↑ Summary
1 package ExtUtils::F77;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Text::ParseWords;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use File::Which qw(which);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use List::Util qw(first);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 our $VERSION = "1.26";
12 1 our $DEBUG;
13  
14 6 ▶sub debug { return if !$DEBUG; warn @_ }
Subroutine debug: called CC=2 SCAR=7.2
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
unless $ExtUtils::F77::DEBUG 0 6 6
15  
16 1 print "Loaded ExtUtils::F77 version $VERSION\n";
17  
18 1 my %F77config=();
19 1 my $Runtime = "-LSNAFU -lwontwork";
20 1 my $RuntimeOK = 0;
21 1 my $Trail_ = 1;
22 1 my $Pkg = "";
23 1 my $Compiler = "";
24 1 my $Cflags = "";
25 1 my ($gcc, $gfortran, $fallback_compiler);
26  
27 # all the compilers and their libraries
28 1 my %COMPLIBS = (
29 g77 => [qw/ g2c f2c /],
30 f77 => [qw/ g2c f2c /],
31 fort77 => [qw/ g2c f2c /],
32 gfortran => [qw/ gfortran /],
33 g95 => [qw/ f95 /],
34 );
35  
36 ########## Win32 Specific ##############
37  
38 1 ▶if ($^O =~ /MSWin/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O =~ /MSWin/i) { } 0 1 1
39 0 my @version;
40 0 ▶ if ($Config{cc} =~ /x86_64\-w64\-mingw32\-gcc/) {
Branch: 2 branches
BranchTrueFalseTotal
if ($ExtUtils::F77::Config{'cc'} =~ /x86_64\-w64\-mingw32\-gcc/) { } 0 0 0
elsif ($ExtUtils::F77::Config{'gccversion'}) { } 0 0 0
41 # This must be gcc-4.x.x
42 0 $gcc = 'x86_64-w64-mingw32-gcc';
43 0 $gfortran = 'x86_64-w64-mingw32-gfortran';
44 0 $fallback_compiler = 'GFortran';
45 }
46 elsif ($Config{gccversion}) {
47 # Different fortran compiler for gcc-4.x.x (and later) versus gcc-3.x.x
48 0 $gcc = 'gcc';
49 0 @version = split /\./, $Config{gccversion};
50 0 ▶ $fallback_compiler = $version[0] >= 4 ? 'GFortran' : 'G77';
Branch: 1 branch
BranchTrueFalseTotal
$version[0] >= 4 ? : 0 0 0
51 0 $gfortran = 'gfortran';
52 }
53 else {
54 0 $gcc = 'gcc';
55 0 $gfortran = 'gfortran';
56 0 $fallback_compiler = 'G77';
57 }
58 }
59 else {
60 # No change from version 1.16.
61 1 $gcc = 'gcc';
62 1 $gfortran = 'gfortran';
63 1 $fallback_compiler = 'G77';
64 }
65  
66 1 ▶$gcc = $ENV{CC} if $ENV{CC};
Branch: 1 branch
BranchTrueFalseTotal
if $ENV{"CC"} 0 1 1
67 1 ▶$gfortran = $ENV{F77} if $ENV{F77};
Branch: 1 branch
BranchTrueFalseTotal
if $ENV{"F77"} 0 1 1
68 1 ▶$fallback_compiler = $ENV{F77} if $ENV{F77};
Branch: 1 branch
BranchTrueFalseTotal
if $ENV{"F77"} 0 1 1
69  
70 ############## End of Win32 Specific ##############
71  
72 # Database starts here. Basically we have a large hash specifying
73 # entries for each os/compiler combination. Entries can be code refs
74 # in which case they are executed and the returned value used. This
75 # allows us to be quite smart.
76  
77 # Hash key convention is uppercase first letter of
78 # hash keys. First key is usually the name of the architecture as
79 # returned by Config (modulo ucfirst()).
80  
81 # Format is: OS, then compiler-family, then specific keys:
82  
83 # DEFAULT: as a compiler-family, gives name of default compiler-family - corresponds to one of the keys
84  
85 # Link: Code to figure out and return link-string for this architecture
86 # Returns false if it can't find anything sensible.
87  
88 # Trail_: Whether symbols (subroutine names etc.) have trailing underscores
89 # (true/false)
90  
91 # Compiler: Program to run to actually compile stuff
92  
93 # Cflags: Associated compiler flags
94  
95 0 ▶sub gfortran_make_linkline {
Subroutine gfortran_make_linkline: not called CC=4 SCAR=30.0
Pod undocumented
96 0 my ($dir, $lib, $defaultdir, $defaultlib, $append) = @_;
97 0 ▶ $dir ||= $defaultdir;
Condition0%0/3
$dir ||= $defaultdir
l!l&&r!l&&!r
000
MC/DC0%0/2
$dir ||= $defaultdir
$dir $defaultdir
Truth table0%0/3
A ||= B
A= $dirB= $defaultdir
ABresult
1X1
011
000
98 0 ▶ $lib ||= $defaultlib;
Condition0%0/3
$lib ||= $defaultlib
l!l&&r!l&&!r
000
MC/DC0%0/2
$lib ||= $defaultlib
$lib $defaultlib
Truth table0%0/3
A ||= B
A= $libB= $defaultlib
ABresult
1X1
011
000
99 0 ▶ $append ||= '';
Condition0%0/2
$append ||= ""
l!l
00
MC/DC0%0/1
$append ||= ""
$append
Truth table0%0/2
A
A= $append
Aresult
11
00
100 0 return( qq{"-L$dir" -L/usr/lib -l$lib $append -lm} );
101 }
102  
103 0 ▶sub gfortran_find_libdir {
Subroutine gfortran_find_libdir: not called CC=4 SCAR=30.0
Pod undocumented
104 0 my ($compiler, $lib) = @_;
105 0 for my $suffix (qw(a so)) {
106 0 my $filename = "lib$lib.$suffix";
107 0 my $dir = `$compiler -print-file-name=$filename`;
108 0 chomp $dir;
109 # Note that -print-file-name returns just the library name
110 # if it cant be found - make sure that we only accept the
111 # directory if it returns a proper path (or matches a /)
112 0 ▶ next if !defined $dir or $dir eq $lib;
Branch: 1 branch
BranchTrueFalseTotal
if not defined $dir or $dir eq $lib 0 0 0
Condition0%0/3
not defined $dir or $dir eq $lib
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $dir or $dir eq $lib
not defined $dir $dir eq $lib
Truth table0%0/3
not(A) or B
A= not defined $dirB= $dir eq $lib
ABresult
1X1
011
000
113 0 $dir =~ s,/$filename$,,;
114 0 return $dir;
115 }
116 }
117  
118 0 ▶$F77config{MinGW}{G77}{Link} = sub {
Subroutine __ANON__: not called CC=3 SCAR=24.8
119 0 my @libs = ('g2c', 'f2c');
120 0 my ($dir, $lib, $test);
121 0 foreach $test (@libs) {
122 0 $dir = gfortran_find_libdir('g77', $test);
123 0 ▶ $lib = $test, last if defined $dir;
Branch: 1 branch
BranchTrueFalseTotal
if defined $dir 0 0 0
124 }
125 0 gfortran_make_linkline($dir, $lib, "/usr/local/lib", "f2c");
126 1 };
127 1 $F77config{MinGW}{G77}{Trail_} = 1;
128 1 $F77config{MinGW}{G77}{Compiler} = find_in_path('g77','f77','fort77');
129 1 $F77config{MinGW}{G77}{Cflags} = '-O';
130  
131 0 ▶$F77config{MinGW}{GFortran}{Link} = sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
132 0 my $dir = gfortran_find_libdir($gfortran, 'gfortran');
133 0 gfortran_make_linkline($dir, "gfortran", "/usr/local/lib", "", '-lquadmath');
134 1 };
135 1 $F77config{MinGW}{GFortran}{Trail_} = 1;
136 1 $F77config{MinGW}{GFortran}{Compiler} = $gfortran;
137 1 $F77config{MinGW}{GFortran}{Cflags} = '-O';
138  
139 ### SunOS (use this as a template for new entries) ###
140  
141 0 ▶$F77config{Sunos}{F77}{Link} = sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
142 0 my $dir = find_highest_SC("/usr/lang/SC*");
143 0 ▶ return "" unless $dir; # Failure
Branch: 1 branch
BranchTrueFalseTotal
unless $dir 0 0 0
144 0 debug "$Pkg: Found Fortran latest version lib dir $dir\n";
145 0 return qq{"-L$dir" -lF77 -lm};
146 1 };
147 1 $F77config{Sunos}{F77}{Trail_} = 1;
148 1 $F77config{Sunos}{F77}{Compiler} = 'f77';
149 1 $F77config{Sunos}{F77}{Cflags} = '-O';
150  
151 1 $F77config{Sunos}{DEFAULT} = 'F77';
152  
153 ############ Rest of database is here ############
154  
155 ### Solaris ###
156  
157 0 ▶$F77config{Solaris}{F77}{Link} = sub {
Subroutine __ANON__: not called CC=14 SCAR=51.8
158 0 my $NSPATH;
159 my $dir;
160  
161 #find the SUNWspro entry of nonstandard inst. in LD_LIBRARY_PATH
162 0 ▶ if ( defined $ENV{'LD_LIBRARY_PATH'} &&
Branch: 2 branches
BranchTrueFalseTotal
if (defined $ENV{'LD_LIBRARY_PATH'} and $ENV{'LD_LIBRARY_PATH'} =~ m[([^:]*SUNWspro[^/]*)]) { } 0 0 0
elsif (defined $ENV{'PATH'}) { } 0 0 0
Condition0%0/3
defined $ENV{"LD_LIBRARY_PATH"} and $ENV{"LD_LIBRARY_PATH"} =~ m[([^:]*SUNWspro[^/]*)]
!ll&&!rl&&r
000
MC/DC0%0/2
defined $ENV{"LD_LIBRARY_PATH"} and $ENV{"LD_LIBRARY_PATH"} =~ m[([^:]*SUNWspro[^/]*)]
defined $ENV{"LD_LIBRARY_PATH"} $ENV{"LD_LIBRARY_PATH"} =~ m[([^:]*SUNWspro[^/]*)]
Truth table0%0/3
A and B
A= defined $ENV{"LD_LIBRARY_PATH"}B= $ENV{"LD_LIBRARY_PATH"} =~ m[([^:]*SUNWspro[^/]*)]
ABresult
0X0
100
111
163 $ENV{'LD_LIBRARY_PATH'} =~ m{([^:]*SUNWspro[^/]*)} )
164 {
165 0 $NSPATH = $1;
166 }
167  
168 elsif ( defined $ENV{'PATH'} ) {
169  
170 0 foreach ( split (/:/,$ENV{PATH}) ) {
171 0 ▶ if ( m{(.*SUNWspro[^/]*)} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (m[(.*SUNWspro[^/]*)]) 0 0 0
172 0 $NSPATH = $1;
173 0 last;
174 }
175 }
176 }
177  
178 0 ▶ if (defined $NSPATH) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $NSPATH) 0 0 0
179 0 debug "$Pkg: Found F77 path:--->$NSPATH\n";
180  
181 0 ▶ $dir = find_highest_SC("$NSPATH/WS*/lib") ||
Condition0%0/6
find_highest_SC("$NSPATH/WS*/lib") || find_highest_SC("$NSPATH/SC*/lib") || find_highest_SC("$NSPATH/sunwspro*/SUNWspro/SC*/lib")
l!l&&r!l&&!r
000
find_highest_SC("$NSPATH/WS*/lib") or find_highest_SC("$NSPATH/SC*/lib")
l!l&&r!l&&!r
000
MC/DC0%0/3
find_highest_SC("$NSPATH/WS*/lib") || find_highest_SC("$NSPATH/SC*/lib") || find_highest_SC("$NSPATH/sunwspro*/SUNWspro/SC*/lib")
find_highest_SC("$NSPATH/WS*/lib") find_highest_SC("$NSPATH/SC*/lib") find_highest_SC("$NSPATH/sunwspro*/SUNWspro/SC*/lib")
Truth table0%0/4
A or B || C
A= find_highest_SC("$NSPATH/WS*/lib")B= find_highest_SC("$NSPATH/SC*/lib")C= find_highest_SC("$NSPATH/sunwspro*/SUNWspro/SC*/lib")
ABCresult
1XX1
01X1
0011
0000
182 find_highest_SC("$NSPATH/SC*/lib") ||
183 find_highest_SC("$NSPATH/sunwspro*/SUNWspro/SC*/lib");
184  
185 # that failed. try $NSPATH/lib. use glob to
186 # match for libF77.*, as libF77.a isn't there anymore?
187 0 ▶ unless ( $dir )
Branch: 1 branch
BranchTrueFalseTotal
unless ($dir) 0 0 0
188 {
189 0 debug "$Pkg: Trying $NSPATH/lib\n";
190 0 ▶ $dir = "$NSPATH/lib" if glob("$NSPATH/lib/libF77*");
Subroutine BEGIN: called CC=1 SCAR=1.2
Branch: 1 branch
BranchTrueFalseTotal
if glob "$NSPATH/lib/libF77*" 0 0 0
191 }
192 }
193 0 ▶ return "" unless $dir; # Failure
Branch: 1 branch
BranchTrueFalseTotal
unless $dir 0 0 0
194 0 debug "$Pkg: Found Fortran latest version lib dir $dir\n";
195  
196 0 my @libs;
197  
198 # determine libraries. F77 and M77 aren't available in the latest
199 # compilers
200 0 my $vcruft = qx/$F77config{Solaris}{F77}{Compiler} -V 2>&1/;
201 0 ▶ if ( $vcruft =~ /Forte Developer 7/
Branch: 1 branch
BranchTrueFalseTotal
if ($vcruft =~ /Forte Developer 7/ or $vcruft =~ /f90:/) { } 0 0 0
Condition0%0/3
$vcruft =~ /Forte Developer 7/ or $vcruft =~ /f90:/
l!l&&r!l&&!r
000
MC/DC0%0/2
$vcruft =~ /Forte Developer 7/ or $vcruft =~ /f90:/
$vcruft =~ /Forte Developer 7/ $vcruft =~ /f90:/
Truth table0%0/3
A or B
A= $vcruft =~ /Forte Developer 7/B= $vcruft =~ /f90:/
ABresult
1X1
011
000
202 || $vcruft =~ /f90:/
203 )
204 {
205 0 push @libs, qw/
206 -lf77compat
207 -lfui
208 -lfai
209 -lfai2
210 -lfsumai
211 -lfprodai
212 -lfminlai
213 -lfmaxlai
214 -lfminvai
215 -lfmaxvai
216 -lfsu
217 -lsunmath
218 -lm
219 /;
220 }
221 else
222 {
223 0 push @libs, qw/
224 -lF77
225 -lM77
226 -lsunmath
227 -lm
228 /;
229 }
230  
231 0 join( ' ', qq{"-L$dir"}, @libs );
232 1 };
233 1 $F77config{Solaris}{F77}{Trail_} = 1;
234 1 $F77config{Solaris}{F77}{Compiler} = 'f77';
235 1 $F77config{Solaris}{F77}{Cflags} = '-O';
236  
237 1 $F77config{Solaris}{DEFAULT} = 'F77';
238  
239 ### Generic GNU-77 or F2C system ###
240  
241 1 $F77config{Generic}{GNU}{Trail_} = 1;
242 1 $F77config{Generic}{GNU}{Cflags} = ' '; # <---need this space!
243 1 $F77config{Generic}{GNU}{Link} = link_gnufortran_compiler($gfortran, 'g77', 'g95', 'fort77');
244 1 $F77config{Generic}{GNU}{Compiler} = find_in_path($gfortran, 'g77', 'g95','fort77');
245  
246 1 $F77config{Generic}{DEFAULT} = 'GNU';
247  
248 ### cygwin ###
249  
250 1 $F77config{Cygwin}{GNU}{Trail_} = 1;
251 1 $F77config{Cygwin}{GNU}{Cflags} = '-O'; # <---need this space!
252 1 $F77config{Cygwin}{GNU}{Link} = link_gnufortran_compiler('g77', 'gfortran', 'g95', 'fort77');
253 1 $F77config{Cygwin}{GNU}{Compiler} = find_in_path('g77', $gfortran, 'g95','fort77');
254  
255 1 $F77config{Cygwin}{DEFAULT} = 'GNU';
256  
257 ### Linux ###
258  
259 1 $F77config{Linux}{GNU} = $F77config{Generic}{GNU};
260  
261 1 $F77config{Linux}{DEFAULT} = 'GNU';
262  
263 ### DEC OSF/1 ###
264  
265 1 $F77config{Dec_osf}{F77}{Link} = "-L/usr/lib -lUfor -lfor -lFutil -lm -lots -lc";
266 1 $F77config{Dec_osf}{F77}{Trail_} = 1;
267 1 $F77config{Dec_osf}{F77}{Compiler} = 'f77';
268 1 $F77config{Dec_osf}{F77}{Cflags} = '-O';
269  
270 1 $F77config{Dec_osf}{DEFAULT} = 'F77';
271  
272 ### HP/UX ###
273  
274 1 $F77config{Hpux}{F77}{Link} = "-L/usr/lib -lcl -lm";
275 1 $F77config{Hpux}{F77}{Trail_} = 0;
276 1 $F77config{Hpux}{F77}{Compiler} = 'f77';
277 1 $F77config{Hpux}{F77}{Cflags} = '-O';
278  
279 1 $F77config{Hpux}{DEFAULT} = 'F77';
280  
281 ### IRIX ###
282  
283 # From: Ovidiu Toader <ovi@physics.utoronto.ca>
284 # For an SGI running IRIX 6.4 or higher (probably lower than 6.4 also)
285 # there is a new abi, -64, which produces 64 bit executables. This is no
286 # longer an experimental feature and I am using it exclusively without any
287 # problem. The code below is what I use instead of original IRIX section
288 # in the ExtUtils::F77 package. It adds the -64 flag and it is supposed to
289 # provide the same functionality as the old code for a non -64 abi.
290  
291 1 ▶if (ucfirst($Config{'osname'}) eq "Irix")
Branch: 1 branch
BranchTrueFalseTotal
if (ucfirst $ExtUtils::F77::Config{"osname"} eq "Irix") 0 1 1
292 {
293 0 my ($cflags,$mips,$default_abi,$abi,$mips_dir,$libs);
294 0 $cflags = $Config{cc};
295 0 ($mips) = ($cflags =~ /(-mips\d)/g);
296 0 ▶ $mips = "" if ! defined($mips);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $mips 0 0 0
297 0 $mips_dir = $mips;$mips_dir =~ s/-//g;
298 0 ▶ $default_abi = $Config{osvers} >= 6.4 ? "-n32" : "-o32";
Branch: 1 branch
BranchTrueFalseTotal
$ExtUtils::F77::Config{'osvers'} >= 6.4 ? : 0 0 0
299 GET_ABI:
300 {
301 # -32 seems to be synonymous for -o32 (CS)
302 0 ▶ $abi = "-o32",last GET_ABI if $cflags =~ /-o?32/;
Branch: 1 branch
BranchTrueFalseTotal
if $cflags =~ /-o?32/ 0 0 0
303 0 ▶ $abi = "-n32",last GET_ABI if $cflags =~ /-n32/;
Branch: 1 branch
BranchTrueFalseTotal
if $cflags =~ /-n32/ 0 0 0
304 0 ▶ $abi = "-64",last GET_ABI if $cflags =~ /-64/;
Branch: 1 branch
BranchTrueFalseTotal
if $cflags =~ /-64/ 0 0 0
305 0 $abi = $default_abi;
306 }
307 0 ▶ if ( $abi eq "-64" ){
Branch: 1 branch
BranchTrueFalseTotal
if ($abi eq -64) 0 0 0
308 0 ▶ $libs = ( (-r "/usr/lib64/$mips_dir") && (-d _) && (-x _) ) ?
Branch: 1 branch
BranchTrueFalseTotal
-r "/usr/lib64/$mips_dir" && -d _ && -x _ ? : 0 0 0
Condition0%0/6
-r "/usr/lib64/$mips_dir" and -d _ and -x _
!ll&&!rl&&r
000
-r "/usr/lib64/$mips_dir" and -d _
!ll&&!rl&&r
000
MC/DC0%0/3
-r "/usr/lib64/$mips_dir" and -d _ and -x _
-r "/usr/lib64/$mips_dir" -d _ -x _
Truth table0%0/4
A and B and C
A= -r "/usr/lib64/$mips_dir"B= -d _C= -x _
ABCresult
0XX0
10X0
1100
1111
309 "-L/usr/lib64/$mips_dir" : "";
310 0 $libs .= " -L/usr/lib64 -lfortran -lm";
311 }
312 0 ▶ if ( $abi eq "-n32" ){
Branch: 1 branch
BranchTrueFalseTotal
if ($abi eq "-n32") 0 0 0
313 0 ▶ $libs = ( (-r "/usr/lib32/$mips_dir") && (-d _) && (-x _) ) ?
Branch: 1 branch
BranchTrueFalseTotal
-r "/usr/lib32/$mips_dir" && -d _ && -x _ ? : 0 0 0
Condition0%0/6
-r "/usr/lib32/$mips_dir" and -d _ and -x _
!ll&&!rl&&r
000
-r "/usr/lib32/$mips_dir" and -d _
!ll&&!rl&&r
000
MC/DC0%0/3
-r "/usr/lib32/$mips_dir" and -d _ and -x _
-r "/usr/lib32/$mips_dir" -d _ -x _
Truth table0%0/4
A and B and C
A= -r "/usr/lib32/$mips_dir"B= -d _C= -x _
ABCresult
0XX0
10X0
1100
1111
314 "-L/usr/lib32/$mips_dir" : "";
315 0 $libs .= " -L/usr/lib32 -lfortran -lm";
316 }
317 0 ▶ if ( $abi eq "-o32" ){
Branch: 1 branch
BranchTrueFalseTotal
if ($abi eq "-o32") 0 0 0
318 0 $libs = "-L/usr/lib -lF77 -lI77 -lU77 -lisam -lm";
319 }
320 0 $F77config{Irix}{F77}{Cflags} = "$abi $mips";
321 0 $F77config{Irix}{F77}{Link} = $libs;
322 0 $F77config{Irix}{F77}{Trail_} = 1;
323 0 $F77config{Irix}{F77}{Compiler} = "f77 $abi";
324  
325 0 $F77config{Irix}{DEFAULT} = 'F77';
326 }
327  
328 ### AIX ###
329  
330 1 $F77config{Aix}{F77}{Link} = "-L/usr/lib -lxlf90 -lxlf -lc -lm";
331 1 $F77config{Aix}{F77}{Trail_} = 0;
332  
333 1 $F77config{Aix}{DEFAULT} = 'F77';
334  
335 ### FreeBSD ###
336  
337 1 ▶if($^O =~ /Freebsd/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O =~ /Freebsd/i) 0 1 1
338 0 $gfortran = 'gfortran';
339 0 $fallback_compiler = 'G77';
340 }
341  
342 0 ▶$F77config{Freebsd}{G77}{Link} = sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
343 0 my $dir = gfortran_find_libdir('g77-34', 'g2c');
344 0 gfortran_make_linkline($dir, 'g2c', "/usr/local/lib", '');
345 1 };
346 1 $F77config{Freebsd}{G77}{Trail_} = 1;
347 1 $F77config{Freebsd}{G77}{Compiler} = 'g77-34';
348 1 $F77config{Freebsd}{G77}{Cflags} = '-O2';
349  
350 0 ▶$F77config{Freebsd}{GFortran}{Link} = sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
351 0 my $dir = gfortran_find_libdir($gfortran, 'gfortran');
352 0 gfortran_make_linkline($dir, "gfortran", "/usr/local/lib", "");
353 1 };
354 1 $F77config{Freebsd}{GFortran}{Trail_} = 1;
355 1 $F77config{Freebsd}{GFortran}{Compiler} = $gfortran;
356 1 $F77config{Freebsd}{GFortran}{Cflags} = '-O2';
357  
358 1 $F77config{Freebsd}{DEFAULT} = 'GFortran';
359  
360 ### VMS ###
361  
362 1 $F77config{VMS}{Fortran}{Link} = ' '; # <---need this space!
363 1 $F77config{VMS}{Fortran}{Trail_} = 0;
364 1 $F77config{VMS}{Fortran}{Compiler} = 'Fortran';
365  
366 1 $F77config{VMS}{DEFAULT} = 'Fortran';
367  
368 ### Darwin (Mac OS X) ###
369  
370 1 $F77config{Darwin}{GNU} = $F77config{Generic}{GNU};
371 1 $F77config{Darwin}{DEFAULT} = 'GNU';
372  
373 ############ End of database is here ############
374  
375 sub get; # See below
376  
377 # All the figuring out occurs during import - this is because
378 # a lot of the answers depend on a lot of the guesswork.
379  
380 1 ▶sub import {
Subroutine import: called CC=24 SCAR=43.4
381 1 ▶ no warnings; # Shuts up complaints on Win32 when running PDL tests
Subroutine BEGIN: called CC=1 SCAR=0.0
382 1 $Pkg = shift;
383 1 my $system = ucfirst(shift); # Set package variables
384 1 my $compiler = ucfirst(shift);
385 1 $Runtime = "-LSNAFU -lwontwork";
386  
387 # Guesses if system/compiler not specified.
388  
389 1 ▶ $system = ucfirst $Config{'osname'} unless $system;
Branch: 1 branch
BranchTrueFalseTotal
unless $system 1 0 1
390 1 ▶ $system = 'Cygwin' if $system =~ /Cygwin/;
Branch: 1 branch
BranchTrueFalseTotal
if $system =~ /Cygwin/ 0 1 1
391 1 ▶ $compiler = get $F77config{$system}{DEFAULT} unless $compiler;
Branch: 1 branch
BranchTrueFalseTotal
unless $compiler 1 0 1
392  
393 1 ▶ debug "$Pkg: Using system=$system compiler=" .
Branch: 1 branch
BranchTrueFalseTotal
defined $compiler ? : 1 0 1
394 (defined $compiler ? $compiler : "<undefined>") . "\n";
395  
396 1 ▶ if (defined($ENV{F77LIBS})) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $ENV{'F77LIBS'}) { } 0 1 1
397 0 debug "Overriding Fortran libs from value of enviroment variable F77LIBS = $ENV{F77LIBS}\n";
398 0 $Runtime = $ENV{F77LIBS};
399 }
400 else {
401  
402 # Try this combination
403  
404 1 my $ok;
405 1 ▶ if ( defined( $compiler ) and defined( $F77config{$system} )){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $compiler and defined $F77config{$system}) { } 1 0 1
Condition33%1/3
defined $compiler and defined $F77config{$system}
!ll&&!rl&&r
001
MC/DC0%0/2
defined $compiler and defined $F77config{$system}
defined $compiler defined $F77config{$system}
Truth table33%1/3
A and B
A= defined $compilerB= defined $F77config{$system}
ABresult
0X0
100
111
406 1 my $flibs = get ($F77config{$system}{$compiler}{Link});
407 1 ▶ if ($flibs ne "") {
Branch: 1 branch
BranchTrueFalseTotal
if ($flibs ne "") 0 1 1
408 0 $Runtime = $flibs;# . gcclibs();
409 # We don't want to append gcc libs if we are using
410 # non gnu compilers. Initially, explicitly check for
411 # use of sun compiler
412 #$Runtime .= gcclibs($flibs) unless $flibs =~ /sunmath/;
413 #(Note appending gcclibs seems to be no longer required)
414 0 ▶ $Runtime =~ s|L([a-z,A-Z]):|L//$1|g if $^O =~ /cygwin/i;
Branch: 1 branch
BranchTrueFalseTotal
if $^O =~ /cygwin/i 0 0 0
415 0 ▶ $Runtime = ' ' if $^O eq 'VMS'; # <-- need this space!
Branch: 1 branch
BranchTrueFalseTotal
if $^O eq "VMS" 0 0 0
416 0 debug "Runtime: $Runtime\n";
417 0 $ok = 1;
418 0 ▶ if ($compiler eq 'GNU') { # Special gfortran case since it seems to have lots of random libs
Branch: 1 branch
BranchTrueFalseTotal
if ($compiler eq 'GNU') { } 0 0 0
419 0 debug "Found compiler=$compiler - skipping validation of $Runtime \n";
420  
421 } else {
422 0 ▶ $ok = validate_libs($Runtime) if $flibs ne "" ;
Branch: 1 branch
BranchTrueFalseTotal
if $flibs ne "" 0 0 0
423 }
424 }
425 } else {
426 0 $Runtime = $ok = "";
427 }
428  
429 # If it doesn't work try Generic + GNU77
430  
431 1 ▶ unless (($Runtime ne "-LSNAFU -lwontwork") && $ok) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($Runtime ne "-LSNAFU -lwontwork" and $ok) 1 0 1
Condition33%1/3
$Runtime ne "-LSNAFU -lwontwork" and $ok
!ll&&!rl&&r
100
MC/DC0%0/2
$Runtime ne "-LSNAFU -lwontwork" and $ok
$Runtime ne "-LSNAFU -lwontwork" $ok
Truth table33%1/3
A and B
A= $Runtime ne "-LSNAFU -lwontwork"B= $ok
ABresult
0X0
100
111
432 $system =
433 1 ▶ $Config{cc} =~ /\bgcc/ && $^O =~ /MSWin32/i ? "MinGW"
Branch: 2 branches
BranchTrueFalseTotal
$ExtUtils::F77::Config{'cc'} =~ /\bgcc/ && $^O =~ /MSWin32/i ? : 0 1 1
$^O =~ /Freebsd/i ? : 0 1 1
Condition33%1/3
$ExtUtils::F77::Config{"cc"} =~ /\bgcc/ and $^O =~ /MSWin32/i
!ll&&!rl&&r
100
MC/DC0%0/2
$ExtUtils::F77::Config{"cc"} =~ /\bgcc/ and $^O =~ /MSWin32/i
$ExtUtils::F77::Config{"cc"} =~ /\bgcc/ $^O =~ /MSWin32/i
Truth table33%1/3
A and B
A= $ExtUtils::F77::Config{"cc"} =~ /\bgcc/B= $^O =~ /MSWin32/i
ABresult
0X0
100
111
434 : $^O =~ /Freebsd/i ? "Freebsd"
435 :"Generic";
436 1 $compiler = $fallback_compiler;
437 1 warn <<"EOD";
438 $Pkg: Unable to guess and/or validate system/compiler configuration
439 $Pkg: Will try system=$system Compiler=$compiler
440 EOD
441 1 my $flibs = get ($F77config{$system}{$compiler}{Link});
442 1 $Runtime = $flibs ; #. gcclibs($flibs); # Note gcclibs appears to be no longer required.
443 1 ▶ $ok = validate_libs($Runtime) if $flibs ne "";
Branch: 1 branch
BranchTrueFalseTotal
if $flibs ne "" 0 1 1
444 1 ▶ warn "$Pkg: Well that didn't appear to validate. Well I will try it anyway.\n"
Branch: 1 branch
BranchTrueFalseTotal
unless $Runtime and $ok 1 0 1
Condition33%1/3
$Runtime and $ok
!ll&&!rl&&r
100
MC/DC0%0/2
$Runtime and $ok
$Runtime $ok
Truth table33%1/3
A and B
A= $RuntimeB= $ok
ABresult
0X0
100
111
445 unless $Runtime && $ok;
446 }
447  
448 1 $RuntimeOK = $ok;
449  
450 } # Not overriding
451  
452 # Now get the misc info for the methods.
453  
454 1 ▶ if (defined( $F77config{$system}{$compiler}{Trail_} )){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $F77config{$system}{$compiler}{'Trail_'}) { } 0 1 1
455 0 $Trail_ = get $F77config{$system}{$compiler}{Trail_};
456 } else {
457 1 warn << "EOD";
458 $Pkg: There does not appear to be any configuration info about
459 $Pkg: names with trailing underscores for system $system. Will assume
460 $Pkg: F77 names have trailing underscores.
461 EOD
462 1 $Trail_ = 1;
463 }
464  
465 1 ▶ if (defined( $F77config{$system}{$compiler}{Compiler} )) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $F77config{$system}{$compiler}{'Compiler'}) { } 0 1 1
466 0 $Compiler = get $F77config{$system}{$compiler}{Compiler};
467 } else {
468 1 warn << "EOD";
469 $Pkg: There does not appear to be any configuration info about
470 $Pkg: the F77 compiler name. Will assume 'f77'.
471 EOD
472 1 $Compiler = 'f77';
473 }
474 1 debug "$Pkg: Compiler: $Compiler\n";
475  
476 1 ▶ if (defined( $F77config{$system}{$compiler}{Cflags} )) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $F77config{$system}{$compiler}{'Cflags'}) { } 0 1 1
477 0 $Cflags = get $F77config{$system}{$compiler}{Cflags} ;
478 } else {
479 1 warn << "EOD";
480 $Pkg: There does not appear to be any configuration info about
481 $Pkg: the options for the F77 compiler. Will assume none
482 $Pkg: necessary.
483 EOD
484 1 $Cflags = '';
485 }
486  
487 1 debug "$Pkg: Cflags: $Cflags\n";
488  
489 } # End of import ()
490  
491 1 ▶sub runtime { return $Runtime; }
Subroutine runtime: called CC=1 SCAR=0.0
Pod documented
492 1 ▶sub runtimeok { return $RuntimeOK; }
Subroutine runtimeok: called CC=1 SCAR=0.0
Pod documented
493 1 ▶sub trail_ { return $Trail_; }
Subroutine trail_: called CC=1 SCAR=0.0
Pod documented
494 2 ▶sub compiler { return $Compiler; }
Subroutine compiler: called CC=1 SCAR=0.0
Pod documented
495 1 ▶sub cflags { return $Cflags; }
Subroutine cflags: called CC=1 SCAR=0.0
Pod documented
496  
497 ### Minor internal utility routines ###
498  
499 # Get hash entry, evaluating code references
500  
501 0 ▶sub get { ref($_[0]) eq "CODE" ? &{$_[0]} : $_[0] };
Subroutine get: called CC=2 SCAR=9.2
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] eq 'CODE' ? : 0 3 3
502  
503 # Test if any files exist matching glob
504  
505 0 ▶sub any_exists {
Subroutine any_exists: not called CC=1 SCAR=6.9
Pod undocumented
506 0 my @glob = glob(shift);
507 0 return scalar(@glob);
508 }
509  
510 # Find highest version number of SCN.N(.N) directories
511 # (Nasty SunOS/Solaris naming scheme for F77 libs]
512 0 ▶sub find_highest_SC {
Subroutine find_highest_SC: not called CC=4 SCAR=30.0
Pod undocumented
513 0 debug "$Pkg: Scanning for $_[0]\n";
514 0 my @glob = glob(shift);
515 0 my %n=();
516 0 for (@glob) {
517 #debug "Found $_\n";
518 0 ▶ if ( m|/SC(\d)\.(\d)/?.*$| ) {
Branch: 1 branch
BranchTrueFalseTotal
if (m[/SC(\d)\.(\d)/?.*$]) 0 0 0
519 0 $n{$_} = $1 *100 + $2 * 10;
520 }
521 0 ▶ if ( m|/SC(\d)\.(\d)\.(\d)/?.*$| ) {
Branch: 1 branch
BranchTrueFalseTotal
if (m[/SC(\d)\.(\d)\.(\d)/?.*$]) 0 0 0
522 0 $n{$_} = $1 *100 + $2 * 10 + $3;
523 }
524 }
525 0 my @sorted_dirs = grep {-f "$_/libF77.a"} sort {$n{$a} <=> $n{$b}} @glob;
526  
527 0 return pop @sorted_dirs; # Highest N
528 }
529  
530 # Validate a string of form "-Ldir -lfoo -lbar"
531  
532 0 ▶sub validate_libs {
Subroutine validate_libs: not called CC=10 SCAR=47.0
Pod undocumented
533 0 debug "$Pkg: Validating $_[0] ";
534 0 my @args = shellwords(shift());
535 0 my $pat;
536 0 my $ret = 1;
537  
538 # Create list of directories to search (with common defaults)
539  
540 0 my @path = ();
541 0 for (@args, "/usr/lib", "/lib") {
542 0 ▶ push @path, $1 if /^-L(.+)$/ && -d $1;
Branch: 1 branch
BranchTrueFalseTotal
if /^-L(.+)$/ and -d $1 0 0 0
Condition0%0/3
/^-L(.+)$/ and -d $1
!ll&&!rl&&r
000
MC/DC0%0/2
/^-L(.+)$/ and -d $1
/^-L(.+)$/ -d $1
Truth table0%0/3
A and B
A= /^-L(.+)$/B= -d $1
ABresult
0X0
100
111
543 }
544  
545 # Search directories
546  
547 0 for (@args) {
548 0 ▶ next if /^-L/;
Branch: 1 branch
BranchTrueFalseTotal
if /^-L/ 0 0 0
549 0 ▶ next if $_ eq "-lm"; # Ignore this common guy
Branch: 1 branch
BranchTrueFalseTotal
if $_ eq "-lm" 0 0 0
550 0 ▶ if (/^-l(.+)$/) {
Branch: 1 branch
BranchTrueFalseTotal
if (/^-l(.+)$/) 0 0 0
551 0 $pat = join(" ", map {$_."/lib".$1.".*"} @path); # Join dirs + file
552 #debug "Checking for $pat\n";
553 0 ▶ unless (any_exists($pat)) {
Branch: 1 branch
BranchTrueFalseTotal
unless (any_exists($pat)) 0 0 0
554 0 debug "\n$Pkg: Unable to find library $_" ;
555 0 $ret = 0;
556 }
557 }
558 }
559 0 ▶ debug $ret ? "[ok]\n" : "\n";
Branch: 1 branch
BranchTrueFalseTotal
$ret ? : 0 0 0
560 0 return $ret;
561 }
562  
563  
564 1 ▶sub testcompiler {
Subroutine testcompiler: called CC=3 SCAR=11.1
Pod documented
565  
566 1 my $file = File::Spec->tmpdir . "/testf77$$";
567 1 $file =~ s/\\/\//g; # For Win32
568  
569 1 my $ret;
570 1 open(OUT,">$file.f");
571 1 print OUT " write(*,*) 'Hello World'\n";
572 1 print OUT " end\n";
573 1 close(OUT);
574 1 debug "Compiling the test Fortran program...\n";
575 1 debug "Command: $Compiler $Cflags $file.f -o ${file}_exe";
576 1 system "$Compiler $Cflags $file.f -o ${file}_exe";
577 1 debug "Executing the test program...\n";
578 1 ▶ if (`${file}_exe` ne " Hello World\n") {
Branch: 1 branch
BranchTrueFalseTotal
if (`${file}_exe` ne " Hello World\n") { } 1 0 1
579 1 warn "Test of Fortran Compiler FAILED. \n";
580 1 warn "Do not know how to compile Fortran on your system\n";
581 1 $ret=0;
582 }
583 else{
584 0 debug "Congratulations you seem to have a working f77!\n";
585 0 $ret=1;
586 }
587 1 ▶ unlink("${file}_exe"); unlink("$file.f"); unlink("$file.o") if -e "$file.o";
Branch: 1 branch
BranchTrueFalseTotal
if -e "$file.o" 0 1 1
588 1 return $ret;
589 };
590  
591 # gcclibs() routine
592 # Return gcc link libs (e.g. -L/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3_U1/2.7.0 -lgcc)
593 # Note this routine appears to be no longer required - gcc3 or 4 change? - and is
594 # NO LONGER CALLED from anywhere in the code. Use of this routine in the future
595 # is DEPRECATED. Retain here just in case this logic is ever needed again,
596 # - Karl Glazebrook Dec/2010
597  
598 0 ▶sub gcclibs {
Subroutine gcclibs: not called CC=11 SCAR=48.8
Pod undocumented
599 0 my $flibs = shift; # Fortran libs
600 0 my $isgcc = $Config{'cc'} eq $gcc;
601 0 ▶ if (!$isgcc && $^O ne 'VMS') {
Branch: 1 branch
BranchTrueFalseTotal
if (not $isgcc and $^O ne "VMS") 0 0 0
Condition0%0/3
not $isgcc and $^O ne "VMS"
!ll&&!rl&&r
000
MC/DC0%0/2
not $isgcc and $^O ne "VMS"
not $isgcc $^O ne "VMS"
Truth table0%0/3
not(A) and B
A= not $isgccB= $^O ne "VMS"
ABresult
0X0
100
111
602 0 debug "Checking for gcc in disguise:\n";
603 0 ▶ $isgcc = 1 if $Config{gccversion};
Branch: 1 branch
BranchTrueFalseTotal
if $ExtUtils::F77::Config{"gccversion"} 0 0 0
604 0 my $string;
605 0 ▶ if ($isgcc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($isgcc) { } 0 0 0
606 0 $string = "Compiler is gcc version $Config{gccversion}";
607 0 ▶ $string .= "\n" unless $string =~ /\n$/;
Branch: 1 branch
BranchTrueFalseTotal
unless $string =~ /\n$/ 0 0 0
608 } else {
609 0 $string = "Not gcc\n";
610 }
611 0 debug $string;
612 }
613 0 ▶ if ($isgcc or ($flibs =~ /-lg2c/) or ($flibs =~ /-lf2c/) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($isgcc or $flibs =~ /-lg2c/ or $flibs =~ /-lf2c/) { } 0 0 0
Condition0%0/6
$isgcc or $flibs =~ /-lg2c/ or $flibs =~ /-lf2c/
l!l&&r!l&&!r
000
$isgcc or $flibs =~ /-lg2c/
l!l&&r!l&&!r
000
MC/DC0%0/3
$isgcc or $flibs =~ /-lg2c/ or $flibs =~ /-lf2c/
$isgcc $flibs =~ /-lg2c/ $flibs =~ /-lf2c/
Truth table0%0/4
A or B or C
A= $isgccB= $flibs =~ /-lg2c/C= $flibs =~ /-lf2c/
ABCresult
1XX1
01X1
0011
0000
614 # Don't link to libgcc on MS Windows iff we're using gfortran.
615 0 ▶ unless ($fallback_compiler eq 'GFortran' && $^O =~ /MSWin/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($fallback_compiler eq 'GFortran' and $^O =~ /MSWin/i) { } 0 0 0
Condition0%0/3
$fallback_compiler eq "GFortran" and $^O =~ /MSWin/i
!ll&&!rl&&r
000
MC/DC0%0/2
$fallback_compiler eq "GFortran" and $^O =~ /MSWin/i
$fallback_compiler eq "GFortran" $^O =~ /MSWin/i
Truth table0%0/3
A and B
A= $fallback_compiler eq "GFortran"B= $^O =~ /MSWin/i
ABresult
0X0
100
111
616 0 my $gccdir = `$gcc -m32 -print-libgcc-file-name`; chomp $gccdir;
617 0 $gccdir =~ s/\/libgcc.a//;
618 0 return qq{ "-L$gccdir" -lgcc};
619 } else {
620 0 return "";
621 }
622  
623 }else{
624 0 return "";
625 }
626 }
627  
628 # Try and find a program in the users PATH
629 5 ▶sub find_in_path {
Subroutine find_in_path: called CC=3 SCAR=13.3
Pod undocumented
630 5 ▶ my $found = first { which $_ } @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
631 5 ▶ return ($^O eq 'VMS' ? '' : undef) if !$found;
Branch: 2 branches
BranchTrueFalseTotal
unless $found 5 0 5
$^O eq 'VMS' ? : 0 5 5
632 0 debug "Found compiler $found\n";
633 0 return $found;
634 }
635  
636 # Based on code from Tim Jeness, tries to figure out the correct GNU
637 # fortran compiler libs
638 2 ▶sub link_gnufortran_compiler {
Subroutine link_gnufortran_compiler: called CC=9 SCAR=40.6
Pod undocumented
639 2 ▶ return () if $^O =~ /MSWin32/i; # Unneeded for MinGW, emits warnings if allowed to proceed.
Branch: 1 branch
BranchTrueFalseTotal
if $^O =~ /MSWin32/i 0 2 2
640 2 my @try = @_;
641 2 my $compiler = find_in_path( @try );
642 2 ▶ return () unless defined $compiler;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $compiler 2 0 2
643 # Get compiler "family"
644 0 $compiler=~/(g77|f77|fort77|gfortran|g95)/;
645 0 my $comp_fam = $1;
646 0 debug "ExtUtils::F77: compiler family is $comp_fam\n";
647 # Get compiler version number
648 0 my @t =`$compiler --version`; $t[0] =~ /(\d+)\.(\d+)\.(\d+)/;
649 0 my $version = "$1.$2"; # Major version number
650 0 debug "ExtUtils::F77: $compiler version $version.$3\n";
651 # Sigh special case random extra gfortran libs to avoid PERL_DL_NONLAZY meltdowns. KG 25/10/2015
652 0 my $append = "";
653 0 my $osvers = (split(/\./,$Config{osvers}))[0]; # Extract first digit in X.Y.Z version numbers
654 0 ▶ if ( $Config{osname} =~ /darwin/ && $osvers >= 14
Branch: 1 branch
BranchTrueFalseTotal
if ($ExtUtils::F77::Config{"osname"} =~ /darwin/ and $osvers >= 14 and $comp_fam eq "gfortran" and $version >= "4.9") 0 0 0
Condition0%0/9
$ExtUtils::F77::Config{"osname"} =~ /darwin/ and $osvers >= 14 and $comp_fam eq "gfortran" and $version >= "4.9"
!ll&&!rl&&r
000
$ExtUtils::F77::Config{"osname"} =~ /darwin/ and $osvers >= 14 and $comp_fam eq "gfortran"
!ll&&!rl&&r
000
$ExtUtils::F77::Config{"osname"} =~ /darwin/ and $osvers >= 14
!ll&&!rl&&r
000
MC/DC0%0/4
$ExtUtils::F77::Config{"osname"} =~ /darwin/ and $osvers >= 14 and $comp_fam eq "gfortran" and $version >= "4.9"
$ExtUtils::F77::Config{"osname"} =~ /darwin/ $osvers >= 14 $comp_fam eq "gfortran" $version >= "4.9"
Truth table0%0/5
A and B and C and D
A= $ExtUtils::F77::Config{"osname"} =~ /darwin/B= $osvers >= 14C= $comp_fam eq "gfortran"D= $version >= "4.9"
ABCDresult
0XXX0
10XX0
110X0
11100
11111
655 && $comp_fam eq 'gfortran' && $version >= 4.9 ) {
656 # Add extra libs for gfortran versions >= 4.9 and OS X
657 0 $append = "-lgcc_ext.10.5 -lgcc_s.10.5 -lquadmath";
658 }
659 0 my @libs = @{$COMPLIBS{$comp_fam}};
660 0 my ($dir, $lib, $test);
661 0 foreach $test (@libs) {
662 0 $dir = gfortran_find_libdir($compiler, $test);
663 0 ▶ $lib = $test, last if defined $dir;
Branch: 1 branch
BranchTrueFalseTotal
if defined $dir 0 0 0
664 }
665 0 gfortran_make_linkline($dir, $lib, "/usr/local/lib", "f2c", $append);
666 }
667  
668 1 1; # Return true
669  
670 __END__
↑ Summary