Re: how do I avoid dynamic libraries?

2012-02-14 Thread Nick Bowler
Hi Sam,

This sounds like a libtool question, so I'll Cc the libtool list and
try to answer it based on that assumption.

On 2012-02-14 10:18 -0500, Sam Steingold wrote:
 There is a problem with the libffcall (http://www.gnu.org/software/libffcall/
 http://savannah.gnu.org/projects/libffcall) package (un)maintained by
 Bruno Haible, described in https://bugs.launchpad.net/bugs/274951:
 
 -- libffcall should be built without shared libraries as explained in
its README[1] file (most of the code is in headers anyway c)
 
 -- when clisp is linked against libffcall's shared libraries it crashes
on self-test
 
 So, I have two questions:
 
 1. how do I modify the libffcall's configure.in[2] so that the shared
libraries are never built even if the user asks for them?

If you use LT_INIT([disable-shared]) in configure.ac, then the default
will be to not build shared libraries.  The user can still enable them
explicitly, though.

To totally disable generating a shared library, you'll need to link the
library using libtool's -static flag (if you're using automake, this
probably means adding it to libffcall_la_LDFLAGS).

Another option is to not use libtool at all.

 2. how do I modify the clisp's configure.in[3] so that it never finds
libffcall's shared libraries even if they are mistakenly installed?

The easiest way is to say don't do that.

Nevertheless, libtool provides the flag -static-libtool-libs to force it
to use only static libtool libraries.  However, this will affect *all*
libtool libraries that you link against.  I don't know if possible to
link only a subset of the libtool libraries statically.

Another option is to not link against the libtool library at all.

 
 [1] http://cvs.savannah.gnu.org/viewvc/*checkout*/ffcall/README?root=libffcall
 
 [2] 
 http://cvs.savannah.gnu.org/viewvc/*checkout*/ffcall/configure.in?root=libffcall
 
 [3] 
 http://clisp.hg.sourceforge.net/hgweb/clisp/clisp/file/tip/src/m4/ffcall.m4

Hope that helps,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)


___
https://lists.gnu.org/mailman/listinfo/libtool


Re: how do I avoid dynamic libraries?

2012-02-14 Thread Daniel Herring
The only sure way I know to statically link a single library is to 
dispense with the common -lname and directly specify /path/to/libffcall.a 
(or the platform-specific equivalent) on the linker command line.


- Daniel

___
https://lists.gnu.org/mailman/listinfo/libtool