Requirements:

 - Linux or mostly POSIX.1-2001 compliant environment
 - GNU make, CMake 2.6.2 or newer
 - gcc 4.7 or newer or clang 3.0 or newer and Boost headers

Optional development packages for optional features:
 - zlib, libbz2, liblzma (from XZ), openssl and their development components
 - recent FUSE library and its development files for the "virtual mirror"
   filesystem

Build and installation instructions:

 - run "make"
 - if an error occurs during configuration: read the message, solve the
   problem, run "make distclean" and retry with "make"
 - when done, copy build/apt-cacher-ng and build/in.acng to /usr/local/sbin

Configure to run on system startup:

This heavily depends on the init system, one should have a look at the latest
Debian package (unpack with ar/tar or just mc) to see how to get it right.
For systemd configuration files, visit systemd directory and install that
config files as needed. For use with Avahi, install
contrib/apt-cacher-ng.service configuration file.

Configuration:

 - create a directory for cached files and for log files
 - set ownership and directory permissions in a way which allows 
   read/write/mkdir actions to the user account used to run apt-cacher-ng later
 - copy conf directory to /etc/apt-cacher-ng or similar location. 
 - adapt acng.conf and other *.conf files in that configuration directory. 
   See user manual (doc/apt-cacher-ng.pdf or doc/README) for instructions.
 - run apt-cacher-ng -c yourConfigurationDirectory
 - visit Command-and-Control web interface of apt-cacher-ng, link can be found
   among other instructions at http://yourHostName:portNumber/ , which might be
   http://localhost:3142/ with the default configuration
 - for apt clients, there is a config snipped in contrib/10-apt-cacher-ng.conf
   which might be installed into /etc/apt/apt.conf.d/.

Special flags:

Certain variables can be passed to the make command via call arguments or
environment variables to customize the build.

 - DEBUG=1 : creates binaries with additional debugging code included. Warning:
   extremelly increased log size.
 - CXX : overrides the default compiler (for example, CXX=clang++-3.0)
 - CXXFLAGS : parameters passed to the compiler after the default ones
 - LDFLAGS : parameters passed to the linker call (compiler call for linking)

Experimental flags:

CXXFLAGS=-flto -O3
(enables Link Time Optimization for smaller and more efficient code,
speed optimization or alternatively -Os for binary size optimization)
LDFLAGS=-fto
(must be enabled to use Link Time Optimization)
