libtool
[Top][All Lists]
Advanced

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

linking shared libraries into libtool libraries


From: Chris Leishman
Subject: linking shared libraries into libtool libraries
Date: Wed, 3 Jan 2001 19:43:16 +1100
User-agent: Mutt/1.1.2i

libtool-1.3.5, ltmain.sh, line 1606:

# How the heck are we supposed to write a wrapper for a shared library?
if test -n "$link_against_libtool_libs"; then
        $echo "$modename: error: cannot link shared libraries into libtool 
libraries" 1>&2
        exit 1
fi  


Can I suggest that you don't actually link in libtool shared libraries - but
you DO add them to the libraries dependancy list (and add any dependancies
from the .la file) rather than exiting here?  Something will have to
be done to distiguish between installed and not installed versions, but that
shouldn't be too hard.

Basically if the .la file has "installed=yes", then we would copy its
dependancy libs, as well as adding "-L${libdir} -l${libname}" for that .la.

If it has "installed=no", then we would probably have to put
"-L${currentdir}/.libs -l${libname}" in our uninstalled target .la file as
well as the dependancies from the source .la, and "-L${libdir} -l${libname}"
in our target .lai as well as the dependancies from the source .lai.  Of
course the assumption (and requirement) is that the two libraries get
installed together, but I don't think that is unreasonable in the situation
where you are linking against an uninstalled library.

Any problems with this idea?


I will look at making this change, but the ltmain.sh is quite complicated so
it might take a while.  If anyone with a better knowledge wants to give it a
go that would be great.


Regards,

Chris

(BTW: please CC me on responses)

-- 
----------------------------------------------------------------------
       Knuth: premature optimisation is the root of all evil.
----------------------------------------------------------------------
Reply with subject 'request key' for GPG public key.  KeyID 0xB4E24219



reply via email to

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