[Nagiosplug-devel] libtool

Ton Voon ton.voon at altinity.com
Tue Mar 7 01:19:02 CET 2006


Hi!

Has anyone got any experience of using libtool? In CVS, I'm trying to  
get a testing executable to link against the tap library (if  
configure sees it is installed), but the tap library installs  
differently on my MacOSX (as a shared dynamic library) from my Debian  
box (as a archive).

The instructions after installing the tap library (http:// 
jc.ngo.org.uk/trac-bin/trac.cgi/wiki/LibTap) say:

----------------------------------------------------------------------
Libraries have been installed in:
    /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
    - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
      during execution
    - add LIBDIR to the `LD_RUN_PATH' environment variable
      during linking
    - use the `-Wl,--rpath -Wl,LIBDIR' linker flag

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

It seems that libtool is the GNU tool that abstracts the linking of  
libraries away, but I think this means it becomes a compile requirement.

Is this requirement worth adding in, especially since it is only  
really for a testing library, which is not necessarily called? Are  
the benefits of libtool worth putting in?

Ton

http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon






More information about the Devel mailing list