18.2 Configuration file

To simply the task of tuning builds, all the configuration options have been gathered into a single header file, include/mupdf/fitz/config.h.

This file is in two halves; the top half consists of a sequence of pairs of comments, and commented out #defines, the second half consists of #ifdef logic to make sense of the #define values set.

The configuration options available at build time are therefore described by the pairs in the first half of the file.

Each one of these pairs has first a comment that describes what the following configuration options do, and then commented out #defines that sets the configuration options to their defaults.

If an integrator wants to change a build option from the default, they have two options. Firstly, and most simply, they can edit the first half of the file to set the required #defines by uncommenting the relevant line and editing it. Alternatively, they can arrange for these values to be predefined by the compiler, normally by editing the CFLAGS defined in the Makefile. This latter method has the advantage of not requiring any edits to the source itself, and of allowing different configurations to be built from the same source tree.

The second half of the file should never need to be edited.