libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to disable building the shared version of one library (but not a


From: Ralf Wildenhues
Subject: Re: How to disable building the shared version of one library (but not all)
Date: Sun, 2 Nov 2008 22:04:40 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Roberto Bagnara wrote on Sat, Nov 01, 2008 at 11:50:01AM CET:
> Ralf Wildenhues wrote:
>> * Roberto Bagnara wrote on Fri, Oct 31, 2008 at 09:40:25PM CET:
>>> I have a project that builds several libraries.  For most of them,
>>> both the shared and static versions make sense, so I don't want
>>> to use AC_DISABLE_STATIC.  However, for some of them the static
>>> version does not make any sense.  How can I avoid the overhead
>>> of building the static version of those?
>>
>> libfoo_la_LIBTOOLFLAGS = --tag=disable-static

> we were already doing that, but this did not prevent compiling
> the sources that are only determined at configure time.

As in
  lib_LTLIBRARIES = libfoo.la
  libfoo_la_SOURCES = foo.c @substed@
  libfoo_la_LIBTOOLFLAGS = --tag=disable-static

and 'AC_SUBST([substed], [...])'?  Should work if you add the list of
possible sources in EXTRA_libfoo_la_SOURCES, I believe.  Should also
work for conditional sources:
  if COND
  libfoo_la_SOURCES += baz.c
  endif

> I had thus to use
>
> AM_LIBTOOLFLAGS = --tag=disable-static
>
> in the Makefile.am of the directory involved.

That is another possibility, but of course limits what can be built in
this Makefile.am.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]