|  11.1 Integration with `configure.in' 
Declaring your use of libtoolin the project's
`configure.in' is a simple matter of adding the
`AC_PROG_LIBTOOL'(18) somewhere
near the top of the file.  I always put it immediately after the other
`AC_PROG_...' macros.  If you are converting an old project to uselibtool, then you will also need to remove any calls to
`AC_PROG_RANLIB'.  Since Libtool will be handling all of the
libraries, it will decide whether or not to callranlibas appropriate for the build environment. 
 
The code generated by `AC_PROG_LIBTOOL' relies on the shell
variable $top_builddirto hold the relative path to the directory
which contains theconfigurescript.  If you are using
Automake,$top_builddiris set in the environment by the
generated `Makefile'.  If you use Autoconf without  Automake then
you must ensure that$top_builddiris set before the call to
`AC_PROG_LIBTOOL' in `configure.in'.
Adding the following code to `configure.in' is often sufficient:
 
 |  | for top_builddir in . .. ../.. $ac_auxdir $ac_auxdir/..; do
  test -f $top_builddir/configure && break
done
 | 
 
Having made these changes to add libtoolsupport to your
project, you will need to regenerate the `aclocal.m4' file to pick
up the macro definitions required for `AC_PROG_LIBTOOL', and then
rebuild yourconfigurescript with these new definitions in
place.  After you have done that, there will be some new options
available fromconfigure: 
 |  | $ aclocal
$ autoconf
$ ./configure --help
...
--enable and --with options recognized:
  --enable-shared[=PKGS]  build shared libraries [yes]
  --enable-static[=PKGS]  build static libraries [yes]
  --enable-fast-install[=PKGS]  optimize for fast installation [yes]
  --with-gnu-ld           assume the C compiler uses GNU ld [no]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --with-pic              try to use only PIC/non-PIC objects [both]
 | 
 
These new options allow the end user of your project some control over
how they want to build the project's libraries.  The opposites of each
of these switches are also accepted, even though they are not listed by
configure --help.  You can equally pass,
`--disable-fast-install' or `--without-gnu-ld' for example. 
 |