libtool
[Top][All Lists]
Advanced

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

Re: stop libtool from compiling everything twice


From: Ralf Wildenhues
Subject: Re: stop libtool from compiling everything twice
Date: Sat, 29 Nov 2008 10:40:10 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* herman bastiaens wrote on Fri, Nov 28, 2008 at 03:41:56PM CET:
> >>> 
> >>> If you need both static and shared elsewhere, you can also try
> >>>   libconv_la_LIBTOOLFLAGS = --tag=disable-static
> >>
> >>I tried the --disable-static option (I believe for a static convenience 
> >>library, I should use the --disable-shared option?), but libtool doesn't 
> >>recognize it:
> >>  libtool: unrecognized option '--disable-static'
> >>the command i tried is:
> >>  libtool --disable-static --mode=compile g++ -g -pipe -c file.cpp
> >>  libtool --mode=compile --disable-static g++ -g -pipe -c file.cpp
> >>  libtool --mode=compile g++ --disable-static -g -pipe -c file.cpp
> >
> >
> >Try ./configure --disable-static
> 
> It's just a makefile I'm writing myself, I don't have a configure
> script, so I would like to know excactly what parameters to pass to
> libtool to get this done.

It would have been helpful if you had mentioned this right away.
Anyway, in this case the thing to use is --tag=disable-static,
as mentioned above, as argument to 'libtool' early in the command
line, before the --mode argument.  Ordering with respect to other
tag arguments like --tag=CXX (which you should use BTW) is irrelevant.

Please note that, if you are using an installed libtool script, you
are to some extent at the mercy of how it was configured: if it was
configured with --disable-shared, then you will only get static
libraries out of it, no matter what options you pass.  If it was
configured to use a different compiler (in which case omitting --tag=CXX
will be important for you to use), then linking will happen with that
different compiler.  Just FYI.

Hope that helps.

Cheers,
Ralf




reply via email to

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