Installing software from the plain source code can be a quite tedious job. So if you are a normal user and have never compiled a program from its source code by yourself you are maybe on the wrong page.
To build the source distribution some programs must be installed
In addition to this programs a couple of libraries are needed
If you are a Linux user you are most probably on the lucky side since most of these programs are included in the package library of modern Linux distributions. For Windows the situation is more difficult. Windows users may lookup the installation procedure for all of the required tools and libraries on the project sites of the software.
Once all dependencies (see above) are satisfied one can start with the build. To simply build the code run
$>scons
in the root directory of the source tree. If BOOST is not installed in one of the standard locations you can add the prefix of you BOOST installation with
$>scons BOOSTPREFIX=/opt/boost
To install the code use
$> scons install
Which will try to install the library along with its development files and documentation below the default installation prefix which is /usr on Linux systems. Clearly you need administrative permissions to install software at this location (in other words: you must be root). If you want to install the library to a different location the PREFIX build variable can be used. For instance
$> scons PREFIX=/opt/pniutils install
will install everything below /opt/pniutils where the libraries go under /opt/pniutils/lib, the headers to /opt/pniutils/include, and the documentation to /opt/pniutils/share/doc/libpniutils-doc. Usually this should give you enough control over your installation. However, in some cases this is not enough and you want to tell scons the individual directories where to install the software. For this purpose three environment variables that can be passed to scons during build and/or installation
LIBDIR - tells scons where to install librariesDOCDIR - where to install documentationINCDIR - where to install header filesIf you use one of these build variables its value overrides the installation path that would be defined by prefix. So for instance if you use
$> scons PREFIX=/usr/local LIBDIR=/usr/local/lib64 install
Libraries will go to /usr/local/lib64 and not /usr/local/lib as they would have done using only PREFIX.
Not done yet.