From 616ce6697b79f5da9cb1ac4a790fe66f9e016f75 Mon Sep 17 00:00:00 2001 From: "Jonas I. Liechti" Date: Sun, 14 Jul 2024 17:53:32 +0000 Subject: [PATCH] Fix: detailed installation instructions (#126) * on label install check mac & windows * fixing running condition * installing dependencies for macos * try installing gsl package * dedicated window pipeline * fixing os parameter * dedicated macos workflow * Revert "try installing gsl package" This reverts commit b6678f53fe08036b47876b9b4dbfd3bbcd90e578. * minor label formatting * fixing container declaration * installing jags * adding jags path * trying again with install * installing rjags providing Jags home * try with silent mode fore setup exe' * adding more R versions * install INLA * renaming workflow * debugging - show gls configs * fixing to always report * create configure file with autoconf * installing automake * debugging - gsl path * providing flags for clang/gcc as well * debugging - check jags location * try to detect the paths for jags * passing the args to Makevars * better test * debugging * unconditional try * debugging * separate install of rjags * simplify * working with only configure.ac file * providing jags paths does not help * started with Fedora installation workflow * started with restructuring installation section * adding installing ... sections * workflow to Fedora * in a container it is * installing missing tools * specify mirror * missing gfortran and deps * wip on README * fixing INLA installation mirror * more details on jags * adding mirrors * Info about GSL * fixing installation command * done with extre installation steps * harmonizing structure * fixing gsl download * providig mirror * separately install rjags * install R-devtools * adding BiocManager deps * fixing testthat call * installing INLA separately * fixing name * intalling R on macos * test without cmake * getting the tests and run testthat * properly handling renv * attempt to link (r)jags * intalling alos Suggests * fixing path to jags.pc * installing Suggests * also install rjags explicitly * install pkg-config for rjags * working config on fedora server * try with the pkg-config path * without specifying type * debugging * fixed R script run * check runtime linkage * better highlighting * debugging * provide path to jags library * try without pkg_config_path * details about fedora and jags * including entropy package * to revert - test with actual version * run autoconf before installing from source * started with prereq part * started with macos prereqs * separate location for build and test * Ubuntu installation workflow * Ubuntu based workflow * debugging folder permisssions * allow adm group to write to /usr/local/lib * install dependencies * completing installing from ... parts * formatting * specify which dependencies * identical testing workflow * fixing pkg root * adding dependencies for testing * adding udunits for INLA #125 * typeo * adiding curl dev for inla dep. * installing INLA dependencies * try to avoid version check issue in devtools * installing openssl heasders * installing openssl dev * fixing package name * first make dir writeable * macos install gdal for s2>fmesher>INLA * installing gdal for INLA * fixing folder perms for R site-library * jpeg headers for INLA dependency * includig gdal headers for INLA * adding gdal headers for INLA * adding testthat again * try install avoiding useing local .o and .so * testing the install via CRAN * bouncing moments dependency * fixing typeo * proj headers for sf>fmesher>INLA * adding proj headers for INLA * adding configure built with configure.ac - see #127 * specify mirror for CRAN install * adding some more info to configure * fixing typeo * uniform naming * loading library * cleaning up windows workflow * cleaning up macos workflow * cleaning up fedora workflow * cleaning up ubuntu workflow * installing geos headers for INLA * installing geos>terra>INLA * corrected comment * building from source * how to install from source * adding pandoc to build from source * do not build vignettes * fixing devtools info for mac + * do not build vignettes * specify repos * ditch the matrix * using autoreconf * removing virtual env setup for now (is untested) * only claim what we really tested * minor completion by adding mirror * adding install status badges * minor formatting * running on specific branch * more structure in INLA part * test headers * formatting dropdowns as headers * properly set targeted branch * minor formatting * adding rjags install for ubunut * fixing typos * fixing #129 - typo * better indentation * fixing some permissions for fedora * simply ignore the installation issue for html docs --- .github/workflows/onlabel_CRAN_checks.yml | 5 +- .github/workflows/onlabel_Fedora_setup.yml | 164 +++++++ .github/workflows/onlabel_Macos_setup.yml | 134 ++++++ .github/workflows/onlabel_Ubuntu_setup.yml | 153 +++++++ .github/workflows/onlabel_Windows_setup.yml | 136 ++++++ DESCRIPTION | 6 +- README.md | 455 ++++++++++++++++++-- configure | 268 ++++++------ configure.ac | 10 + src/Makevars | 19 - src/Makevars.in | 9 +- vignettes/paper.md | 2 +- 12 files changed, 1160 insertions(+), 201 deletions(-) create mode 100644 .github/workflows/onlabel_Fedora_setup.yml create mode 100644 .github/workflows/onlabel_Macos_setup.yml create mode 100644 .github/workflows/onlabel_Ubuntu_setup.yml create mode 100644 .github/workflows/onlabel_Windows_setup.yml delete mode 100644 src/Makevars diff --git a/.github/workflows/onlabel_CRAN_checks.yml b/.github/workflows/onlabel_CRAN_checks.yml index dbd06148f..16d1b1f70 100644 --- a/.github/workflows/onlabel_CRAN_checks.yml +++ b/.github/workflows/onlabel_CRAN_checks.yml @@ -87,10 +87,9 @@ jobs: run: | renv::deactivate() shell: Rscript {0} - - name: Change permissions of configure + - name: Configure ABN for installation run: | - chmod +x configure - shell: bash + autoreconf - name: Install package dependencies run: | devtools::install_deps(pkg = '.', dependencies = TRUE, upgrade='never') diff --git a/.github/workflows/onlabel_Fedora_setup.yml b/.github/workflows/onlabel_Fedora_setup.yml new file mode 100644 index 000000000..4eeb19517 --- /dev/null +++ b/.github/workflows/onlabel_Fedora_setup.yml @@ -0,0 +1,164 @@ +# Workflow is triggered on label and check installation on various operating systems +# This action is adapted from https://github.com/t4d-gmbh/stubbed_versioning +name: Fedora Install + +on: + pull_request: + types: [ labeled ] + +env: + LABEL_CHECK: 'fedoraInstall::check' + LABEL_SUCCESS: 'fedoraInstall::passed' + LABEL_FAILURE: 'fedoraInstall::failed' + JAGS: '4.3.2' + BUILD_LOC: "./build" + BRANCH: ${{ github.head_ref || github.ref_name }} + +permissions: + packages: read + contents: write + pull-requests: write + repository-projects: write + +jobs: + setup-and-install: + runs-on: ubuntu-latest + container: + image: "fedora:latest" + if: ${{ github.event.label.name == 'fedoraInstall::check' }} + name: fedora-latest R release + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + steps: + - name: prepare fedora + run: | + dnf -y install wget + dnf -y install gcc + dnf -y install gcc-c++ + dnf -y install gfortran + dnf -y install lapack* # is needed on fedora server + dnf -y install blas* + dnf -y install atlas* + + - name: install R + run: | + dnf -y install R + + - name: install config and build dependencies + run: | + dnf -y install pkg-config + dnf -y install cmake + dnf -y install R-devtools + + - name: install GSL + run: | + dnf -y install gsl-devel + + - name: install JAGS + run: | + wget -O /tmp/jags.tar.gz https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Source/JAGS-${{ env.JAGS }}.tar.gz/download + cd /tmp + tar -xf jags.tar.gz + cd /tmp/JAGS-${{ env.JAGS }} + ./configure --libdir=/usr/local/lib64 + make + make install + + - name: assert runtime linkage + run: | + echo "/usr/local/lib64" > /etc/ld.so.conf.d/jags.conf + /sbin/ldconfig + + - name: install rjags + run: | + install.packages("rjags", configure.args="--enable-rpath", repos=c(CRAN="https://cran.r-project.org")) + library("rjags") + shell: Rscript {0} + + - name: install INLA dependencies + run: | + dnf -y install udunits2-devel + dnf -y install libcurl-devel # rCurls package (for INLA) + dnf -y install openssl-devel # s2 package + dnf -y install libjpeg-devel # jpeg package + dnf -y install proj-devel # sf package + dnf -y install geos-devel # sf package + dnf -y install gdal-devel # terra package + + - name: install INLA + run: | + install.packages("INLA", repos = c(CRAN = "https://cran.r-project.org", INLA = "https://inla.r-inla-download.org/R/stable"), dep = TRUE) + shell: Rscript {0} + + - name: installing dependencies from BiocManager + run: | + if (!requireNamespace("BiocManager", quietly = TRUE)) + install.packages("BiocManager", repos=c(CRAN="https://cran.r-project.org")) + BiocManager::install("Rgraphviz") + BiocManager::install("graph") + shell: Rscript {0} + + - name: install from CRAN + run: | + install.packages('abn', repos=c(CRAN="https://cran.r-project.org")) + library('abn') + shell: Rscript {0} + + - name: install from GitHub + run: | + devtools::install_github("furrer-lab/abn", ref="${{ env.BRANCH }}", dependencies=c("Depends", "Imports", "LinkingTo"), local=FALSE) + library('abn') + shell: Rscript {0} + + - name: fetch the repository from GitHub + uses: actions/checkout@v4 + + - name: deactivate the renv + run: | + renv::deactivate() + shell: Rscript {0} + + - name: install from source + run: | + devtools::install_deps(pkg = '.', dependencies = TRUE, upgrade='never', repos=c(CRAN="https://cran.r-project.org")) + devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE) + install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source") + shell: Rscript {0} + + report_Fedora_setup: + if: ${{ (success() || failure()) }} + needs: + - setup-and-install + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + repository-projects: write + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} + steps: + - uses: actions/checkout@v4 + - name: Check if on demand tasks succeeded + run: | + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} + if [ ${{ needs.setup-and-install.result }} == "success" ]; then + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY + exit 0 + elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY + exit 1 + else + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "On demand task outcome was ${{ needs.setup-and-installoutcome }}" + fi + shell: bash + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + EVENT: ${{ github.event.number }} # This is either the issue or pr diff --git a/.github/workflows/onlabel_Macos_setup.yml b/.github/workflows/onlabel_Macos_setup.yml new file mode 100644 index 000000000..50959dbd9 --- /dev/null +++ b/.github/workflows/onlabel_Macos_setup.yml @@ -0,0 +1,134 @@ +# Workflow is triggered on label and check installation on various operating systems +# This action is adapted from https://github.com/t4d-gmbh/stubbed_versioning +name: Macos Install + +on: + pull_request: + types: [ labeled ] + +env: + LABEL_CHECK: 'macosInstall::check' + LABEL_SUCCESS: 'macosInstall::passed' + LABEL_FAILURE: 'macosInstall::failed' + BUILD_LOC: "./build" + BRANCH: ${{ github.head_ref || github.ref_name }} + +permissions: + packages: read + contents: write + pull-requests: write + repository-projects: write + +jobs: + setup-and-install: + if: ${{ github.event.label.name == 'macosInstall::check' }} + name: macos-latest R release + runs-on: macos-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + steps: + - name: prepare macos + run: | + brew install R + brew install pkg-config + brew install automake # needed to run autoconf + + - name: install GSL + run: | + brew install gsl + + - name: install JAGS + run: | + brew install jags + + - name: install rjags + run: | + install.packages("rjags", type="source", repos=c(CRAN="https://cran.r-project.org")) + library("rjags") + shell: Rscript {0} + + - name: install INLA dependencies + run: | + brew install udunits + brew install openssl@1.1 # s2 package + brew install gdal # installs geos as dependency + # for s2 fmesher terra) + brew install proj # sf package + + - name: install INLA + run: | + install.packages("INLA", repos = c(CRAN = "https://cran.r-project.org", INLA = "https://inla.r-inla-download.org/R/stable"), dep = TRUE) + shell: Rscript {0} + + - name: installing dependencies from BiocManager + run: | + if (!requireNamespace("BiocManager", quietly = TRUE)) + install.packages("BiocManager", repos=c(CRAN="https://cran.r-project.org")) + BiocManager::install("Rgraphviz") + BiocManager::install("graph") + shell: Rscript {0} + + - name: install from CRAN + run: | + install.packages('abn', repos=c(CRAN="https://cran.r-project.org")) + library('abn') + shell: Rscript {0} + + - name: install from GitHub + run: | + devtools::install_github("furrer-lab/abn", ref="${{ env.BRANCH }}", dependencies=c("Depends", "Imports", "LinkingTo"), local=FALSE) + library('abn') + shell: Rscript {0} + + - name: fetch the repository from GitHub + uses: actions/checkout@v4 + + - name: deactivate the renv + run: | + renv::deactivate() + shell: Rscript {0} + + - name: install from source + run: | + devtools::install_deps(pkg = '.', dependencies = TRUE, upgrade='never', repos=c(CRAN="https://cran.r-project.org")) + devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE) + install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source") + shell: Rscript {0} + + report_Macos_setup: + if: ${{ (success() || failure()) }} + needs: + - setup-and-install + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + repository-projects: write + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} + steps: + - uses: actions/checkout@v4 + - name: Check if on demand tasks succeeded + run: | + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} + if [ ${{ needs.setup-and-install.result }} == "success" ]; then + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY + exit 0 + elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY + exit 1 + else + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "On demand task outcome was ${{ needs.setup-and-install.outcome }}" + fi + shell: bash + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + EVENT: ${{ github.event.number }} # This is either the issue or pr diff --git a/.github/workflows/onlabel_Ubuntu_setup.yml b/.github/workflows/onlabel_Ubuntu_setup.yml new file mode 100644 index 000000000..49a477514 --- /dev/null +++ b/.github/workflows/onlabel_Ubuntu_setup.yml @@ -0,0 +1,153 @@ +# Workflow is triggered on label and check installation on various operating systems +# This action is adapted from https://github.com/t4d-gmbh/stubbed_versioning +name: Ubuntu Install + +on: + pull_request: + types: [ labeled ] + +env: + LABEL_CHECK: 'ubuntuInstall::check' + LABEL_SUCCESS: 'ubuntuInstall::passed' + LABEL_FAILURE: 'ubuntuInstall::failed' + JAGS: '4.3.2' + BUILD_LOC: "./build" + BRANCH: ${{ github.head_ref || github.ref_name }} + +permissions: + packages: read + contents: write + pull-requests: write + repository-projects: write + +jobs: + setup-and-install: + runs-on: ubuntu-latest + if: ${{ github.event.label.name == 'ubuntuInstall::check' }} + name: ubuntu-latest R release + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + steps: + + - name: install R + run: | + sudo apt-get -y install r-base + + - name: install config and build dependencies + run: | + sudo apt-get -y install pkg-config + sudo apt-get -y install cmake + sudo apt-get -y install r-cran-devtools + + - name: fixing folder perms for local lib + run: | + sudo chown root:adm -R /usr/lib/R + sudo chmod g+w -R /usr/lib/R + sudo chown root:adm -R /usr/local/lib/R + sudo chmod g+w -R /usr/local/lib/R + + - name: update R packages + run: | + update.packages(ask = FALSE, checkBuilt = TRUE) + shell: Rscript {0} + + - name: install GSL + run: | + sudo apt-get -y install libgsl-dev + + - name: install JAGS + run: | + sudo apt-get -y install jags + + - name: install rjags + run: | + install.packages("rjags", configure.args="--enable-rpath", repos=c(CRAN="https://cran.r-project.org")) + library("rjags") + shell: Rscript {0} + + - name: install INLA dependencies + run: | + sudo apt-get install -y --no-install-recommends libudunits2-dev + sudo apt -y install libcurl4-openssl-dev # rCurl for (for INLA) + sudo apt-get -y install libssl-dev # s2 package + sudo apt-get -y install libproj-dev # sf package + sudo apt-get -y install libgeos-dev # terra package + sudo apt-get -y install libgdal-dev # terra package + + - name: install INLA + run: | + install.packages("INLA", repos = c(CRAN = "https://cran.r-project.org", INLA = "https://inla.r-inla-download.org/R/stable"), dep = TRUE) + shell: Rscript {0} + + - name: installing dependencies from BiocManager + run: | + if (!requireNamespace("BiocManager", quietly = TRUE)) + install.packages("BiocManager", repos=c(CRAN="https://cran.r-project.org")) + BiocManager::install("Rgraphviz") + BiocManager::install("graph") + shell: Rscript {0} + + - name: install from CRAN + run: | + install.packages('abn', repos=c(CRAN="https://cran.r-project.org")) + library('abn') + shell: Rscript {0} + + - name: install from GitHub + run: | + devtools::install_github("furrer-lab/abn", ref="${{ env.BRANCH }}", dependencies=c("Depends", "Imports", "LinkingTo"), local=FALSE) + library('abn') + shell: Rscript {0} + + - name: fetch the repository from GitHub + uses: actions/checkout@v4 + + - name: deactivate the renv + run: | + renv::deactivate() + shell: Rscript {0} + + - name: install from source + run: | + devtools::install_deps(pkg = '.', dependencies = TRUE, upgrade='never', repos=c(CRAN="https://cran.r-project.org")) + devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE) + install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source") + shell: Rscript {0} + + report_Ubuntu_setup: + if: ${{ (success() || failure()) }} + needs: + - setup-and-install + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + repository-projects: write + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} + steps: + - uses: actions/checkout@v4 + - name: Check if on demand tasks succeeded + run: | + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} + if [ ${{ needs.setup-and-install.result }} == "success" ]; then + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY + exit 0 + elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY + exit 1 + else + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "On demand task outcome was ${{ needs.setup-and-installoutcome }}" + fi + shell: bash + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + EVENT: ${{ github.event.number }} # This is either the issue or pr diff --git a/.github/workflows/onlabel_Windows_setup.yml b/.github/workflows/onlabel_Windows_setup.yml new file mode 100644 index 000000000..470cacace --- /dev/null +++ b/.github/workflows/onlabel_Windows_setup.yml @@ -0,0 +1,136 @@ +# Workflow is triggered on label and check installation on various operating systems +# This action is adapted from https://github.com/t4d-gmbh/stubbed_versioning +name: Windows Install + +on: + pull_request: + types: [ labeled ] + +env: + LABEL_CHECK: 'windowsInstall::check' + LABEL_SUCCESS: 'windowsInstall::passed' + LABEL_FAILURE: 'windowsInstall::failed' + BUILD_LOC: "./build" + BRANCH: ${{ github.head_ref || github.ref_name }} + JAGS_MAJORV: '4' + JAGS_VERSION: '4.3.1' + JAGS_URL: "https://sourceforge.net/projects/mcmc-jags/files/JAGS" + +permissions: + packages: read + contents: write + pull-requests: write + repository-projects: write + +jobs: + setup-and-install: + if: ${{ github.event.label.name == 'windowsInstall::check' }} + name: windows-latest R release + runs-on: windows-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + steps: + + - name: prepare windows + run: | + install.packages("devtools", repos=c(CRAN="https://cran.r-project.org")) + shell: Rscript {0} + + - name: install GSL + run: | + Import-Module bitstransfer + New-Item -ItemType Directory -Force -Path "C:\Program Files\cygwin" + start-bitstransfer -source https://cygwin.com/setup-x86_64.exe "C:\Program Files\cygwin\setup-x86_64.exe" + Start-Process -Wait -FilePath "C:\Program Files\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages=gsl --site=https://cygwin.mirror.constant.com" -PassThru + + - name: install JAGS + run: | + Import-Module bitstransfer + New-Item -ItemType Directory -Force -Path "C:\Program Files\JAGS\JAGS-${{ env.JAGS_VERSION }}" + start-bitstransfer -source ${{ env.JAGS_URL }}/${{ env.JAGS_MAJORV }}.x/Windows/JAGS-${{ env.JAGS_VERSION }}.exe/download "C:\Program Files\JAGS\JAGS-${{ env.JAGS_VERSION }}\JAGS-${{ env.JAGS_VERSION }}.exe" + Start-Process -Wait -FilePath "C:\Program Files\JAGS\JAGS-${{ env.JAGS_VERSION }}\JAGS-${{ env.JAGS_VERSION }}.exe" -ArgumentList "/S" -PassThru + + - name: install rjags separately + run: | + Sys.setenv(JAGS_HOME="C:/Program Files/JAGS/JAGS-${{ env.JAGS_VERSION }}") + install.packages("rjags", repos=c(CRAN="https://cran.r-project.org")) + library("rjags") + shell: Rscript {0} + + - name: install INLA + run: | + install.packages("INLA", repos = c(CRAN = "https://cran.r-project.org", INLA = "https://inla.r-inla-download.org/R/stable"), dep = TRUE) + shell: Rscript {0} + + - name: installing dependencies from BiocManager + run: | + if (!requireNamespace("BiocManager", quietly = TRUE)) + install.packages("BiocManager", repos=c(CRAN="https://cran.r-project.org")) + BiocManager::install("Rgraphviz") + BiocManager::install("graph") + shell: Rscript {0} + + - name: install from CRAN + run: | + install.packages('abn', repos=c(CRAN="https://cran.r-project.org")) + library('abn') + shell: Rscript {0} + + - name: install from GitHub + run: | + devtools::install_github("furrer-lab/abn", ref="${{ env.BRANCH }}", dependencies=c("Depends", "Imports", "LinkingTo"), local=FALSE) + library('abn') + shell: Rscript {0} + + - name: fetch the repository from GitHub + uses: actions/checkout@v4 + + - name: deactivate the renv + run: | + renv::deactivate() + shell: Rscript {0} + + - name: install from source + run: | + devtools::install_deps(pkg = '.', dependencies = TRUE, upgrade='never', repos=c(CRAN="https://cran.r-project.org")) + devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE) + install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source") + shell: Rscript {0} + + report_Windows_setup: + if: ${{ (success() || failure()) }} + needs: + - setup-and-install + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + repository-projects: write + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} + steps: + - uses: actions/checkout@v4 + - name: Check if on demand tasks succeeded + run: | + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} + if [ ${{ needs.setup-and-install.result }} == "success" ]; then + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY + exit 0 + elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then + gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY + exit 1 + else + gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} + echo "On demand task outcome was ${{ needs.setup-and-install.outcome }}" + fi + shell: bash + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + EVENT: ${{ github.event.number }} # This is either the issue or pr diff --git a/DESCRIPTION b/DESCRIPTION index d07ff1f60..01629c254 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -50,13 +50,14 @@ Imports: Rcpp, Rgraphviz, rjags, - stringi + stringi, + entropy, + moments Suggests: bookdown, boot, brglm, devtools (>= 2.4.5), - entropy, ggplot2, gridExtra, INLA, @@ -64,7 +65,6 @@ Suggests: Matrix (>= 1.6.3), MatrixModels (>= 0.5.3), microbenchmark, - moments, R.rsp, RhpcBLASctl, rmarkdown, diff --git a/README.md b/README.md index 902e75ce2..cf66acaa7 100644 --- a/README.md +++ b/README.md @@ -16,62 +16,445 @@ It derives a directed acyclic graph (DAG) from empirical data that describes the The package provides routines for structure learning and parameter estimation of additive Bayesian network models. # Installation +[![Ubuntu Install](https://github.com/furrer-lab/abn/actions/workflows/onlabel_Ubuntu_setup.yml/badge.svg?branch=main)](https://github.com/furrer-lab/abn/actions/workflows/onlabel_Ubuntu_setup.yml) +[![Fedora Install](https://github.com/furrer-lab/abn/actions/workflows/onlabel_Fedora_setup.yml/badge.svg?branch=main)](https://github.com/furrer-lab/abn/actions/workflows/onlabel_Fedora_setup.yml) +[![MacOS Install](https://github.com/furrer-lab/abn/actions/workflows/onlabel_Macos_setup.yml/badge.svg?branch=main)](https://github.com/furrer-lab/abn/actions/workflows/onlabel_Macos_setup.yml) +[![Windows Install](https://github.com/furrer-lab/abn/actions/workflows/onlabel_Windows_setup.yml/badge.svg?branch=main)](https://github.com/furrer-lab/abn/actions/workflows/onlabel_Windows_setup.yml) + +`abn` and its installation process relies on various software that might, or might not, be present in your system. + +The [Prerequisites](#prerequisites) section contains information about software that is needed but is (very) likely already installed in your system. +In the [Dependencies](#dependencies) section you will find information about required software that is likely not already present. + +We recommend to go through both sections and follow the suggested installation process for your operating system before you try to install `abn`. + +## R version support + +Officially supported is R version >= 4.4 + +## Prerequisites + +
+ Ubuntu + + + Most likely you have R installed already but if not run: + + ```bash + apt-get install r-base + ``` + + To configure and build `abn` correctly we need `cmake` and `pkg-config`, as well as, the R `devtools` package: + + ```bash + apt-get install pkg-config + apt-get install cmake + apt-get install r-cran-devtools + ``` + + Finally, we will use `wget` to download `JAGS` later, as well as, the development headers of `curl` and `openssl`: + + ```bash + apt-get install wget + apt-get install libcurl4-openssl-dev + apt-get install libssl-dev + + ``` + +
+ +
+ Fedora + + You will need C/C++ and Fortran compilers and various libraries: + + ```bash + dnf install gcc + dnf install gcc-c++ + dnf install gfortran + dnf install lapack* # is needed on fedora server + dnf install blas* + dnf install atlas* + ``` + + Most likely you have R installed already but if not run: + + ```bash + dnf install R + ``` + + To configure and build `abn` correctly we need `cmake` and `pkg-config`, as well as, the R `devtools` package: + + ```bash + dnf install pkg-config + dnf install cmake + dnf install R-devtools + ``` + + Finally, we will use `wget` to download `JAGS` later, as well as, the development headers of `curl` and `openssl`: + + ```bash + dnf install wget + dnf install libcurl-devel + dnf install openssl-devel + ``` +
+ +
+ MacOS + + The installation process on MacOS relies on [Homebrew](https://brew.sh/), head over to their site to see the installation process or simply open a terminal and run: + + ```bash + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + ``` + + To configure and build `abn` correctly we need `cmake` and `pkg-config`: + + ```bash + brew install pkg-config + brew install automake # needed to run autoconf + ``` + + We will use `wget` to download `JAGS` later, as well as, the development headers `openssl`: + + ```bash + brew install wget + brew install openssl@1.1 + ``` -The most recent development version is available from [Github](https://github.com/furrer-lab/abn) and can be installed with: + Most likely you have R installed already but if not run: + + ```bash + brew install R + ``` -```r -devtools::install_github("furrer-lab/abn") +
+ +## Dependencies + +`abn` has a few **dependencies that need to be installed** before installing the package itself. +Some are C/C++ libraries and some are R packages that are not hosted on CRAN. + +Below is a list of these dependencies with details on how to install and configure them: + +-
+ GSL + + [GSL](https://www.gnu.org/software/gsl/), the _GNU Scientific Library_, is a numerical library for C/C++. + It is required to compile `abn`'s C/C++ code. + + #### Installation + +
+ Ubuntu + + `GSL` is available through the Advanced Package Tool, `APT`, simply type: + + ```bash + sudo apt-get install libgsl-dev + ``` + +
+
+ Fedora + + `GSL` is available through Fedoras standard package manager, `DNF`, simply type: + + ```bash + sudo dnf -y install gsl-devel + ``` + +
+
+ MacOS + + With Homebrew you can install the `GSL` binaries directly: + + ``` + brew install gsl + ``` +
+
+ Windows + + In Windows `GSL` is available a.o. through [cygwin](https://cygwin.com/index.html), which has a straight forward installation process. + Either head over to the website, download and install the setup-x86_64.exe file, or use PowerShell: + + ``` + Import-Module bitstransfer + New-Item -ItemType Directory -Force -Path "C:\Program Files\cygwin" + start-bitstransfer -source https://cygwin.com/setup-x86_64.exe "C:\Program Files\cygwin\setup-x86_64.exe" + Start-Process -Wait -FilePath "C:\Program Files\cygwin\setup-x86_64.exe" -ArgumentList "/S" -PassThru + ``` +
+
+-
JAGS & rjags + + [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. [rjags](https://cran.r-project.org/web/packages/rjags/index.html) is R's interface to the `JAGS` library. + `JAGS` is required in some simulations `abn` can perform. + + #### Installation + + In principle, we could only install `JAGS` and have `rjags` be installed automatically as dependency when installing `abn`, however, there are situations where `rjags` cannot find the `JAGS` libraries or `jags` at runtime, and therefore we recommend installing `rjags` directly after `JAGS` so to make sure that everything works as expected: + +
+ Ubuntu + + `JAGS` is available through the Advanced Package Tool, `APT`, simply type: + + ```bash + sudo apt-get install jags + ``` + And to install `rjags` open an R session and type: + + ```R + install.packages("rjags", configure.args="--enable-rpath", repos=c(CRAN="https://cran.r-project.org")) + library("rjags") + ``` + +
+
+ Fedora + + `JAGS` must be installed from source. + Below are the steps to install `JAGS 4.3.2`. + + ```bash + wget -O /tmp/jags.tar.gz https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Source/JAGS-4.3.2.tar.gz/download + cd /tmp + tar -xf jags.tar.gz + cd /tmp/JAGS-4.3.2 + ./configure --libdir=/usr/local/lib64 + make + sudo make install + ``` + + **Note:** + + _If you are on a 64bit system (you likely are) mind the `--libdir=/usr/local/lib64` argument when launching `./configure`._ + _Omitting this argument will lead to `rjags` "not seeing" `jags`._ + + + On Fedora `rjags` might need some special configuration for it to link properly to the `JAGS` library. + Also, it might be needed to add the path to the `JAGS` library to the linker path (see [rjags INSTALL file](https://github.com/cran/rjags/blob/master/INSTALL) for further details). + + In order to add the `JAGS` library to the linker path, run the following commands: + + ```bash + sudo echo "/usr/local/lib64" > /etc/ld.so.conf.d/jags.conf + sudo /sbin/ldconfig + ``` + **Note:** + _These commands might not be needed, you might first try to install `rjags` (see below) and only run them if you encounter a `configure: error: Runtime link error`._ + + To install `rjags` open an R session and type: + + ```R + install.packages("rjags", configure.args="--enable-rpath", repos=c(CRAN="https://cran.r-project.org")) + ``` + +
+
+ MacOS + + With Homebrew you can install the `JAGS` binaries directly: + + ``` + brew install jags + ``` + + And now to install `rjags`, open an R session and type: + + ```R + install.packages("rjags", type="source", repos=c(CRAN="https://cran.r-project.org")) + library("rjags") + ``` + +
+
+ Windows + + You can either head over to the [JAGS download page](https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/), download and execute the installable, or use PowerShell. + The following instructions will download and install `JAGS 4.3.1` in PowerShell: + + ``` + Import-Module bitstransfer + New-Item -ItemType Directory -Force -Path "C:\Program Files\JAGS\JAGS-4.3.1" + start-bitstransfer -source https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/JAGS-4.3.1.exe/download "C:\Program Files\JAGS\JAGS-4.3.1\JAGS-4.3.1.exe" + Start-Process -Wait -FilePath "C:\Program Files\JAGS\JAGS-4.3.1\JAGS-4.3.1.exe" -ArgumentList "/S" -PassThru + ``` + + In order to make sure `rjags` finds `JAGS` we set the environment variable `JAGS_HOME` before installing `rjags`. + To do so, open your R session and type: + + ```R + Sys.setenv(JAGS_HOME="C:/Program Files/JAGS/JAGS-4.3.1") + install.packages("rjags", repos=c(CRAN="https://cran.r-project.org")) + library("rjags") + ``` + +
+
+-
+ INLA + + [INLA](https://www.r-inla.org/) is an R package that is not hosted on CRAN and thus needs to be installed separately. + `anb` uses `INLA` to fit some models. + + #### Dependencies + + `INLA` relies on various other R packages and C/C++ libraries. + It thus needs some additional installation steps: + +
+ Ubuntu + + Install with: + + ```bash + apt-get install --no-install-recommends libudunits2-dev + apt-get install libjpeg-dev + apt-get install libgdal-dev + apt-get install libgeos-dev # might not be needed + apt-get install libproj-dev + ``` +
+
+ Fedora + + Install with: + + ```bash + dnf install udunits2-devel + dnf install libjpeg-devel + dnf install gdal-devel + dnf install geos-devel + dnf install proj-devel + ``` + +
+
+ MacOS + + Install with: + + ```bash + brew install udunits + brew install gdal # installs also geos as dependency + brew install proj + ``` + +
+ + #### Installation + + The installation is straight forward on common platforms, simply start an R session and run: + + ```R + install.packages("INLA", repos = c(getOption("repos"), INLA = "https://inla.r-inla-download.org/R/stable"), dep = TRUE) + ``` + + If you run into trouble, please see also [INLA's installation instructions](https://www.r-inla.org/download-install) for further details. + +
+-
+ Dependencies from BiocManager + + [Rgraphviz](https://www.bioconductor.org/packages/release/bioc/html/Rgraphviz.html) and [graph](https://bioconductor.org/packages/3.19/bioc/html/graph.html) are used to produce plots of network graphs. + Both packages are hosted on [Bioconductor](https://www.bioconductor.org/) and thus need to be installed with `BiocManager`: + + #### Installation + + The installation is straight forward on most common platforms, simply start an R session and run: + + ```R + if (!requireNamespace("BiocManager", quietly = TRUE)) + install.packages("BiocManager") + BiocManager::install("Rgraphviz") + BiocManager::install("graph") + ``` + +
+ +_Click on each dependency to see the specific installation instructions_ + +## Installing from GitHub (recommended) + +From GitHub you can install any version and/or state of the `abn` repository you want. +We recommend to not directly install `main`, but to a specific version. +Head over to our [version list](https://github.com/furrer-lab/abn/releases) to see which one is the latest version. +Here we assume the version is `3.1.1`. + +We use [devtools](https://github.com/r-lib/devtools) to install from GitHub. +At this point `devtools` should already be installed in your system. +
if not, install it first. Open an R session and type: + +```R +install.packages("devtools", repos=c(CRAN="https://cran.r-project.org")) ``` +
-It is recommended to install `abn` within a virtual environment, e.g., using [renv](https://rstudio.github.io/renv/articles/renv.html) which can be done with: +To install `abn` run in your R session: -```r -renv::install("bioc::graph") -renv::install("bioc::Rgraphviz") -renv::install("abn", dependencies = c("Depends", "Imports", "LinkingTo", "Suggests")) +```R +devtools::install_github("furrer-lab/abn", ref="3.1.1", dependencies=c("Depends", "Imports", "LinkingTo")) +``` + +## Installing from CRAN + +Note that when installing from CRAN you might not get the latest version of `abn`. +If you want the latest version follow the instructions from [Installing from GitHub](#installing-from-github-recommended). + +In order to install the `abn` version on CRAN, open an R session and type: + +```R +install.packages('abn', repos=c(CRAN="https://cran.r-project.org")) ``` -Please note that the `abn` package is currently unavailable on CRAN. -We are dedicated to providing a robust and reliable package, and we appreciate your understanding as we work towards making `abn` available on CRAN soon. [^1] +`anb` has several dependencies that are not available on CRAN. This is also whey the [Prerequisites](#prerequisites) and [Dependencies](#dependencies) should be followed through before installing `abn` from CRAN. [^1] -[^1]: The `abn` package includes certain features, such as multiprocessing and integration with the INLA package, which are limited or available only on specific CRAN flavors. +[^1]: The `abn` package includes certain features, such as multiprocessing and integration with the `INLA` package, which are limited or available only on specific CRAN flavors. While it is possible to relax the testing process by, e.g., excluding tests of these functionalities, we believe that rigorous testing is important for reliable software development, especially for a package like `abn` that includes complex functionalities. We have implemented a rigorous testing framework similar to CRAN's to validate these functionalities in our development process. 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 +## Installing from source -The following system libraries are required to install the [abn](https://cran.r-project.org/package=abn) package: +It is also possible to clone this repository and install `abn` from source. -- [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/). +> [!NOTE] +> Also in this case you need to first prepare your system by following the [Prerequisites](#prerequisites) and [Dependencies](#dependencies) section. -## Additional libraries +When installing from source -The following additional libraries are recommended to best profit from the [abn](https://cran.r-project.org/package=abn) features. +Installing from source is done with the following steps: -- [INLA](https://www.r-inla.org/), which is an R package used for model fitting. It is hosted separately from CRAN and is easy to install on common platforms (see instructions on the INLA website). -```r -install.packages("INLA", repos = c(getOption("repos"), INLA = "https://inla.r-inla-download.org/R/stable"), dep = TRUE) -``` +1. Clone the repository and go to the root directory of the repo: -- [Rgraphviz](https://www.bioconductor.org//packages/release/bioc/html/Rgraphviz.html) is used to produce plots of network graphs and is hosted on [Bioconductor](https://www.bioconductor.org/). -```r -if (!requireNamespace("BiocManager", quietly = TRUE)) - install.packages("BiocManager") -BiocManager::install("Rgraphviz", version = "3.8") -``` + ```bash + git clone https://github.com/furrer-lab/abn + cd abn + ``` + +2. Install the dependencies by opening an R session and typing: + + ```R + devtools::install_deps(pkg = '.', dependencies = TRUE, upgrade='never', repos=c(CRAN="https://cran.r-project.org")) + ``` + +3. Build the package by opening an R session and typing: + + ```R + devtools::build(pkg = '.', path = '.build/abn.tar.gz', vignettes = FALSE) + ``` + +4. Install the package by opening an R session and typing: -- [JAGS](https://mcmc-jags.sourceforge.io/) is a program for analyzing Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC) simulation. Its installation is platform-dependent and is, therefore, not covered here. + ```R + install.packages('.build/abn.tar.gz', repos=NULL, type="source") + ``` # Quickstart diff --git a/configure b/configure index 9b2f0ad81..5efade7cb 100755 --- a/configure +++ b/configure @@ -1,9 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for abn 3.1.1. +# Generated by GNU Autoconf 2.72 for abn 3.1.1. # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # @@ -15,7 +15,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -24,12 +23,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -101,7 +101,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -131,15 +131,14 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -147,12 +146,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -170,8 +170,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else \$as_nop - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -184,14 +185,15 @@ test -x / || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else $as_nop - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -224,12 +226,13 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi +fi ;; +esac fi @@ -251,7 +254,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -270,7 +273,8 @@ $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -309,14 +313,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -385,11 +381,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -403,21 +400,14 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -491,6 +481,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -539,7 +531,6 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -551,9 +542,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -578,10 +569,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 /dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -798,7 +791,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1011,7 +1004,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1027,7 +1020,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1057,8 +1050,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" ;; *=*) @@ -1066,7 +1059,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1116,7 +1109,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1184,7 +1177,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1212,7 +1205,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.1.1 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]... @@ -1226,11 +1219,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1238,10 +1231,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1343,9 +1336,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF abn configure 3.1.1 -generated by GNU Autoconf 2.71 +generated by GNU Autoconf 2.72 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1380,7 +1373,7 @@ 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.1.1, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -1626,10 +1619,10 @@ esac printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } fi done @@ -1660,12 +1653,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -1674,18 +1667,18 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. @@ -1701,11 +1694,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## @@ -1730,8 +1723,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GSL_CONFIG+y} then : printf %s "(cached) " >&6 -else $as_nop - case $GSL_CONFIG in +else case e in #( + e) case $GSL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GSL_CONFIG="$GSL_CONFIG" # Let the user override the test with a path. ;; @@ -1756,6 +1749,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi GSL_CONFIG=$ac_cv_path_GSL_CONFIG @@ -1789,8 +1783,8 @@ 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 +else case e in #( + e) case $JAGS in [\\/]* | ?:[\\/]*) ac_cv_path_JAGS="$JAGS" # Let the user override the test with a path. ;; @@ -1815,6 +1809,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi JAGS=$ac_cv_path_JAGS @@ -1843,8 +1838,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -1874,14 +1869,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -1945,9 +1940,7 @@ s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g +s/[][ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\$/$$/g H :any @@ -2007,7 +2000,6 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -2016,12 +2008,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -2093,7 +2086,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -2122,7 +2115,6 @@ as_fn_error () } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -2162,11 +2154,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -2180,11 +2173,12 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith @@ -2267,9 +2261,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -2350,10 +2344,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 @@ -2369,7 +2365,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by abn $as_me 3.1.1, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -2396,7 +2392,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions +'$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -2424,10 +2420,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ abn config.status 3.1.1 -configured by $0, generated by GNU Autoconf 2.71, +configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -2484,8 +2480,8 @@ do ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: '$1' +Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -2535,7 +2531,7 @@ do case $ac_config_target in "src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done @@ -2553,7 +2549,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= @@ -2577,7 +2573,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. +# This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then @@ -2743,7 +2739,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -2765,19 +2761,19 @@ do -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. + # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is `configure' which instantiates (i.e., don't + # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` @@ -2901,7 +2897,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when `$srcdir' = `.'. +# Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -2930,9 +2926,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -2984,3 +2980,13 @@ printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 fi +echo " + -------------------------------------------------- + Configuration for ${PACKAGE_NAME} ${PACKAGE_VERSION} + + cppflags: ${CPPFLAGS} ${PKG_CPPFLAGS} + libs: ${PKG_LIBS} + + -------------------------------------------------- +" + diff --git a/configure.ac b/configure.ac index 0d628f949..e289e6412 100644 --- a/configure.ac +++ b/configure.ac @@ -25,3 +25,13 @@ fi AC_CONFIG_FILES([src/Makevars]) AC_OUTPUT + +echo " + -------------------------------------------------- + Configuration for ${PACKAGE_NAME} ${PACKAGE_VERSION} + + cppflags: ${CPPFLAGS} ${PKG_CPPFLAGS} + libs: ${PKG_LIBS} + + -------------------------------------------------- +" diff --git a/src/Makevars b/src/Makevars deleted file mode 100644 index 2949a02e6..000000000 --- a/src/Makevars +++ /dev/null @@ -1,19 +0,0 @@ -# Kindly supplied by Dirk Eddelbuettel - -# set by configure - -GSL_CFLAGS = -I/usr/include - -GSL_LIBS = -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm - - -# combine to standard arguments for R - -PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) $(GSL_CFLAGS) -I. - -PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(GSL_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) - -#PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS) - -#PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) - diff --git a/src/Makevars.in b/src/Makevars.in index a6c5a861a..ea1cbb875 100755 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -3,17 +3,10 @@ # set by configure GSL_CFLAGS = @GSL_CFLAGS@ - GSL_LIBS = @GSL_LIBS@ - # combine to standard arguments for R PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) $(GSL_CFLAGS) -I. - +PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS) $(GSL_CFLAGS) PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(GSL_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) - -#PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS) - -#PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) - diff --git a/vignettes/paper.md b/vignettes/paper.md index 9addb34bf..7e8f6978e 100644 --- a/vignettes/paper.md +++ b/vignettes/paper.md @@ -40,7 +40,7 @@ Additive Bayesian Network (ABN) models extend the concept of generalized linear This makes them a powerful tool for understanding complex, multivariate datasets. This package provides routines for structure learning and parameter estimation of ABN models. -# Statment of need +# Statement of need The increasing complexity of data in various fields, ranging from healthcare research to environmental science and ecology, has resulted in a need for a tool like `abn`. Researchers often face multivariate, tabular data where the relationships between variables are not straightforward. BN analysis becomes essential when traditional statistical methods fail to analyze multivariate data with intricate relationships, as it models these relationships graphically for more straightforward data interpretation.