libtool: Integrating libtool
1
1 5 Integrating libtool with your package
1 ***************************************
1
1 This chapter describes how to integrate libtool with your packages so
1 that your users can install hassle-free shared libraries.
1
1 There are several ways that Libtool may be integrated in your
1 package, described in the following sections. Typically, the Libtool
1 macro files as well as 'ltmain.sh' are copied into your package using
1 'libtoolize' and 'aclocal' after setting up the 'configure.ac' and
1 toplevel 'Makefile.am', then 'autoconf' adds the needed tests to the
1 'configure' script. These individual steps are often automated with
1 'autoreconf'.
1
1 Here is a diagram showing how such a typical Libtool configuration
1 works when preparing a package for distribution, assuming that 'm4' has
1 been chosen as location for additional Autoconf macros, and 'build-aux'
11 as location for auxiliary build tools (⇒The Autoconf Manual
(autoconf)Input.):
1
1 libtool.m4 -----. .--> aclocal.m4 -----.
1 ltoptions.m4 ---+ .-> aclocal* -+ +--> autoconf*
1 ltversion.m4 ---+--+ `--> [copy in m4/] --+ |
1 ltsugar.m4 -----+ | ^ | \/
1 lt~obsolete.m4 -+ +-> libtoolize* -----' | configure
1 [ltdl.m4] ------+ | |
1 `----------------------------------'
1
1 ltmain.sh -----------> libtoolize* -> [copy in build-aux/]
1
1 During configuration, the 'libtool' script is generated either
1 through 'config.status' or 'config.lt':
1
1 .--> config.status* --.
1 configure* --+ +--> libtool
1 `--> [config.lt*] ----' ^
1 |
1 ltmain.sh --------------------------------'
1
1 At 'make' run time, 'libtool' is then invoked as needed as a wrapper
1 around compilers, linkers, install and cleanup programs.
1
1 There are alternatives choices to several parts of the setup; for
1 example, the Libtool macro files can either be copied or symlinked into
1 the package, or copied into 'aclocal.m4'. As another example, an
1 external, pre-configured 'libtool' script may be used, by-passing most
1 of the tests and package-specific setup for Libtool.
1
Menu