www.delorie.com/gnu/docs/octave/kpathsea_16.html   search  
 
Buy GNU books!


Kpathsea: A library for path searching

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2.4.5 Shared library

You can compile Kpathsea as a shared library on a few systems, by specifying the option `--enable-shared' when you run `configure'.

The main advantage in doing this is that the executables can then share the code, thus decreasing memory and disk space requirements.

On some systems, you can record the location of shared libraries in a binary, usually by giving certain options to the linker. Then individual users do not need to set their system's environment variable (e.g., LD_LIBRARY_PATH) to find shared libraries. If you want to do this, you will need to add the necessary options to LDFLAGS yourself; for example, on Solaris, include something like `-R${prefix}/lib', on IRIX or Linux, use `-rpath${prefix}/lib'. (Unfortunately, making this happen by default is very difficult, because of interactions with an existing installed shared library.)

Currently, shared library support is implemented only on Linux, SunOS 4 (Solaris 1), SunOS 5 (Solaris 2), IRIX 5, and IRIX 6. If you're interested and willing in adding support for other systems, please see the `configure' mode in the `klibtool' script, especially the host-specific case statement around line 250.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003