# Xapian - the open source search engine

## Introduction

This document is intended to get you going with Xapian, taking you from the point of downloading the code, to getting an example application compiled and running.

Xapian can be built on UNIX systems (including MacOS X), and also Microsoft Windows systems using GCC with mingw or cygwin.

### Download

The first step is to obtain a copy of the software from the Xapian website.

### Unpacking

Use the usual tools to unpack the archives. For example, on a Linux system:

> `tar zxvf xapian-core-<versionnumber>.tar.gz
> tar zxvf omega-<versionnumber>.tar.gz`

These commands should unpack the archives into separate subdirectories ("xapian-core-N.NN" and "omega-N.NN").

### Configuring and building Xapian

Xapian uses the GNU autoconf, automake, and libtool tools. If you only wish to build releases or SVN snapshots or make minor alterations, this need not concern you greatly.

These tools generate a shell script called "configure" for each of the archives, which you should run to set up the code for compilation.

A typical build would be done using the commands:

        cd xapian-core
        ./configure
        make
        make install

Various options may be given to the configure script: `./configure --help` summarises these.

By default, Xapian will be installed in directories under `/usr/local`. This can be altered using the --prefix option to configure (e.g. `./configure --prefix=/home/fred/xapian` if you don't have root access to the system you want to install Xapian on).

### Configuring and building Omega

Omega can be built in almost exactly the same way as the core library. Simply run:

        cd omega
        ./configure
        make

`configure` should automatically find the installed Xapian library: if it doesn't you may need to specify the path to the `xapian-config` script, by passing a value for `XAPIAN_CONFIG` to configure, e.g. `./configure XAPIAN_CONFIG=/home/fred/xapian/bin/xapian-config`

Note: if you use libtool to link your application, you can link them with an uninstalled Xapian library. If you don't use libtool, you must install Xapian. We recommend using libtool anyway, since it handles setting the runtime library search path, so you can link against a shared Xapian library installed in a non-standard location, and it will be found without you having to mess with LD_LIBRARY_PATH.

### Building from CVS

If you wish to help develop Xapian, you may wish to build from the Subversion repository.