( Using Automake

Info Catalog ( Makefile rules ( Integrating libtool ( Configuring
 5.2 Using Automake with libtool
 Libtool library support is implemented under the `LTLIBRARIES' primary.
    Here are some samples from the Automake `' in the libtool
 distribution's `demo' subdirectory.
    First, to link a program against a libtool library, just use the
 `program_LDADD' variable:
      bin_PROGRAMS = hell hell.debug
      # Build hell from main.c and
      hell_SOURCES = main.c
      hell_LDADD =
      # Create an easier-to-debug version of hell.
      hell_debug_SOURCES = main.c
      hell_debug_LDADD =
      hell_debug_LDFLAGS = -static
    The flags `-dlopen' or `-dlpreopen' ( Link mode) would fit
 better in the PROGRAM_LDADD variable.  Unfortunately, GNU automake, up
 to release 1.4, doesn't accept these flags in a PROGRAM_LDADD variable,
 so you have the following alternatives:
    * add them to PROGRAM_LDFLAGS, and list the libraries in
      PROGRAM_DEPENDENCIES, then wait for a release of GNU automake that
      accepts these flags where they belong;
    * surround the flags between quotes, but then you must set
           program_LDADD = "-dlopen"
           program_DEPENDENCIES =
    * set and `AC_SUBST' variables DLOPEN and DLPREOPEN in
      `' and use `@DLOPEN@' and `@DLPREOPEN@' as
      replacements for the explicit flags `-dlopen' and `-dlpreopen' in
      `program_LDADD'.  Automake will discard `AC_SUBST'ed variables
      from dependencies, so it will behave exactly as we expect it to
      behave when it accepts these flags in `program_LDADD'.  But hey!,
      this is ugly!
    You may use the `program_LDFLAGS' variable to stuff in any flags you
 want to pass to libtool while linking `program' (such as `-static' to
 avoid linking uninstalled shared libtool libraries).
    Building a libtool library is almost as trivial... note the use of
 `libhello_la_LDFLAGS' to pass the `-version-info' ( Versioning)
 option to libtool:
      # Build a libtool library, for installation in libdir.
      lib_LTLIBRARIES =
      libhello_la_SOURCES = hello.c foo.c
      libhello_la_LDFLAGS = -version-info 3:12:1
    The `-rpath' option is passed automatically by Automake (except for
 libraries listed as `noinst_LTLIBRARIES'), so you should not specify it.
     Building a Shared Library (automake)A Shared Library, for
 more information.
Info Catalog ( Makefile rules ( Integrating libtool ( Configuring
automatically generated byinfo2html