This is the mail archive of the gsl-discuss@sourceware.cygnus.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: broken after libtoolswitch on




On Mon, 14 Feb 2000, Thomas Walter wrote:

> After this one has all libraries as shared and static.  Now the real
> problem is how to tell libtool to put all static libraries into a
> single 'libgls.a'.  The documentation of libtool does not say much
> about this (or I am not able to understand it).

Hello,

I just subscribed to the list, so I'm coming late into this conversation; 
I hope I haven't missed some important context for the above question. 

I have recently used libtool to do just what you ask.  It is fairly
straightforward: use a _LIBADD variable to list the libraries that you
want merged into libgls.

Here's a fragment of our top-level Makefile.am that creates libbicpl:

	SUBDIRS = Include Data_structures Transforms ...
	lib_LTLIBRARIES = libbicpl.la
	libbicpl_la_SOURCES = version.c
	libbicpl_la_LIBADD = \
		$(top_builddir)/Data_structures/libbicpl_ds.la \
		$(top_builddir)/Transforms/libbicpl_t.la \
		...


And here's what Data_structures/Makefile.am looks like:

	AM_CPPFLAGS = -I$(top_srcdir)/Include
	noinst_LTLIBRARIES = libbicpl_ds.la
	libbicpl_ds_la_SOURCES = bintree.c bitlist.c ...


There are two things to note.  First, it _is_ possible to use
noinst_LTLIBRARIES.  I skimmed a couple of recent messages about this,
which seemed to imply there was some problem using noinst libraries. 
(Or was it that one *wants* all the sub-libraries installed alongside the
conglomerate?)  

The second thing to note is that I was not able to make libbicpl composed
*solely* from the contents of LDADD.  Eventually, I discovered that I
needed a non-empty libbicpl_la_SOURCES, so I stuck in a dummy file,
version.c (it just has a static version string).  I suspect this is a bug
in one of the auto* tools, but I haven't investigated further. 

Cheers,
-Steve

P.S. This set-up allows *both* static and shared versions of the
     libraries.

P.P.S. libtool version 1.3.3, automake 1.4, and autoconf 2.13.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]