Note that Xapian is currently only available in versions targeted for UNIX systems.
tar zxvf xapian-core-<versionnumber>.tar.gz
tar zxvf xapian-examples-<versionnumber>.tar.gz
These commands should unpack the archives into separate subdirectories
("xapian-core" and "xapian-examples").
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 installVarious 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=/opt
).
cd xapian-examples ./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 using the
--with-xapian-config
option to configure.
Note: you must install the Xapian library to be able to link applications with it. In the past we've attempted to allow linking against uninstalled builds of the library, but it's very hard to do it reliably and portably. If you don't have the rights to install libraries in /usr/local/lib (or similar) then you can build Xapian to install under your home directory.
Supposing you had unpacked both xapian and xapian-examples in the same directory, you could use:
cd xapian-core ./configure --prefix=`pwd`/tempinstall --disable-shared make make install cd ../xapian-examples ./configure --with-xapian-config=`pwd`/../xapian-core/tempinstall/bin/xapian-config make
Check the documentation within the xapian-examples archive for more details on building and running the examples.