-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathconfigure.win
63 lines (53 loc) · 1.65 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
62
63
#!/bin/sh
echo " checking Windows runtime"
runtime=`"${R_HOME}/bin/Rscript" -e 'cat(R.version$crt)'`
echo " found: '$runtime'"
if [ x"$runtime" = xucrt ]; then
echo " UCRT run-time, assuming toolchain has everything"
echo " declaring SUPPORTS_JPEG and SUPPORTS_TIFF"
echo '#define SUPPORTS_JPEG 1' > src/cconfig.h
echo '#define SUPPORTS_TIFF 1' >> src/cconfig.h
else
echo " MSVCRT run-time"
echo " checking cairo headers and libraries"
allok=yes
if [ ! -e src/win64/libcairo.a ]; then
if [ ! -e src/cairo-current-win.tar.gz ]; then
echo " cannot find current cairograhics files"
echo " attempting to download them"
echo 'download.file("http://www.rforge.net/Cairo/files/cairo-current-win.tar.gz","src/cairo-current-win.tar.gz",mode="wb")'|${R_HOME}/bin/R --vanilla --slave
fi
if [ ! -e src/cairo-current-win.tar.gz ]; then
allok=no
else
echo " unpacking current cairo"
tar fxz src/cairo-current-win.tar.gz
if [ ! -e src/win64/libcairo.a ]; then
allok=no
fi
fi
fi
if [ ! -e src/win64/libcairo.a ]; then
allok=no
fi
if [ ! -e src/win64/cconfig.h ]; then
echo '/* no extra features */' > src/win64/cconfig.h
fi
if [ ! -e src/win32/cconfig.h ]; then
echo '/* no extra features */' > src/win32/cconfig.h
fi
if [ ${allok} != yes ]; then
echo ""
echo " *** ERROR: unable to find cairographics files"
echo ""
echo " They must be either in src/win32 and src/win64 or in a tar-ball"
echo " src/cairo-current-win.tar.gz"
echo ""
echo " You can get the latest binary ball from"
echo " http://www.rforge.net/Cairo/files/"
echo ""
exit 1
fi
echo " seems ok, ready to go"
fi
exit 0