forked from photron/msys_setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile_libcurl.sh
62 lines (48 loc) · 1.33 KB
/
compile_libcurl.sh
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
#!/bin/sh -ex
. utilslib.sh
basedir=/src/libcurl
baseurl=http://curl.haxx.se/download
version=7.21.7
revision=0
tarball=curl-${version}.tar.gz
directory=curl-${version}-${revision}
mkdir -p $basedir
pushd $basedir
utilslib_download $baseurl $tarball
if [ ! -d $directory ]
then
echo unpacking $tarball ...
mkdir -p $directory
tar -xvf $tarball -C $directory --strip-components=1
fi
pushd $directory
if [ ! -f gnutls.patch.applied ]
then
echo patching ...
patch -p1 < ../../curl-${version}-gnutls.patch
echo applied > gnutls.patch.applied
fi
if [ ! -f configure.done ]
then
# with gnutls (LGPL)
CFLAGS=-I/include \
LDFLAGS=-L/lib\ -lgcrypt \
./configure --prefix= --disable-ldap --without-ssl --with-gnutls=
# with polarssl (GPL)
#CFLAGS=-I/include \
#LDFLAGS=-L/lib \
#./configure --prefix= --disable-ldap --without-ssl --with-polarssl=
# with yassl (GPL, with exception for other FOSS licenses like LGPL)
#CFLAGS=-I/include \
#LDFLAGS=-L/lib \
#./configure --prefix= --disable-ldap --without-ssl --with-yassl=
# with nss (MPL, GPL, LGPL)
#CFLAGS=-I/include\ -I/opt/nss/include \
#LDFLAGS=-L/lib\ -L/opt/nss/lib \
#./configure --prefix= --disable-ldap --without-ssl --without-gnutls --with-nss=/opt/nss
echo done > configure.done
fi
make
make install
popd
popd