Compiling the Chafa package: Chafa Reference Manual

## Compiling the Chafa package

Compiling the Chafa Package — How to compile Chafa itself

## Building from the Git repository

When building from a clean Git repository, the build files must be prepared before anything else happens. The repository includes a shell script for this:

`./autogen.sh`

Afterwards the build can proceed like it would from a source package.

## Building from a source package

Chafa uses a typical build system provided by autoconf, automake and libtool. You can build and install Chafa like this:

`./configure`
`make`
`make install`

The standard options provided by GNU autoconf may be passed to the configure script. Please see the autoconf documentation or run ./configure --help for information about the standard options.

## Dependencies

Chafa depends on the GLib library. If you want to build the chafa command-line tool in addition to the libchafa library, you will also need ImageMagick (specifically the MagickWand library) and its development files.

## Extra Configuration Options

In addition to the normal options, the configure script supports these additional arguments:

`--disable-Bsymbolic` and `--enable-Bsymbolic`. By default, Chafa uses the -Bsymbolic-functions linker flag to avoid intra-library PLT jumps. A side-effect of this is that it is no longer possible to override internal uses of Chafa functions with `LD_PRELOAD`. Therefore, it may make sense to turn this feature off in some situations. The `--disable-Bsymbolic` option allows you to do that.

`--disable-gtk-doc` and `--enable-gtk-doc`. By default the configure script will try to auto-detect whether the gtk-doc package is installed. If it is, then it will use it to extract and build the documentation for the Chafa library. These options can be used to explicitly control whether gtk-doc should be used or not. If it is not used, the distributed, pre-generated HTML files will be installed instead of building them on your machine.

`--disable-man` and `--enable-man`. By default the configure script will try to auto-detect whether xsltproc and the necessary Docbook stylesheets are installed. If they are, then it will use them to rebuild the included man pages from the XML sources. These options can be used to explicitly control whether man pages should be rebuilt or not. The distribution includes pre-generated man pages.