|
2 | 2 | ##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*- |
3 | 3 | ##### bootstrap FreeSWITCH and FreeSWITCH libraries |
4 | 4 |
|
| 5 | +. $(dirname $0)/scripts/ci/build-requirements.sh |
| 6 | + |
5 | 7 | echo "bootstrap: checking installation..." |
6 | 8 |
|
7 | 9 | BGJOB=false |
@@ -45,176 +47,6 @@ setup_gnu() { |
45 | 47 | touch README |
46 | 48 | } |
47 | 49 |
|
48 | | -check_ac_ver() { |
49 | | - # autoconf 2.59 or newer |
50 | | - ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'` |
51 | | - if test -z "$ac_version"; then |
52 | | - echo "bootstrap: autoconf not found." |
53 | | - echo " You need autoconf version 2.59 or newer installed" |
54 | | - echo " to build FreeSWITCH from source." |
55 | | - exit 1 |
56 | | - fi |
57 | | - if test `uname -s` = "OpenBSD" && test "$ac_version" = "2.62"; then |
58 | | - echo "Autoconf 2.62 is broken on OpenBSD, please try another version" |
59 | | - exit 1 |
60 | | - fi |
61 | | - IFS=_; set $ac_version; IFS=' ' |
62 | | - ac_version=$1 |
63 | | - IFS=.; set $ac_version; IFS=' ' |
64 | | - if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then |
65 | | - echo "bootstrap: autoconf version $ac_version found." |
66 | | - echo " You need autoconf version 2.59 or newer installed" |
67 | | - echo " to build FreeSWITCH from source." |
68 | | - exit 1 |
69 | | - else |
70 | | - echo "bootstrap: autoconf version $ac_version (ok)" |
71 | | - fi |
72 | | -} |
73 | | - |
74 | | -check_am_ver() { |
75 | | - # automake 1.7 or newer |
76 | | - am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'` |
77 | | - if test -z "$am_version"; then |
78 | | - echo "bootstrap: automake not found." |
79 | | - echo " You need automake version 1.7 or newer installed" |
80 | | - echo " to build FreeSWITCH from source." |
81 | | - exit 1 |
82 | | - fi |
83 | | - IFS=_; set $am_version; IFS=' ' |
84 | | - am_version=$1 |
85 | | - IFS=.; set $am_version; IFS=' ' |
86 | | - if test "$1" = "1" -a "$2" -lt "7"; then |
87 | | - echo "bootstrap: automake version $am_version found." |
88 | | - echo " You need automake version 1.7 or newer installed" |
89 | | - echo " to build FreeSWITCH from source." |
90 | | - exit 1 |
91 | | - else |
92 | | - echo "bootstrap: automake version $am_version (ok)" |
93 | | - fi |
94 | | -} |
95 | | - |
96 | | -check_acl_ver() { |
97 | | - # aclocal 1.7 or newer |
98 | | - acl_version=`${ACLOCAL:-aclocal} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'` |
99 | | - if test -z "$acl_version"; then |
100 | | - echo "bootstrap: aclocal not found." |
101 | | - echo " You need aclocal version 1.7 or newer installed" |
102 | | - echo " to build FreeSWITCH from source." |
103 | | - exit 1 |
104 | | - fi |
105 | | - IFS=_; set $acl_version; IFS=' ' |
106 | | - acl_version=$1 |
107 | | - IFS=.; set $acl_version; IFS=' ' |
108 | | - if test "$1" = "1" -a "$2" -lt "7"; then |
109 | | - echo "bootstrap: aclocal version $acl_version found." |
110 | | - echo " You need aclocal version 1.7 or newer installed" |
111 | | - echo " to build FreeSWITCH from source." |
112 | | - exit 1 |
113 | | - else |
114 | | - echo "bootstrap: aclocal version $acl_version (ok)" |
115 | | - fi |
116 | | -} |
117 | | - |
118 | | -check_lt_ver() { |
119 | | - # Sample libtool --version outputs: |
120 | | - # ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11) |
121 | | - # ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a |
122 | | - # output is multiline from 1.5 onwards |
123 | | - |
124 | | - # Require libtool 1.4 or newer |
125 | | - libtool=${LIBTOOL:-`${LIBDIR}/apr/build/PrintPath glibtool libtool libtool22 libtool15 libtool14`} |
126 | | - lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` |
127 | | - if test -z "$lt_pversion"; then |
128 | | - echo "bootstrap: libtool not found." |
129 | | - echo " You need libtool version 1.5.14 or newer to build FreeSWITCH from source." |
130 | | - exit 1 |
131 | | - fi |
132 | | - lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'` |
133 | | - IFS=.; set $lt_version; IFS=' ' |
134 | | - lt_status="good" |
135 | | - |
136 | | - if test -z "$1"; then a=0 ; else a=$1;fi |
137 | | - if test -z "$2"; then b=0 ; else b=$2;fi |
138 | | - if test -z "$3"; then c=0 ; else c=$3;fi |
139 | | - lt_major=$a |
140 | | - |
141 | | - if test "$a" -eq "2"; then |
142 | | - lt_status="good" |
143 | | - elif test "$a" -lt "2"; then |
144 | | - if test "$b" -lt "5" -o "$b" = "5" -a "$c" -lt "14" ; then |
145 | | - lt_status="bad" |
146 | | - fi |
147 | | - else |
148 | | - lt_status="bad" |
149 | | - fi |
150 | | - if test $lt_status = "good"; then |
151 | | - echo "bootstrap: libtool version $lt_pversion (ok)" |
152 | | - else |
153 | | - echo "bootstrap: libtool version $lt_pversion found." |
154 | | - echo " You need libtool version 1.5.14 or newer to build FreeSWITCH from source." |
155 | | - exit 1 |
156 | | - fi |
157 | | -} |
158 | | - |
159 | | -check_libtoolize() { |
160 | | - # check libtoolize availability |
161 | | - if [ -n "${LIBTOOL}" ]; then |
162 | | - libtoolize=${LIBTOOLIZE:-`dirname "${LIBTOOL}"`/libtoolize} |
163 | | - else |
164 | | - libtoolize=${LIBTOOLIZE:-`${LIBDIR}/apr/build/PrintPath glibtoolize libtoolize libtoolize22 libtoolize15 libtoolize14`} |
165 | | - fi |
166 | | - if [ "x$libtoolize" = "x" ]; then |
167 | | - echo "libtoolize not found in path" |
168 | | - exit 1 |
169 | | - fi |
170 | | - if [ ! -x "$libtoolize" ]; then |
171 | | - echo "$libtoolize does not exist or is not executable" |
172 | | - exit 1 |
173 | | - fi |
174 | | - |
175 | | - # compare libtool and libtoolize version |
176 | | - ltl_pversion=`$libtoolize --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` |
177 | | - ltl_version=`echo $ltl_pversion|sed -e 's/\([a-z]*\)$/.\1/'` |
178 | | - IFS=.; set $ltl_version; IFS=' ' |
179 | | - |
180 | | - if [ "x${lt_version}" != "x${ltl_version}" ]; then |
181 | | - echo "$libtool and $libtoolize have different versions" |
182 | | - exit 1 |
183 | | - fi |
184 | | -} |
185 | | - |
186 | | -check_make() { |
187 | | - # |
188 | | - # Check to make sure we have GNU Make installed |
189 | | - # |
190 | | - |
191 | | - make=`which make` |
192 | | - if [ -x "$make" ]; then |
193 | | - make_version=`$make --version || true | grep GNU` |
194 | | - if [ $? -ne 0 ]; then |
195 | | - make=`which gmake` |
196 | | - if [ -x "$make" ]; then |
197 | | - make_version=`$make --version | grep GNU` |
198 | | - if [ $? -ne 0 ]; then |
199 | | - echo "GNU Make does not exist or is not executable" |
200 | | - exit 1; |
201 | | - fi |
202 | | - fi |
203 | | - fi |
204 | | - fi |
205 | | -} |
206 | | - |
207 | | - |
208 | | -check_awk() { |
209 | | - # TODO: Building with mawk on at least Debian squeeze is know to |
210 | | - # work, but mawk is believed to fail on some systems. If we can |
211 | | - # replicate this, we need a particular behavior that we can test |
212 | | - # here to verify whether we have an acceptable awk. |
213 | | - : |
214 | | -} |
215 | | - |
216 | | - |
217 | | - |
218 | 50 | print_autotools_vers() { |
219 | 51 | # |
220 | 52 | # Info output |
|
0 commit comments