GNU R package sybilSBML: Link to libSBML for sybil


# ---------------------------------------------------------------------------- #
# All Systems
# ---------------------------------------------------------------------------- #

First make sure you have installed libsbml >= 5.16 with the FBC and groups
package. At http://sbml.org/Software/libSBML you can find installers for various
plattforms and the source to compile by yourself. In this case download the file
libSBML-5.16.0-core-plus-packages-src.* from their sourceforge page and use the 
configure options "--enable-fbc --enable-groups".

The installation procedure for the sybilSBML package needs to know where to
find the libSBML include directory and where to find the callable library.

# ---------------------------------------------------------------------------- #
# Linux and MacOS X installation
# ---------------------------------------------------------------------------- #

NOTE for MacOS: Onward from OS X 10.11 you might need to deactivate the System
Integrity Protection (SIP). Otherwise R won't be able to load the compiled
library.

There are basically four different ways of installing the sybilSBML package:

1) Use --with-sbml-<ARG>

   --with-sbml-include=PATH     with PATH being the include directory of libSBML

   --with-sbml-lib=PATH         with PATH being the directory containing the
                                callable library.

   R CMD INSTALL --configure-args=" \
       --with-sbml-include=/path/to/include/dir \
       --with-sbml-lib=/path/to/lib/dir" sybilSBML_X.X.X.tar.gz


   When using --with-sbml-<ARG>, both arguments must be given.

2) Use of environment variables

   PKG_CPPFLAGS                giving the PATH to the include directory of libSBML
   PKG_LIBS                    giving the PATH to the directory containing the
                               callable library and the libraries to link to.

3) Use --prefix

   --prefix=PATH               with path being the installation directory of
                               sybilSBML. The include directory is assumed to be
                               PATH/include and the callable library should be
                               in PATH/lib.

   If either --with-sbml-<ARG> nor --prefix is given, it is checked wether
   libSBML is located in /usr/local/include and /usr/local/lib[64] and
   /usr/include and /usr/lib[64].


4) Use pkg-config

   If pkg-config is available on your system, the pkg-config information
   of libSBML will be used.


# ---------------------------------------------------------------------------- #
# Windows installation
# ---------------------------------------------------------------------------- #

For the installation on Windows systems the file Makewars.win in src/ is
required. The file looks like this:

PKG_CPPFLAGS= -D_R_=1 -DUSE_R=1 -I"$(LIB_SBML)/include"

PKG_LIBS = -L"$(LIB_SBML)/bin" -lsbml

all: $(SHLIB)
	mkdir -p "$(R_PACKAGE_DIR)/libs$(R_ARCH)"
	cp "$(LIB_SBML)/bin/libsbml.dll" "$(R_PACKAGE_DIR)\libs$(R_ARCH)"

with the environment variable LIB_SBML being the installation directory
of libSBML.

If you want to build the package with libSBML FBC and Groups plugins functionality,
please exchange the the first row in the Makevars.win file in src/ into

PKG_CPPFLAGS= -D_R_=1 -DUSE_R=1 -DHAVE_FBC_PLUGIN=1 -DHAVE_GROUPS_PLUGIN=1 -I"$(LIB_SBML)/include"
