libtool
[Top][All Lists]
Advanced

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

Re: Enabling/disabling shared or static libs from Makefile.am


From: Robert Boehne
Subject: Re: Enabling/disabling shared or static libs from Makefile.am
Date: Fri, 08 Jun 2001 10:51:50 -0500

Pierre:

If you put additional configure.in files in the subdirectories,
you can specify whatever you like in them, and they'll only
affect those subdirectories.
In general you can use one top-level configure.in if everything
is the same, if not you just need to have separate configure
scripts.  The scripts should run automatically so it doesn't
require multiple "configure" commands to be executed by
the user.  Another option may be to use libtool convience
libraries, but I'm not certain that would work for your case.

Cheers!

Robert

Pierre Sarrazin wrote:
> 
> I am autoconfiscating a large source tree with Autoconf (2.13),
> Automake (1.4) and Libtool (1.3.5) on a GNU/Linux system.
> 
> In this tree, there are subtrees that constitute the sources for
> shared libraries.  Other subtrees should give static libraries
> because they will never be needed in shared form.  Yet other subtrees
> define executable commands.
> 
> In the Makefile.am files that define the libraries, I specify that
> I want to build libtool libraries, e.g., libfoo.la.
> 
> One problem is that libtool then compiles every source file twice:
> once with position-independent code for a shared library, and once
> with position-dependent code for a static library.
> 
> None of the libraries need to be created in both shared and static
> form.  Thus, compiling twice wastes time and disk space.
> 
> I know that I can specify AC_DISABLE_STATIC before AM_PROG_LIBTOOL
> in the configure.in file.  But then, all libraries are created in
> shared form, which is inappropriate in my case.  This solution is
> too centralized.
> 
> Logically, it is in a Makefile.am file that I would like to ask
> that a specific library should be static.
> 
> There is one Makefile.am file in which I build two libraries:
> 
>     lib_LTLIBRARIES = libutils.la libmem.la
> 
> libutils should be static, while libmem should be shared.
> 
> I tried adding the -static flag to the *_LDFLAGS variable:
> 
>     libutils_la_LDFLAGS = -version-info 0:0:0 -no-undefined -static
> 
> But the source files are still compiled twice.
> 
> Does automake support what I am trying to say?
> 
> I would not mind if all source files were compiled as
> position-independent code, even for static libraries.
> 
> --
> Pierre Sarrazin <sarrazip -at- sympatico -dot- ca>
> 
> _______________________________________________
> Libtool mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/libtool

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden



reply via email to

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