[lug] [OT] Automake question ...

Tom Tromey tromey at redhat.com
Mon Aug 12 18:20:13 MDT 2002


>>>>> "Ralf" == rm  <rm at fabula.de> writes:

Ralf> i'm currently working on converting a project (mod-guile)
Ralf> to an auto-tools managed codebase. Somehow i can't find
Ralf> a way to have automake accept a shared object (.so) as my
Ralf> primary build target. I know that i can tell it to build
Ralf> a libtool shared library (*.la or *.lo) and that i can
Ralf> grab the *.so object from libtool's .libs directory but this
Ralf> looks somehow wrong to me ;-) Any hints, documentation pointers
Ralf> etc. from the gurus?

Automake has always assumed that there is just one way to build a .so:
use libtool.  You could simply use libtool with automake in the
standard way, and let the *.la files, etc, be installed.  Things
should still work; Apache ought to ignore the extra files.


You can also hack things by doing something like:

    mybindir = $(libdir)
    mybin_PROGRAMS = libfoo.so
    libfoo_so_SOURCES = ...
    AM_CFLAGS = -fPIC

... and whatever other magic you find you need (probably some
link-time stuff).  Of course, once you try to make this portable
you'll be reinventing libtool.  There may be other quirks with this
approach.

Tom



More information about the LUG mailing list