|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
Very often, one wants to build not only programs, but libraries, so that other programs can benefit from the fruits of your labor. Ideally, one would like to produce shared (dynamically-linked) libraries, which can be used by multiple programs without duplication on disk or in memory and can be updated independently of the linked programs. Producing shared libraries portably, however, is the stuff of nightmares--each system has its own incompatible tools, compiler flags, and magic incantations. Fortunately, GNU provides a solution: Libtool.
Libtool handles all the requirements of building shared libraries for
you, and at this time seems to be the only way to do so with any
portability. It also handles many other headaches, such as: the
Makefile rules with the variable suffixes of
shared libraries, linking reliably to shared libraries before they are
installed by the superuser, and supplying a consistent versioning system
(so that different versions of a library can be installed or upgraded
without breaking binary compatibility). Although Libtool, like
Autoconf, can be used on its own, it is most simply utilized in
conjunction with Automake--there, Libtool is used automatically
whenever shared libraries are needed, and you need not know its syntax.