### Installation on Linux and Mac OS X

For user local installations a couple of environment variables need to be define. For instance, if you want to install the software to

$HOME/.usr, then use export PATH=$HOME/.usr/bin:$PATH export CPATH=$HOME/.usr/include:$CPATH export LD_LIBRARY_PATH=$HOME/.usr/lib:$LD_LIBRARY_PATH export LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBRARY_PATH export MANPATH=$HOME/.usr/share/man:$MANPATH This is only for local installation, system-wide installations don’t need any further configuration. Before you compile the software, make sure that you have all the required software installed, such as gcc, libgsl, python and matplotlib. You also need the gnu autotools to generate the configure script if you have downloaded the source from our version control repository. Simply type “autoreconf” to generate the script. To compile the source run ./configure make make install  The configure script accepts a couple of options including prefix to set the installation directory. Use ./configure --prefix=$HOME/.usr


for a local installation to \$HOME/.usr. Another important option is --enable-longdouble=yes/no which is used to enable long double precision instead of simple double precision. Please see ./configure --help for additional information.

### Installation on Windows

The installation of the adaptive sampling library on windows is complicated and requires a working installation of MinGW as well as cross-compiler toolchains for 64bit processors. We recommend to use our precompiled Matlab executables instead.

### GNU-R Package

To compile the R packages you need to install the adaptive sampling library as described above. The package is located in the R/ subfolder. Simply run

make install


in the R/ subfolder to install the packages. This will automatically assemble the R packages by running

R CMD build --no-multiarch adaptive.sampling
R CMD build --no-multiarch multibin.summation


and afterwards the packages are installed to your R library directory with

R CMD INSTALL --no-multiarch adaptive.sampling_1.0-1.tar.gz multibin.summation_1.0-1.tar.gz


### Matlab

We provide precompiled Matlab executables (MEX-files) for Linux, Mac OS X and Windows. The executables are self-contained, which means that you do not need to compile and install the adaptive sampling library yourself.

You can also compile the Matlab plugin from source. On Linux and Mac OS X it is straight forward. Use

./configure --with-matlab


or

./configure --with-matlab=DIR


to enable Matlab support. Then go to the matlab/ subdirectory and run make.

Compiling the software on Windows is more complicated. Please refer to matlab/README for further instructions.

### Building Debian Packages

We provide all necessary files to construct Debian packages. The library however has yet not been uploaded to the Debian archive. To build the package we first need a working source tree. Simply clone the git repository

git clone http://anonscm.debian.org/git/sampling/sampling.git adaptive-sampling


and run autoreconf and ./configure inside the source directory. Then type

make dist-gzip


to obtain a tarball from the source tree, say adaptive-sampling-1.0.tar.gz. Rename it so that it is recognized by the Debian build tools, i.e.

mv adaptive-sampling-1.0.tar.gz ../adaptive-sampling_1.0.orig.tar.gz


and then run

git-buildpackage


to build the packages.