1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
1 |
#!/bin/sh
|
1.1.5
by Martin Pitt
Import upstream version 7.15.4 |
2 |
#***************************************************************************
|
3 |
# _ _ ____ _
|
|
4 |
# Project ___| | | | _ \| |
|
|
5 |
# / __| | | | |_) | |
|
|
6 |
# | (__| |_| | _ <| |___
|
|
7 |
# \___|\___/|_| \_\_____|
|
|
8 |
#
|
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
9 |
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
1.1.5
by Martin Pitt
Import upstream version 7.15.4 |
10 |
#
|
11 |
# This software is licensed as described in the file COPYING, which
|
|
12 |
# you should have received as part of this distribution. The terms
|
|
13 |
# are also available at http://curl.haxx.se/docs/copyright.html.
|
|
14 |
#
|
|
15 |
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
16 |
# copies of the Software, and permit persons to whom the Software is
|
|
17 |
# furnished to do so, under the terms of the COPYING file.
|
|
18 |
#
|
|
19 |
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
20 |
# KIND, either express or implied.
|
|
21 |
#
|
|
22 |
###########################################################################
|
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
23 |
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
24 |
#--------------------------------------------------------------------------
|
25 |
# die prints argument string to stdout and exits this shell script.
|
|
26 |
#
|
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
27 |
die(){
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
28 |
echo "buildconf: $@" |
29 |
exit 1 |
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
30 |
}
|
31 |
||
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
32 |
#--------------------------------------------------------------------------
|
33 |
# findtool works as 'which' but we use a different name to make it more
|
|
34 |
# obvious we aren't using 'which'! ;-)
|
|
35 |
#
|
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
36 |
findtool(){
|
37 |
file="$1" |
|
38 |
||
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
39 |
if { echo "$file" | grep "/" >/dev/null 2>&1; } then |
40 |
# when file is given with a path check it first
|
|
1.2.5
by Ramakrishnan Muthukrishnan
Import upstream version 7.21.0 |
41 |
if test -f "$file"; then |
42 |
echo "$file" |
|
43 |
return
|
|
44 |
fi
|
|
45 |
fi
|
|
46 |
||
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
47 |
old_IFS=$IFS; IFS=':' |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
48 |
for path in $PATH |
49 |
do
|
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
50 |
IFS=$old_IFS |
1.1.5
by Martin Pitt
Import upstream version 7.15.4 |
51 |
# echo "checks for $file in $path" >&2
|
1.1.4
by Martin Pitt
Import upstream version 7.15.1 |
52 |
if test -f "$path/$file"; then |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
53 |
echo "$path/$file" |
54 |
return
|
|
55 |
fi
|
|
56 |
done
|
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
57 |
IFS=$old_IFS |
58 |
}
|
|
59 |
||
60 |
#--------------------------------------------------------------------------
|
|
61 |
# removethis() removes all files and subdirectories with the given name,
|
|
62 |
# inside and below the current subdirectory at invocation time.
|
|
63 |
#
|
|
64 |
removethis(){
|
|
65 |
if test "$#" = "1"; then |
|
66 |
find . -depth -name $1 -print > buildconf.tmp.$$ |
|
67 |
while read fdname |
|
68 |
do
|
|
69 |
if test -f "$fdname"; then |
|
70 |
rm -f "$fdname" |
|
71 |
elif test -d "$fdname"; then |
|
72 |
rm -f -r "$fdname" |
|
73 |
fi
|
|
74 |
done < buildconf.tmp.$$ |
|
75 |
rm -f buildconf.tmp.$$
|
|
76 |
fi
|
|
77 |
}
|
|
78 |
||
79 |
#--------------------------------------------------------------------------
|
|
80 |
# Ensure that buildconf runs from the subdirectory where configure.ac lives
|
|
81 |
#
|
|
82 |
if test ! -f configure.ac || |
|
1.2.14
by Alessandro Ghedini
Import upstream version 7.23.1 |
83 |
test ! -f src/tool_main.c || |
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
84 |
test ! -f lib/urldata.h || |
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
85 |
test ! -f include/curl/curl.h || |
86 |
test ! -f m4/curl-functions.m4; then |
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
87 |
echo "Can not run buildconf from outside of curl's source subdirectory!" |
88 |
echo "Change to the subdirectory where buildconf is found, and try again." |
|
89 |
exit 1 |
|
90 |
fi
|
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
91 |
|
92 |
#--------------------------------------------------------------------------
|
|
1.2.14
by Alessandro Ghedini
Import upstream version 7.23.1 |
93 |
# autoconf 2.57 or newer. Unpatched version 2.67 does not generate proper
|
94 |
# configure script. Unpatched version 2.68 is simply unusable, we should
|
|
95 |
# disallow 2.68 usage.
|
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
96 |
#
|
97 |
need_autoconf="2.57" |
|
1.1.4
by Martin Pitt
Import upstream version 7.15.1 |
98 |
ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|head -n 1| sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'` |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
99 |
if test -z "$ac_version"; then |
100 |
echo "buildconf: autoconf not found." |
|
101 |
echo " You need autoconf version $need_autoconf or newer installed." |
|
102 |
exit 1 |
|
103 |
fi
|
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
104 |
old_IFS=$IFS; IFS='.'; set $ac_version; IFS=$old_IFS |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
105 |
if test "$1" = "2" -a "$2" -lt "57" || test "$1" -lt "2"; then |
106 |
echo "buildconf: autoconf version $ac_version found." |
|
107 |
echo " You need autoconf version $need_autoconf or newer installed." |
|
108 |
echo " If you have a sufficient autoconf installed, but it" |
|
109 |
echo " is not named 'autoconf', then try setting the" |
|
110 |
echo " AUTOCONF environment variable." |
|
111 |
exit 1 |
|
112 |
fi
|
|
113 |
||
1.2.14
by Alessandro Ghedini
Import upstream version 7.23.1 |
114 |
if test "$1" = "2" -a "$2" -eq "67"; then |
115 |
echo "buildconf: autoconf version $ac_version (BAD)" |
|
116 |
echo " Unpatched version generates broken configure script." |
|
117 |
elif test "$1" = "2" -a "$2" -eq "68"; then |
|
118 |
echo "buildconf: autoconf version $ac_version (BAD)" |
|
119 |
echo " Unpatched version generates unusable configure script." |
|
120 |
else
|
|
121 |
echo "buildconf: autoconf version $ac_version (ok)" |
|
122 |
fi
|
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
123 |
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
124 |
am4te_version=`${AUTOM4TE:-autom4te} --version 2>/dev/null|head -n 1| sed -e 's/autom4te\(.*\)/\1/' -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'` |
125 |
if test -z "$am4te_version"; then |
|
126 |
echo "buildconf: autom4te not found. Weird autoconf installation!" |
|
127 |
exit 1 |
|
128 |
fi
|
|
129 |
if test "$am4te_version" = "$ac_version"; then |
|
130 |
echo "buildconf: autom4te version $am4te_version (ok)" |
|
131 |
else
|
|
132 |
echo "buildconf: autom4te version $am4te_version (ERROR: does not match autoconf version)" |
|
133 |
exit 1 |
|
134 |
fi
|
|
135 |
||
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
136 |
#--------------------------------------------------------------------------
|
137 |
# autoheader 2.50 or newer
|
|
138 |
#
|
|
1.1.4
by Martin Pitt
Import upstream version 7.15.1 |
139 |
ah_version=`${AUTOHEADER:-autoheader} --version 2>/dev/null|head -n 1| sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'` |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
140 |
if test -z "$ah_version"; then |
141 |
echo "buildconf: autoheader not found." |
|
142 |
echo " You need autoheader version 2.50 or newer installed." |
|
143 |
exit 1 |
|
144 |
fi
|
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
145 |
old_IFS=$IFS; IFS='.'; set $ah_version; IFS=$old_IFS |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
146 |
if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then |
147 |
echo "buildconf: autoheader version $ah_version found." |
|
148 |
echo " You need autoheader version 2.50 or newer installed." |
|
149 |
echo " If you have a sufficient autoheader installed, but it" |
|
150 |
echo " is not named 'autoheader', then try setting the" |
|
151 |
echo " AUTOHEADER environment variable." |
|
152 |
exit 1 |
|
153 |
fi
|
|
154 |
||
155 |
echo "buildconf: autoheader version $ah_version (ok)" |
|
156 |
||
157 |
#--------------------------------------------------------------------------
|
|
158 |
# automake 1.7 or newer
|
|
159 |
#
|
|
160 |
need_automake="1.7" |
|
1.1.4
by Martin Pitt
Import upstream version 7.15.1 |
161 |
am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|head -n 1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//' -e 's/\(.*\)\(-p.*\)/\1/'` |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
162 |
if test -z "$am_version"; then |
163 |
echo "buildconf: automake not found." |
|
164 |
echo " You need automake version $need_automake or newer installed." |
|
165 |
exit 1 |
|
166 |
fi
|
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
167 |
old_IFS=$IFS; IFS='.'; set $am_version; IFS=$old_IFS |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
168 |
if test "$1" = "1" -a "$2" -lt "7" || test "$1" -lt "1"; then |
169 |
echo "buildconf: automake version $am_version found." |
|
170 |
echo " You need automake version $need_automake or newer installed." |
|
171 |
echo " If you have a sufficient automake installed, but it" |
|
172 |
echo " is not named 'automake', then try setting the" |
|
173 |
echo " AUTOMAKE environment variable." |
|
174 |
exit 1 |
|
175 |
fi
|
|
176 |
||
177 |
echo "buildconf: automake version $am_version (ok)" |
|
178 |
||
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
179 |
acloc_version=`${ACLOCAL:-aclocal} --version 2>/dev/null|head -n 1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//' -e 's/\(.*\)\(-p.*\)/\1/'` |
180 |
if test -z "$acloc_version"; then |
|
1.1.3
by Matthias Klose
Import upstream version 7.14.0 |
181 |
echo "buildconf: aclocal not found. Weird automake installation!" |
182 |
exit 1 |
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
183 |
fi
|
184 |
if test "$acloc_version" = "$am_version"; then |
|
185 |
echo "buildconf: aclocal version $acloc_version (ok)" |
|
1.1.3
by Matthias Klose
Import upstream version 7.14.0 |
186 |
else
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
187 |
echo "buildconf: aclocal version $acloc_version (ERROR: does not match automake version)" |
188 |
exit 1 |
|
1.1.3
by Matthias Klose
Import upstream version 7.14.0 |
189 |
fi
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
190 |
|
191 |
#--------------------------------------------------------------------------
|
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
192 |
# GNU libtool preliminary check
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
193 |
#
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
194 |
want_lt_major=1 |
195 |
want_lt_minor=4 |
|
196 |
want_lt_patch=2 |
|
197 |
want_lt_version=1.4.2 |
|
198 |
||
199 |
# This approach that tries 'glibtool' first is intended for systems that
|
|
200 |
# have GNU libtool named as 'glibtool' and libtool not being GNU's.
|
|
201 |
||
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
202 |
libtool=`findtool glibtool 2>/dev/null` |
203 |
if test ! -x "$libtool"; then |
|
1.1.5
by Martin Pitt
Import upstream version 7.15.4 |
204 |
libtool=`findtool ${LIBTOOL:-libtool}` |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
205 |
fi
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
206 |
if test -z "$libtool"; then |
207 |
echo "buildconf: libtool not found." |
|
208 |
echo " You need GNU libtool $want_lt_version or newer installed." |
|
209 |
exit 1 |
|
1.1.5
by Martin Pitt
Import upstream version 7.15.4 |
210 |
fi
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
211 |
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
212 |
lt_pver=`$libtool --version 2>/dev/null|head -n 1` |
213 |
lt_qver=`echo $lt_pver|sed -e "s/([^)]*)//g" -e "s/^[^0-9]*//g"` |
|
214 |
lt_version=`echo $lt_qver|sed -e "s/[- ].*//" -e "s/\([a-z]*\)$//"` |
|
215 |
if test -z "$lt_version"; then |
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
216 |
echo "buildconf: libtool not found." |
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
217 |
echo " You need GNU libtool $want_lt_version or newer installed." |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
218 |
exit 1 |
219 |
fi
|
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
220 |
old_IFS=$IFS; IFS='.'; set $lt_version; IFS=$old_IFS |
221 |
lt_major=$1 |
|
222 |
lt_minor=$2 |
|
223 |
lt_patch=$3 |
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
224 |
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
225 |
if test -z "$lt_major"; then |
226 |
lt_status="bad" |
|
227 |
elif test "$lt_major" -gt "$want_lt_major"; then |
|
228 |
lt_status="good" |
|
229 |
elif test "$lt_major" -lt "$want_lt_major"; then |
|
230 |
lt_status="bad" |
|
231 |
elif test -z "$lt_minor"; then |
|
232 |
lt_status="bad" |
|
233 |
elif test "$lt_minor" -gt "$want_lt_minor"; then |
|
234 |
lt_status="good" |
|
235 |
elif test "$lt_minor" -lt "$want_lt_minor"; then |
|
236 |
lt_status="bad" |
|
237 |
elif test -z "$lt_patch"; then |
|
238 |
lt_status="bad" |
|
239 |
elif test "$lt_patch" -gt "$want_lt_patch"; then |
|
240 |
lt_status="good" |
|
241 |
elif test "$lt_patch" -lt "$want_lt_patch"; then |
|
242 |
lt_status="bad" |
|
243 |
else
|
|
244 |
lt_status="good" |
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
245 |
fi
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
246 |
if test "$lt_status" != "good"; then |
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
247 |
echo "buildconf: libtool version $lt_version found." |
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
248 |
echo " You need GNU libtool $want_lt_version or newer installed." |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
249 |
exit 1 |
250 |
fi
|
|
251 |
||
252 |
echo "buildconf: libtool version $lt_version (ok)" |
|
253 |
||
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
254 |
#--------------------------------------------------------------------------
|
255 |
# GNU libtoolize check
|
|
256 |
#
|
|
257 |
if test -z "$LIBTOOLIZE"; then |
|
258 |
# use (g)libtoolize from same location as (g)libtool
|
|
259 |
libtoolize="${libtool}ize" |
|
1.1.3
by Matthias Klose
Import upstream version 7.14.0 |
260 |
else
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
261 |
libtoolize=`findtool $LIBTOOLIZE` |
262 |
fi
|
|
263 |
if test ! -f "$libtoolize"; then |
|
264 |
echo "buildconf: libtoolize not found." |
|
265 |
echo " You need GNU libtoolize $want_lt_version or newer installed." |
|
1.1.3
by Matthias Klose
Import upstream version 7.14.0 |
266 |
exit 1 |
267 |
fi
|
|
268 |
||
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
269 |
#--------------------------------------------------------------------------
|
270 |
# m4 check
|
|
271 |
#
|
|
1.2.7
by Ramakrishnan Muthukrishnan
Import upstream version 7.21.2 |
272 |
m4=`(${M4:-m4} --version || ${M4:-gm4} --version) 2>/dev/null | head -n 1`; |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
273 |
m4_version=`echo $m4 | sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'` |
274 |
||
275 |
if { echo $m4 | grep "GNU" >/dev/null 2>&1; } then |
|
276 |
echo "buildconf: GNU m4 version $m4_version (ok)" |
|
277 |
else
|
|
1.2.7
by Ramakrishnan Muthukrishnan
Import upstream version 7.21.2 |
278 |
if test -z "$m4"; then |
279 |
echo "buildconf: m4 version not recognized. You need a GNU m4 installed!" |
|
280 |
else
|
|
281 |
echo "buildconf: m4 version $m4 found. You need a GNU m4 installed!" |
|
282 |
fi
|
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
283 |
exit 1 |
284 |
fi
|
|
285 |
||
1.1.3
by Matthias Klose
Import upstream version 7.14.0 |
286 |
#--------------------------------------------------------------------------
|
287 |
# perl check
|
|
288 |
#
|
|
1.1.5
by Martin Pitt
Import upstream version 7.15.4 |
289 |
PERL=`findtool ${PERL:-perl}` |
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
290 |
if test -z "$PERL"; then |
291 |
echo "buildconf: perl not found" |
|
292 |
exit 1 |
|
293 |
fi
|
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
294 |
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
295 |
#--------------------------------------------------------------------------
|
296 |
# Remove files generated on previous buildconf/configure run.
|
|
297 |
#
|
|
298 |
for fname in .deps \ |
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
299 |
.libs \
|
300 |
*.la \
|
|
301 |
*.lo \
|
|
302 |
*.a \
|
|
303 |
*.o \
|
|
304 |
Makefile \
|
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
305 |
Makefile.in \
|
306 |
aclocal.m4 \
|
|
307 |
aclocal.m4.bak \
|
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
308 |
ares_build.h \
|
3.4.3
by Domenico Andreoli
* Package is orphaned. |
309 |
ares_config.h \
|
310 |
ares_config.h.in \
|
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
311 |
autom4te.cache \
|
312 |
compile \
|
|
313 |
config.guess \
|
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
314 |
curl_config.h \
|
315 |
curl_config.h.in \
|
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
316 |
config.log \
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
317 |
config.lt \
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
318 |
config.status \
|
319 |
config.sub \
|
|
320 |
configure \
|
|
1.2.8
by Ramakrishnan Muthukrishnan
Import upstream version 7.21.3 |
321 |
configurehelp.pm \
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
322 |
curl-config \
|
323 |
curlbuild.h \
|
|
324 |
depcomp \
|
|
325 |
libcares.pc \
|
|
326 |
libcurl.pc \
|
|
327 |
libtool \
|
|
328 |
libtool.m4 \
|
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
329 |
libtool.m4.tmp \
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
330 |
ltmain.sh \
|
331 |
ltoptions.m4 \
|
|
332 |
ltsugar.m4 \
|
|
333 |
ltversion.m4 \
|
|
334 |
lt~obsolete.m4 \
|
|
335 |
stamp-h1 \
|
|
336 |
stamp-h2 \
|
|
337 |
stamp-h3 ; do |
|
338 |
removethis "$fname" |
|
339 |
done
|
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
340 |
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
341 |
#--------------------------------------------------------------------------
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
342 |
# run the correct scripts now
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
343 |
#
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
344 |
|
345 |
echo "buildconf: running libtoolize" |
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
346 |
${libtoolize} --copy --automake --force || die "libtoolize command failed" |
347 |
||
348 |
# When using libtool 1.5.X (X < 26) we copy libtool.m4 to our local m4
|
|
349 |
# subdirectory and this local copy is patched to fix some warnings that
|
|
350 |
# are triggered when running aclocal and using autoconf 2.62 or later.
|
|
351 |
||
352 |
if test "$lt_major" = "1" && test "$lt_minor" = "5"; then |
|
353 |
if test -z "$lt_patch" || test "$lt_patch" -lt "26"; then |
|
354 |
echo "buildconf: copying libtool.m4 to local m4 subdir" |
|
355 |
ac_dir=`${ACLOCAL:-aclocal} --print-ac-dir` |
|
356 |
if test -f $ac_dir/libtool.m4; then |
|
357 |
cp -f $ac_dir/libtool.m4 m4/libtool.m4
|
|
358 |
else
|
|
359 |
echo "buildconf: $ac_dir/libtool.m4 not found" |
|
360 |
fi
|
|
361 |
if test -f m4/libtool.m4; then |
|
362 |
echo "buildconf: renaming some variables in local m4/libtool.m4" |
|
363 |
$PERL -i.tmp -pe \ |
|
364 |
's/lt_prog_compiler_pic_works/lt_cv_prog_compiler_pic_works/g; \
|
|
365 |
s/lt_prog_compiler_static_works/lt_cv_prog_compiler_static_works/g;' \ |
|
366 |
m4/libtool.m4 |
|
367 |
rm -f m4/libtool.m4.tmp |
|
368 |
fi
|
|
369 |
fi
|
|
370 |
fi
|
|
371 |
||
372 |
if test -f m4/libtool.m4; then |
|
373 |
echo "buildconf: converting all mv to mv -f in local m4/libtool.m4" |
|
374 |
$PERL -i.tmp -pe 's/\bmv +([^-\s])/mv -f $1/g' m4/libtool.m4 |
|
375 |
rm -f m4/libtool.m4.tmp |
|
1.2.1
by Andreas Schuldei
Import upstream version 7.19.5 |
376 |
fi
|
377 |
||
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
378 |
echo "buildconf: running aclocal" |
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
379 |
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "aclocal command failed" |
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
380 |
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
381 |
echo "buildconf: converting all mv to mv -f in local aclocal.m4" |
382 |
$PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4 |
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
383 |
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
384 |
echo "buildconf: running autoheader" |
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
385 |
${AUTOHEADER:-autoheader} || die "autoheader command failed" |
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
386 |
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
387 |
echo "buildconf: cp lib/curl_config.h.in src/curl_config.h.in" |
388 |
cp lib/curl_config.h.in src/curl_config.h.in |
|
1.1.12
by Andreas Schuldei
Import upstream version 7.19.4 |
389 |
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
390 |
echo "buildconf: running autoconf" |
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
391 |
${AUTOCONF:-autoconf} || die "autoconf command failed" |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
392 |
|
393 |
if test -d ares; then |
|
394 |
cd ares
|
|
1.1.5
by Martin Pitt
Import upstream version 7.15.4 |
395 |
echo "buildconf: running in ares" |
396 |
./buildconf |
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
397 |
cd ..
|
398 |
fi
|
|
399 |
||
400 |
echo "buildconf: running automake" |
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
401 |
${AUTOMAKE:-automake} --add-missing --copy || die "automake command failed" |
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
402 |
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
403 |
#--------------------------------------------------------------------------
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
404 |
# GNU libtool complementary check
|
405 |
#
|
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
406 |
# Depending on the libtool and automake versions being used, config.guess
|
407 |
# might not be installed in the subdirectory until automake has finished.
|
|
408 |
# So we can not attempt to use it until this very last buildconf stage.
|
|
409 |
#
|
|
410 |
if test ! -f ./config.guess; then |
|
411 |
echo "buildconf: config.guess not found" |
|
412 |
else
|
|
413 |
buildhost=`./config.guess 2>/dev/null|head -n 1` |
|
414 |
case $buildhost in |
|
1.2.8
by Ramakrishnan Muthukrishnan
Import upstream version 7.21.3 |
415 |
*-*-darwin*)
|
416 |
need_lt_major=1 |
|
417 |
need_lt_minor=5 |
|
418 |
need_lt_patch=26 |
|
419 |
need_lt_check="yes" |
|
420 |
;;
|
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
421 |
*-*-hpux*)
|
422 |
need_lt_major=1 |
|
423 |
need_lt_minor=5 |
|
424 |
need_lt_patch=24 |
|
425 |
need_lt_check="yes" |
|
426 |
;;
|
|
427 |
esac
|
|
428 |
if test ! -z "$need_lt_check"; then |
|
429 |
if test -z "$lt_major"; then |
|
430 |
lt_status="bad" |
|
431 |
elif test "$lt_major" -gt "$need_lt_major"; then |
|
432 |
lt_status="good" |
|
433 |
elif test "$lt_major" -lt "$need_lt_major"; then |
|
434 |
lt_status="bad" |
|
435 |
elif test -z "$lt_minor"; then |
|
436 |
lt_status="bad" |
|
437 |
elif test "$lt_minor" -gt "$need_lt_minor"; then |
|
438 |
lt_status="good" |
|
439 |
elif test "$lt_minor" -lt "$need_lt_minor"; then |
|
440 |
lt_status="bad" |
|
441 |
elif test -z "$lt_patch"; then |
|
442 |
lt_status="bad" |
|
443 |
elif test "$lt_patch" -gt "$need_lt_patch"; then |
|
444 |
lt_status="good" |
|
445 |
elif test "$lt_patch" -lt "$need_lt_patch"; then |
|
446 |
lt_status="bad" |
|
447 |
else
|
|
448 |
lt_status="good" |
|
449 |
fi
|
|
450 |
if test "$lt_status" != "good"; then |
|
451 |
need_lt_version="$need_lt_major.$need_lt_minor.$need_lt_patch" |
|
452 |
echo "buildconf: libtool version $lt_version found." |
|
1.2.15
by Alessandro Ghedini
Import upstream version 7.24.0 |
453 |
echo " $buildhost requires GNU libtool $need_lt_version or newer installed." |
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
454 |
rm -f configure |
455 |
exit 1 |
|
456 |
fi
|
|
457 |
fi
|
|
458 |
fi
|
|
459 |
||
460 |
#--------------------------------------------------------------------------
|
|
1.2.11
by Ramakrishnan Muthukrishnan
Import upstream version 7.21.6 |
461 |
# Finished successfully.
|
1.2.2
by Domenico Andreoli
Import upstream version 7.19.7 |
462 |
#
|
1.1.2
by LaMont Jones
Import upstream version 7.12.3 |
463 |
echo "buildconf: OK" |
464 |
exit 0 |