libtool
[Top][All Lists]
Advanced

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

Re: Getting filenames for libraries


From: Jason Curl
Subject: Re: Getting filenames for libraries
Date: Tue, 09 Dec 2008 19:54:43 +0100
User-agent: Thunderbird 2.0.0.18 (Windows/20081105)

Ralf Wildenhues wrote:
Hello Jason,

* Jason Curl wrote on Mon, Dec 08, 2008 at 08:43:35PM CET:
I can't move over to libtool 2.2.x just yet (most distros I support still have 1.5.26 - sorry) and I'm generating libraries.

FWIW, most distros have a way to use upstream packages without
re-libtoolizing and re-autoreconfing them.
I'm using Ubuntu 8.04, SuSE 11.0, Cygwin 1.5.x. I'm a little afraid of having both libtool 1.5.x and 2.x installed simultaneously and don't want to uninstall 1.5.x in fear of breaking things. This newsgroup has enough reports about mixing releases, especially libtool.

I'll look forward to playing around with Ubuntu 8.10 when I get time to testdrive libtool-2.x. Until then I've had to write a bunch of libtool macros that are specific to 1.5.x (code copy, paste and hack) to achieve some results.
Is there any way, given an la file, to get the file name of the library that will be generated at make time?

What do you need it for?
I should rephrase the question. Is there anyway, given the name of the la file I want to generate (it's not yet built at configure time) and given the options that I want to use to build the library, can I get the filename that libtool will generate?

Windows DLL rsrc for version has some fields (such as InternalName) that should be the name of the library DLL. For Non-Windows targets I plan to have a function that I call that gets the name and the version of the library that I can use for some version checking so I'll be embedding the name directly into C files with @LIBRARY_NAME@ or something similar and converting the "myfile.h.in" to "myfile.h" and then distributing this tarball.

All this is going in a general template for shared libraries that can be compiled on Windows and Posix like targets so I'm looking for it to be as automatic as possible.

Then it'll be extended to "plugins" which will have an API for version information and the filename will be embedded. A bit contrived, but the Windows resource filename is the big issue. I'm looking for a generic answer as somebody has already done most of the hard work.
libtool --config gives me partial information (such as the library_names_spec and soname_spec) but some of the variables are missing, such as ${shared_ext}, etc. I was kind of hoping there might be also someway to call script libtool and get the information directly from the source, is this even possible?

For shared_ext, you currently need to
  eval shared_ext=\"$shrext_cmds\"
Got that part from reading through aclocal.m4 and libtool after autoreconf/configure (couldn't be bothered finding the source all the time for libtool.m4 as it was copied in anycase to my development tree via autoconf).

Basically, I've got something pretty much implemented. Found out that on Cygwin/MinGW32 the soname_spec is what I want and on Linux/Solaris/FreeBSD library_names_spec is what I want.

But there's a lot of duplicate stuff between my m4 macro that gets this information and libtool itself. And my macros won't work on all systems (probably not irix, osf and what appeared to be another weird library naming system).
Cheers,
Ralf






reply via email to

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