
Building From Source
====================

In general, this is a standard autoconf-style project: ./configure && make check && sudo make install

If your starting point is a tarball download, the following prerequisites apply:

* A basically functional POSIX build environment with a C99 compiler
* libev headers and libraries, version 4.x: distro pkg or http://software.schmorp.de/pkg/libev.html

The following are optional, but generally recommended:

* liburcu aka userspace-rcu headers and libraries. Use distro pkg or http://lttng.org/urcu/
* libcap headers and libraries on Linux hosts (use distro pkg generally)

The following have no real effect on the build or runtime, but are required in order to run the testsuite:

* Perl 5.8.1 or higher
* Perl modules: LWP 5.805+, Socket6, IO::Socket::INET6, HTTP::Daemon

If working directly from a git clone rather than a tarball, in addition to all of the above:

* ./autogen.sh will construct the configure script to get started
* You may need to install updated autoconf, automake, and libtool packages
* You will need a working copy of Ragel: http://www.complang.org/ragel/ (or distro package)
* Use "git clean -dfx" to reset to a truly clean state (could wipe local edits!)

Interesting / Non-standard autoconf options
===========================================

--enable-developer
  Builds a debugging build (-g) with a lot of extra gcc warnings
    flags, a large suite of assert()ions, and extra
    informative debug information via STDERR or syslog().
    It also does other excessive runtime checks that really
    slow things down.
  Not generally for production use.  If you just want debug
    symbols, put -g in your CFLAGS.

--with-testport=N
  The test suite needs to be able to bind to 3 consecutive ports
   on 127.0.0.1, starting with port N.  The default is 12345.  If
   this conflicts with some existing service on your machine, change
   it here.

--without-libcap
  Explicitly disable libcap support on Linux

--without-urcu
  Explicitly disable support for liburcu (falls back to pthread locks)

--with-rundir=/some/where
  Set an alternate system-level rundir, e.g. in situations where a Linux
  distro wants to use "/run" in place of "/var/run".

--with-rootdir=/some/where
  Defaults this build to chroot-mode execution using the specified default
  chroot path.  The normal default is to use $PREFIX-based paths (-d system).
  Regardless of this setting, the commandline "-d" argument can change the
  behavior and/or path at runtime.
