MAN page from RedHat Other perl-5.004-0.1.i386.rpm
ExtUtils::Liblist
Section: Perl Programmers Reference Guide (3)
Updated: perl 5.004, patch 04
Index NAME
ExtUtils::Liblist - determine libraries to use and how to use them
SYNOPSIS
require ExtUtils::Liblist;ExtUtils::Liblist::ext($self, $potential_libs, $verbose);
DESCRIPTION
This utility takes a list of libraries in the form
-llib1 -llib2-llib3 and prints out lines suitable for inclusion in an extensionMakefile. Extra library paths may be included with the form
-L/another/path this will affect the searches for all subsequentlibraries.
It returns an array of four scalar values: EXTRALIBS, BSLOADLIBS,LDLOADLIBS, and LD_RUN_PATH. Some of these don't mean anythingon VMS and Win32. See the details about those platform specificsbelow.
Dependent libraries can be linked in one of three ways:
- • For static extensions
- by the ld command when the perl binary is linked with the extensionlibrary. See EXTRALIBS below.
- • For dynamic extensions
- by the ld command when the shared object is built/linked. SeeLDLOADLIBS below.
- • For dynamic extensions
- by the DynaLoader when the shared object is loaded. See BSLOADLIBSbelow.
EXTRALIBS
List of libraries that need to be linked with when linking a perlbinary which includes this extension Only those libraries thatactually exist are included. These are written to a file and usedwhen linking perl.
LDLOADLIBS and LD_RUN_PATH
List of those libraries which can or must be linked into the sharedlibrary when created using ld. These may be static or dynamiclibraries. LD_RUN_PATH is a colon separated list of the directoriesin LDLOADLIBS. It is passed as an environment variable to the processthat links the shared library.
BSLOADLIBS
List of those libraries that are needed but can be linked indynamically at run time on this platform. SunOS/Solaris does not needthis because ld records the information (from LDLOADLIBS) into theobject file. This list is used to create a .bs (bootstrap) file.
PORTABILITY
This module deals with a lot of system dependencies and has quite afew architecture specific
ifs in the code.
VMS implementation
The version of ext() which is executed under VMS differs from theUnix-OS/2 version in several respects:
- •
- Input library and path specifications are accepted with or without the-l and -L prefices used by Unix linkers. If neither prefix ispresent, a token is considered a directory to search if it is in facta directory, and a library to search for otherwise. Authors who wishtheir extensions to be portable to Unix or OS/2 should use the Unixprefixes, since the Unix-OS/2 version of ext() requires them.
- •
- Wherever possible, shareable images are preferred to object libraries,and object libraries to plain object files. In accordance with VMSnaming conventions, ext() looks for files named libshr and librtl;it also looks for liblib and liblib to accomodate Unix conventionsused in some ported software.
- •
- For each library that is found, an appropriate directive for a linker optionsfile is generated. The return values are space-separated strings ofthese directives, rather than elements used on the linker command line.
- •
- LDLOADLIBS and EXTRALIBS are always identical under VMS, and BSLOADLIBSand LD_RIN_PATH are always empty.
In addition, an attempt is made to recognize several common Unix librarynames, and filter them out or convert them to their VMS equivalents, asappropriate.
In general, the VMS version of ext() should properly handle input fromextensions originally designed for a Unix or VMS environment. If youencounter problems, or discover cases where the search could be improved,please let us know.
Win32 implementation
The version of ext() which is executed under Win32 differs from theUnix-OS/2 version in several respects:
- •
- Input library and path specifications are accepted with or without the-l and -L prefices used by Unix linkers. -lfoo specifies thelibrary foo.lib and -Ls:ome\dir specifies a directory to look forthe libraries that follow. If neither prefix is present, a token isconsidered a directory to search if it is in fact a directory, and alibrary to search for otherwise. The $Config{lib_ext} suffix willbe appended to any entries that are not directories and don't alreadyhave the suffix. Authors who wish their extensions to be portable toUnix or OS/2 should use the Unix prefixes, since the Unix-OS/2 versionof ext() requires them.
- •
- Entries cannot be plain object files, as many Win32 compilers willnot handle object files in the place of libraries.
- •
- If $potential_libs is empty, the return value will be empty.Otherwise, the libraries specified by $Config{libs} (see Config.pm)will be appended to the list of $potential_libs. The librarieswill be searched for in the directories specified in $potential_libsas well as in $Config{libpth}. For each library that is found, aspace-separated list of fully qualified library pathnames is generated.You may specify an entry that matches /:nodefault/i in$potential_libs to disable the appending of default librariesfound in $Config{libs} (this should be only needed very rarely).
- •
- The libraries specified may be a mixture of static libraries andimport libraries (to link with DLLs). Since both kinds are usedpretty transparently on the win32 platform, we do not attempt todistinguish between them.
- •
- LDLOADLIBS and EXTRALIBS are always identical under Win32, and BSLOADLIBSand LD_RUN_PATH are always empty (this may change in future).
SEE ALSO
the
ExtUtils::MakeMaker manpage
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- PORTABILITY
- SEE ALSO
This document was created byman2html,using the manual pages.