manpagez: man pages & more
info libtool
Home | html | info | man

File: libtool.info,  Node: Static-only libraries,  Prev: Distributing,  Up: Integrating libtool

5.6 Static-only libraries
=========================

When you are developing a package, it is often worthwhile to configure
your package with the ‘--disable-shared’ flag, or to override the
defaults for ‘LT_INIT’ by using the ‘disable-shared’ option (*note The
‘LT_INIT’ macro: LT_INIT.). This prevents libtool from building shared
libraries, which has several advantages:

   • compilation is twice as fast, which can speed up your development
     cycle,

   • debugging is easier because you don't need to deal with any
     complexities added by shared libraries, and

   • you can see how libtool behaves on static-only platforms.

   You may want to put a small note in your package ‘README’ to let
other developers know that ‘--disable-shared’ can save them time.  The
following example note is taken from the GIMP(1) distribution ‘README’:

     The GIMP uses GNU Libtool to build shared libraries on a
     variety of systems.  While this is very nice for making usable
     binaries, it can be a pain when trying to debug a program.  For that
     reason, compilation of shared libraries can be turned off by
     specifying the --disable-shared option to configure.

   ---------- Footnotes ----------

   (1) GNU Image Manipulation Program, for those who haven't taken the
plunge.  See .

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