I'm building several shared libraries. These shared libraries use common code from several static libraries, which I'll refer to as component libraries. Here's an example component library:
libauth_la_SOURCES=auth.h authexit.c chain.c checkpassword.c \
[ more sources go here ]
libauth_la_LDFLAGS=-staticlibauth.la is not going to get installed by the final application. It's an internal library whose only intended purpose is to provide some common code for a bunch of shared libraries that will be installed.
Here's one such shared library:
libauthuserdb_la_SOURCES=authuserdb.c preauthuserdb.c \
[ more sources ]
libauthuserdb_la_DEPENDENCIES=libauth.la
libauthuserdb_la_LIBADD=libauth.la
libauthuserdb_la_LDFLAGS=-moduleMy intentions here are:
Build the sources for libauthuserdb.la. Take their object code, and grab whatever modules from libauth.la that are references by stuff in libauthuserdb.la, and place all of that into a shared library.
In other words: look up all unresolved symbols from libauthuserdb.la's sources which can be found in the libauth.la. Take whatever modules from libauth.la that libauthuserdb.la needs, and generate a .so containing libauthuserdb_la_SOURCES plus whatever the sources need that can be found in libauth.a
Unfortunately, the actual results are different. There are two problem:
1. Libtool takes _all_ modules from libauth.la, and puts them into libauthuserdb.la. I only want the modules that libauthuserdb.la actually needs.
2. For some reason, only the static version of libauthuserdb.la is generated. I don't know why, but libauthuserdb.so is not created, only libauthuserdb.a is created. I am _not_ using the --disable-shared flag with the configure script.
I'd like to come up with a solution to do what I want without rearchitecturing the source. Of course, I could simply take the requisite libauth_la_SOURCES, manually add them to libauthuserdb_la_SOURCES, and build a garden-variety shared library, without a dependency on a static library.
However, this is not practical. I'm building several shared libraries that use different bits and pieces of the common code, and manually tracking which common source module is used by which shared library is cumbersome. I need to coerce libtool in doing this job for me.
pgp8bh9cN9OJc.pgp
Description: PGP signature_______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/libtool
