https://github.com/cran/RcppArmadillo
Raw File
Tip revision: 99fa03acfed7ee17bf67feefb79c811361fbfd70 authored by Dirk Eddelbuettel on 10 December 2013, 10:03:31 UTC
version 0.3.930.1
Tip revision: 99fa03a
configure
#!/bin/bash

if [ "${R_HOME}" == "" ]; then
   R_HOME=$(R RHOME)
fi

lapack=$(${R_HOME}/bin/R CMD config LAPACK_LIBS)
echo -n "* checking LAPACK_LIBS"

hasRlapack=$(echo ${lapack} | grep lRlapack)

if [ "${hasRlapack}" == "" ]; then
   ## We are using a full Lapack and can use zgesdd -- so #undef remains
   echo " divide-and-conquer complex SVD available via system LAPACK"
   cp inst/include/RcppArmadilloLapack.h.in inst/include/RcppArmadilloLapack.h 
else
   ## We are using a R's subset of Lapack and CANNOT use zgesdd -- so mark ARMA_DONT_USE_CX_GESDD as 1
   echo " divide-and-conquer complex SVD unavailable via R-supplied LAPACK"
   echo "* divide-and-conquer algorithm for complex SVD will be redirected to default"
   sed -e 's/\/\/ \#undef ARMA_DONT_USE_CX_GESDD/\#define ARMA_DONT_USE_CX_GESDD/' \
       inst/include/RcppArmadilloLapack.h.in > inst/include/RcppArmadilloLapack.h 
fi


back to top