Tell us your story
Tell us your story
How has offline Wikipedia affected you? The Wikimedia Foundation (the non-profit that supports Wikipedia) is looking for personal, diverse and inspiring stories about how offline Wikipedia affects the world. If you have a personal story that you would like to share, please contact: stories@kiwix.org. Thank you!

Black&White Project/Automatic compilation/configure

From Kiwix
Jump to: navigation, search

In order to ease maintenance and readability of this very essential script in the build process, we have decided that configure.ac needed a major rewrite. Because this script cascades everywhere towards the compilation chain, we will work on the rewrite in parallel.

To use the new compile script, do the following:

./autogen.sh alt

The configure.ac does not exist anymore in svn. A link to configure_orig.ac (previous version) is created by autogen.sh.

Changes

  • The new configure script will tend to a more standard autotools approach by changing options names.
  • There are two main direction: packaged build or regular build.
  • Each dependency (shared objects or archive) can be specified.
  • Not found dependencies falls back to download/compile mode.
  • Download/compile respects main direction.

Files modified:

Options

All dependencies must be present as shared objects (dll, dylib). A packaged build is a regular build which then creates a tarball containing all shared objects. Components are NOT built statically.

The command line binaries (server, indexer, searcher, manager, reader) are built statically.

Each dependency has two options:

  • --with-dep=

Used to specify the folder where to find the shared objects.

  • --with-static-dep=

Used to specify the path to the static archive.

Both options can receive SELF as value which the script will interpret as download and build for me. Should SELF be defined for either shared or static, both will be built and used.

--enable-compileall (default: false)

variable: COMPIL_DEPS (bool)

Defines whether to build a static version or not.

--with-gecko-sdk=

variable: GECKO_SDK_PATH. Path to sdk/ of xulrunner-sdk or gecko-sdk.

Debian package: xulrunner-1.9-dev (ubuntu maverick and before, debian 6) Gecko_SDK

Optional packages

Command line tools are mostly optional (except for server). Active/deactive compilation with enable-xxx and disable-xxx.

Regular dependencies

The following dependencies are required:

  • Zlib
  • Xapian
  • SQLite
  • libmicroHTTPd
  • LZMA
  • aria2 (only the aria2c binary)
  • cLucene
  • ICU (static option is a path as there are multiple archives)

Typical usages

Regular build

./configure --with-z=/opt/local/lib --with-static-lzma=SELF

This will build Kiwix with /opt/local/lib/libz.dll and retrive+compile LZMA.

Packaged build shortcut

./configure --enable-compileall

Build instructions

./autogen.sh alt
./configure
make src/dependencies
./configure
make
make static