1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/sh
ARCH=`$R_HOME/bin/Rscript --no-echo -e 'cat(R.version$arch)'`
if [ X$ARCH == Xx86_64 ] ; then
#untar the lib
BASEPBNAME="hdf5"
PBTGZNAME=hdf5_headers_1.10.7.tar.gz
cd src
if test -d ${BASEPBNAME}; then
echo 'found ' $BASEPBNAME ' header sources; using what is there.'
else
echo "untarring $PBTGZNAME ...";
## we'll use Rscript to untar the file
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "untar('wininclude/$PBTGZNAME')"
fi
else
if which lld >/dev/null 2>/dev/null ; then
./configure LD=lld CPPFLAGS=-Wno-implicit-function-declaration $*
else
./configure $*
fi
cp src/Makevars src/Makevars.ucrt
if which lld >/dev/null ; then
sed -i -e 's!LDFLAGS=!LD=lld \0!g' \
-e "s!CPPFLAGS='!CPPFLAGS='-Wno-implicit-function-declaration!g" \
-e 's!PKG_LIBS = .*!\0 -ldl!g' \
src/Makevars.ucrt
fi
fi
|