
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, 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
* Perl 5.8.1 or higher and the perl "pod2man" command for document
  generation (this may be in the package perl-podlaters)
* liburcu aka userspace-rcu headers and libraries. Use distro pkg or
  http://lttng.org/urcu/ (optional, but important for performance!)

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

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

If working directly from a git clone, you may also need:

* autoconf (2.63+), automake(1.11.1+), and libtool(2.2.6+) packages
* Ragel 6.x: http://www.complang.org/ragel/ (or distro package)
* Start with "autoreconf -vi", then ./configure ...

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

--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-systemdsystemunitdir=DIR
  Sets the install path for the systemd gdnsd.service unit file on
    linux hosts with systemd, which would normally be obtained via:
    "pkg-config --variable=systemdsystemunitdir systemd".
  Note that the automatic value for this from pkg-config doesn't follow
    autoconf's prefix at all; it will still pick e.g.
    "/usr/lib/systemd/system" even when --prefix is "/usr/local".
  If pkg-config and/or systemd do not exist and this is not set manually
    the unit file is neither generated nor installed.
  To disable the generation and installation of the unit file on systems
    which have systemd software installed (but e.g. are not using it for
    the init system), use --without-systemdsystemunitdir.

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

--without-hardening
  Disable the default compiler/linker flags for security hardening.
  Probably not a great idea unless they're breaking things on your
    platform and/or you're supplying replacement flags of your own.

--enable-developer
  Builds a debugging build (-g) with a large suite of assert()ions, extra
    informative debug information via STDERR or syslog(), and some
    other expensive, excessive runtime checks that really slow things down.
  Not generally for production use, but handy for development or tracking
    down evasive bugs.  If you just want debug symbols, put -g in 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.
