INSTALLATION
============

Building from source
~~~~~~~~~~~~~~~~~~~~

The VMOD is built on a system where an instance of Vinyl Cache is installed, and
the auto-tools will attempt to locate the Vinyl Cache instance, and then pull in
libraries and other support files from there.

Requirements
------------

.. _`Vinyl Cache build dependencies`: https://vinyl-cache.org/docs/trunk/installation/install_source.html

We recommend to just install the `Vinyl Cache build dependencies`_
for the system on which this vmod is to be built.

The following packages are required at a minimum::

  make
  automake
  autoconf
  autoconf-archive
  libpcre2-dev
  libtool
  pkg-config

In particular, ``libpcre2-dev`` refers to a PCRE2 installation with
headers.

Your system might use slightly different names.

Quick start
-----------

This sequence should be enough in typical setups:

1. ``./autogen.sh``  (for git-installation)
2. ``./configure``
3. ``make``
4. ``make check`` (regression tests)
5. ``make install`` (may require root: sudo make install)

Alternative configs
-------------------

If you have installed Vinyl Cache to a non-standard directory, call
``autogen.sh`` and ``configure`` with ``PKG_CONFIG_PATH`` pointing to
the appropriate path. For example, when vinyld configure was called
with ``--prefix=$PREFIX``, use::

  PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
  export PKG_CONFIG_PATH

For developers
--------------

As with Vinyl Cache, you can use these ``configure`` options for stricter
compiling:

* ``--enable-developer-warnings``
* ``--enable-extra-developer-warnings`` (for GCC 4)
* ``--enable-werror``

The VMOD must always build successfully with these options enabled.

Also as with Vinyl Cache, you can add ``--enable-debugging-symbols``, so
that the VMOD's symbols are available to debuggers, in core dumps and
so forth.
