1 Prerequisites
---------------

1.1 Build Dependencies
----------------------

Boost (>= v1.43) - http://www.boost.org/
cmake (>= v2.6)  - http://www.cmake.org/
re2c  (>= v0.13) - http://www.re2c.org/

And a C++ compiler like gcc or clang:
- http://gcc.gnu.org/
- http://clang.llvm.org/

1.2 Runtime Dependencies
------------------------

clasp  (>= v3.0.0) - http://potassco.sourceforge.net/
gringo (>= v4.2.1) - http://potassco.sourceforge.net/

2 Compilation and Installation
------------------------------

To compile a release build, create a release folder and execute cmake
accordingly:

  mkdir -p build/release
  cd build/release
  cmake -DCMAKE_BUILD_TYPE=Release ../..
  make
  make install
  
For information on how to run aspcud, please refer to the
README file.

2.1 Using non-default Boost Installations
-----------------------------------------

If you want to use a boost library that is not installed in a default 
location, than you can specify its location using environment variables:

BOOST_ROOT       - Installation prefix for searching for Boost.
                   Set this if cmake has problems finding the proper
                   Boost installation.

BOOST_INCLUDEDIR - Similar to BOOST_ROOT but sets the path to the include 
                   directory directly.

BOOST_LIBRARYDIR - Similar to BOOST_ROOT but sets the path to the library
                   directory directly.

To use a Boost installation in /usr/local, set the respective environment
variable:

  export BOOST_ROOT=/usr/local

2.2 Configuring Paths to Binaries and Encodings
-----------------------------------------------

By default aspcud uses some hardcoded paths for binaries/encodings.  These can
be overwritten using the following cmake variables (this are *not* environment
variables and thus have to be set using cmakes -D option):

CUDF2LP_LOC  - The path to the cudf2lp binary.
               Default: CMAKE_INSTALL_PREFIX/bin/cudf2lp

GRINGO_LOC   - The path to the gringo binary.
               Default: CMAKE_INSTALL_PREFIX/bin/gringo

CLASP_LOC    - The path to the clasp binary.
               Default: CMAKE_INSTALL_PREFIX/bin/clasp

ENCODING_LOC - The path to the default encoding.
               Default: CMAKE_INSTALL_PREFIX/share/aspcud/misc2012.lp

Furthermore, you can use the prefix <module_path> in any of the above paths.
This prefix is then replaced by the path the aspcud executable is in. This is
ment for distributing relocatable binaries of aspcud.

