forked from mdsol/PKI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.win
51 lines (44 loc) · 1.46 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
#!/bin/sh
echo " checking openssl headers and libraries"
allok=yes
if [ -e "${LOCAL_SOFT}/include/openssl/ssl.h" ]; then
echo " --- Using local version of openssl 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/libssl.a ]; then
if [ ! -e src/openssl-current-win.tar.gz ]; then
echo " cannot find current openssl files"
echo " attempting to download them"
echo 'download.file("http://www.rforge.net/PKI/files/openssl-current-win.tar.gz","src/openssl-current-win.tar.gz",mode="wb",quiet=TRUE)'|${R_HOME}/bin/R --vanilla --slave
fi
if [ ! -e src/openssl-current-win.tar.gz ]; then
allok=no
else
echo " unpacking current openssl"
tar fxz src/openssl-current-win.tar.gz -C src
if [ ! -e src/win32/libssl.a ]; then
allok=no
fi
fi
fi
if [ ! -e src/win32/libssl.a ]; then
allok=no
fi
if [ ${allok} != yes ]; then
echo ""
echo " *** ERROR: unable to find openssl files"
echo ""
echo " They must be either in src/win32 or in a tar-ball"
echo " src/openssl-current-win.tar.gz"
echo ""
echo " You can get the latest binary tar ball from"
echo " http://www.rforge.net/PKI/files/"
echo ""
echo " Alternatively you can set LOCAL_SOFT environment variable"
echo " to point to the prefix (like /usr/local) containing openssl binaries."
echo ""
exit 1
fi
echo " seems ok, ready to go"
exit 0