Apertium-service
Compiling and Installing
This document covers compilation and installation of apertium-service on Unix and Unix-like systems only.
apertium-service, like many other Open Source projects, uses GNU buildtools (like autoconf and automake) to create a build environment.
Requirements
You need the following software installed:
- liblttoolbox3
- libapertium3
- libxmlrpc-c3 - a lightweight RPC library based on XML and HTTP for C and C++.
- libtextcat0 - a library implementing the classification technique described in Cavnar & Trenkle, "N-Gram-Based Text Categorization". (optional)
- libboost - Boost C++ libraries are a collection of peer-reviewed, Open Source libraries that extend the functionality of C++.
In particular, the following components from Boost C++ libraries are required:
- libboost-thread - for portable C++ multi-threading.
- libboost-filesystem - for portable filesystem operations in C++.
- libboost-date-time - for portable date/time operations in C++.
- libboost-regex - regular expression library for C++.
- libboost-program-options - program options library for C++.
Download
apertium-service can be downloaded from the Apertium SVN repository with the following command:
$ svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium-service
Configuring the source tree
The next step is to configure the apertium-service source tree for your particular platform and personal requirements. This is done using the script configure included in the root directory of the distribution. (Developers downloading an unreleased version of the apertium-service source tree will need to have autoconf and libtool installed and will need to run the script autogen.sh before proceeding with the next steps. This is not necessary for official releases.)
To configure the source tree using all the default options, simply type ./configure. To change the default options, configure accepts a variety of variables and command line options.
The most important option is the location --prefix where the apertium-service is to be installed later, because apertium-service has to be configured for this location to work correctly. More fine-tuned control of the location of files is possible with additional configure options.
In addition, it is sometimes necessary to provide the configure script with extra information about the location of your compiler, libraries, or header files. This is done by passing either environment variables or command line options to configure. For more information, see the configure manual page.
For a short impression of what possibilities you have, here is a typical example which compiles apertium-service for the installation tree /sw/pkg/apertium-service with a particular compiler and flags:
$ CC="pgcc" CFLAGS="-O2" \ ./configure --prefix=/sw/pkg/apertium-service
When configure is run it will take a few seconds to test for the availability of features on your system and build Makefiles which will later be used to compile the server.
Details on all the different configure options are available on the configure manual page.