manpagez: man pages & more
info libtool
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5 Integrating libtool with your package

This chapter describes how to integrate libtool with your packages so that your users can install hassle-free shared libraries.

There are several ways in which Libtool may be integrated in your package, described in the following sections. Typically, the Libtool macro files as well as ‘ltmain.sh’ are copied into your package using libtoolize and aclocal after setting up the ‘configure.ac’ and toplevel ‘Makefile.am’, then autoconf adds the needed tests to the ‘configure’ script. These individual steps are often automated with autoreconf.

Here is a diagram showing how such a typical Libtool configuration works when preparing a package for distribution, assuming that ‘m4’ has been chosen as location for additional Autoconf macros, and ‘build-aux’ as location for auxiliary build tools (see The Autoconf Manual in The Autoconf Manual):

libtool.m4 -----.                .--> aclocal.m4 -----.
ltoptions.m4 ---+  .-> aclocal* -+                    +--> autoconf*
ltversion.m4 ---+--+             `--> [copy in m4/] --+       |
ltsugar.m4 -----+  |                    ^             |       \/
lt~obsolete.m4 -+  +-> libtoolize* -----'             |    configure
[ltdl.m4] ------+  |                                  |
                   `----------------------------------'

ltmain.sh -----------> libtoolize* -> [copy in build-aux/]

During configuration, the ‘libtool’ script is generated either through config.status or config.lt:

             .--> config.status* --.
configure* --+                     +--> libtool
             `--> [config.lt*] ----'      ^
                                          |
ltmain.sh --------------------------------'

At make run time, libtool is then invoked as needed as a wrapper around compilers, linkers, install and cleanup programs.

There are alternatives choices to several parts of the setup; for example, the Libtool macro files can either be copied or symlinked into the package, or copied into ‘aclocal.m4’. As another example, an external, pre-configured libtool script may be used, by-passing most of the tests and package-specific setup for Libtool.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on December 1, 2011 using texi2html 5.0.

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.