Compiling and Using libinfinity: libinfinity-0.7 Reference Manual

## Compiling libinfinity

This chapter explains how to compile libinfinity on a UNIX-like operating system such as Linux. On Windows, you can pretty much follow the same instructions once you have set up a MinGW/MSYS build environment and installed the necessary dependencies to the correct locations. This document does not cover how to do this but might in the future. It is also possible to build libinfinity using the Microsoft Compiler and Visual Studio IDE but there are no project files so far.

The first thing to do is to check whether all dependencies of libinfinity are installed. The following list shows what packages are required to be present on your system prior to building libinfinity:

- libxml2

- glib-2.0 >= 2.16

- gnutls >= 1.7.2

- gsasl >= 0.2.21

- gtk+ >= 2.12 (optional)

- avahi-client (optional)

- libdaemon (optional)

Most if not all of them are most likely available in the package manager of your operating system vendor. It is much more convenient to obtain them from there than building them on your own.

The next step is to obtain the current source code for libinfinity. Point your web browser to http://releases.0x539.de/libinfinity and grab the latest `.tar.gz` file available, or exactly the version you want if you are looking for a specific one. Then unpack the tarball. On the command line this can be done using the following command:

    tar xvfz libinfinity-0.4.tar.gz

After unpacking, descend into the newly created directory and run the `configure` script there. This performs several checks to adapt the build for your specific operating system and environment. The script can be passed several command-line arguments to alter the build. For example, the `--prefix` argument specifies the directory libinfinity will be installed into after the build. It defaults to `/usr/local` but you might want to install it to a different place, such as `/opt/libinfinity`. In that case run the following:

    ./configure --prefix=/opt/libinfinity

To get a list of all possible arguments run `configure` with the `--help` argument. If you do not want to change the installation path simply omit the `--prefix=/opt/libinfinity` in the command above.

When all dependencies are installed correctly the `configure` script will run smoothly and end up with a status summary of what parts of libinfinity will or will not be built. If there are errors you need to fix them (for examply by installing a missing dependency) and run `configure` again. After it ran it created a `Makefile` and you can build the package via:

    make

This might take some time but it is not supposed to produce an error. If it does something might be wrong with your build setup that `configure` was unable to detect. When make finished install the package using:

    make install

Depending on the installation directory you chose with the `--prefix` argument to configure you might need superuser privileges for this step.

## Compiling applications using libinfinity

## Environment variables