Skip to content

Commit

Permalink
Merge pull request #115 from furrer-lab/114-provide-guidance-on-prere…
Browse files Browse the repository at this point in the history
…quisite-for-installing-abn

114 provide guidance on prerequisite for installing abn
  • Loading branch information
matteodelucchi committed Jun 11, 2024
2 parents 55ba4eb + e76296f commit a72a5ef
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 9 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ We have implemented a rigorous testing framework similar to CRAN's to validate t
Our aim is to maximize the reliability of the `abn` package under various conditions, and we are dedicated to providing a robust and reliable package.
We appreciate your understanding as we work towards making `abn` available on CRAN soon.

## Required System libraries

The following system libraries are required to install the [abn](https://cran.r-project.org/package=abn) package:

- [GSL](https://www.gnu.org/software/gsl/): The GNU Scientific Library is a numerical library for C/C++. It is required for the [abn](https://cran.r-project.org/package=abn) package to compile the C/C++ code.
- On Ubuntu, install the library with `sudo apt-get install libgsl-dev`.
- On Fedora, install the library with `sudo dnf install gsl-devel`.
- On macOS, install the library with `brew install gsl`.
- On Windows, download the binaries from the [GSL website](https://www.gnu.org/software/gsl/).
- [JAGS](https://mcmc-jags.sourceforge.io/): Just Another Gibbs Sampler is a program for analyzing Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC) simulation. It is required for the [abn](https://cran.r-project.org/package=abn) package to run simulations.
- On Ubuntu, install the library with `sudo apt-get install jags`.
- On Fedora, install the library with `sudo dnf install jags`.
- On macOS, install the library with `brew install jags`.
- On Windows, download the installer from the [JAGS website](https://mcmc-jags.sourceforge.io/).

## Additional libraries

The following additional libraries are recommended to best profit from the [abn](https://cran.r-project.org/package=abn) features.
Expand Down
69 changes: 60 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for abn 3.0.7.
# Generated by GNU Autoconf 2.71 for abn 3.1.1.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
Expand Down Expand Up @@ -607,13 +607,14 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='abn'
PACKAGE_TARNAME='abn'
PACKAGE_VERSION='3.0.7'
PACKAGE_STRING='abn 3.0.7'
PACKAGE_VERSION='3.1.1'
PACKAGE_STRING='abn 3.1.1'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

ac_subst_vars='LTLIBOBJS
LIBOBJS
JAGS
GSL_LIBS
GSL_CFLAGS
GSL_CONFIG
Expand Down Expand Up @@ -1211,7 +1212,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures abn 3.0.7 to adapt to many kinds of systems.
\`configure' configures abn 3.1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1273,7 +1274,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of abn 3.0.7:";;
short | recursive ) echo "Configuration of abn 3.1.1:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1341,7 +1342,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
abn configure 3.0.7
abn configure 3.1.1
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1378,7 +1379,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by abn $as_me 3.0.7, which was
It was created by abn $as_me 3.1.1, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -1780,6 +1781,56 @@ fi



## Check for non-standard programs: JAGS
# Extract the first word of "jags", so it can be a program name with args.
set dummy jags; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_JAGS+y}
then :
printf %s "(cached) " >&6
else $as_nop
case $JAGS in
[\\/]* | ?:[\\/]*)
ac_cv_path_JAGS="$JAGS" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_path_JAGS="$as_dir$ac_word$ac_exec_ext"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

;;
esac
fi
JAGS=$ac_cv_path_JAGS
if test -n "$JAGS"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $JAGS" >&5
printf "%s\n" "$JAGS" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


if test "${JAGS}" = ""; then
as_fn_error $? "jags not found, is JAGS installed?" "$LINENO" 5
fi

ac_config_files="$ac_config_files src/Makevars"

cat >confcache <<\_ACEOF
Expand Down Expand Up @@ -2317,7 +2368,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by abn $as_me 3.0.7, which was
This file was extended by abn $as_me 3.1.1, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -2372,7 +2423,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
abn config.status 3.0.7
abn config.status 3.1.1
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,11 @@ fi
AC_SUBST(GSL_CFLAGS)
AC_SUBST(GSL_LIBS)

## Check for non-standard programs: JAGS
AC_PATH_PROG([JAGS], [jags])
if test "${JAGS}" = ""; then
AC_MSG_ERROR([jags not found, is JAGS installed?])
fi

AC_CONFIG_FILES([src/Makevars])
AC_OUTPUT

0 comments on commit a72a5ef

Please sign in to comment.