how to link with libtool?
Hello, I have a library that has its .la file in the right place. The question is: What should I do in the autotools setup so that libtool takes over the compilation, discovers the .la file and passes additional options to the linker so that the linking doesn't fail? Having AC_PROG_LIBTOOL in the configure.ac is not enough... What about having a AC_CHECK_LTLIB macro? This would be good to check for libtool libs first and for pkg-config configuration only if someone has taken the .la files away (some distros do that) What do you think of this? Matej ___ http://lists.gnu.org/mailman/listinfo/libtool
library versioning
Hello, libtool has a nice way how to version libraries. However, how do I tell to the linker that my app has to link with the library that supports interface x? This seems as a very trivial question, but I haven't found the answer in the manual, is that possible? Regards, Matej ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: library versioning
Hello Matěj, * Matěj Týč wrote on Mon, Feb 02, 2009 at 09:37:20PM CET: > libtool has a nice way how to version libraries. > However, how do I tell to the linker that my app has to link with the > library that supports interface x? This is not possible, in general. It has nothing much to do with libtool either, because typically it's just the system semantics that allow for only one unversioned soname symlink. Users typically work around this by installing different library versions in different $prefix'es. Developers typically hack around this by using the -release flag to rename the library, which comes with its added costs of course (see the manual!). Of course, if you don't have to be able to have multiple versions installed concurrently, then all you do is use a configure test like AC_CHECK_LIB or sisters with the latest-added symbol that you need, or a self-written link test if the latest needed API isn't distinguishable by function symbol alone. Hope that helps. Cheers, Ralf ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: how to link with libtool?
Hello Matěj, * Matěj Týč wrote on Mon, Feb 02, 2009 at 09:34:49PM CET: > I have a library that has its .la file in the right place. > The question is: What should I do in the autotools setup so that libtool > takes over the compilation, discovers the .la file and passes additional > options to the linker so that the linking doesn't fail? Having > AC_PROG_LIBTOOL in the configure.ac is not enough... > What about having a AC_CHECK_LTLIB macro? > This would be good to check for libtool libs first and for pkg-config > configuration only if someone has taken the .la files away (some distros > do that) Yes, it may be a good idea if somebody wrote this. It should probably depend on LT_OUTPUT. OTOH, the havelib module from gnulib already provides quite a bit of functionality in this area. Cheers, Ralf ___ http://lists.gnu.org/mailman/listinfo/libtool