forked from harphub/meteogrid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.win
52 lines (45 loc) · 1.5 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
#!/bin/sh
# this conf file borrowed from "proj4" library by S. Urbanek
echo " checking PROJ4 headers and libraries"
allok=yes
if [ -e "${LOCAL_SOFT}/include/proj_api.h" ]; then
echo " --- Using local version of PROJ4 found in LOCAL_SOFT: ${LOCAL_SOFT}"
echo " --- Proceed at your own risk, if in doubt unset LOCAL_SOFT to use our binary."
exit 0
fi
if [ ! -e src/win32/libproj.a ]; then
if [ ! -e src/proj4-current-win.tar.gz ]; then
echo " cannot find current PROJ4 files"
echo " attempting to download them"
echo 'download.file("http://www.rforge.net/proj4/files/proj4-current-win.tar.gz","src/proj4-current-win.tar.gz",mode="wb",quiet=TRUE)'|${R_HOME}/bin/R --vanilla --slave
fi
if [ ! -e src/proj4-current-win.tar.gz ]; then
allok=no
else
echo " unpacking current PROJ4"
tar fxz src/proj4-current-win.tar.gz -C src
if [ ! -e src/win32/libproj.a ]; then
allok=no
fi
fi
fi
if [ ! -e src/win32/libproj.a ]; then
allok=no
fi
if [ ${allok} != yes ]; then
echo ""
echo " *** ERROR: unable to find PROJ4 files"
echo ""
echo " They must be either in src/win32 or in a tar-ball"
echo " src/proj4-current-win.tar.gz"
echo ""
echo " You can get the latest binary tar ball from"
echo " http://www.rforge.net/proj4/files/"
echo ""
echo " Alternatively you can set LOCAL_SOFT environment variable"
echo " to point to the prefix (like /usr/local) containing PROJ4 binaries."
echo ""
exit 1
fi
echo " seems ok, ready to go"
exit 0