-
Notifications
You must be signed in to change notification settings - Fork 22
/
configure.win
46 lines (41 loc) · 1.21 KB
/
configure.win
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
# config file to download pre-compiled windows libraries and headers
# Adapted from Cairo package:
echo " checking hdf5 headers and libraries"
allok=yes
LIBWIN="$(echo ${LIB_HDF5}/lib${R_ARCH} | sed 's/\\/\//g')"
INC_HDF5=""
if [ ! -e ${LIBWIN}/libhdf5_cpp.a ]; then
echo " cannot find current hdf5 file(s) in ${LIBWIN}/libhdf5_cpp.a"
echo " attempting to download them"
echo 'download.file("https://github.com/mannau/h5-libwin/archive/master.zip", destfile = "h5-libwin.zip")' | R --vanilla --slave
if [ ! -e h5-libwin.zip ]; then
allok=no
else
echo " unpacking current hdf5"
unzip h5-libwin.zip
cp -rf h5-libwin-master/include inst
cp -rf h5-libwin-master/lib src
rm h5-libwin.zip
rm -rf h5-libwin-master
if [ ! -e src/lib${R_ARCH}/libhdf5_cpp.a ]; then
allok=no
fi
if [ ! -e inst/include/hdf5_cpp/H5Cpp.h ]; then
allok=no
fi
fi
fi
if [ ${allok} != yes ]; then
echo ""
echo " *** ERROR: unable to find HDF5 files"
echo ""
echo " They must be in src/lib and inst/include"
echo ""
echo " You can get the latest binary ball from"
echo " https://github.com/mannau/h5-libwin"
echo ""
exit 1
fi
echo " seems ok, ready to go"
exit 0