1F77(3)                User Contributed Perl Documentation               F77(3)
2
3
4

NAME

6       ExtUtils::F77 - Simple interface to F77 libs
7

DESCRIPTION

9       This module tries to figure out how to link C programs with Fortran
10       subroutines on your system. Basically one must add a list of Fortran
11       runtime libraries. The problem is their location and name varies with
12       each OS/compiler combination! It was originally developed to make
13       building and installation of the PGPLOT module easier, which links to
14       the pgplot Fortran graphics library. It is now used by a number of perl
15       modules.
16
17       This module tries to implement a simple 'rule-of-thumb' database for
18       various flavours of UNIX systems.  A simple self-documenting Perl
19       database of knowledge/code for figuring out how to link for various
20       combinations of OS and compiler is embedded in the modules Perl code.
21       Please help save the world by submitted patches for new database
22       entries for your system at <https://github.com/PDLPorters/extutils-f77>
23
24       Note the default on most systems is now to search for a generic 'GNU'
25       compiler which can be gfortran, g77, g95 or fort77 (in that order based
26       on usage) and then find the appropriate link libraries automatically.
27       (This is the 'Generic' 'GNU' database entry in the code.)
28
29       The target compiler can be explicitly overriden by setting the
30       environment variable F77, e.g.
31
32        % setenv F77 "x86_64-pc-linux-gnu-gfortran"
33        % perl -MExtUtils::F77 -e 'print ExtUtils::F77->compiler, "\n"'
34
35       The library list which the module returns can be explicitly overridden
36       by setting the environment variable F77LIBS, e.g.
37
38         % setenv F77LIBS "-lfoo -lbar"
39         % perl -MExtUtils::F77 -e 'print ExtUtils::F77->runtime, "\n"'
40         ...
41

SYNOPSIS

43         use ExtUtils::F77;               # Automatic guess
44         use ExtUtils::F77 qw(sunos);     # Specify system
45         use ExtUtils::F77 qw(linux g77); # Specify system and compiler
46         $fortranlibs = ExtUtils::F77->runtime;
47

METHODS

49       The following are all class methods.
50
51   runtime
52       Returns a list of F77 runtime libraries.
53
54         $fortranlibs = ExtUtils::F77->runtime;
55
56   runtimeok
57       Returns TRUE only if runtime libraries have been found successfully.
58
59   trail_
60       Returns true if F77 names have trailing underscores.
61
62   compiler
63       Returns command to execute the compiler (e.g. 'f77').
64
65   cflags
66       Returns compiler flags.
67
68   testcompiler
69       Test to see if compiler actually works.
70

DEBUGGING

72       To debug this module, and/or get more information about its workings,
73       set $ExtUtils::F77::DEBUG to a true value. If set, it will "warn"
74       various information about its operations.
75
76       As of version 1.22, this module will no longer print or warn if it is
77       working normally.
78

SEE ALSO

80       PDL (PDL::Minuit and PDL::Slatec), PGPLOT
81

AUTHOR

83       Karl Glazebrook, with many other contributions (see git repository at
84       https://github.com/PDLPorters/extutils-f77)
85
86
87
88perl v5.36.0                      2023-01-20                            F77(3)
Impressum