Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 462 lines (423 sloc) 14.743 kb
14521b4 @bagder useful script to run after updating from CVS
authored
1 #!/bin/sh
9799f7a @bagder added our regular source header
authored
2 #***************************************************************************
3 # _ _ ____ _
4 # Project ___| | | | _ \| |
5 # / __| | | | |_) | |
6 # | (__| |_| | _ <| |___
7 # \___|\___/|_| \_\_____|
8 #
919c97f @yangtse curl tool: use configuration files from lib directory
yangtse authored
9 # Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
9799f7a @bagder added our regular source header
authored
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 ###########################################################################
14521b4 @bagder useful script to run after updating from CVS
authored
23
430527a @yangtse buildconf: minor tweaks
yangtse authored
24 #--------------------------------------------------------------------------
25 # die prints argument string to stdout and exits this shell script.
26 #
285e998 @bagder Sterling Hughes's fixes
authored
27 die(){
430527a @yangtse buildconf: minor tweaks
yangtse authored
28 echo "buildconf: $@"
29 exit 1
285e998 @bagder Sterling Hughes's fixes
authored
30 }
31
e93bcbe @yangtse For debugging purposes, show all sed's available in PATH on SunOS sys…
yangtse authored
32 #--------------------------------------------------------------------------
33 # findtool works as 'which' but we use a different name to make it more
34 # obvious we aren't using 'which'! ;-)
35 #
4cf70e3 @bagder AIX and Tru64 have what Tor calls "horribly broken 'which' programs" …
authored
36 findtool(){
37 file="$1"
38
430527a @yangtse buildconf: minor tweaks
yangtse authored
39 if { echo "$file" | grep "/" >/dev/null 2>&1; } then
40 # when file is given with a path check it first
a784ed6 @bagder findtool: file name as a full path requires a slash
authored
41 if test -f "$file"; then
42 echo "$file"
43 return
44 fi
a7b9452 @zuh Allow tools to be defined with full path in buildconf
zuh authored
45 fi
46
e93bcbe @yangtse For debugging purposes, show all sed's available in PATH on SunOS sys…
yangtse authored
47 old_IFS=$IFS; IFS=':'
4cf70e3 @bagder AIX and Tru64 have what Tor calls "horribly broken 'which' programs" …
authored
48 for path in $PATH
49 do
e93bcbe @yangtse For debugging purposes, show all sed's available in PATH on SunOS sys…
yangtse authored
50 IFS=$old_IFS
6358b24 @bagder allow more evironment variables to control what tools to check for an…
authored
51 # echo "checks for $file in $path" >&2
a214af0 @bagder make sure the found tool is a regular file (and not a dir or something)
authored
52 if test -f "$path/$file"; then
4cf70e3 @bagder AIX and Tru64 have what Tor calls "horribly broken 'which' programs" …
authored
53 echo "$path/$file"
54 return
55 fi
56 done
e93bcbe @yangtse For debugging purposes, show all sed's available in PATH on SunOS sys…
yangtse authored
57 IFS=$old_IFS
4cf70e3 @bagder AIX and Tru64 have what Tor calls "horribly broken 'which' programs" …
authored
58 }
59
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
60 #--------------------------------------------------------------------------
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
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 #--------------------------------------------------------------------------
57d13c7 @yangtse Ensure that buildconf runs from the subdirectory where configure.ac l…
yangtse authored
80 # Ensure that buildconf runs from the subdirectory where configure.ac lives
81 #
82 if test ! -f configure.ac ||
49b79b7 @yangtse curl tool: code moved to tool_*.[ch] files
yangtse authored
83 test ! -f src/tool_main.c ||
57d13c7 @yangtse Ensure that buildconf runs from the subdirectory where configure.ac l…
yangtse authored
84 test ! -f lib/urldata.h ||
430527a @yangtse buildconf: minor tweaks
yangtse authored
85 test ! -f include/curl/curl.h ||
86 test ! -f m4/curl-functions.m4; then
57d13c7 @yangtse Ensure that buildconf runs from the subdirectory where configure.ac l…
yangtse authored
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
91
92 #--------------------------------------------------------------------------
7afccf7 @yangtse buildconf: warn about autoconf 2.67 and 2.68 generating bad/unusable …
yangtse authored
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.
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
96 #
7431957 @bagder put back the libtool test, now for 1.5
authored
97 need_autoconf="2.57"
f21bc46 @bagder Modified to use 'head -n 1' instead of 'head -1' since some versions …
authored
98 ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|head -n 1| sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
99 if test -z "$ac_version"; then
100 echo "buildconf: autoconf not found."
7431957 @bagder put back the libtool test, now for 1.5
authored
101 echo " You need autoconf version $need_autoconf or newer installed."
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
102 exit 1
103 fi
ee6a618 @yangtse Adjusted libtool version parsing due to libtool --version now also
yangtse authored
104 old_IFS=$IFS; IFS='.'; set $ac_version; IFS=$old_IFS
7431957 @bagder put back the libtool test, now for 1.5
authored
105 if test "$1" = "2" -a "$2" -lt "57" || test "$1" -lt "2"; then
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
106 echo "buildconf: autoconf version $ac_version found."
7431957 @bagder put back the libtool test, now for 1.5
authored
107 echo " You need autoconf version $need_autoconf or newer installed."
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
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
7afccf7 @yangtse buildconf: warn about autoconf 2.67 and 2.68 generating bad/unusable …
yangtse authored
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
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
123
637bfa0 @yangtse Show autom4te and aclocal versions.
yangtse authored
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
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
128 fi
129 if test "$am4te_version" = "$ac_version"; then
130 echo "buildconf: autom4te version $am4te_version (ok)"
637bfa0 @yangtse Show autom4te and aclocal versions.
yangtse authored
131 else
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
132 echo "buildconf: autom4te version $am4te_version (ERROR: does not match autoconf version)"
133 exit 1
637bfa0 @yangtse Show autom4te and aclocal versions.
yangtse authored
134 fi
135
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
136 #--------------------------------------------------------------------------
137 # autoheader 2.50 or newer
138 #
f21bc46 @bagder Modified to use 'head -n 1' instead of 'head -1' since some versions …
authored
139 ah_version=`${AUTOHEADER:-autoheader} --version 2>/dev/null|head -n 1| sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
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
ee6a618 @yangtse Adjusted libtool version parsing due to libtool --version now also
yangtse authored
145 old_IFS=$IFS; IFS='.'; set $ah_version; IFS=$old_IFS
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
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 #--------------------------------------------------------------------------
7431957 @bagder put back the libtool test, now for 1.5
authored
158 # automake 1.7 or newer
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
159 #
7431957 @bagder put back the libtool test, now for 1.5
authored
160 need_automake="1.7"
f21bc46 @bagder Modified to use 'head -n 1' instead of 'head -1' since some versions …
authored
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/'`
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
162 if test -z "$am_version"; then
163 echo "buildconf: automake not found."
7431957 @bagder put back the libtool test, now for 1.5
authored
164 echo " You need automake version $need_automake or newer installed."
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
165 exit 1
166 fi
ee6a618 @yangtse Adjusted libtool version parsing due to libtool --version now also
yangtse authored
167 old_IFS=$IFS; IFS='.'; set $am_version; IFS=$old_IFS
7431957 @bagder put back the libtool test, now for 1.5
authored
168 if test "$1" = "1" -a "$2" -lt "7" || test "$1" -lt "1"; then
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
169 echo "buildconf: automake version $am_version found."
7431957 @bagder put back the libtool test, now for 1.5
authored
170 echo " You need automake version $need_automake or newer installed."
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
171 echo " If you have a sufficient automake installed, but it"
8b3946e @bagder Tor Arntsen fixed a spelling error
authored
172 echo " is not named 'automake', then try setting the"
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
173 echo " AUTOMAKE environment variable."
174 exit 1
175 fi
176
177 echo "buildconf: automake version $am_version (ok)"
178
637bfa0 @yangtse Show autom4te and aclocal versions.
yangtse authored
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
c6ea597 @bagder check for libtoolize and aclocal to doublecheck the installations better
authored
181 echo "buildconf: aclocal not found. Weird automake installation!"
182 exit 1
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
183 fi
184 if test "$acloc_version" = "$am_version"; then
185 echo "buildconf: aclocal version $acloc_version (ok)"
c6ea597 @bagder check for libtoolize and aclocal to doublecheck the installations better
authored
186 else
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
187 echo "buildconf: aclocal version $acloc_version (ERROR: does not match automake version)"
188 exit 1
c6ea597 @bagder check for libtoolize and aclocal to doublecheck the installations better
authored
189 fi
7431957 @bagder put back the libtool test, now for 1.5
authored
190
191 #--------------------------------------------------------------------------
430527a @yangtse buildconf: minor tweaks
yangtse authored
192 # GNU libtool preliminary check
7431957 @bagder put back the libtool test, now for 1.5
authored
193 #
430527a @yangtse buildconf: minor tweaks
yangtse authored
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
4cf70e3 @bagder AIX and Tru64 have what Tor calls "horribly broken 'which' programs" …
authored
202 libtool=`findtool glibtool 2>/dev/null`
7431957 @bagder put back the libtool test, now for 1.5
authored
203 if test ! -x "$libtool"; then
6358b24 @bagder allow more evironment variables to control what tools to check for an…
authored
204 libtool=`findtool ${LIBTOOL:-libtool}`
7431957 @bagder put back the libtool test, now for 1.5
authored
205 fi
430527a @yangtse buildconf: minor tweaks
yangtse authored
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
6358b24 @bagder allow more evironment variables to control what tools to check for an…
authored
210 fi
94c6a5e @bagder Jean-Philippe Barrette-LaPierre made buildconf run better on Mac OS X by
authored
211
ee6a618 @yangtse Adjusted libtool version parsing due to libtool --version now also
yangtse authored
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
7431957 @bagder put back the libtool test, now for 1.5
authored
216 echo "buildconf: libtool not found."
430527a @yangtse buildconf: minor tweaks
yangtse authored
217 echo " You need GNU libtool $want_lt_version or newer installed."
7431957 @bagder put back the libtool test, now for 1.5
authored
218 exit 1
219 fi
ee6a618 @yangtse Adjusted libtool version parsing due to libtool --version now also
yangtse authored
220 old_IFS=$IFS; IFS='.'; set $lt_version; IFS=$old_IFS
221 lt_major=$1
222 lt_minor=$2
223 lt_patch=$3
7553341 @bagder improved the libtool check to disqualify "1.4c" when 1.4.2 is required
authored
224
430527a @yangtse buildconf: minor tweaks
yangtse authored
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"
7431957 @bagder put back the libtool test, now for 1.5
authored
245 fi
430527a @yangtse buildconf: minor tweaks
yangtse authored
246 if test "$lt_status" != "good"; then
ee6a618 @yangtse Adjusted libtool version parsing due to libtool --version now also
yangtse authored
247 echo "buildconf: libtool version $lt_version found."
430527a @yangtse buildconf: minor tweaks
yangtse authored
248 echo " You need GNU libtool $want_lt_version or newer installed."
7431957 @bagder put back the libtool test, now for 1.5
authored
249 exit 1
250 fi
251
f8cd217 @yangtse buildconf: minor tweaks commit 430527a1 follow-up
yangtse authored
252 echo "buildconf: libtool version $lt_version (ok)"
253
430527a @yangtse buildconf: minor tweaks
yangtse authored
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"
c6ea597 @bagder check for libtoolize and aclocal to doublecheck the installations better
authored
260 else
430527a @yangtse buildconf: minor tweaks
yangtse authored
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."
c6ea597 @bagder check for libtoolize and aclocal to doublecheck the installations better
authored
266 exit 1
267 fi
268
bea9152 @bagder Check for a GNU version of m4, since autoconf won't run nicely withou…
authored
269 #--------------------------------------------------------------------------
270 # m4 check
271 #
892d693 In the m4 detection line, factor out the 2>dev/null
Fabian Keil authored
272 m4=`(${M4:-m4} --version || ${M4:-gm4} --version) 2>/dev/null | head -n 1`;
bea9152 @bagder Check for a GNU version of m4, since autoconf won't run nicely withou…
authored
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
b0873cb If the m4 version isn't recognized at all, just say so
Fabian Keil authored
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
bea9152 @bagder Check for a GNU version of m4, since autoconf won't run nicely withou…
authored
283 exit 1
284 fi
285
018dbfe @bagder bail out if perl is missing, it is needed for building curl anyway
authored
286 #--------------------------------------------------------------------------
287 # perl check
288 #
6358b24 @bagder allow more evironment variables to control what tools to check for an…
authored
289 PERL=`findtool ${PERL:-perl}`
7e02f7f @yangtse buildconf: fix libtool 1.5.x warnings triggered with autoconf 2.6x or…
yangtse authored
290 if test -z "$PERL"; then
291 echo "buildconf: perl not found"
292 exit 1
293 fi
bea9152 @bagder Check for a GNU version of m4, since autoconf won't run nicely withou…
authored
294
1692384 @yangtse Remove files generated on previous buildconf/configure run,
yangtse authored
295 #--------------------------------------------------------------------------
296 # Remove files generated on previous buildconf/configure run.
297 #
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
298 for fname in .deps \
b59b3a5 @yangtse Remove more generated files
yangtse authored
299 .libs \
52b2bc4 @yangtse Remove more generated files.
yangtse authored
300 *.la \
301 *.lo \
302 *.a \
303 *.o \
fe6c033 @yangtse Remove all generated 'Makefile' files.
yangtse authored
304 Makefile \
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
305 Makefile.in \
306 aclocal.m4 \
307 aclocal.m4.bak \
e3f1288 @yangtse Remove more generated files
yangtse authored
308 ares_build.h \
a2ddb0a @yangtse Add a couple of renamed files to the removal list
yangtse authored
309 ares_config.h \
310 ares_config.h.in \
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
311 autom4te.cache \
312 compile \
313 config.guess \
f671d05 @gknauf renamed generated config.h to curl_config.h in order to avoid clashes…
gknauf authored
314 curl_config.h \
315 curl_config.h.in \
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
316 config.log \
52b2bc4 @yangtse Remove more generated files.
yangtse authored
317 config.lt \
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
318 config.status \
319 config.sub \
320 configure \
ef24ecd @yangtse symbol-scan: use configure script knowledge about how to run the C pr…
yangtse authored
321 configurehelp.pm \
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
322 curl-config \
11cb78c @yangtse curlbuild.h is a generated file on configure-capable systems
yangtse authored
323 curlbuild.h \
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
324 depcomp \
325 libcares.pc \
326 libcurl.pc \
327 libtool \
328 libtool.m4 \
34f9ec0 @yangtse configure: libtool 1.5 tweaks
yangtse authored
329 libtool.m4.tmp \
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
330 ltmain.sh \
0cf10ae @yangtse Remove following files generated on previous buildconf run:
yangtse authored
331 ltoptions.m4 \
332 ltsugar.m4 \
333 ltversion.m4 \
334 lt~obsolete.m4 \
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
335 stamp-h1 \
336 stamp-h2 \
337 stamp-h3 ; do
338 removethis "$fname"
1692384 @yangtse Remove files generated on previous buildconf/configure run,
yangtse authored
339 done
7431957 @bagder put back the libtool test, now for 1.5
authored
340
1692384 @yangtse Remove files generated on previous buildconf/configure run,
yangtse authored
341 #--------------------------------------------------------------------------
7431957 @bagder put back the libtool test, now for 1.5
authored
342 # run the correct scripts now
1692384 @yangtse Remove files generated on previous buildconf/configure run,
yangtse authored
343 #
7431957 @bagder put back the libtool test, now for 1.5
authored
344
e6c267f @bagder oops, run libtoolize as the first tool
authored
345 echo "buildconf: running libtoolize"
430527a @yangtse buildconf: minor tweaks
yangtse authored
346 ${libtoolize} --copy --automake --force || die "libtoolize command failed"
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
347
34f9ec0 @yangtse configure: libtool 1.5 tweaks
yangtse authored
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
7e02f7f @yangtse buildconf: fix libtool 1.5.x warnings triggered with autoconf 2.6x or…
yangtse authored
352 if test "$lt_major" = "1" && test "$lt_minor" = "5"; then
353 if test -z "$lt_patch" || test "$lt_patch" -lt "26"; then
34f9ec0 @yangtse configure: libtool 1.5 tweaks
yangtse authored
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"
c92234c @yangtse buildconf: follow-up for commit 7e02f7fd
yangtse authored
360 fi
34f9ec0 @yangtse configure: libtool 1.5 tweaks
yangtse authored
361 if test -f m4/libtool.m4; then
362 echo "buildconf: renaming some variables in local m4/libtool.m4"
363 $PERL -i.tmp -pe \
c92234c @yangtse buildconf: follow-up for commit 7e02f7fd
yangtse authored
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;' \
34f9ec0 @yangtse configure: libtool 1.5 tweaks
yangtse authored
366 m4/libtool.m4
367 rm -f m4/libtool.m4.tmp
c92234c @yangtse buildconf: follow-up for commit 7e02f7fd
yangtse authored
368 fi
7e02f7f @yangtse buildconf: fix libtool 1.5.x warnings triggered with autoconf 2.6x or…
yangtse authored
369 fi
370 fi
371
34f9ec0 @yangtse configure: libtool 1.5 tweaks
yangtse authored
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
376 fi
377
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
378 echo "buildconf: running aclocal"
430527a @yangtse buildconf: minor tweaks
yangtse authored
379 ${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "aclocal command failed"
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
380
34f9ec0 @yangtse configure: libtool 1.5 tweaks
yangtse authored
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
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
383
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
384 echo "buildconf: running autoheader"
430527a @yangtse buildconf: minor tweaks
yangtse authored
385 ${AUTOHEADER:-autoheader} || die "autoheader command failed"
09f2781 @yangtse Validate that autom4te and autoconf versions match.
yangtse authored
386
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
387 echo "buildconf: running autoconf"
430527a @yangtse buildconf: minor tweaks
yangtse authored
388 ${AUTOCONF:-autoconf} || die "autoconf command failed"
b84607f @bagder run autoconf in the ares dir as well if the dir is present, after it has
authored
389
390 if test -d ares; then
391 cd ares
723a78a @bagder As Alexander Lazic pointed out, run the buildconf from the ares dir i…
authored
392 echo "buildconf: running in ares"
393 ./buildconf
b84607f @bagder run autoconf in the ares dir as well if the dir is present, after it has
authored
394 cd ..
395 fi
396
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
397 echo "buildconf: running automake"
430527a @yangtse buildconf: minor tweaks
yangtse authored
398 ${AUTOMAKE:-automake} --add-missing --copy || die "automake command failed"
5d947e9 @bagder display OK if it runs OK
authored
399
e3d6538 @yangtse Depending on the libtool and automake versions being used config.gues…
yangtse authored
400 #--------------------------------------------------------------------------
430527a @yangtse buildconf: minor tweaks
yangtse authored
401 # GNU libtool complementary check
402 #
e3d6538 @yangtse Depending on the libtool and automake versions being used config.gues…
yangtse authored
403 # Depending on the libtool and automake versions being used, config.guess
404 # might not be installed in the subdirectory until automake has finished.
405 # So we can not attempt to use it until this very last buildconf stage.
406 #
407 if test ! -f ./config.guess; then
408 echo "buildconf: config.guess not found"
409 else
410 buildhost=`./config.guess 2>/dev/null|head -n 1`
411 case $buildhost in
fec5f03 @yangtse buildconf: MAC OS X requires libtool version 1.5.26 or newer
yangtse authored
412 *-*-darwin*)
413 need_lt_major=1
414 need_lt_minor=5
415 need_lt_patch=26
416 need_lt_check="yes"
417 ;;
e3d6538 @yangtse Depending on the libtool and automake versions being used config.gues…
yangtse authored
418 *-*-hpux*)
419 need_lt_major=1
420 need_lt_minor=5
421 need_lt_patch=24
422 need_lt_check="yes"
423 ;;
424 esac
425 if test ! -z "$need_lt_check"; then
426 if test -z "$lt_major"; then
427 lt_status="bad"
428 elif test "$lt_major" -gt "$need_lt_major"; then
429 lt_status="good"
430 elif test "$lt_major" -lt "$need_lt_major"; then
431 lt_status="bad"
432 elif test -z "$lt_minor"; then
433 lt_status="bad"
434 elif test "$lt_minor" -gt "$need_lt_minor"; then
435 lt_status="good"
436 elif test "$lt_minor" -lt "$need_lt_minor"; then
437 lt_status="bad"
438 elif test -z "$lt_patch"; then
439 lt_status="bad"
440 elif test "$lt_patch" -gt "$need_lt_patch"; then
441 lt_status="good"
442 elif test "$lt_patch" -lt "$need_lt_patch"; then
443 lt_status="bad"
444 else
445 lt_status="good"
446 fi
447 if test "$lt_status" != "good"; then
448 need_lt_version="$need_lt_major.$need_lt_minor.$need_lt_patch"
ee6a618 @yangtse Adjusted libtool version parsing due to libtool --version now also
yangtse authored
449 echo "buildconf: libtool version $lt_version found."
430527a @yangtse buildconf: minor tweaks
yangtse authored
450 echo " $buildhost requires GNU libtool $need_lt_version or newer installed."
e3d6538 @yangtse Depending on the libtool and automake versions being used config.gues…
yangtse authored
451 rm -f configure
452 exit 1
453 fi
454 fi
455 fi
456
457 #--------------------------------------------------------------------------
5942362 Fix spelling errors in buildconf
Fabian Keil authored
458 # Finished successfully.
e3d6538 @yangtse Depending on the libtool and automake versions being used config.gues…
yangtse authored
459 #
5d947e9 @bagder display OK if it runs OK
authored
460 echo "buildconf: OK"
d0eb56d @bagder made this script detect proper versions of the tools we need to build…
authored
461 exit 0
Something went wrong with that request. Please try again.