INSTALLING C-PLUFF
==================

These are instructions for building and installing the C-Pluff framework
implementation using the source code distribution or the source code from the
version control repository.

For help on building C-Pluff based applications, see the examples in the
examples directory.


Prerequisites
-------------

To build C-Pluff, you need to have following prerequisites installed:

  - GNU Make, C/C++ compiler (GCC), etc.

  - a C library supporting POSIX dlopen
    (for example, GNU C library)
    or
    GNU Libtool libltdl library
    (http://www.gnu.org/software/libtool/)

  - Expat XML Parser library for C
    (http://expat.sourceforge.net/)

Following components are optional and are used if they are installed:

  - GNU gettext libintl library for localization
    (http://www.gnu.org/software/gettext/gettext.html)

  - GNU Readline Library for enhanced command line
    (http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html)


Preparing GNU Autotools build environment
-----------------------------------------

If you are using a pre-packaged source distribution cpluff-VERSION.tar.gz then
you may skip directly to section Building.

If you are building from source checked out from the version control repository
then you have to first prepare the GNU autotools build environment. To do this,
simply execute the following command in the top level source directory.

  ./autogen.sh

The following tools must be installed to successfully prepare the build
environment.

  - GNU Gettext

  - GNU Libtool

  - GNU Automake

  - GNU Autoconf


Building
--------

To build C-Pluff, follow the usual Autotools procedure:

  Building in the source directory:
    ./configure
    make

  Building in a separate build directory:
    cd BUILD_DIR
    SOURCE_DIR/configure
    make

You can specify the installation prefix (for example, /usr or /usr/local)
when running the configure script.

  ./configure --prefix=/usr
  
The default installation prefix is /usr/local. More help on available
configuration options is available using the --help option.

  ./configure --help


Installation
------------

You can install the library, header files, utilities, documentation and
examples by making target install:

  make install

If installing to system directories you have to do this as root.

Additionally, you can specify a directory to be used in place of the
root directory during installation. This is typically used to create
binary packages.

  make DESTDIR=/tmp/installation install
