1/** 2@page libtool Build with libtool 3 4@section libtoolBuild 5 64.4.0 introduces the dynamic library build option. It uses Gnu autotools 7and in particular libtool but is fully backward compatible. 8 9The Gnu autoreconf which is a driver for other autotools: it runs 10autoconf (building configure from configure.ac), autoheader (creating 11the AC_CONFIG_HEADERS file, includes/config.h for ISC DHC), aclocal 12(building aclocal.m4 script), automake (creating .in files from .am files), 13libtoolize (adding libtool support when enabled in configure.ac) and 14autopoint (for gettext which is not used by ISC DHCP). 15 16Static libraries are built using the same setup as in previous versions. 17This enforces strict backward compatibility and is the default option 18so users who do not want dynamic libraries have nothing different to do. 19(In other words changes for the support of dynamic libraries is invisible 20for legacy users). 21 22Dynamic libraries are handled by libtool, and therefore require a few 23extra steps before invoking configure. For users not reading the 24documentation but still wanting dynamic libraries "--enable-libtool" 25is accepted even without these extra steps (cp configure.ac+lt configure.ac; 26autoreconf -i) in a recovery procedure (invoking config+lt script) 27but not in a very robust way. Note libtool allows you to build static 28libraries: there is nothing to make this impossible but as the 29recommend way to build static libraries does not use libtool it is 30neither recommended nor supported. 31 32The autoreconf input file is configure.ac. There are four versions of this: 33 34 - configure.ac-base which has code for legacy and libtool options 35 36 - configure.ac-lt which has only the legacy option with recovery 37 when --with-libtool is given. Note it is not included in the 38 distribution as its configure.ac copy is 39 40 - configure.ac+lt which has the libool code and defaults to --with-libtool 41 42 - configure.ac which is either configure.ac-lt in the distribution and 43 configure.ac+lt when copied by the user at the first step for dynamic 44 libraries or by the config+lt recovery script 45 46Three scripts manage legacy and libtool options: 47 48 - util/lt.pl which extracts configure.ac-lt and configure.ac+lt from 49 configure.ac-base 50 51 - util/regen.sh which invokes util/lt.pl and copies configure.ac-lt 52 to configure.ac and run autoconf. The correct way for developers to 53 update the configure system is to update configure.ac-base and 54 to call util/regen.sh 55 56 - config+lt which is the recovery script. As it can be called in place 57 of configure it must be executable (i.e. -rwxr-xr-x rights) in 58 the distribution. 59 To perform the reverse recovery, i.e. from libtool to legacy options, 60 the simplest (and most reliable) way is to simply clean the build 61 directory and to restart from the initial step, i.e., to extract 62 the distribution. 63 64Automake uses different names for library related variables if libtool 65is used or not for some Makefile's the procedure is a bit complex. 66 67Usually the source Makefile is Makefile.am. Automake is run before 68the distribution build to generate Makefile.in and at configuration 69time the config.status script is invoked at the end of ./configure 70on AC_CONFIG_FILES to substitute @xxx@ variables into Makefile. 71 72ISC DHCP uses an extra step with a postconfig phase at the end 73of ./configure which invokes automake and reruns config.status 74giving a chain with Makefile.am.in, Makefile.am, Makefile.in and 75Makefile 76 77*/ 78