This repository has been archived by the owner on Apr 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis-install-autotools.sh
executable file
·139 lines (131 loc) · 4.02 KB
/
.travis-install-autotools.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/bin/sh
set +e
set -x
os=`uname`
TRAVIS_ROOT="$1"
case "$os" in
Darwin)
set +e # do not fail on error
brew update
brew info autoconf automake libtool
brew install autoconf automake libtool
brew upgrade autoconf automake libtool
which glibtool
which glibtoolize
glibtool --version
ln -s `which glibtool` ${TRAVIS_ROOT}/bin/libtool
ln -s `which glibtoolize` ${TRAVIS_ROOT}/bin/libtoolize
set -e # restore fail on error
;;
Linux)
MAKE_JNUM=2
M4_VERSION=1.4.17
LIBTOOL_VERSION=2.4.6
AUTOCONF_VERSION=2.69
AUTOMAKE_VERSION=1.15
cd ${TRAVIS_ROOT}
TOOL=m4
TDIR=${TOOL}-${M4_VERSION}
FILE=${TDIR}.tar.gz
BIN=${TRAVIS_ROOT}/bin/${TOOL}
if [ -f ${FILE} ] ; then
echo ${FILE} already exists! Using existing copy.
else
wget http://ftp.gnu.org/gnu/${TOOL}/${FILE}
fi
if [ -d ${TDIR} ] ; then
echo ${TDIR} already exists! Using existing copy.
else
echo Unpacking ${FILE}
tar -xzf ${FILE}
fi
if [ -f ${BIN} ] ; then
echo ${BIN} already exists! Skipping build.
else
cd ${TRAVIS_ROOT}/${TDIR}
./configure CC=cc --prefix=${TRAVIS_ROOT} && make -j ${MAKE_JNUM} && make install
if [ "x$?" != "x0" ] ; then
echo FAILURE 1
exit
fi
fi
cd ${TRAVIS_ROOT}
TOOL=libtool
TDIR=${TOOL}-${LIBTOOL_VERSION}
FILE=${TDIR}.tar.gz
BIN=${TRAVIS_ROOT}/bin/${TOOL}
if [ ! -f ${FILE} ] ; then
wget http://ftp.gnu.org/gnu/${TOOL}/${FILE}
else
echo ${FILE} already exists! Using existing copy.
fi
if [ ! -d ${TDIR} ] ; then
echo Unpacking ${FILE}
tar -xzf ${FILE}
else
echo ${TDIR} already exists! Using existing copy.
fi
if [ -f ${BIN} ] ; then
echo ${BIN} already exists! Skipping build.
else
cd ${TRAVIS_ROOT}/${TDIR}
./configure CC=cc --prefix=${TRAVIS_ROOT} M4=${TRAVIS_ROOT}/bin/m4 && make -j ${MAKE_JNUM} && make install
if [ "x$?" != "x0" ] ; then
echo FAILURE 2
exit
fi
fi
cd ${TRAVIS_ROOT}
TOOL=autoconf
TDIR=${TOOL}-${AUTOCONF_VERSION}
FILE=${TDIR}.tar.gz
BIN=${TRAVIS_ROOT}/bin/${TOOL}
if [ ! -f ${FILE} ] ; then
wget http://ftp.gnu.org/gnu/${TOOL}/${FILE}
else
echo ${FILE} already exists! Using existing copy.
fi
if [ ! -d ${TDIR} ] ; then
echo Unpacking ${FILE}
tar -xzf ${FILE}
else
echo ${TDIR} already exists! Using existing copy.
fi
if [ -f ${BIN} ] ; then
echo ${BIN} already exists! Skipping build.
else
cd ${TRAVIS_ROOT}/${TDIR}
./configure CC=cc --prefix=${TRAVIS_ROOT} M4=${TRAVIS_ROOT}/bin/m4 && make -j ${MAKE_JNUM} && make install
if [ "x$?" != "x0" ] ; then
echo FAILURE 3
exit
fi
fi
cd ${TRAVIS_ROOT}
TOOL=automake
TDIR=${TOOL}-${AUTOMAKE_VERSION}
FILE=${TDIR}.tar.gz
BIN=${TRAVIS_ROOT}/bin/${TOOL}
if [ ! -f ${FILE} ] ; then
wget http://ftp.gnu.org/gnu/${TOOL}/${FILE}
else
echo ${FILE} already exists! Using existing copy.
fi
if [ ! -d ${TDIR} ] ; then
echo Unpacking ${FILE}
tar -xzf ${FILE}
else
echo ${TDIR} already exists! Using existing copy.
fi
if [ -f ${BIN} ] ; then
echo ${BIN} already exists! Skipping build.
else
cd ${TRAVIS_ROOT}/${TDIR}
./configure CC=cc --prefix=${TRAVIS_ROOT} M4=${TRAVIS_ROOT}/bin/m4 && make -j ${MAKE_JNUM} && make install
if [ "x$?" != "x0" ] ; then
echo FAILURE 4
exit
fi
fi
;;
esac