# Compiling and installing from source

## Prerequisites

Make sure you have all needed libraries (qt3, boost and xlib) along with their headers. You also need the environment variable `QTDIR` to be set to directory in which the Qt toolkit (version 3) is installed. Many distributions already set this when installing Qt, but some of them don't. In that case, you have to set the `QTDIR` manually. Usually it is set to something like `/usr/qt/3` or `/usr/share/qt3` Also, `QMAKESPEC` have to be set to match your system type. For most linuxes is is `linux-g++`, on BSD systems it can differ. If `QTDIR` is set in your distribution, this environment variable is probably set too. Once you set `QTDIR`, you may try typing `ls $QTDIR/mkspecs` - `QMAKESPEC` need to be set to name of one of the directories that are in `mkspecs` subdirectory in the Qt directory.

## Configuration

First step is to run configuration script, it will do some checks of required libraries and environment. Also, it allow to alter default settings (which is that the application will be installed in /usr/local directory tree) In CVS root (or root of distribution archive) type `./configure [parameters]` to run configuration

With parametr `--prefix` you can specify where to install the program, so if you do not have root privileges, you can install somewhere in your home directory, for example by specifying `--prefix=$HOME/pdfedit` . Type `./configure --help` to show all parameters of the configure script.

## Compiling

After running configure, type `make` to compile PDF Editor and re-genereate documentation (if needed, in the distribution archive the documentation is already pre-generated in HTML format, if you have proper tools installed (xstlproc, apache fop), then PDF version of documentation is also generated, if not, it is simply skipped as it is not essential)

## Installing

In CVS root (or root of distribution archive) type `make install` to install PDF Editor. It will check whether the project is compiled (if not, it will compile it) and install the editor.

## Uninstalling

In CVS root (or root of distribution archive) type `make uninstall` to uninstall PDF Editor. The editor must be already built (and installed) for this to work. This will remove all the files that have been installed by `make install`