-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.win
61 lines (50 loc) · 1.72 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
echo " Checking ming dependency libraries"
allok=yes
if [ ! -e inst/libs/zlib1.dll ]; then
if [ ! -e src/windows/png-z-gif-freetype-w32.tar.gz ]; then
echo " cannot find current ming dependency lib files"
echo " attempting to download them"
mkdir -p src/windows 2> /dev/null
echo 'download.file("http://cloud.github.com/downloads/cameronbracken/swfDevice/png-z-gif-freetype-w32.tar.gz","src/windows/png-z-gif-freetype-w32.tar.gz",mode="wb")'|${R_HOME}/bin/R --vanilla --slave
fi
if [ ! -e src/windows/png-z-gif-freetype-w32.tar.gz ]; then
allok=no
else
echo " Unpacking current libs"
mkdir src/windows
tar fxz src/windows/png-z-gif-freetype-w32.tar.gz -C src/windows
cp -r src/windows/png-z-gif-freetype-w32/inst/libs inst
cp -r src/windows/png-z-gif-freetype-w32/src/windows/* src/windows
if [ ! -e inst/libs/zlib1.dll ]; then
allok=no
fi
fi
if [ ! -e inst/libs ]; then
allok=no
fi
fi
if [ ${allok} != yes ]; then
echo ""
echo " *** ERROR: unable to find required libraries for building ming"
echo ""
echo " They must be either in inst/windows or in a tar-ball:"
echo " src/windows/png-z-gif-freetype-w32.tar.gz"
echo ""
echo " You can get the latest binary ball from:"
echo " http://cloud.github.com/downloads/cameronbracken/swfDevice/png-z-gif-freetype-w32.tar.gz"
echo ""
exit 1
fi
echo " Ready to compile ming"
LIB_HOME="C:/Rtools/MinGW"
INC_DIR="${LIB_HOME}/include"
LIB_DIR="${LIB_HOME}/lib"
echo "LIB_HOME=${LIB_HOME}" > src/Makeconf.win
echo "INC_DIR=${INC_DIR}" >> src/Makeconf.win
echo "LIB_DIR=${LIB_DIR}" >> src/Makeconf.win
echo "Using LIB_HOME: ${LIB_HOME}"
if test -z "$R_PACKAGE_DIR" ; then
R_PACKAGE_DIR=${DPKG}
fi
exit 0