######################################################################################################
###  
###  Installation instructions for the neojags package 
### 
###
###  The instructions below are modified from the runjags package
###  Original file is Copyright (C) Matthew Denwood, licensed under GPL-2
###
######################################################################################################


This package is based on the runjags package.


Installation on Windows
-----------------------

At compile time, there is no way for Windows to guess where the JAGS
library is installed, so you must supply the location yourself using
the make variable JAGS_ROOT, defining it in the file HOME/.R/Makevars.win
like so:

JAGS_ROOT=c:/Progra~1/JAGS/JAGS-4.0.0

where HOME is the default starting directory for an R session launched
from the start menu (typically your Documents folder).

The configure script also needs to know the version of JAGS being used,
and will attempt to guess this from the JAGS_ROOT path.  If a non-
standard install path has been used you will need to provide the correct
JAGS major-version number like so:

JAGS_MAJOR_VERSION=4

The header files for the module itself should be able to detect the
version of JAGS installed on your system, but if you encounter compiler
errors it may help to specify JAGS_MAJOR_VERSION even if JAGS is 
installed in a standard directory.



Unix/Linux: pkg-config
------------------------

If you have pkg-config installed then the configure script will use it
to detect the JAGS library and set the compiler and linker flags for
neojags. You can test this capability in a unix shell by typing

pkg-config --modversion jags

If this does not detect your JAGS installation then it means that the
file 'jags.pc' is not on the search path of pkg-config. In this case
you should add it by setting the environment variable PKG_CONFIG_PATH.
For example if the full path to 'jags.pc' is
'/usr/local/lib64/pkgconfig/jags.pc', then set

export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

before installing neojags.

Recall that most Linux distributions divide software into `user' and
`developer' versions, so if you are using a pre-built JAGS binary
package for your Linux distribution then remember to install the
developer version before attempting to install the neojags package.

The header files for the module itself should be able to detect the
version of JAGS installed on your system, but a JAGS_MAJOR_VERSION
environmental variable can be set in case of problems which may be
encountered with some versions of JAGS - e.g. JAGS 4-beta requires:

export JAGS_MAJOR_VERSION=4
R CMD install neojags



Unix/Linux: legacy configuration
----------------------------------

Legacy configuration is used whenever pkg-config is not installed or
otherwise fails to detect the JAGS library. Legacy configuration is
deprecated and will be removed in a future version. If you experience
problems with installing neojags then it is strongly recommended that
you try to get pkg-config working. Otherwise, you can refer to the
legacy installation instructions given within the rjags package.