Difference between revisions of "Apertium-service"

From Apertium
Jump to navigation Jump to search
Line 64: Line 64:
Now you can build the various parts which form the Apache HTTPd package by simply running the command:
Now you can build the various parts which form the apertium-service package by simply running the command:

Revision as of 11:40, 18 August 2009

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.


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++.


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.


Now you can build the various parts which form the apertium-service package by simply running the command:

$ make

A base configuration takes a few minutes to compile and the time will vary widely depending on your hardware.


Now it's time to install the package under the configured installation PREFIX (see --prefix option above) by running:

$ make install