Contents of /trunk/libjpeg/patches/libjpeg-6b-multilib.patch
Parent Directory | Revision Log
Revision 144 -
(show annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 330459 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 330459 byte(s)
-import
1 | Submitted By: Jim Gifford (patches at jg555 dot com) |
2 | Date: 2006-06-21 |
3 | Initial Package Version: 6b |
4 | Origin: Ryan Oliver |
5 | Upstream Status: Not Submitted |
6 | o Updates config.sub and config.guess to support newer architectures |
7 | o Updates libtool scripts to avoid linking issues during multilib builds |
8 | |
9 | diff -Naur jpeg-6b.orig/config.guess jpeg-6b/config.guess |
10 | --- jpeg-6b.orig/config.guess 1998-03-25 15:25:38.000000000 +0000 |
11 | +++ jpeg-6b/config.guess 2006-06-21 15:41:44.000000000 +0000 |
12 | @@ -1,7 +1,10 @@ |
13 | #! /bin/sh |
14 | # Attempt to guess a canonical system name. |
15 | -# Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. |
16 | -# |
17 | +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
18 | +# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
19 | + |
20 | +timestamp='2004-11-12' |
21 | + |
22 | # This file is free software; you can redistribute it and/or modify it |
23 | # under the terms of the GNU General Public License as published by |
24 | # the Free Software Foundation; either version 2 of the License, or |
25 | @@ -21,125 +24,314 @@ |
26 | # configuration script generated by Autoconf, you may include it under |
27 | # the same distribution terms that you use for the rest of that program. |
28 | |
29 | -# Written by Per Bothner <bothner@cygnus.com>. |
30 | -# The master version of this file is at the FSF in /home/gd/gnu/lib. |
31 | +# Originally written by Per Bothner <per@bothner.com>. |
32 | +# Please send patches to <config-patches@gnu.org>. Submit a context |
33 | +# diff and a properly formatted ChangeLog entry. |
34 | # |
35 | # This script attempts to guess a canonical system name similar to |
36 | # config.sub. If it succeeds, it prints the system name on stdout, and |
37 | # exits with 0. Otherwise, it exits with 1. |
38 | # |
39 | # The plan is that this can be called by configure scripts if you |
40 | -# don't specify an explicit system type (host/target name). |
41 | -# |
42 | -# Only a few systems have been added to this list; please add others |
43 | -# (but try to keep the structure clean). |
44 | -# |
45 | +# don't specify an explicit build system type. |
46 | + |
47 | +me=`echo "$0" | sed -e 's,.*/,,'` |
48 | + |
49 | +usage="\ |
50 | +Usage: $0 [OPTION] |
51 | + |
52 | +Output the configuration name of the system \`$me' is run on. |
53 | + |
54 | +Operation modes: |
55 | + -h, --help print this help, then exit |
56 | + -t, --time-stamp print date of last modification, then exit |
57 | + -v, --version print version number, then exit |
58 | + |
59 | +Report bugs and patches to <config-patches@gnu.org>." |
60 | + |
61 | +version="\ |
62 | +GNU config.guess ($timestamp) |
63 | + |
64 | +Originally written by Per Bothner. |
65 | +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
66 | +Free Software Foundation, Inc. |
67 | + |
68 | +This is free software; see the source for copying conditions. There is NO |
69 | +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
70 | + |
71 | +help=" |
72 | +Try \`$me --help' for more information." |
73 | + |
74 | +# Parse command line |
75 | +while test $# -gt 0 ; do |
76 | + case $1 in |
77 | + --time-stamp | --time* | -t ) |
78 | + echo "$timestamp" ; exit 0 ;; |
79 | + --version | -v ) |
80 | + echo "$version" ; exit 0 ;; |
81 | + --help | --h* | -h ) |
82 | + echo "$usage"; exit 0 ;; |
83 | + -- ) # Stop option processing |
84 | + shift; break ;; |
85 | + - ) # Use stdin as input. |
86 | + break ;; |
87 | + -* ) |
88 | + echo "$me: invalid option $1$help" >&2 |
89 | + exit 1 ;; |
90 | + * ) |
91 | + break ;; |
92 | + esac |
93 | +done |
94 | + |
95 | +if test $# != 0; then |
96 | + echo "$me: too many arguments$help" >&2 |
97 | + exit 1 |
98 | +fi |
99 | + |
100 | +trap 'exit 1' 1 2 15 |
101 | + |
102 | +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
103 | +# compiler to aid in system detection is discouraged as it requires |
104 | +# temporary files to be created and, as you can see below, it is a |
105 | +# headache to deal with in a portable fashion. |
106 | + |
107 | +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still |
108 | +# use `HOST_CC' if defined, but it is deprecated. |
109 | + |
110 | +# Portable tmp directory creation inspired by the Autoconf team. |
111 | + |
112 | +set_cc_for_build=' |
113 | +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; |
114 | +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; |
115 | +: ${TMPDIR=/tmp} ; |
116 | + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || |
117 | + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || |
118 | + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || |
119 | + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; |
120 | +dummy=$tmp/dummy ; |
121 | +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; |
122 | +case $CC_FOR_BUILD,$HOST_CC,$CC in |
123 | + ,,) echo "int x;" > $dummy.c ; |
124 | + for c in cc gcc c89 c99 ; do |
125 | + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then |
126 | + CC_FOR_BUILD="$c"; break ; |
127 | + fi ; |
128 | + done ; |
129 | + if test x"$CC_FOR_BUILD" = x ; then |
130 | + CC_FOR_BUILD=no_compiler_found ; |
131 | + fi |
132 | + ;; |
133 | + ,,*) CC_FOR_BUILD=$CC ;; |
134 | + ,*,*) CC_FOR_BUILD=$HOST_CC ;; |
135 | +esac ;' |
136 | |
137 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
138 | -# (ghazi@noc.rutgers.edu 8/24/94.) |
139 | +# (ghazi@noc.rutgers.edu 1994-08-24) |
140 | if (test -f /.attbin/uname) >/dev/null 2>&1 ; then |
141 | PATH=$PATH:/.attbin ; export PATH |
142 | fi |
143 | |
144 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
145 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
146 | -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
147 | +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
148 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
149 | |
150 | -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 |
151 | - |
152 | # Note: order is significant - the case branches are not exclusive. |
153 | |
154 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
155 | + *:NetBSD:*:*) |
156 | + # NetBSD (nbsd) targets should (where applicable) match one or |
157 | + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, |
158 | + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
159 | + # switched to ELF, *-*-netbsd* would select the old |
160 | + # object file format. This provides both forward |
161 | + # compatibility and a consistent mechanism for selecting the |
162 | + # object file format. |
163 | + # |
164 | + # Note: NetBSD doesn't particularly care about the vendor |
165 | + # portion of the name. We always set it to "unknown". |
166 | + sysctl="sysctl -n hw.machine_arch" |
167 | + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ |
168 | + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` |
169 | + case "${UNAME_MACHINE_ARCH}" in |
170 | + armeb) machine=armeb-unknown ;; |
171 | + arm*) machine=arm-unknown ;; |
172 | + sh3el) machine=shl-unknown ;; |
173 | + sh3eb) machine=sh-unknown ;; |
174 | + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; |
175 | + esac |
176 | + # The Operating System including object format, if it has switched |
177 | + # to ELF recently, or will in the future. |
178 | + case "${UNAME_MACHINE_ARCH}" in |
179 | + arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
180 | + eval $set_cc_for_build |
181 | + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
182 | + | grep __ELF__ >/dev/null |
183 | + then |
184 | + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). |
185 | + # Return netbsd for either. FIX? |
186 | + os=netbsd |
187 | + else |
188 | + os=netbsdelf |
189 | + fi |
190 | + ;; |
191 | + *) |
192 | + os=netbsd |
193 | + ;; |
194 | + esac |
195 | + # The OS release |
196 | + # Debian GNU/NetBSD machines have a different userland, and |
197 | + # thus, need a distinct triplet. However, they do not need |
198 | + # kernel version information, so it can be replaced with a |
199 | + # suitable tag, in the style of linux-gnu. |
200 | + case "${UNAME_VERSION}" in |
201 | + Debian*) |
202 | + release='-gnu' |
203 | + ;; |
204 | + *) |
205 | + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
206 | + ;; |
207 | + esac |
208 | + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
209 | + # contains redundant information, the shorter form: |
210 | + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
211 | + echo "${machine}-${os}${release}" |
212 | + exit 0 ;; |
213 | + amd64:OpenBSD:*:*) |
214 | + echo x86_64-unknown-openbsd${UNAME_RELEASE} |
215 | + exit 0 ;; |
216 | + amiga:OpenBSD:*:*) |
217 | + echo m68k-unknown-openbsd${UNAME_RELEASE} |
218 | + exit 0 ;; |
219 | + cats:OpenBSD:*:*) |
220 | + echo arm-unknown-openbsd${UNAME_RELEASE} |
221 | + exit 0 ;; |
222 | + hp300:OpenBSD:*:*) |
223 | + echo m68k-unknown-openbsd${UNAME_RELEASE} |
224 | + exit 0 ;; |
225 | + luna88k:OpenBSD:*:*) |
226 | + echo m88k-unknown-openbsd${UNAME_RELEASE} |
227 | + exit 0 ;; |
228 | + mac68k:OpenBSD:*:*) |
229 | + echo m68k-unknown-openbsd${UNAME_RELEASE} |
230 | + exit 0 ;; |
231 | + macppc:OpenBSD:*:*) |
232 | + echo powerpc-unknown-openbsd${UNAME_RELEASE} |
233 | + exit 0 ;; |
234 | + mvme68k:OpenBSD:*:*) |
235 | + echo m68k-unknown-openbsd${UNAME_RELEASE} |
236 | + exit 0 ;; |
237 | + mvme88k:OpenBSD:*:*) |
238 | + echo m88k-unknown-openbsd${UNAME_RELEASE} |
239 | + exit 0 ;; |
240 | + mvmeppc:OpenBSD:*:*) |
241 | + echo powerpc-unknown-openbsd${UNAME_RELEASE} |
242 | + exit 0 ;; |
243 | + sgi:OpenBSD:*:*) |
244 | + echo mips64-unknown-openbsd${UNAME_RELEASE} |
245 | + exit 0 ;; |
246 | + sun3:OpenBSD:*:*) |
247 | + echo m68k-unknown-openbsd${UNAME_RELEASE} |
248 | + exit 0 ;; |
249 | + *:OpenBSD:*:*) |
250 | + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} |
251 | + exit 0 ;; |
252 | + *:ekkoBSD:*:*) |
253 | + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} |
254 | + exit 0 ;; |
255 | + macppc:MirBSD:*:*) |
256 | + echo powerppc-unknown-mirbsd${UNAME_RELEASE} |
257 | + exit 0 ;; |
258 | + *:MirBSD:*:*) |
259 | + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} |
260 | + exit 0 ;; |
261 | alpha:OSF1:*:*) |
262 | - if test $UNAME_RELEASE = "V4.0"; then |
263 | + case $UNAME_RELEASE in |
264 | + *4.0) |
265 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
266 | - fi |
267 | + ;; |
268 | + *5.*) |
269 | + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` |
270 | + ;; |
271 | + esac |
272 | + # According to Compaq, /usr/sbin/psrinfo has been available on |
273 | + # OSF/1 and Tru64 systems produced since 1995. I hope that |
274 | + # covers most systems running today. This code pipes the CPU |
275 | + # types through head -n 1, so we only detect the type of CPU 0. |
276 | + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
277 | + case "$ALPHA_CPU_TYPE" in |
278 | + "EV4 (21064)") |
279 | + UNAME_MACHINE="alpha" ;; |
280 | + "EV4.5 (21064)") |
281 | + UNAME_MACHINE="alpha" ;; |
282 | + "LCA4 (21066/21068)") |
283 | + UNAME_MACHINE="alpha" ;; |
284 | + "EV5 (21164)") |
285 | + UNAME_MACHINE="alphaev5" ;; |
286 | + "EV5.6 (21164A)") |
287 | + UNAME_MACHINE="alphaev56" ;; |
288 | + "EV5.6 (21164PC)") |
289 | + UNAME_MACHINE="alphapca56" ;; |
290 | + "EV5.7 (21164PC)") |
291 | + UNAME_MACHINE="alphapca57" ;; |
292 | + "EV6 (21264)") |
293 | + UNAME_MACHINE="alphaev6" ;; |
294 | + "EV6.7 (21264A)") |
295 | + UNAME_MACHINE="alphaev67" ;; |
296 | + "EV6.8CB (21264C)") |
297 | + UNAME_MACHINE="alphaev68" ;; |
298 | + "EV6.8AL (21264B)") |
299 | + UNAME_MACHINE="alphaev68" ;; |
300 | + "EV6.8CX (21264D)") |
301 | + UNAME_MACHINE="alphaev68" ;; |
302 | + "EV6.9A (21264/EV69A)") |
303 | + UNAME_MACHINE="alphaev69" ;; |
304 | + "EV7 (21364)") |
305 | + UNAME_MACHINE="alphaev7" ;; |
306 | + "EV7.9 (21364A)") |
307 | + UNAME_MACHINE="alphaev79" ;; |
308 | + esac |
309 | + # A Pn.n version is a patched version. |
310 | # A Vn.n version is a released version. |
311 | # A Tn.n version is a released field test version. |
312 | # A Xn.n version is an unreleased experimental baselevel. |
313 | # 1.2 uses "1.2" for uname -r. |
314 | - cat <<EOF >dummy.s |
315 | - .globl main |
316 | - .ent main |
317 | -main: |
318 | - .frame \$30,0,\$26,0 |
319 | - .prologue 0 |
320 | - .long 0x47e03d80 # implver $0 |
321 | - lda \$2,259 |
322 | - .long 0x47e20c21 # amask $2,$1 |
323 | - srl \$1,8,\$2 |
324 | - sll \$2,2,\$2 |
325 | - sll \$0,3,\$0 |
326 | - addl \$1,\$0,\$0 |
327 | - addl \$2,\$0,\$0 |
328 | - ret \$31,(\$26),1 |
329 | - .end main |
330 | -EOF |
331 | - ${CC-cc} dummy.s -o dummy 2>/dev/null |
332 | - if test "$?" = 0 ; then |
333 | - ./dummy |
334 | - case "$?" in |
335 | - 7) |
336 | - UNAME_MACHINE="alpha" |
337 | - ;; |
338 | - 15) |
339 | - UNAME_MACHINE="alphaev5" |
340 | - ;; |
341 | - 14) |
342 | - UNAME_MACHINE="alphaev56" |
343 | - ;; |
344 | - 10) |
345 | - UNAME_MACHINE="alphapca56" |
346 | - ;; |
347 | - 16) |
348 | - UNAME_MACHINE="alphaev6" |
349 | - ;; |
350 | - esac |
351 | - fi |
352 | - rm -f dummy.s dummy |
353 | - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` |
354 | + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
355 | + exit 0 ;; |
356 | + Alpha\ *:Windows_NT*:*) |
357 | + # How do we know it's Interix rather than the generic POSIX subsystem? |
358 | + # Should we change UNAME_MACHINE based on the output of uname instead |
359 | + # of the specific Alpha model? |
360 | + echo alpha-pc-interix |
361 | exit 0 ;; |
362 | 21064:Windows_NT:50:3) |
363 | echo alpha-dec-winnt3.5 |
364 | exit 0 ;; |
365 | Amiga*:UNIX_System_V:4.0:*) |
366 | - echo m68k-cbm-sysv4 |
367 | + echo m68k-unknown-sysv4 |
368 | exit 0;; |
369 | - amiga:NetBSD:*:*) |
370 | - echo m68k-cbm-netbsd${UNAME_RELEASE} |
371 | - exit 0 ;; |
372 | - amiga:OpenBSD:*:*) |
373 | - echo m68k-unknown-openbsd${UNAME_RELEASE} |
374 | - exit 0 ;; |
375 | - arc64:OpenBSD:*:*) |
376 | - echo mips64el-unknown-openbsd${UNAME_RELEASE} |
377 | + *:[Aa]miga[Oo][Ss]:*:*) |
378 | + echo ${UNAME_MACHINE}-unknown-amigaos |
379 | exit 0 ;; |
380 | - arc:OpenBSD:*:*) |
381 | - echo mipsel-unknown-openbsd${UNAME_RELEASE} |
382 | + *:[Mm]orph[Oo][Ss]:*:*) |
383 | + echo ${UNAME_MACHINE}-unknown-morphos |
384 | exit 0 ;; |
385 | - hkmips:OpenBSD:*:*) |
386 | - echo mips-unknown-openbsd${UNAME_RELEASE} |
387 | + *:OS/390:*:*) |
388 | + echo i370-ibm-openedition |
389 | exit 0 ;; |
390 | - pmax:OpenBSD:*:*) |
391 | - echo mipsel-unknown-openbsd${UNAME_RELEASE} |
392 | - exit 0 ;; |
393 | - sgi:OpenBSD:*:*) |
394 | - echo mips-unknown-openbsd${UNAME_RELEASE} |
395 | + *:z/VM:*:*) |
396 | + echo s390-ibm-zvmoe |
397 | exit 0 ;; |
398 | - wgrisc:OpenBSD:*:*) |
399 | - echo mipsel-unknown-openbsd${UNAME_RELEASE} |
400 | + *:OS400:*:*) |
401 | + echo powerpc-ibm-os400 |
402 | exit 0 ;; |
403 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
404 | echo arm-acorn-riscix${UNAME_RELEASE} |
405 | exit 0;; |
406 | - arm32:NetBSD:*:*) |
407 | - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
408 | - exit 0 ;; |
409 | - SR2?01:HI-UX/MPP:*:*) |
410 | + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
411 | echo hppa1.1-hitachi-hiuxmpp |
412 | exit 0;; |
413 | - Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) |
414 | + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
415 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. |
416 | if test "`(/bin/universe) 2>/dev/null`" = att ; then |
417 | echo pyramid-pyramid-sysv3 |
418 | @@ -147,9 +339,19 @@ |
419 | echo pyramid-pyramid-bsd |
420 | fi |
421 | exit 0 ;; |
422 | - NILE:*:*:dcosx) |
423 | + NILE*:*:*:dcosx) |
424 | echo pyramid-pyramid-svr4 |
425 | exit 0 ;; |
426 | + DRS?6000:unix:4.0:6*) |
427 | + echo sparc-icl-nx6 |
428 | + exit 0 ;; |
429 | + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
430 | + case `/usr/bin/uname -p` in |
431 | + sparc) echo sparc-icl-nx7 && exit 0 ;; |
432 | + esac ;; |
433 | + sun4H:SunOS:5.*:*) |
434 | + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
435 | + exit 0 ;; |
436 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
437 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
438 | exit 0 ;; |
439 | @@ -175,7 +377,7 @@ |
440 | echo m68k-sun-sunos${UNAME_RELEASE} |
441 | exit 0 ;; |
442 | sun*:*:4.2BSD:*) |
443 | - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
444 | + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
445 | test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 |
446 | case "`/bin/arch`" in |
447 | sun3) |
448 | @@ -189,29 +391,34 @@ |
449 | aushp:SunOS:*:*) |
450 | echo sparc-auspex-sunos${UNAME_RELEASE} |
451 | exit 0 ;; |
452 | - atari*:NetBSD:*:*) |
453 | - echo m68k-atari-netbsd${UNAME_RELEASE} |
454 | + # The situation for MiNT is a little confusing. The machine name |
455 | + # can be virtually everything (everything which is not |
456 | + # "atarist" or "atariste" at least should have a processor |
457 | + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" |
458 | + # to the lowercase version "mint" (or "freemint"). Finally |
459 | + # the system name "TOS" denotes a system which is actually not |
460 | + # MiNT. But MiNT is downward compatible to TOS, so this should |
461 | + # be no problem. |
462 | + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
463 | + echo m68k-atari-mint${UNAME_RELEASE} |
464 | exit 0 ;; |
465 | - atari*:OpenBSD:*:*) |
466 | - echo m68k-unknown-openbsd${UNAME_RELEASE} |
467 | - exit 0 ;; |
468 | - sun3*:NetBSD:*:*) |
469 | - echo m68k-sun-netbsd${UNAME_RELEASE} |
470 | - exit 0 ;; |
471 | - sun3*:OpenBSD:*:*) |
472 | - echo m68k-unknown-openbsd${UNAME_RELEASE} |
473 | - exit 0 ;; |
474 | - mac68k:NetBSD:*:*) |
475 | - echo m68k-apple-netbsd${UNAME_RELEASE} |
476 | - exit 0 ;; |
477 | - mac68k:OpenBSD:*:*) |
478 | - echo m68k-unknown-openbsd${UNAME_RELEASE} |
479 | - exit 0 ;; |
480 | - mvme68k:OpenBSD:*:*) |
481 | - echo m68k-unknown-openbsd${UNAME_RELEASE} |
482 | + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
483 | + echo m68k-atari-mint${UNAME_RELEASE} |
484 | + exit 0 ;; |
485 | + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
486 | + echo m68k-atari-mint${UNAME_RELEASE} |
487 | exit 0 ;; |
488 | - mvme88k:OpenBSD:*:*) |
489 | - echo m88k-unknown-openbsd${UNAME_RELEASE} |
490 | + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
491 | + echo m68k-milan-mint${UNAME_RELEASE} |
492 | + exit 0 ;; |
493 | + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
494 | + echo m68k-hades-mint${UNAME_RELEASE} |
495 | + exit 0 ;; |
496 | + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
497 | + echo m68k-unknown-mint${UNAME_RELEASE} |
498 | + exit 0 ;; |
499 | + m68k:machten:*:*) |
500 | + echo m68k-apple-machten${UNAME_RELEASE} |
501 | exit 0 ;; |
502 | powerpc:machten:*:*) |
503 | echo powerpc-apple-machten${UNAME_RELEASE} |
504 | @@ -225,12 +432,18 @@ |
505 | VAX*:ULTRIX*:*:*) |
506 | echo vax-dec-ultrix${UNAME_RELEASE} |
507 | exit 0 ;; |
508 | - 2020:CLIX:*:*) |
509 | + 2020:CLIX:*:* | 2430:CLIX:*:*) |
510 | echo clipper-intergraph-clix${UNAME_RELEASE} |
511 | exit 0 ;; |
512 | mips:*:*:UMIPS | mips:*:*:RISCos) |
513 | - sed 's/^ //' << EOF >dummy.c |
514 | - int main (argc, argv) int argc; char **argv; { |
515 | + eval $set_cc_for_build |
516 | + sed 's/^ //' << EOF >$dummy.c |
517 | +#ifdef __cplusplus |
518 | +#include <stdio.h> /* for printf() prototype */ |
519 | + int main (int argc, char *argv[]) { |
520 | +#else |
521 | + int main (argc, argv) int argc; char *argv[]; { |
522 | +#endif |
523 | #if defined (host_mips) && defined (MIPSEB) |
524 | #if defined (SYSTYPE_SYSV) |
525 | printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); |
526 | @@ -245,12 +458,20 @@ |
527 | exit (-1); |
528 | } |
529 | EOF |
530 | - ${CC-cc} dummy.c -o dummy \ |
531 | - && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ |
532 | - && rm dummy.c dummy && exit 0 |
533 | - rm -f dummy.c dummy |
534 | + $CC_FOR_BUILD -o $dummy $dummy.c \ |
535 | + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ |
536 | + && exit 0 |
537 | echo mips-mips-riscos${UNAME_RELEASE} |
538 | exit 0 ;; |
539 | + Motorola:PowerMAX_OS:*:*) |
540 | + echo powerpc-motorola-powermax |
541 | + exit 0 ;; |
542 | + Motorola:*:4.3:PL8-*) |
543 | + echo powerpc-harris-powermax |
544 | + exit 0 ;; |
545 | + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
546 | + echo powerpc-harris-powermax |
547 | + exit 0 ;; |
548 | Night_Hawk:Power_UNIX:*:*) |
549 | echo powerpc-harris-powerunix |
550 | exit 0 ;; |
551 | @@ -266,15 +487,18 @@ |
552 | AViiON:dgux:*:*) |
553 | # DG/UX returns AViiON for all architectures |
554 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
555 | - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then |
556 | - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ |
557 | - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then |
558 | + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] |
559 | + then |
560 | + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ |
561 | + [ ${TARGET_BINARY_INTERFACE}x = x ] |
562 | + then |
563 | echo m88k-dg-dgux${UNAME_RELEASE} |
564 | - else |
565 | + else |
566 | echo m88k-dg-dguxbcs${UNAME_RELEASE} |
567 | + fi |
568 | + else |
569 | + echo i586-dg-dgux${UNAME_RELEASE} |
570 | fi |
571 | - else echo i586-dg-dgux${UNAME_RELEASE} |
572 | - fi |
573 | exit 0 ;; |
574 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
575 | echo m88k-dolphin-sysv3 |
576 | @@ -295,12 +519,21 @@ |
577 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
578 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
579 | exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' |
580 | - i?86:AIX:*:*) |
581 | + i*86:AIX:*:*) |
582 | echo i386-ibm-aix |
583 | exit 0 ;; |
584 | + ia64:AIX:*:*) |
585 | + if [ -x /usr/bin/oslevel ] ; then |
586 | + IBM_REV=`/usr/bin/oslevel` |
587 | + else |
588 | + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
589 | + fi |
590 | + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} |
591 | + exit 0 ;; |
592 | *:AIX:2:3) |
593 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
594 | - sed 's/^ //' << EOF >dummy.c |
595 | + eval $set_cc_for_build |
596 | + sed 's/^ //' << EOF >$dummy.c |
597 | #include <sys/systemcfg.h> |
598 | |
599 | main() |
600 | @@ -311,8 +544,7 @@ |
601 | exit(0); |
602 | } |
603 | EOF |
604 | - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 |
605 | - rm -f dummy.c dummy |
606 | + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 |
607 | echo rs6000-ibm-aix3.2.5 |
608 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
609 | echo rs6000-ibm-aix3.2.4 |
610 | @@ -320,8 +552,9 @@ |
611 | echo rs6000-ibm-aix3.2 |
612 | fi |
613 | exit 0 ;; |
614 | - *:AIX:*:4) |
615 | - if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then |
616 | + *:AIX:*:[45]) |
617 | + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
618 | + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then |
619 | IBM_ARCH=rs6000 |
620 | else |
621 | IBM_ARCH=powerpc |
622 | @@ -329,7 +562,7 @@ |
623 | if [ -x /usr/bin/oslevel ] ; then |
624 | IBM_REV=`/usr/bin/oslevel` |
625 | else |
626 | - IBM_REV=4.${UNAME_RELEASE} |
627 | + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
628 | fi |
629 | echo ${IBM_ARCH}-ibm-aix${IBM_REV} |
630 | exit 0 ;; |
631 | @@ -339,7 +572,7 @@ |
632 | ibmrt:4.4BSD:*|romp-ibm:BSD:*) |
633 | echo romp-ibm-bsd4.4 |
634 | exit 0 ;; |
635 | - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and |
636 | + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
637 | echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to |
638 | exit 0 ;; # report: romp-ibm BSD 4.3 |
639 | *:BOSX:*:*) |
640 | @@ -354,18 +587,85 @@ |
641 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
642 | echo m68k-hp-bsd4.4 |
643 | exit 0 ;; |
644 | - 9000/[3478]??:HP-UX:*:*) |
645 | + 9000/[34678]??:HP-UX:*:*) |
646 | + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
647 | case "${UNAME_MACHINE}" in |
648 | 9000/31? ) HP_ARCH=m68000 ;; |
649 | 9000/[34]?? ) HP_ARCH=m68k ;; |
650 | - 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; |
651 | - 9000/8?? ) HP_ARCH=hppa1.0 ;; |
652 | + 9000/[678][0-9][0-9]) |
653 | + if [ -x /usr/bin/getconf ]; then |
654 | + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
655 | + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
656 | + case "${sc_cpu_version}" in |
657 | + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 |
658 | + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 |
659 | + 532) # CPU_PA_RISC2_0 |
660 | + case "${sc_kernel_bits}" in |
661 | + 32) HP_ARCH="hppa2.0n" ;; |
662 | + 64) HP_ARCH="hppa2.0w" ;; |
663 | + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 |
664 | + esac ;; |
665 | + esac |
666 | + fi |
667 | + if [ "${HP_ARCH}" = "" ]; then |
668 | + eval $set_cc_for_build |
669 | + sed 's/^ //' << EOF >$dummy.c |
670 | + |
671 | + #define _HPUX_SOURCE |
672 | + #include <stdlib.h> |
673 | + #include <unistd.h> |
674 | + |
675 | + int main () |
676 | + { |
677 | + #if defined(_SC_KERNEL_BITS) |
678 | + long bits = sysconf(_SC_KERNEL_BITS); |
679 | + #endif |
680 | + long cpu = sysconf (_SC_CPU_VERSION); |
681 | + |
682 | + switch (cpu) |
683 | + { |
684 | + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; |
685 | + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; |
686 | + case CPU_PA_RISC2_0: |
687 | + #if defined(_SC_KERNEL_BITS) |
688 | + switch (bits) |
689 | + { |
690 | + case 64: puts ("hppa2.0w"); break; |
691 | + case 32: puts ("hppa2.0n"); break; |
692 | + default: puts ("hppa2.0"); break; |
693 | + } break; |
694 | + #else /* !defined(_SC_KERNEL_BITS) */ |
695 | + puts ("hppa2.0"); break; |
696 | + #endif |
697 | + default: puts ("hppa1.0"); break; |
698 | + } |
699 | + exit (0); |
700 | + } |
701 | +EOF |
702 | + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
703 | + test -z "$HP_ARCH" && HP_ARCH=hppa |
704 | + fi ;; |
705 | esac |
706 | - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
707 | + if [ ${HP_ARCH} = "hppa2.0w" ] |
708 | + then |
709 | + # avoid double evaluation of $set_cc_for_build |
710 | + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build |
711 | + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null |
712 | + then |
713 | + HP_ARCH="hppa2.0w" |
714 | + else |
715 | + HP_ARCH="hppa64" |
716 | + fi |
717 | + fi |
718 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
719 | exit 0 ;; |
720 | + ia64:HP-UX:*:*) |
721 | + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
722 | + echo ia64-hp-hpux${HPUX_REV} |
723 | + exit 0 ;; |
724 | 3050*:HI-UX:*:*) |
725 | - sed 's/^ //' << EOF >dummy.c |
726 | + eval $set_cc_for_build |
727 | + sed 's/^ //' << EOF >$dummy.c |
728 | #include <unistd.h> |
729 | int |
730 | main () |
731 | @@ -390,8 +690,7 @@ |
732 | exit (0); |
733 | } |
734 | EOF |
735 | - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 |
736 | - rm -f dummy.c dummy |
737 | + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 |
738 | echo unknown-hitachi-hiuxwe2 |
739 | exit 0 ;; |
740 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) |
741 | @@ -400,13 +699,16 @@ |
742 | 9000/8??:4.3bsd:*:*) |
743 | echo hppa1.0-hp-bsd |
744 | exit 0 ;; |
745 | + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
746 | + echo hppa1.0-hp-mpeix |
747 | + exit 0 ;; |
748 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) |
749 | echo hppa1.1-hp-osf |
750 | exit 0 ;; |
751 | hp8??:OSF1:*:*) |
752 | echo hppa1.0-hp-osf |
753 | exit 0 ;; |
754 | - i?86:OSF1:*:*) |
755 | + i*86:OSF1:*:*) |
756 | if [ -x /usr/sbin/sysversion ] ; then |
757 | echo ${UNAME_MACHINE}-unknown-osf1mk |
758 | else |
759 | @@ -434,196 +736,259 @@ |
760 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
761 | echo c4-convex-bsd |
762 | exit 0 ;; |
763 | - CRAY*X-MP:*:*:*) |
764 | - echo xmp-cray-unicos |
765 | - exit 0 ;; |
766 | CRAY*Y-MP:*:*:*) |
767 | - echo ymp-cray-unicos${UNAME_RELEASE} |
768 | + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
769 | exit 0 ;; |
770 | CRAY*[A-Z]90:*:*:*) |
771 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ |
772 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
773 | - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ |
774 | + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
775 | + -e 's/\.[^.]*$/.X/' |
776 | exit 0 ;; |
777 | CRAY*TS:*:*:*) |
778 | - echo t90-cray-unicos${UNAME_RELEASE} |
779 | + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
780 | exit 0 ;; |
781 | - CRAY-2:*:*:*) |
782 | - echo cray2-cray-unicos |
783 | - exit 0 ;; |
784 | - F300:UNIX_System_V:*:*) |
785 | - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` |
786 | + CRAY*T3E:*:*:*) |
787 | + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
788 | + exit 0 ;; |
789 | + CRAY*SV1:*:*:*) |
790 | + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
791 | + exit 0 ;; |
792 | + *:UNICOS/mp:*:*) |
793 | + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
794 | + exit 0 ;; |
795 | + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
796 | + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
797 | + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
798 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
799 | - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
800 | + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
801 | exit 0 ;; |
802 | - F301:UNIX_System_V:*:*) |
803 | - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` |
804 | - exit 0 ;; |
805 | - hp3[0-9][05]:NetBSD:*:*) |
806 | - echo m68k-hp-netbsd${UNAME_RELEASE} |
807 | + 5000:UNIX_System_V:4.*:*) |
808 | + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
809 | + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` |
810 | + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
811 | exit 0 ;; |
812 | - hp300:OpenBSD:*:*) |
813 | - echo m68k-unknown-openbsd${UNAME_RELEASE} |
814 | - exit 0 ;; |
815 | - i?86:BSD/386:*:* | *:BSD/OS:*:*) |
816 | + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
817 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
818 | exit 0 ;; |
819 | - *:FreeBSD:*:*) |
820 | - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
821 | + sparc*:BSD/OS:*:*) |
822 | + echo sparc-unknown-bsdi${UNAME_RELEASE} |
823 | exit 0 ;; |
824 | - *:NetBSD:*:*) |
825 | - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
826 | + *:BSD/OS:*:*) |
827 | + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |
828 | exit 0 ;; |
829 | - *:OpenBSD:*:*) |
830 | - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
831 | + *:FreeBSD:*:*) |
832 | + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
833 | exit 0 ;; |
834 | i*:CYGWIN*:*) |
835 | - echo i386-pc-cygwin32 |
836 | + echo ${UNAME_MACHINE}-pc-cygwin |
837 | exit 0 ;; |
838 | i*:MINGW*:*) |
839 | - echo i386-pc-mingw32 |
840 | + echo ${UNAME_MACHINE}-pc-mingw32 |
841 | + exit 0 ;; |
842 | + i*:PW*:*) |
843 | + echo ${UNAME_MACHINE}-pc-pw32 |
844 | + exit 0 ;; |
845 | + x86:Interix*:[34]*) |
846 | + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' |
847 | + exit 0 ;; |
848 | + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) |
849 | + echo i${UNAME_MACHINE}-pc-mks |
850 | + exit 0 ;; |
851 | + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) |
852 | + # How do we know it's Interix rather than the generic POSIX subsystem? |
853 | + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we |
854 | + # UNAME_MACHINE based on the output of uname instead of i386? |
855 | + echo i586-pc-interix |
856 | + exit 0 ;; |
857 | + i*:UWIN*:*) |
858 | + echo ${UNAME_MACHINE}-pc-uwin |
859 | exit 0 ;; |
860 | p*:CYGWIN*:*) |
861 | - echo powerpcle-unknown-cygwin32 |
862 | + echo powerpcle-unknown-cygwin |
863 | exit 0 ;; |
864 | prep*:SunOS:5.*:*) |
865 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
866 | exit 0 ;; |
867 | *:GNU:*:*) |
868 | + # the GNU system |
869 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
870 | exit 0 ;; |
871 | - *:Linux:*:*) |
872 | + *:GNU/*:*:*) |
873 | + # other systems with GNU libc and userland |
874 | + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu |
875 | + exit 0 ;; |
876 | + i*86:Minix:*:*) |
877 | + echo ${UNAME_MACHINE}-pc-minix |
878 | + exit 0 ;; |
879 | + arm*:Linux:*:*) |
880 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
881 | + exit 0 ;; |
882 | + cris:Linux:*:*) |
883 | + echo cris-axis-linux-gnu |
884 | + exit 0 ;; |
885 | + crisv32:Linux:*:*) |
886 | + echo crisv32-axis-linux-gnu |
887 | + exit 0 ;; |
888 | + frv:Linux:*:*) |
889 | + echo frv-unknown-linux-gnu |
890 | + exit 0 ;; |
891 | + ia64:Linux:*:*) |
892 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
893 | + exit 0 ;; |
894 | + m32r*:Linux:*:*) |
895 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
896 | + exit 0 ;; |
897 | + m68*:Linux:*:*) |
898 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
899 | + exit 0 ;; |
900 | + mips:Linux:*:*) |
901 | + eval $set_cc_for_build |
902 | + sed 's/^ //' << EOF >$dummy.c |
903 | + #undef CPU |
904 | + #undef mips |
905 | + #undef mipsel |
906 | + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
907 | + CPU=mipsel |
908 | + #else |
909 | + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
910 | + CPU=mips |
911 | + #else |
912 | + CPU= |
913 | + #endif |
914 | + #endif |
915 | +EOF |
916 | + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` |
917 | + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 |
918 | + ;; |
919 | + mips64:Linux:*:*) |
920 | + eval $set_cc_for_build |
921 | + sed 's/^ //' << EOF >$dummy.c |
922 | + #undef CPU |
923 | + #undef mips64 |
924 | + #undef mips64el |
925 | + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
926 | + CPU=mips64el |
927 | + #else |
928 | + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
929 | + CPU=mips64 |
930 | + #else |
931 | + CPU= |
932 | + #endif |
933 | + #endif |
934 | +EOF |
935 | + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` |
936 | + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 |
937 | + ;; |
938 | + ppc:Linux:*:*) |
939 | + echo powerpc-unknown-linux-gnu |
940 | + exit 0 ;; |
941 | + ppc64:Linux:*:*) |
942 | + echo powerpc64-unknown-linux-gnu |
943 | + exit 0 ;; |
944 | + alpha:Linux:*:*) |
945 | + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
946 | + EV5) UNAME_MACHINE=alphaev5 ;; |
947 | + EV56) UNAME_MACHINE=alphaev56 ;; |
948 | + PCA56) UNAME_MACHINE=alphapca56 ;; |
949 | + PCA57) UNAME_MACHINE=alphapca56 ;; |
950 | + EV6) UNAME_MACHINE=alphaev6 ;; |
951 | + EV67) UNAME_MACHINE=alphaev67 ;; |
952 | + EV68*) UNAME_MACHINE=alphaev68 ;; |
953 | + esac |
954 | + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null |
955 | + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi |
956 | + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} |
957 | + exit 0 ;; |
958 | + parisc:Linux:*:* | hppa:Linux:*:*) |
959 | + # Look for CPU level |
960 | + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
961 | + PA7*) echo hppa1.1-unknown-linux-gnu ;; |
962 | + PA8*) echo hppa2.0-unknown-linux-gnu ;; |
963 | + *) echo hppa-unknown-linux-gnu ;; |
964 | + esac |
965 | + exit 0 ;; |
966 | + parisc64:Linux:*:* | hppa64:Linux:*:*) |
967 | + echo hppa64-unknown-linux-gnu |
968 | + exit 0 ;; |
969 | + s390:Linux:*:* | s390x:Linux:*:*) |
970 | + echo ${UNAME_MACHINE}-ibm-linux |
971 | + exit 0 ;; |
972 | + sh64*:Linux:*:*) |
973 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
974 | + exit 0 ;; |
975 | + sh*:Linux:*:*) |
976 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
977 | + exit 0 ;; |
978 | + sparc:Linux:*:* | sparc64:Linux:*:*) |
979 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
980 | + exit 0 ;; |
981 | + x86_64:Linux:*:*) |
982 | + echo x86_64-unknown-linux-gnu |
983 | + exit 0 ;; |
984 | + i*86:Linux:*:*) |
985 | # The BFD linker knows what the default object file format is, so |
986 | - # first see if it will tell us. |
987 | - ld_help_string=`ld --help 2>&1` |
988 | - ld_supported_emulations=`echo $ld_help_string \ |
989 | - | sed -ne '/supported emulations:/!d |
990 | + # first see if it will tell us. cd to the root directory to prevent |
991 | + # problems with other programs or directories called `ld' in the path. |
992 | + # Set LC_ALL=C to ensure ld outputs messages in English. |
993 | + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ |
994 | + | sed -ne '/supported targets:/!d |
995 | s/[ ][ ]*/ /g |
996 | - s/.*supported emulations: *// |
997 | + s/.*supported targets: *// |
998 | s/ .*// |
999 | p'` |
1000 | - case "$ld_supported_emulations" in |
1001 | - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; |
1002 | - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; |
1003 | - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; |
1004 | - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; |
1005 | - elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; |
1006 | - esac |
1007 | - |
1008 | - if test "${UNAME_MACHINE}" = "alpha" ; then |
1009 | - sed 's/^ //' <<EOF >dummy.s |
1010 | - .globl main |
1011 | - .ent main |
1012 | - main: |
1013 | - .frame \$30,0,\$26,0 |
1014 | - .prologue 0 |
1015 | - .long 0x47e03d80 # implver $0 |
1016 | - lda \$2,259 |
1017 | - .long 0x47e20c21 # amask $2,$1 |
1018 | - srl \$1,8,\$2 |
1019 | - sll \$2,2,\$2 |
1020 | - sll \$0,3,\$0 |
1021 | - addl \$1,\$0,\$0 |
1022 | - addl \$2,\$0,\$0 |
1023 | - ret \$31,(\$26),1 |
1024 | - .end main |
1025 | -EOF |
1026 | - LIBC="" |
1027 | - ${CC-cc} dummy.s -o dummy 2>/dev/null |
1028 | - if test "$?" = 0 ; then |
1029 | - ./dummy |
1030 | - case "$?" in |
1031 | - 7) |
1032 | - UNAME_MACHINE="alpha" |
1033 | - ;; |
1034 | - 15) |
1035 | - UNAME_MACHINE="alphaev5" |
1036 | - ;; |
1037 | - 14) |
1038 | - UNAME_MACHINE="alphaev56" |
1039 | - ;; |
1040 | - 10) |
1041 | - UNAME_MACHINE="alphapca56" |
1042 | - ;; |
1043 | - 16) |
1044 | - UNAME_MACHINE="alphaev6" |
1045 | - ;; |
1046 | - esac |
1047 | - |
1048 | - objdump --private-headers dummy | \ |
1049 | - grep ld.so.1 > /dev/null |
1050 | - if test "$?" = 0 ; then |
1051 | - LIBC="libc1" |
1052 | - fi |
1053 | - fi |
1054 | - rm -f dummy.s dummy |
1055 | - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 |
1056 | - elif test "${UNAME_MACHINE}" = "mips" ; then |
1057 | - cat >dummy.c <<EOF |
1058 | -main(argc, argv) |
1059 | - int argc; |
1060 | - char *argv[]; |
1061 | -{ |
1062 | -#ifdef __MIPSEB__ |
1063 | - printf ("%s-unknown-linux-gnu\n", argv[1]); |
1064 | -#endif |
1065 | -#ifdef __MIPSEL__ |
1066 | - printf ("%sel-unknown-linux-gnu\n", argv[1]); |
1067 | -#endif |
1068 | - return 0; |
1069 | -} |
1070 | -EOF |
1071 | - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 |
1072 | - rm -f dummy.c dummy |
1073 | - else |
1074 | - # Either a pre-BFD a.out linker (linux-gnuoldld) |
1075 | - # or one that does not give us useful --help. |
1076 | - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. |
1077 | - # If ld does not provide *any* "supported emulations:" |
1078 | - # that means it is gnuoldld. |
1079 | - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" |
1080 | - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 |
1081 | - |
1082 | - case "${UNAME_MACHINE}" in |
1083 | - i?86) |
1084 | - VENDOR=pc; |
1085 | - ;; |
1086 | - *) |
1087 | - VENDOR=unknown; |
1088 | - ;; |
1089 | - esac |
1090 | - # Determine whether the default compiler is a.out or elf |
1091 | - cat >dummy.c <<EOF |
1092 | -#include <features.h> |
1093 | -main(argc, argv) |
1094 | - int argc; |
1095 | - char *argv[]; |
1096 | -{ |
1097 | -#ifdef __ELF__ |
1098 | -# ifdef __GLIBC__ |
1099 | -# if __GLIBC__ >= 2 |
1100 | - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); |
1101 | -# else |
1102 | - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); |
1103 | -# endif |
1104 | -# else |
1105 | - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); |
1106 | -# endif |
1107 | -#else |
1108 | - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); |
1109 | -#endif |
1110 | - return 0; |
1111 | -} |
1112 | + case "$ld_supported_targets" in |
1113 | + elf32-i386) |
1114 | + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" |
1115 | + ;; |
1116 | + a.out-i386-linux) |
1117 | + echo "${UNAME_MACHINE}-pc-linux-gnuaout" |
1118 | + exit 0 ;; |
1119 | + coff-i386) |
1120 | + echo "${UNAME_MACHINE}-pc-linux-gnucoff" |
1121 | + exit 0 ;; |
1122 | + "") |
1123 | + # Either a pre-BFD a.out linker (linux-gnuoldld) or |
1124 | + # one that does not give us useful --help. |
1125 | + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" |
1126 | + exit 0 ;; |
1127 | + esac |
1128 | + # Determine whether the default compiler is a.out or elf |
1129 | + eval $set_cc_for_build |
1130 | + sed 's/^ //' << EOF >$dummy.c |
1131 | + #include <features.h> |
1132 | + #ifdef __ELF__ |
1133 | + # ifdef __GLIBC__ |
1134 | + # if __GLIBC__ >= 2 |
1135 | + LIBC=gnu |
1136 | + # else |
1137 | + LIBC=gnulibc1 |
1138 | + # endif |
1139 | + # else |
1140 | + LIBC=gnulibc1 |
1141 | + # endif |
1142 | + #else |
1143 | + #ifdef __INTEL_COMPILER |
1144 | + LIBC=gnu |
1145 | + #else |
1146 | + LIBC=gnuaout |
1147 | + #endif |
1148 | + #endif |
1149 | + #ifdef __dietlibc__ |
1150 | + LIBC=dietlibc |
1151 | + #endif |
1152 | EOF |
1153 | - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 |
1154 | - rm -f dummy.c dummy |
1155 | - fi ;; |
1156 | -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions |
1157 | -# are messed up and put the nodename in both sysname and nodename. |
1158 | - i?86:DYNIX/ptx:4*:*) |
1159 | + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` |
1160 | + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 |
1161 | + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 |
1162 | + ;; |
1163 | + i*86:DYNIX/ptx:4*:*) |
1164 | + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1165 | + # earlier versions are messed up and put the nodename in both |
1166 | + # sysname and nodename. |
1167 | echo i386-sequent-sysv4 |
1168 | exit 0 ;; |
1169 | - i?86:UNIX_SV:4.2MP:2.*) |
1170 | + i*86:UNIX_SV:4.2MP:2.*) |
1171 | # Unixware is an offshoot of SVR4, but it has its own version |
1172 | # number series starting with 2... |
1173 | # I am not positive that other SVR4 systems won't match this, |
1174 | @@ -631,28 +996,62 @@ |
1175 | # Use sysv4.2uw... so that sysv4* matches it. |
1176 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} |
1177 | exit 0 ;; |
1178 | - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) |
1179 | + i*86:OS/2:*:*) |
1180 | + # If we were able to find `uname', then EMX Unix compatibility |
1181 | + # is probably installed. |
1182 | + echo ${UNAME_MACHINE}-pc-os2-emx |
1183 | + exit 0 ;; |
1184 | + i*86:XTS-300:*:STOP) |
1185 | + echo ${UNAME_MACHINE}-unknown-stop |
1186 | + exit 0 ;; |
1187 | + i*86:atheos:*:*) |
1188 | + echo ${UNAME_MACHINE}-unknown-atheos |
1189 | + exit 0 ;; |
1190 | + i*86:syllable:*:*) |
1191 | + echo ${UNAME_MACHINE}-pc-syllable |
1192 | + exit 0 ;; |
1193 | + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) |
1194 | + echo i386-unknown-lynxos${UNAME_RELEASE} |
1195 | + exit 0 ;; |
1196 | + i*86:*DOS:*:*) |
1197 | + echo ${UNAME_MACHINE}-pc-msdosdjgpp |
1198 | + exit 0 ;; |
1199 | + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) |
1200 | + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` |
1201 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
1202 | - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} |
1203 | + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} |
1204 | else |
1205 | - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} |
1206 | + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} |
1207 | fi |
1208 | exit 0 ;; |
1209 | - i?86:*:3.2:*) |
1210 | + i*86:*:5:[78]*) |
1211 | + case `/bin/uname -X | grep "^Machine"` in |
1212 | + *486*) UNAME_MACHINE=i486 ;; |
1213 | + *Pentium) UNAME_MACHINE=i586 ;; |
1214 | + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1215 | + esac |
1216 | + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} |
1217 | + exit 0 ;; |
1218 | + i*86:*:3.2:*) |
1219 | if test -f /usr/options/cb.name; then |
1220 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
1221 | echo ${UNAME_MACHINE}-pc-isc$UNAME_REL |
1222 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
1223 | - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` |
1224 | - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 |
1225 | - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ |
1226 | + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
1227 | + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
1228 | + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ |
1229 | && UNAME_MACHINE=i586 |
1230 | + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ |
1231 | + && UNAME_MACHINE=i686 |
1232 | + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
1233 | + && UNAME_MACHINE=i686 |
1234 | echo ${UNAME_MACHINE}-pc-sco$UNAME_REL |
1235 | else |
1236 | echo ${UNAME_MACHINE}-pc-sysv32 |
1237 | fi |
1238 | exit 0 ;; |
1239 | pc:*:*:*) |
1240 | + # Left here for compatibility: |
1241 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
1242 | # the processor, so we play safe by assuming i386. |
1243 | echo i386-pc-msdosdjgpp |
1244 | @@ -674,9 +1073,15 @@ |
1245 | # "miniframe" |
1246 | echo m68010-convergent-sysv |
1247 | exit 0 ;; |
1248 | - M68*:*:R3V[567]*:*) |
1249 | + mc68k:UNIX:SYSTEM5:3.51m) |
1250 | + echo m68k-convergent-sysv |
1251 | + exit 0 ;; |
1252 | + M680?0:D-NIX:5.3:*) |
1253 | + echo m68k-diab-dnix |
1254 | + exit 0 ;; |
1255 | + M68*:*:R3V[5678]*:*) |
1256 | test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; |
1257 | - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) |
1258 | + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) |
1259 | OS_REL='' |
1260 | test -r /etc/.relid \ |
1261 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1262 | @@ -687,24 +1092,27 @@ |
1263 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
1264 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1265 | && echo i486-ncr-sysv4 && exit 0 ;; |
1266 | - m68*:LynxOS:2.*:*) |
1267 | + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
1268 | echo m68k-unknown-lynxos${UNAME_RELEASE} |
1269 | exit 0 ;; |
1270 | mc68030:UNIX_System_V:4.*:*) |
1271 | echo m68k-atari-sysv4 |
1272 | exit 0 ;; |
1273 | - i?86:LynxOS:2.*:*) |
1274 | - echo i386-unknown-lynxos${UNAME_RELEASE} |
1275 | - exit 0 ;; |
1276 | TSUNAMI:LynxOS:2.*:*) |
1277 | echo sparc-unknown-lynxos${UNAME_RELEASE} |
1278 | exit 0 ;; |
1279 | - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) |
1280 | + rs6000:LynxOS:2.*:*) |
1281 | echo rs6000-unknown-lynxos${UNAME_RELEASE} |
1282 | exit 0 ;; |
1283 | + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) |
1284 | + echo powerpc-unknown-lynxos${UNAME_RELEASE} |
1285 | + exit 0 ;; |
1286 | SM[BE]S:UNIX_SV:*:*) |
1287 | echo mips-dde-sysv${UNAME_RELEASE} |
1288 | exit 0 ;; |
1289 | + RM*:ReliantUNIX-*:*:*) |
1290 | + echo mips-sni-sysv4 |
1291 | + exit 0 ;; |
1292 | RM*:SINIX-*:*:*) |
1293 | echo mips-sni-sysv4 |
1294 | exit 0 ;; |
1295 | @@ -716,8 +1124,8 @@ |
1296 | echo ns32k-sni-sysv |
1297 | fi |
1298 | exit 0 ;; |
1299 | - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
1300 | - # says <Richard.M.Bartel@ccMail.Census.GOV> |
1301 | + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
1302 | + # says <Richard.M.Bartel@ccMail.Census.GOV> |
1303 | echo i586-unisys-sysv4 |
1304 | exit 0 ;; |
1305 | *:UNIX_System_V:4*:FTX*) |
1306 | @@ -729,25 +1137,130 @@ |
1307 | # From seanf@swdc.stratus.com. |
1308 | echo i860-stratus-sysv4 |
1309 | exit 0 ;; |
1310 | + *:VOS:*:*) |
1311 | + # From Paul.Green@stratus.com. |
1312 | + echo hppa1.1-stratus-vos |
1313 | + exit 0 ;; |
1314 | mc68*:A/UX:*:*) |
1315 | echo m68k-apple-aux${UNAME_RELEASE} |
1316 | exit 0 ;; |
1317 | - news*:NEWS-OS:*:6*) |
1318 | + news*:NEWS-OS:6*:*) |
1319 | echo mips-sony-newsos6 |
1320 | exit 0 ;; |
1321 | - R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) |
1322 | + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1323 | if [ -d /usr/nec ]; then |
1324 | echo mips-nec-sysv${UNAME_RELEASE} |
1325 | else |
1326 | echo mips-unknown-sysv${UNAME_RELEASE} |
1327 | fi |
1328 | exit 0 ;; |
1329 | + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1330 | + echo powerpc-be-beos |
1331 | + exit 0 ;; |
1332 | + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
1333 | + echo powerpc-apple-beos |
1334 | + exit 0 ;; |
1335 | + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
1336 | + echo i586-pc-beos |
1337 | + exit 0 ;; |
1338 | + SX-4:SUPER-UX:*:*) |
1339 | + echo sx4-nec-superux${UNAME_RELEASE} |
1340 | + exit 0 ;; |
1341 | + SX-5:SUPER-UX:*:*) |
1342 | + echo sx5-nec-superux${UNAME_RELEASE} |
1343 | + exit 0 ;; |
1344 | + SX-6:SUPER-UX:*:*) |
1345 | + echo sx6-nec-superux${UNAME_RELEASE} |
1346 | + exit 0 ;; |
1347 | + Power*:Rhapsody:*:*) |
1348 | + echo powerpc-apple-rhapsody${UNAME_RELEASE} |
1349 | + exit 0 ;; |
1350 | + *:Rhapsody:*:*) |
1351 | + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} |
1352 | + exit 0 ;; |
1353 | + *:Darwin:*:*) |
1354 | + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
1355 | + case $UNAME_PROCESSOR in |
1356 | + *86) UNAME_PROCESSOR=i686 ;; |
1357 | + unknown) UNAME_PROCESSOR=powerpc ;; |
1358 | + esac |
1359 | + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
1360 | + exit 0 ;; |
1361 | + *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1362 | + UNAME_PROCESSOR=`uname -p` |
1363 | + if test "$UNAME_PROCESSOR" = "x86"; then |
1364 | + UNAME_PROCESSOR=i386 |
1365 | + UNAME_MACHINE=pc |
1366 | + fi |
1367 | + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} |
1368 | + exit 0 ;; |
1369 | + *:QNX:*:4*) |
1370 | + echo i386-pc-qnx |
1371 | + exit 0 ;; |
1372 | + NSR-?:NONSTOP_KERNEL:*:*) |
1373 | + echo nsr-tandem-nsk${UNAME_RELEASE} |
1374 | + exit 0 ;; |
1375 | + *:NonStop-UX:*:*) |
1376 | + echo mips-compaq-nonstopux |
1377 | + exit 0 ;; |
1378 | + BS2000:POSIX*:*:*) |
1379 | + echo bs2000-siemens-sysv |
1380 | + exit 0 ;; |
1381 | + DS/*:UNIX_System_V:*:*) |
1382 | + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} |
1383 | + exit 0 ;; |
1384 | + *:Plan9:*:*) |
1385 | + # "uname -m" is not consistent, so use $cputype instead. 386 |
1386 | + # is converted to i386 for consistency with other x86 |
1387 | + # operating systems. |
1388 | + if test "$cputype" = "386"; then |
1389 | + UNAME_MACHINE=i386 |
1390 | + else |
1391 | + UNAME_MACHINE="$cputype" |
1392 | + fi |
1393 | + echo ${UNAME_MACHINE}-unknown-plan9 |
1394 | + exit 0 ;; |
1395 | + *:TOPS-10:*:*) |
1396 | + echo pdp10-unknown-tops10 |
1397 | + exit 0 ;; |
1398 | + *:TENEX:*:*) |
1399 | + echo pdp10-unknown-tenex |
1400 | + exit 0 ;; |
1401 | + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
1402 | + echo pdp10-dec-tops20 |
1403 | + exit 0 ;; |
1404 | + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
1405 | + echo pdp10-xkl-tops20 |
1406 | + exit 0 ;; |
1407 | + *:TOPS-20:*:*) |
1408 | + echo pdp10-unknown-tops20 |
1409 | + exit 0 ;; |
1410 | + *:ITS:*:*) |
1411 | + echo pdp10-unknown-its |
1412 | + exit 0 ;; |
1413 | + SEI:*:*:SEIUX) |
1414 | + echo mips-sei-seiux${UNAME_RELEASE} |
1415 | + exit 0 ;; |
1416 | + *:DragonFly:*:*) |
1417 | + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
1418 | + exit 0 ;; |
1419 | + *:*VMS:*:*) |
1420 | + UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1421 | + case "${UNAME_MACHINE}" in |
1422 | + A*) echo alpha-dec-vms && exit 0 ;; |
1423 | + I*) echo ia64-dec-vms && exit 0 ;; |
1424 | + V*) echo vax-dec-vms && exit 0 ;; |
1425 | + esac ;; |
1426 | + *:XENIX:*:SysV) |
1427 | + echo i386-pc-xenix |
1428 | + exit 0 ;; |
1429 | esac |
1430 | |
1431 | #echo '(No uname command or uname output not recognized.)' 1>&2 |
1432 | #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 |
1433 | |
1434 | -cat >dummy.c <<EOF |
1435 | +eval $set_cc_for_build |
1436 | +cat >$dummy.c <<EOF |
1437 | #ifdef _SEQUENT_ |
1438 | # include <sys/types.h> |
1439 | # include <sys/utsname.h> |
1440 | @@ -785,7 +1298,10 @@ |
1441 | #endif |
1442 | int version; |
1443 | version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; |
1444 | - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
1445 | + if (version < 4) |
1446 | + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
1447 | + else |
1448 | + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); |
1449 | exit (0); |
1450 | #endif |
1451 | |
1452 | @@ -830,11 +1346,24 @@ |
1453 | #endif |
1454 | |
1455 | #if defined (vax) |
1456 | -#if !defined (ultrix) |
1457 | - printf ("vax-dec-bsd\n"); exit (0); |
1458 | -#else |
1459 | - printf ("vax-dec-ultrix\n"); exit (0); |
1460 | -#endif |
1461 | +# if !defined (ultrix) |
1462 | +# include <sys/param.h> |
1463 | +# if defined (BSD) |
1464 | +# if BSD == 43 |
1465 | + printf ("vax-dec-bsd4.3\n"); exit (0); |
1466 | +# else |
1467 | +# if BSD == 199006 |
1468 | + printf ("vax-dec-bsd4.3reno\n"); exit (0); |
1469 | +# else |
1470 | + printf ("vax-dec-bsd\n"); exit (0); |
1471 | +# endif |
1472 | +# endif |
1473 | +# else |
1474 | + printf ("vax-dec-bsd\n"); exit (0); |
1475 | +# endif |
1476 | +# else |
1477 | + printf ("vax-dec-ultrix\n"); exit (0); |
1478 | +# endif |
1479 | #endif |
1480 | |
1481 | #if defined (alliant) && defined (i860) |
1482 | @@ -845,8 +1374,7 @@ |
1483 | } |
1484 | EOF |
1485 | |
1486 | -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 |
1487 | -rm -f dummy.c dummy |
1488 | +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 |
1489 | |
1490 | # Apollos put the system type in the environment. |
1491 | |
1492 | @@ -878,6 +1406,48 @@ |
1493 | esac |
1494 | fi |
1495 | |
1496 | -#echo '(Unable to guess system type)' 1>&2 |
1497 | +cat >&2 <<EOF |
1498 | +$0: unable to guess system type |
1499 | + |
1500 | +This script, last modified $timestamp, has failed to recognize |
1501 | +the operating system you are using. It is advised that you |
1502 | +download the most up to date version of the config scripts from |
1503 | + |
1504 | + ftp://ftp.gnu.org/pub/gnu/config/ |
1505 | + |
1506 | +If the version you run ($0) is already up to date, please |
1507 | +send the following data and any information you think might be |
1508 | +pertinent to <config-patches@gnu.org> in order to provide the needed |
1509 | +information to handle your system. |
1510 | + |
1511 | +config.guess timestamp = $timestamp |
1512 | + |
1513 | +uname -m = `(uname -m) 2>/dev/null || echo unknown` |
1514 | +uname -r = `(uname -r) 2>/dev/null || echo unknown` |
1515 | +uname -s = `(uname -s) 2>/dev/null || echo unknown` |
1516 | +uname -v = `(uname -v) 2>/dev/null || echo unknown` |
1517 | + |
1518 | +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` |
1519 | +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` |
1520 | + |
1521 | +hostinfo = `(hostinfo) 2>/dev/null` |
1522 | +/bin/universe = `(/bin/universe) 2>/dev/null` |
1523 | +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` |
1524 | +/bin/arch = `(/bin/arch) 2>/dev/null` |
1525 | +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` |
1526 | +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` |
1527 | + |
1528 | +UNAME_MACHINE = ${UNAME_MACHINE} |
1529 | +UNAME_RELEASE = ${UNAME_RELEASE} |
1530 | +UNAME_SYSTEM = ${UNAME_SYSTEM} |
1531 | +UNAME_VERSION = ${UNAME_VERSION} |
1532 | +EOF |
1533 | |
1534 | exit 1 |
1535 | + |
1536 | +# Local variables: |
1537 | +# eval: (add-hook 'write-file-hooks 'time-stamp) |
1538 | +# time-stamp-start: "timestamp='" |
1539 | +# time-stamp-format: "%:y-%02m-%02d" |
1540 | +# time-stamp-end: "'" |
1541 | +# End: |
1542 | diff -Naur jpeg-6b.orig/config.sub jpeg-6b/config.sub |
1543 | --- jpeg-6b.orig/config.sub 1998-03-25 15:25:39.000000000 +0000 |
1544 | +++ jpeg-6b/config.sub 2006-06-21 15:41:49.000000000 +0000 |
1545 | @@ -1,6 +1,10 @@ |
1546 | #! /bin/sh |
1547 | -# Configuration validation subroutine script, version 1.1. |
1548 | -# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. |
1549 | +# Configuration validation subroutine script. |
1550 | +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
1551 | +# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
1552 | + |
1553 | +timestamp='2004-11-30' |
1554 | + |
1555 | # This file is (in principle) common to ALL GNU software. |
1556 | # The presence of a machine in this file suggests that SOME GNU software |
1557 | # can handle that machine. It does not imply ALL GNU software can. |
1558 | @@ -25,6 +29,9 @@ |
1559 | # configuration script generated by Autoconf, you may include it under |
1560 | # the same distribution terms that you use for the rest of that program. |
1561 | |
1562 | +# Please send patches to <config-patches@gnu.org>. Submit a context |
1563 | +# diff and a properly formatted ChangeLog entry. |
1564 | +# |
1565 | # Configuration subroutine to validate and canonicalize a configuration type. |
1566 | # Supply the specified configuration type as an argument. |
1567 | # If it is invalid, we print an error message on stderr and exit with code 1. |
1568 | @@ -45,30 +52,74 @@ |
1569 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
1570 | # It is wrong to echo any other type of specification. |
1571 | |
1572 | -if [ x$1 = x ] |
1573 | -then |
1574 | - echo Configuration name missing. 1>&2 |
1575 | - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 |
1576 | - echo "or $0 ALIAS" 1>&2 |
1577 | - echo where ALIAS is a recognized configuration type. 1>&2 |
1578 | - exit 1 |
1579 | -fi |
1580 | +me=`echo "$0" | sed -e 's,.*/,,'` |
1581 | |
1582 | -# First pass through any local machine types. |
1583 | -case $1 in |
1584 | - *local*) |
1585 | - echo $1 |
1586 | - exit 0 |
1587 | - ;; |
1588 | - *) |
1589 | - ;; |
1590 | +usage="\ |
1591 | +Usage: $0 [OPTION] CPU-MFR-OPSYS |
1592 | + $0 [OPTION] ALIAS |
1593 | + |
1594 | +Canonicalize a configuration name. |
1595 | + |
1596 | +Operation modes: |
1597 | + -h, --help print this help, then exit |
1598 | + -t, --time-stamp print date of last modification, then exit |
1599 | + -v, --version print version number, then exit |
1600 | + |
1601 | +Report bugs and patches to <config-patches@gnu.org>." |
1602 | + |
1603 | +version="\ |
1604 | +GNU config.sub ($timestamp) |
1605 | + |
1606 | +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
1607 | +Free Software Foundation, Inc. |
1608 | + |
1609 | +This is free software; see the source for copying conditions. There is NO |
1610 | +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
1611 | + |
1612 | +help=" |
1613 | +Try \`$me --help' for more information." |
1614 | + |
1615 | +# Parse command line |
1616 | +while test $# -gt 0 ; do |
1617 | + case $1 in |
1618 | + --time-stamp | --time* | -t ) |
1619 | + echo "$timestamp" ; exit 0 ;; |
1620 | + --version | -v ) |
1621 | + echo "$version" ; exit 0 ;; |
1622 | + --help | --h* | -h ) |
1623 | + echo "$usage"; exit 0 ;; |
1624 | + -- ) # Stop option processing |
1625 | + shift; break ;; |
1626 | + - ) # Use stdin as input. |
1627 | + break ;; |
1628 | + -* ) |
1629 | + echo "$me: invalid option $1$help" |
1630 | + exit 1 ;; |
1631 | + |
1632 | + *local*) |
1633 | + # First pass through any local machine types. |
1634 | + echo $1 |
1635 | + exit 0;; |
1636 | + |
1637 | + * ) |
1638 | + break ;; |
1639 | + esac |
1640 | +done |
1641 | + |
1642 | +case $# in |
1643 | + 0) echo "$me: missing argument$help" >&2 |
1644 | + exit 1;; |
1645 | + 1) ;; |
1646 | + *) echo "$me: too many arguments$help" >&2 |
1647 | + exit 1;; |
1648 | esac |
1649 | |
1650 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). |
1651 | # Here we must recognize all the valid KERNEL-OS combinations. |
1652 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
1653 | case $maybe_os in |
1654 | - linux-gnu*) |
1655 | + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ |
1656 | + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) |
1657 | os=-$maybe_os |
1658 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` |
1659 | ;; |
1660 | @@ -94,15 +145,33 @@ |
1661 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
1662 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ |
1663 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
1664 | - -apple) |
1665 | + -apple | -axis | -knuth | -cray) |
1666 | os= |
1667 | basic_machine=$1 |
1668 | ;; |
1669 | + -sim | -cisco | -oki | -wec | -winbond) |
1670 | + os= |
1671 | + basic_machine=$1 |
1672 | + ;; |
1673 | + -scout) |
1674 | + ;; |
1675 | + -wrs) |
1676 | + os=-vxworks |
1677 | + basic_machine=$1 |
1678 | + ;; |
1679 | + -chorusos*) |
1680 | + os=-chorusos |
1681 | + basic_machine=$1 |
1682 | + ;; |
1683 | + -chorusrdb) |
1684 | + os=-chorusrdb |
1685 | + basic_machine=$1 |
1686 | + ;; |
1687 | -hiux*) |
1688 | os=-hiuxwe2 |
1689 | ;; |
1690 | -sco5) |
1691 | - os=sco3.2v5 |
1692 | + os=-sco3.2v5 |
1693 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1694 | ;; |
1695 | -sco4) |
1696 | @@ -121,6 +190,9 @@ |
1697 | os=-sco3.2v2 |
1698 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1699 | ;; |
1700 | + -udk*) |
1701 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1702 | + ;; |
1703 | -isc) |
1704 | os=-isc2.2 |
1705 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1706 | @@ -143,26 +215,74 @@ |
1707 | -psos*) |
1708 | os=-psos |
1709 | ;; |
1710 | + -mint | -mint[0-9]*) |
1711 | + basic_machine=m68k-atari |
1712 | + os=-mint |
1713 | + ;; |
1714 | esac |
1715 | |
1716 | # Decode aliases for certain CPU-COMPANY combinations. |
1717 | case $basic_machine in |
1718 | # Recognize the basic CPU types without company name. |
1719 | # Some are omitted here because they have special meanings below. |
1720 | - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ |
1721 | - | arme[lb] | pyramid | mn10200 | mn10300 \ |
1722 | - | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ |
1723 | - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ |
1724 | - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ |
1725 | - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ |
1726 | - | mipstx39 | mipstx39el \ |
1727 | - | sparc | sparclet | sparclite | sparc64 | v850) |
1728 | + 1750a | 580 \ |
1729 | + | a29k \ |
1730 | + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ |
1731 | + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ |
1732 | + | am33_2.0 \ |
1733 | + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ |
1734 | + | c4x | clipper \ |
1735 | + | d10v | d30v | dlx | dsp16xx \ |
1736 | + | fr30 | frv \ |
1737 | + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ |
1738 | + | i370 | i860 | i960 | ia64 \ |
1739 | + | ip2k | iq2000 \ |
1740 | + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ |
1741 | + | mips | mipsbe | mipseb | mipsel | mipsle \ |
1742 | + | mips16 \ |
1743 | + | mips64 | mips64el \ |
1744 | + | mips64vr | mips64vrel \ |
1745 | + | mips64orion | mips64orionel \ |
1746 | + | mips64vr4100 | mips64vr4100el \ |
1747 | + | mips64vr4300 | mips64vr4300el \ |
1748 | + | mips64vr5000 | mips64vr5000el \ |
1749 | + | mipsisa32 | mipsisa32el \ |
1750 | + | mipsisa32r2 | mipsisa32r2el \ |
1751 | + | mipsisa64 | mipsisa64el \ |
1752 | + | mipsisa64r2 | mipsisa64r2el \ |
1753 | + | mipsisa64sb1 | mipsisa64sb1el \ |
1754 | + | mipsisa64sr71k | mipsisa64sr71kel \ |
1755 | + | mipstx39 | mipstx39el \ |
1756 | + | mn10200 | mn10300 \ |
1757 | + | msp430 \ |
1758 | + | ns16k | ns32k \ |
1759 | + | openrisc | or32 \ |
1760 | + | pdp10 | pdp11 | pj | pjl \ |
1761 | + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ |
1762 | + | pyramid \ |
1763 | + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ |
1764 | + | sh64 | sh64le \ |
1765 | + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ |
1766 | + | strongarm \ |
1767 | + | tahoe | thumb | tic4x | tic80 | tron \ |
1768 | + | v850 | v850e \ |
1769 | + | we32k \ |
1770 | + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ |
1771 | + | z8k) |
1772 | basic_machine=$basic_machine-unknown |
1773 | ;; |
1774 | + m6811 | m68hc11 | m6812 | m68hc12) |
1775 | + # Motorola 68HC11/12. |
1776 | + basic_machine=$basic_machine-unknown |
1777 | + os=-none |
1778 | + ;; |
1779 | + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) |
1780 | + ;; |
1781 | + |
1782 | # We use `pc' rather than `unknown' |
1783 | # because (1) that's what they normally are, and |
1784 | # (2) the word "unknown" tends to confuse beginning users. |
1785 | - i[3456]86) |
1786 | + i*86 | x86_64) |
1787 | basic_machine=$basic_machine-pc |
1788 | ;; |
1789 | # Object if more than one company name word. |
1790 | @@ -171,27 +291,86 @@ |
1791 | exit 1 |
1792 | ;; |
1793 | # Recognize the basic CPU types with company name. |
1794 | - vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \ |
1795 | - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ |
1796 | - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ |
1797 | - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ |
1798 | - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ |
1799 | - | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ |
1800 | - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ |
1801 | - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ |
1802 | - | sparc64-* | mips64-* | mipsel-* \ |
1803 | - | mips64el-* | mips64orion-* | mips64orionel-* \ |
1804 | - | mipstx39-* | mipstx39el-* \ |
1805 | - | f301-*) |
1806 | + 580-* \ |
1807 | + | a29k-* \ |
1808 | + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ |
1809 | + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ |
1810 | + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ |
1811 | + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ |
1812 | + | avr-* \ |
1813 | + | bs2000-* \ |
1814 | + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ |
1815 | + | clipper-* | craynv-* | cydra-* \ |
1816 | + | d10v-* | d30v-* | dlx-* \ |
1817 | + | elxsi-* \ |
1818 | + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ |
1819 | + | h8300-* | h8500-* \ |
1820 | + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ |
1821 | + | i*86-* | i860-* | i960-* | ia64-* \ |
1822 | + | ip2k-* | iq2000-* \ |
1823 | + | m32r-* | m32rle-* \ |
1824 | + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ |
1825 | + | m88110-* | m88k-* | maxq-* | mcore-* \ |
1826 | + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ |
1827 | + | mips16-* \ |
1828 | + | mips64-* | mips64el-* \ |
1829 | + | mips64vr-* | mips64vrel-* \ |
1830 | + | mips64orion-* | mips64orionel-* \ |
1831 | + | mips64vr4100-* | mips64vr4100el-* \ |
1832 | + | mips64vr4300-* | mips64vr4300el-* \ |
1833 | + | mips64vr5000-* | mips64vr5000el-* \ |
1834 | + | mipsisa32-* | mipsisa32el-* \ |
1835 | + | mipsisa32r2-* | mipsisa32r2el-* \ |
1836 | + | mipsisa64-* | mipsisa64el-* \ |
1837 | + | mipsisa64r2-* | mipsisa64r2el-* \ |
1838 | + | mipsisa64sb1-* | mipsisa64sb1el-* \ |
1839 | + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ |
1840 | + | mipstx39-* | mipstx39el-* \ |
1841 | + | mmix-* \ |
1842 | + | msp430-* \ |
1843 | + | none-* | np1-* | ns16k-* | ns32k-* \ |
1844 | + | orion-* \ |
1845 | + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ |
1846 | + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ |
1847 | + | pyramid-* \ |
1848 | + | romp-* | rs6000-* \ |
1849 | + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ |
1850 | + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ |
1851 | + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ |
1852 | + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ |
1853 | + | tahoe-* | thumb-* \ |
1854 | + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ |
1855 | + | tron-* \ |
1856 | + | v850-* | v850e-* | vax-* \ |
1857 | + | we32k-* \ |
1858 | + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ |
1859 | + | xstormy16-* | xtensa-* \ |
1860 | + | ymp-* \ |
1861 | + | z8k-*) |
1862 | ;; |
1863 | # Recognize the various machine names and aliases which stand |
1864 | # for a CPU type and a company and sometimes even an OS. |
1865 | + 386bsd) |
1866 | + basic_machine=i386-unknown |
1867 | + os=-bsd |
1868 | + ;; |
1869 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
1870 | basic_machine=m68000-att |
1871 | ;; |
1872 | 3b*) |
1873 | basic_machine=we32k-att |
1874 | ;; |
1875 | + a29khif) |
1876 | + basic_machine=a29k-amd |
1877 | + os=-udi |
1878 | + ;; |
1879 | + abacus) |
1880 | + basic_machine=abacus-unknown |
1881 | + ;; |
1882 | + adobe68k) |
1883 | + basic_machine=m68010-adobe |
1884 | + os=-scout |
1885 | + ;; |
1886 | alliant | fx80) |
1887 | basic_machine=fx80-alliant |
1888 | ;; |
1889 | @@ -202,25 +381,35 @@ |
1890 | basic_machine=a29k-none |
1891 | os=-bsd |
1892 | ;; |
1893 | + amd64) |
1894 | + basic_machine=x86_64-pc |
1895 | + ;; |
1896 | + amd64-*) |
1897 | + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` |
1898 | + ;; |
1899 | amdahl) |
1900 | basic_machine=580-amdahl |
1901 | os=-sysv |
1902 | ;; |
1903 | amiga | amiga-*) |
1904 | - basic_machine=m68k-cbm |
1905 | + basic_machine=m68k-unknown |
1906 | ;; |
1907 | amigaos | amigados) |
1908 | - basic_machine=m68k-cbm |
1909 | + basic_machine=m68k-unknown |
1910 | os=-amigaos |
1911 | ;; |
1912 | amigaunix | amix) |
1913 | - basic_machine=m68k-cbm |
1914 | + basic_machine=m68k-unknown |
1915 | os=-sysv4 |
1916 | ;; |
1917 | apollo68) |
1918 | basic_machine=m68k-apollo |
1919 | os=-sysv |
1920 | ;; |
1921 | + apollo68bsd) |
1922 | + basic_machine=m68k-apollo |
1923 | + os=-bsd |
1924 | + ;; |
1925 | aux) |
1926 | basic_machine=m68k-apple |
1927 | os=-aux |
1928 | @@ -229,6 +418,10 @@ |
1929 | basic_machine=ns32k-sequent |
1930 | os=-dynix |
1931 | ;; |
1932 | + c90) |
1933 | + basic_machine=c90-cray |
1934 | + os=-unicos |
1935 | + ;; |
1936 | convex-c1) |
1937 | basic_machine=c1-convex |
1938 | os=-bsd |
1939 | @@ -249,27 +442,45 @@ |
1940 | basic_machine=c38-convex |
1941 | os=-bsd |
1942 | ;; |
1943 | - cray | ymp) |
1944 | - basic_machine=ymp-cray |
1945 | - os=-unicos |
1946 | - ;; |
1947 | - cray2) |
1948 | - basic_machine=cray2-cray |
1949 | + cray | j90) |
1950 | + basic_machine=j90-cray |
1951 | os=-unicos |
1952 | ;; |
1953 | - [ctj]90-cray) |
1954 | - basic_machine=c90-cray |
1955 | - os=-unicos |
1956 | + craynv) |
1957 | + basic_machine=craynv-cray |
1958 | + os=-unicosmp |
1959 | + ;; |
1960 | + cr16c) |
1961 | + basic_machine=cr16c-unknown |
1962 | + os=-elf |
1963 | ;; |
1964 | crds | unos) |
1965 | basic_machine=m68k-crds |
1966 | ;; |
1967 | + crisv32 | crisv32-* | etraxfs*) |
1968 | + basic_machine=crisv32-axis |
1969 | + ;; |
1970 | + cris | cris-* | etrax*) |
1971 | + basic_machine=cris-axis |
1972 | + ;; |
1973 | + crx) |
1974 | + basic_machine=crx-unknown |
1975 | + os=-elf |
1976 | + ;; |
1977 | da30 | da30-*) |
1978 | basic_machine=m68k-da30 |
1979 | ;; |
1980 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) |
1981 | basic_machine=mips-dec |
1982 | ;; |
1983 | + decsystem10* | dec10*) |
1984 | + basic_machine=pdp10-dec |
1985 | + os=-tops10 |
1986 | + ;; |
1987 | + decsystem20* | dec20*) |
1988 | + basic_machine=pdp10-dec |
1989 | + os=-tops20 |
1990 | + ;; |
1991 | delta | 3300 | motorola-3300 | motorola-delta \ |
1992 | | 3300-motorola | delta-motorola) |
1993 | basic_machine=m68k-motorola |
1994 | @@ -278,6 +489,10 @@ |
1995 | basic_machine=m88k-motorola |
1996 | os=-sysv3 |
1997 | ;; |
1998 | + djgpp) |
1999 | + basic_machine=i586-pc |
2000 | + os=-msdosdjgpp |
2001 | + ;; |
2002 | dpx20 | dpx20-*) |
2003 | basic_machine=rs6000-bull |
2004 | os=-bosx |
2005 | @@ -297,6 +512,10 @@ |
2006 | encore | umax | mmax) |
2007 | basic_machine=ns32k-encore |
2008 | ;; |
2009 | + es1800 | OSE68k | ose68k | ose | OSE) |
2010 | + basic_machine=m68k-ericsson |
2011 | + os=-ose |
2012 | + ;; |
2013 | fx2800) |
2014 | basic_machine=i860-alliant |
2015 | ;; |
2016 | @@ -307,6 +526,10 @@ |
2017 | basic_machine=tron-gmicro |
2018 | os=-sysv |
2019 | ;; |
2020 | + go32) |
2021 | + basic_machine=i386-pc |
2022 | + os=-go32 |
2023 | + ;; |
2024 | h3050r* | hiux*) |
2025 | basic_machine=hppa1.1-hitachi |
2026 | os=-hiuxwe2 |
2027 | @@ -315,6 +538,14 @@ |
2028 | basic_machine=h8300-hitachi |
2029 | os=-hms |
2030 | ;; |
2031 | + h8300xray) |
2032 | + basic_machine=h8300-hitachi |
2033 | + os=-xray |
2034 | + ;; |
2035 | + h8500hms) |
2036 | + basic_machine=h8500-hitachi |
2037 | + os=-hms |
2038 | + ;; |
2039 | harris) |
2040 | basic_machine=m88k-harris |
2041 | os=-sysv3 |
2042 | @@ -330,13 +561,30 @@ |
2043 | basic_machine=m68k-hp |
2044 | os=-hpux |
2045 | ;; |
2046 | + hp3k9[0-9][0-9] | hp9[0-9][0-9]) |
2047 | + basic_machine=hppa1.0-hp |
2048 | + ;; |
2049 | hp9k2[0-9][0-9] | hp9k31[0-9]) |
2050 | basic_machine=m68000-hp |
2051 | ;; |
2052 | hp9k3[2-9][0-9]) |
2053 | basic_machine=m68k-hp |
2054 | ;; |
2055 | - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) |
2056 | + hp9k6[0-9][0-9] | hp6[0-9][0-9]) |
2057 | + basic_machine=hppa1.0-hp |
2058 | + ;; |
2059 | + hp9k7[0-79][0-9] | hp7[0-79][0-9]) |
2060 | + basic_machine=hppa1.1-hp |
2061 | + ;; |
2062 | + hp9k78[0-9] | hp78[0-9]) |
2063 | + # FIXME: really hppa2.0-hp |
2064 | + basic_machine=hppa1.1-hp |
2065 | + ;; |
2066 | + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) |
2067 | + # FIXME: really hppa2.0-hp |
2068 | + basic_machine=hppa1.1-hp |
2069 | + ;; |
2070 | + hp9k8[0-9][13679] | hp8[0-9][13679]) |
2071 | basic_machine=hppa1.1-hp |
2072 | ;; |
2073 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) |
2074 | @@ -345,27 +593,42 @@ |
2075 | hppa-next) |
2076 | os=-nextstep3 |
2077 | ;; |
2078 | + hppaosf) |
2079 | + basic_machine=hppa1.1-hp |
2080 | + os=-osf |
2081 | + ;; |
2082 | + hppro) |
2083 | + basic_machine=hppa1.1-hp |
2084 | + os=-proelf |
2085 | + ;; |
2086 | i370-ibm* | ibm*) |
2087 | basic_machine=i370-ibm |
2088 | - os=-mvs |
2089 | ;; |
2090 | # I'm not sure what "Sysv32" means. Should this be sysv3.2? |
2091 | - i[3456]86v32) |
2092 | + i*86v32) |
2093 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2094 | os=-sysv32 |
2095 | ;; |
2096 | - i[3456]86v4*) |
2097 | + i*86v4*) |
2098 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2099 | os=-sysv4 |
2100 | ;; |
2101 | - i[3456]86v) |
2102 | + i*86v) |
2103 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2104 | os=-sysv |
2105 | ;; |
2106 | - i[3456]86sol2) |
2107 | + i*86sol2) |
2108 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2109 | os=-solaris2 |
2110 | ;; |
2111 | + i386mach) |
2112 | + basic_machine=i386-mach |
2113 | + os=-mach |
2114 | + ;; |
2115 | + i386-vsta | vsta) |
2116 | + basic_machine=i386-unknown |
2117 | + os=-vsta |
2118 | + ;; |
2119 | iris | iris4d) |
2120 | basic_machine=mips-sgi |
2121 | case $os in |
2122 | @@ -391,16 +654,16 @@ |
2123 | basic_machine=ns32k-utek |
2124 | os=-sysv |
2125 | ;; |
2126 | + mingw32) |
2127 | + basic_machine=i386-pc |
2128 | + os=-mingw32 |
2129 | + ;; |
2130 | miniframe) |
2131 | basic_machine=m68000-convergent |
2132 | ;; |
2133 | - mipsel*-linux*) |
2134 | - basic_machine=mipsel-unknown |
2135 | - os=-linux-gnu |
2136 | - ;; |
2137 | - mips*-linux*) |
2138 | - basic_machine=mips-unknown |
2139 | - os=-linux-gnu |
2140 | + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) |
2141 | + basic_machine=m68k-atari |
2142 | + os=-mint |
2143 | ;; |
2144 | mips3*-*) |
2145 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` |
2146 | @@ -408,10 +671,34 @@ |
2147 | mips3*) |
2148 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown |
2149 | ;; |
2150 | + monitor) |
2151 | + basic_machine=m68k-rom68k |
2152 | + os=-coff |
2153 | + ;; |
2154 | + morphos) |
2155 | + basic_machine=powerpc-unknown |
2156 | + os=-morphos |
2157 | + ;; |
2158 | + msdos) |
2159 | + basic_machine=i386-pc |
2160 | + os=-msdos |
2161 | + ;; |
2162 | + mvs) |
2163 | + basic_machine=i370-ibm |
2164 | + os=-mvs |
2165 | + ;; |
2166 | ncr3000) |
2167 | basic_machine=i486-ncr |
2168 | os=-sysv4 |
2169 | ;; |
2170 | + netbsd386) |
2171 | + basic_machine=i386-unknown |
2172 | + os=-netbsd |
2173 | + ;; |
2174 | + netwinder) |
2175 | + basic_machine=armv4l-rebel |
2176 | + os=-linux |
2177 | + ;; |
2178 | news | news700 | news800 | news900) |
2179 | basic_machine=m68k-sony |
2180 | os=-newsos |
2181 | @@ -424,6 +711,10 @@ |
2182 | basic_machine=mips-sony |
2183 | os=-newsos |
2184 | ;; |
2185 | + necv70) |
2186 | + basic_machine=v70-nec |
2187 | + os=-sysv |
2188 | + ;; |
2189 | next | m*-next ) |
2190 | basic_machine=m68k-next |
2191 | case $os in |
2192 | @@ -449,9 +740,40 @@ |
2193 | basic_machine=i960-intel |
2194 | os=-nindy |
2195 | ;; |
2196 | + mon960) |
2197 | + basic_machine=i960-intel |
2198 | + os=-mon960 |
2199 | + ;; |
2200 | + nonstopux) |
2201 | + basic_machine=mips-compaq |
2202 | + os=-nonstopux |
2203 | + ;; |
2204 | np1) |
2205 | basic_machine=np1-gould |
2206 | ;; |
2207 | + nsr-tandem) |
2208 | + basic_machine=nsr-tandem |
2209 | + ;; |
2210 | + op50n-* | op60c-*) |
2211 | + basic_machine=hppa1.1-oki |
2212 | + os=-proelf |
2213 | + ;; |
2214 | + or32 | or32-*) |
2215 | + basic_machine=or32-unknown |
2216 | + os=-coff |
2217 | + ;; |
2218 | + os400) |
2219 | + basic_machine=powerpc-ibm |
2220 | + os=-os400 |
2221 | + ;; |
2222 | + OSE68000 | ose68000) |
2223 | + basic_machine=m68000-ericsson |
2224 | + os=-ose |
2225 | + ;; |
2226 | + os68k) |
2227 | + basic_machine=m68k-none |
2228 | + os=-os68k |
2229 | + ;; |
2230 | pa-hitachi) |
2231 | basic_machine=hppa1.1-hitachi |
2232 | os=-hiuxwe2 |
2233 | @@ -466,53 +788,95 @@ |
2234 | pbb) |
2235 | basic_machine=m68k-tti |
2236 | ;; |
2237 | - pc532 | pc532-*) |
2238 | + pc532 | pc532-*) |
2239 | basic_machine=ns32k-pc532 |
2240 | ;; |
2241 | - pentium | p5) |
2242 | - basic_machine=i586-intel |
2243 | + pentium | p5 | k5 | k6 | nexgen | viac3) |
2244 | + basic_machine=i586-pc |
2245 | + ;; |
2246 | + pentiumpro | p6 | 6x86 | athlon | athlon_*) |
2247 | + basic_machine=i686-pc |
2248 | ;; |
2249 | - pentiumpro | p6) |
2250 | - basic_machine=i686-intel |
2251 | + pentiumii | pentium2 | pentiumiii | pentium3) |
2252 | + basic_machine=i686-pc |
2253 | ;; |
2254 | - pentium-* | p5-*) |
2255 | + pentium4) |
2256 | + basic_machine=i786-pc |
2257 | + ;; |
2258 | + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) |
2259 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` |
2260 | ;; |
2261 | - pentiumpro-* | p6-*) |
2262 | + pentiumpro-* | p6-* | 6x86-* | athlon-*) |
2263 | + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` |
2264 | + ;; |
2265 | + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) |
2266 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` |
2267 | ;; |
2268 | - k5) |
2269 | - # We don't have specific support for AMD's K5 yet, so just call it a Pentium |
2270 | - basic_machine=i586-amd |
2271 | - ;; |
2272 | - nexen) |
2273 | - # We don't have specific support for Nexgen yet, so just call it a Pentium |
2274 | - basic_machine=i586-nexgen |
2275 | + pentium4-*) |
2276 | + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` |
2277 | ;; |
2278 | pn) |
2279 | basic_machine=pn-gould |
2280 | ;; |
2281 | - power) basic_machine=rs6000-ibm |
2282 | + power) basic_machine=power-ibm |
2283 | ;; |
2284 | ppc) basic_machine=powerpc-unknown |
2285 | - ;; |
2286 | + ;; |
2287 | ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` |
2288 | ;; |
2289 | ppcle | powerpclittle | ppc-le | powerpc-little) |
2290 | basic_machine=powerpcle-unknown |
2291 | - ;; |
2292 | + ;; |
2293 | ppcle-* | powerpclittle-*) |
2294 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` |
2295 | ;; |
2296 | + ppc64) basic_machine=powerpc64-unknown |
2297 | + ;; |
2298 | + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` |
2299 | + ;; |
2300 | + ppc64le | powerpc64little | ppc64-le | powerpc64-little) |
2301 | + basic_machine=powerpc64le-unknown |
2302 | + ;; |
2303 | + ppc64le-* | powerpc64little-*) |
2304 | + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` |
2305 | + ;; |
2306 | ps2) |
2307 | basic_machine=i386-ibm |
2308 | ;; |
2309 | + pw32) |
2310 | + basic_machine=i586-unknown |
2311 | + os=-pw32 |
2312 | + ;; |
2313 | + rom68k) |
2314 | + basic_machine=m68k-rom68k |
2315 | + os=-coff |
2316 | + ;; |
2317 | rm[46]00) |
2318 | basic_machine=mips-siemens |
2319 | ;; |
2320 | rtpc | rtpc-*) |
2321 | basic_machine=romp-ibm |
2322 | ;; |
2323 | + s390 | s390-*) |
2324 | + basic_machine=s390-ibm |
2325 | + ;; |
2326 | + s390x | s390x-*) |
2327 | + basic_machine=s390x-ibm |
2328 | + ;; |
2329 | + sa29200) |
2330 | + basic_machine=a29k-amd |
2331 | + os=-udi |
2332 | + ;; |
2333 | + sb1) |
2334 | + basic_machine=mipsisa64sb1-unknown |
2335 | + ;; |
2336 | + sb1el) |
2337 | + basic_machine=mipsisa64sb1el-unknown |
2338 | + ;; |
2339 | + sei) |
2340 | + basic_machine=mips-sei |
2341 | + os=-seiux |
2342 | + ;; |
2343 | sequent) |
2344 | basic_machine=i386-sequent |
2345 | ;; |
2346 | @@ -520,6 +884,13 @@ |
2347 | basic_machine=sh-hitachi |
2348 | os=-hms |
2349 | ;; |
2350 | + sh64) |
2351 | + basic_machine=sh64-unknown |
2352 | + ;; |
2353 | + sparclite-wrs | simso-wrs) |
2354 | + basic_machine=sparclite-wrs |
2355 | + os=-vxworks |
2356 | + ;; |
2357 | sps7) |
2358 | basic_machine=m68k-bull |
2359 | os=-sysv2 |
2360 | @@ -527,6 +898,13 @@ |
2361 | spur) |
2362 | basic_machine=spur-unknown |
2363 | ;; |
2364 | + st2000) |
2365 | + basic_machine=m68k-tandem |
2366 | + ;; |
2367 | + stratus) |
2368 | + basic_machine=i860-stratus |
2369 | + os=-sysv4 |
2370 | + ;; |
2371 | sun2) |
2372 | basic_machine=m68000-sun |
2373 | ;; |
2374 | @@ -567,19 +945,51 @@ |
2375 | sun386 | sun386i | roadrunner) |
2376 | basic_machine=i386-sun |
2377 | ;; |
2378 | + sv1) |
2379 | + basic_machine=sv1-cray |
2380 | + os=-unicos |
2381 | + ;; |
2382 | symmetry) |
2383 | basic_machine=i386-sequent |
2384 | os=-dynix |
2385 | ;; |
2386 | + t3e) |
2387 | + basic_machine=alphaev5-cray |
2388 | + os=-unicos |
2389 | + ;; |
2390 | + t90) |
2391 | + basic_machine=t90-cray |
2392 | + os=-unicos |
2393 | + ;; |
2394 | + tic54x | c54x*) |
2395 | + basic_machine=tic54x-unknown |
2396 | + os=-coff |
2397 | + ;; |
2398 | + tic55x | c55x*) |
2399 | + basic_machine=tic55x-unknown |
2400 | + os=-coff |
2401 | + ;; |
2402 | + tic6x | c6x*) |
2403 | + basic_machine=tic6x-unknown |
2404 | + os=-coff |
2405 | + ;; |
2406 | tx39) |
2407 | basic_machine=mipstx39-unknown |
2408 | ;; |
2409 | tx39el) |
2410 | basic_machine=mipstx39el-unknown |
2411 | ;; |
2412 | + toad1) |
2413 | + basic_machine=pdp10-xkl |
2414 | + os=-tops20 |
2415 | + ;; |
2416 | tower | tower-32) |
2417 | basic_machine=m68k-ncr |
2418 | ;; |
2419 | + tpf) |
2420 | + basic_machine=s390x-ibm |
2421 | + os=-tpf |
2422 | + ;; |
2423 | udi29k) |
2424 | basic_machine=a29k-amd |
2425 | os=-udi |
2426 | @@ -588,6 +998,10 @@ |
2427 | basic_machine=a29k-nyu |
2428 | os=-sym1 |
2429 | ;; |
2430 | + v810 | necv810) |
2431 | + basic_machine=v810-nec |
2432 | + os=-none |
2433 | + ;; |
2434 | vaxv) |
2435 | basic_machine=vax-dec |
2436 | os=-sysv |
2437 | @@ -597,8 +1011,8 @@ |
2438 | os=-vms |
2439 | ;; |
2440 | vpp*|vx|vx-*) |
2441 | - basic_machine=f301-fujitsu |
2442 | - ;; |
2443 | + basic_machine=f301-fujitsu |
2444 | + ;; |
2445 | vxworks960) |
2446 | basic_machine=i960-wrs |
2447 | os=-vxworks |
2448 | @@ -611,13 +1025,29 @@ |
2449 | basic_machine=a29k-wrs |
2450 | os=-vxworks |
2451 | ;; |
2452 | - xmp) |
2453 | - basic_machine=xmp-cray |
2454 | - os=-unicos |
2455 | + w65*) |
2456 | + basic_machine=w65-wdc |
2457 | + os=-none |
2458 | + ;; |
2459 | + w89k-*) |
2460 | + basic_machine=hppa1.1-winbond |
2461 | + os=-proelf |
2462 | + ;; |
2463 | + xbox) |
2464 | + basic_machine=i686-pc |
2465 | + os=-mingw32 |
2466 | ;; |
2467 | - xps | xps100) |
2468 | + xps | xps100) |
2469 | basic_machine=xps100-honeywell |
2470 | ;; |
2471 | + ymp) |
2472 | + basic_machine=ymp-cray |
2473 | + os=-unicos |
2474 | + ;; |
2475 | + z8k-*-coff) |
2476 | + basic_machine=z8k-unknown |
2477 | + os=-sim |
2478 | + ;; |
2479 | none) |
2480 | basic_machine=none-none |
2481 | os=-none |
2482 | @@ -625,32 +1055,47 @@ |
2483 | |
2484 | # Here we handle the default manufacturer of certain CPU types. It is in |
2485 | # some cases the only manufacturer, in others, it is the most popular. |
2486 | - mips) |
2487 | - if [ x$os = x-linux-gnu ]; then |
2488 | - basic_machine=mips-unknown |
2489 | - else |
2490 | - basic_machine=mips-mips |
2491 | - fi |
2492 | + w89k) |
2493 | + basic_machine=hppa1.1-winbond |
2494 | + ;; |
2495 | + op50n) |
2496 | + basic_machine=hppa1.1-oki |
2497 | + ;; |
2498 | + op60c) |
2499 | + basic_machine=hppa1.1-oki |
2500 | ;; |
2501 | romp) |
2502 | basic_machine=romp-ibm |
2503 | ;; |
2504 | + mmix) |
2505 | + basic_machine=mmix-knuth |
2506 | + ;; |
2507 | rs6000) |
2508 | basic_machine=rs6000-ibm |
2509 | ;; |
2510 | vax) |
2511 | basic_machine=vax-dec |
2512 | ;; |
2513 | + pdp10) |
2514 | + # there are many clones, so DEC is not a safe bet |
2515 | + basic_machine=pdp10-unknown |
2516 | + ;; |
2517 | pdp11) |
2518 | basic_machine=pdp11-dec |
2519 | ;; |
2520 | we32k) |
2521 | basic_machine=we32k-att |
2522 | ;; |
2523 | - sparc) |
2524 | + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) |
2525 | + basic_machine=sh-unknown |
2526 | + ;; |
2527 | + sh64) |
2528 | + basic_machine=sh64-unknown |
2529 | + ;; |
2530 | + sparc | sparcv8 | sparcv9 | sparcv9b) |
2531 | basic_machine=sparc-sun |
2532 | ;; |
2533 | - cydra) |
2534 | + cydra) |
2535 | basic_machine=cydra-cydrome |
2536 | ;; |
2537 | orion) |
2538 | @@ -659,6 +1104,15 @@ |
2539 | orion105) |
2540 | basic_machine=clipper-highlevel |
2541 | ;; |
2542 | + mac | mpw | mac-mpw) |
2543 | + basic_machine=m68k-apple |
2544 | + ;; |
2545 | + pmac | pmac-mpw) |
2546 | + basic_machine=powerpc-apple |
2547 | + ;; |
2548 | + *-unknown) |
2549 | + # Make sure to match an already-canonicalized machine name. |
2550 | + ;; |
2551 | *) |
2552 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 |
2553 | exit 1 |
2554 | @@ -711,14 +1165,46 @@ |
2555 | | -aos* \ |
2556 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ |
2557 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ |
2558 | - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ |
2559 | - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ |
2560 | + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ |
2561 | + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ |
2562 | + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ |
2563 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ |
2564 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ |
2565 | - | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
2566 | - | -mingw32* | -linux-gnu* | -uxpv*) |
2567 | + | -chorusos* | -chorusrdb* \ |
2568 | + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
2569 | + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ |
2570 | + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ |
2571 | + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
2572 | + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ |
2573 | + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ |
2574 | + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ |
2575 | + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) |
2576 | # Remember, each alternative MUST END IN *, to match a version number. |
2577 | ;; |
2578 | + -qnx*) |
2579 | + case $basic_machine in |
2580 | + x86-* | i*86-*) |
2581 | + ;; |
2582 | + *) |
2583 | + os=-nto$os |
2584 | + ;; |
2585 | + esac |
2586 | + ;; |
2587 | + -nto-qnx*) |
2588 | + ;; |
2589 | + -nto*) |
2590 | + os=`echo $os | sed -e 's|nto|nto-qnx|'` |
2591 | + ;; |
2592 | + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ |
2593 | + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ |
2594 | + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) |
2595 | + ;; |
2596 | + -mac*) |
2597 | + os=`echo $os | sed -e 's|mac|macos|'` |
2598 | + ;; |
2599 | + -linux-dietlibc) |
2600 | + os=-linux-dietlibc |
2601 | + ;; |
2602 | -linux*) |
2603 | os=`echo $os | sed -e 's|linux|linux-gnu|'` |
2604 | ;; |
2605 | @@ -728,6 +1214,15 @@ |
2606 | -sunos6*) |
2607 | os=`echo $os | sed -e 's|sunos6|solaris3|'` |
2608 | ;; |
2609 | + -opened*) |
2610 | + os=-openedition |
2611 | + ;; |
2612 | + -os400*) |
2613 | + os=-os400 |
2614 | + ;; |
2615 | + -wince*) |
2616 | + os=-wince |
2617 | + ;; |
2618 | -osfrose*) |
2619 | os=-osfrose |
2620 | ;; |
2621 | @@ -743,11 +1238,26 @@ |
2622 | -acis*) |
2623 | os=-aos |
2624 | ;; |
2625 | + -atheos*) |
2626 | + os=-atheos |
2627 | + ;; |
2628 | + -syllable*) |
2629 | + os=-syllable |
2630 | + ;; |
2631 | + -386bsd) |
2632 | + os=-bsd |
2633 | + ;; |
2634 | -ctix* | -uts*) |
2635 | os=-sysv |
2636 | ;; |
2637 | + -nova*) |
2638 | + os=-rtmk-nova |
2639 | + ;; |
2640 | -ns2 ) |
2641 | - os=-nextstep2 |
2642 | + os=-nextstep2 |
2643 | + ;; |
2644 | + -nsk*) |
2645 | + os=-nsk |
2646 | ;; |
2647 | # Preserve the version number of sinix5. |
2648 | -sinix5.*) |
2649 | @@ -756,6 +1266,9 @@ |
2650 | -sinix*) |
2651 | os=-sysv4 |
2652 | ;; |
2653 | + -tpf*) |
2654 | + os=-tpf |
2655 | + ;; |
2656 | -triton*) |
2657 | os=-sysv3 |
2658 | ;; |
2659 | @@ -774,9 +1287,27 @@ |
2660 | # This must come after -sysvr4. |
2661 | -sysv*) |
2662 | ;; |
2663 | + -ose*) |
2664 | + os=-ose |
2665 | + ;; |
2666 | + -es1800*) |
2667 | + os=-ose |
2668 | + ;; |
2669 | -xenix) |
2670 | os=-xenix |
2671 | ;; |
2672 | + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
2673 | + os=-mint |
2674 | + ;; |
2675 | + -aros*) |
2676 | + os=-aros |
2677 | + ;; |
2678 | + -kaos*) |
2679 | + os=-kaos |
2680 | + ;; |
2681 | + -zvmoe) |
2682 | + os=-zvmoe |
2683 | + ;; |
2684 | -none) |
2685 | ;; |
2686 | *) |
2687 | @@ -802,10 +1333,20 @@ |
2688 | *-acorn) |
2689 | os=-riscix1.2 |
2690 | ;; |
2691 | + arm*-rebel) |
2692 | + os=-linux |
2693 | + ;; |
2694 | arm*-semi) |
2695 | os=-aout |
2696 | ;; |
2697 | - pdp11-*) |
2698 | + c4x-* | tic4x-*) |
2699 | + os=-coff |
2700 | + ;; |
2701 | + # This must come before the *-dec entry. |
2702 | + pdp10-*) |
2703 | + os=-tops20 |
2704 | + ;; |
2705 | + pdp11-*) |
2706 | os=-none |
2707 | ;; |
2708 | *-dec | vax-*) |
2709 | @@ -823,15 +1364,42 @@ |
2710 | # default. |
2711 | # os=-sunos4 |
2712 | ;; |
2713 | + m68*-cisco) |
2714 | + os=-aout |
2715 | + ;; |
2716 | + mips*-cisco) |
2717 | + os=-elf |
2718 | + ;; |
2719 | + mips*-*) |
2720 | + os=-elf |
2721 | + ;; |
2722 | + or32-*) |
2723 | + os=-coff |
2724 | + ;; |
2725 | *-tti) # must be before sparc entry or we get the wrong os. |
2726 | os=-sysv3 |
2727 | ;; |
2728 | sparc-* | *-sun) |
2729 | os=-sunos4.1.1 |
2730 | ;; |
2731 | + *-be) |
2732 | + os=-beos |
2733 | + ;; |
2734 | *-ibm) |
2735 | os=-aix |
2736 | ;; |
2737 | + *-knuth) |
2738 | + os=-mmixware |
2739 | + ;; |
2740 | + *-wec) |
2741 | + os=-proelf |
2742 | + ;; |
2743 | + *-winbond) |
2744 | + os=-proelf |
2745 | + ;; |
2746 | + *-oki) |
2747 | + os=-proelf |
2748 | + ;; |
2749 | *-hp) |
2750 | os=-hpux |
2751 | ;; |
2752 | @@ -874,27 +1442,39 @@ |
2753 | *-next) |
2754 | os=-nextstep3 |
2755 | ;; |
2756 | - *-gould) |
2757 | + *-gould) |
2758 | os=-sysv |
2759 | ;; |
2760 | - *-highlevel) |
2761 | + *-highlevel) |
2762 | os=-bsd |
2763 | ;; |
2764 | *-encore) |
2765 | os=-bsd |
2766 | ;; |
2767 | - *-sgi) |
2768 | + *-sgi) |
2769 | os=-irix |
2770 | ;; |
2771 | - *-siemens) |
2772 | + *-siemens) |
2773 | os=-sysv4 |
2774 | ;; |
2775 | *-masscomp) |
2776 | os=-rtu |
2777 | ;; |
2778 | - f301-fujitsu) |
2779 | + f30[01]-fujitsu | f700-fujitsu) |
2780 | os=-uxpv |
2781 | ;; |
2782 | + *-rom68k) |
2783 | + os=-coff |
2784 | + ;; |
2785 | + *-*bug) |
2786 | + os=-coff |
2787 | + ;; |
2788 | + *-apple) |
2789 | + os=-macos |
2790 | + ;; |
2791 | + *-atari*) |
2792 | + os=-mint |
2793 | + ;; |
2794 | *) |
2795 | os=-none |
2796 | ;; |
2797 | @@ -916,9 +1496,15 @@ |
2798 | -aix*) |
2799 | vendor=ibm |
2800 | ;; |
2801 | + -beos*) |
2802 | + vendor=be |
2803 | + ;; |
2804 | -hpux*) |
2805 | vendor=hp |
2806 | ;; |
2807 | + -mpeix*) |
2808 | + vendor=hp |
2809 | + ;; |
2810 | -hiux*) |
2811 | vendor=hitachi |
2812 | ;; |
2813 | @@ -934,21 +1520,47 @@ |
2814 | -genix*) |
2815 | vendor=ns |
2816 | ;; |
2817 | - -mvs*) |
2818 | + -mvs* | -opened*) |
2819 | + vendor=ibm |
2820 | + ;; |
2821 | + -os400*) |
2822 | vendor=ibm |
2823 | ;; |
2824 | -ptx*) |
2825 | vendor=sequent |
2826 | ;; |
2827 | - -vxsim* | -vxworks*) |
2828 | + -tpf*) |
2829 | + vendor=ibm |
2830 | + ;; |
2831 | + -vxsim* | -vxworks* | -windiss*) |
2832 | vendor=wrs |
2833 | ;; |
2834 | -aux*) |
2835 | vendor=apple |
2836 | ;; |
2837 | + -hms*) |
2838 | + vendor=hitachi |
2839 | + ;; |
2840 | + -mpw* | -macos*) |
2841 | + vendor=apple |
2842 | + ;; |
2843 | + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
2844 | + vendor=atari |
2845 | + ;; |
2846 | + -vos*) |
2847 | + vendor=stratus |
2848 | + ;; |
2849 | esac |
2850 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` |
2851 | ;; |
2852 | esac |
2853 | |
2854 | echo $basic_machine$os |
2855 | +exit 0 |
2856 | + |
2857 | +# Local variables: |
2858 | +# eval: (add-hook 'write-file-hooks 'time-stamp) |
2859 | +# time-stamp-start: "timestamp='" |
2860 | +# time-stamp-format: "%:y-%02m-%02d" |
2861 | +# time-stamp-end: "'" |
2862 | +# End: |
2863 | diff -Naur jpeg-6b.orig/ltconfig jpeg-6b/ltconfig |
2864 | --- jpeg-6b.orig/ltconfig 1998-03-25 15:25:39.000000000 +0000 |
2865 | +++ jpeg-6b/ltconfig 2006-06-21 15:41:12.000000000 +0000 |
2866 | @@ -1,8 +1,8 @@ |
2867 | #! /bin/sh |
2868 | |
2869 | # ltconfig - Create a system-specific libtool. |
2870 | -# Copyright (C) 1996-1998 Free Software Foundation, Inc. |
2871 | -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
2872 | +# Copyright (C) 1996-1999 Free Software Foundation, Inc. |
2873 | +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
2874 | # |
2875 | # This file is free software; you can redistribute it and/or modify it |
2876 | # under the terms of the GNU General Public License as published by |
2877 | @@ -25,30 +25,129 @@ |
2878 | |
2879 | # A lot of this script is taken from autoconf-2.10. |
2880 | |
2881 | +# Check that we are running under the correct shell. |
2882 | +SHELL=${CONFIG_SHELL-/bin/sh} |
2883 | +echo=echo |
2884 | +if test "X$1" = X--no-reexec; then |
2885 | + # Discard the --no-reexec flag, and continue. |
2886 | + shift |
2887 | +elif test "X$1" = X--fallback-echo; then |
2888 | + # Avoid inline document here, it may be left over |
2889 | + : |
2890 | +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then |
2891 | + # Yippee, $echo works! |
2892 | + : |
2893 | +else |
2894 | + # Restart under the correct shell. |
2895 | + exec "$SHELL" "$0" --no-reexec ${1+"$@"} |
2896 | +fi |
2897 | + |
2898 | +if test "X$1" = X--fallback-echo; then |
2899 | + # used as fallback echo |
2900 | + shift |
2901 | + cat <<EOF |
2902 | +$* |
2903 | +EOF |
2904 | + exit 0 |
2905 | +fi |
2906 | + |
2907 | +# Find the correct PATH separator. Usually this is `:', but |
2908 | +# DJGPP uses `;' like DOS. |
2909 | +if test "X${PATH_SEPARATOR+set}" != Xset; then |
2910 | + UNAME=${UNAME-`uname 2>/dev/null`} |
2911 | + case X$UNAME in |
2912 | + *-DOS) PATH_SEPARATOR=';' ;; |
2913 | + *) PATH_SEPARATOR=':' ;; |
2914 | + esac |
2915 | +fi |
2916 | + |
2917 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
2918 | # if CDPATH is set. |
2919 | -if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi |
2920 | +if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
2921 | |
2922 | -echo=echo |
2923 | -if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : |
2924 | -else |
2925 | - # The Solaris and AIX default echo program unquotes backslashes. |
2926 | - # This makes it impossible to quote backslashes using |
2927 | +if test "X${echo_test_string+set}" != Xset; then |
2928 | + # find a string as large as possible, as long as the shell can cope with it |
2929 | + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do |
2930 | + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
2931 | + if (echo_test_string="`eval $cmd`") 2>/dev/null && |
2932 | + echo_test_string="`eval $cmd`" && |
2933 | + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then |
2934 | + break |
2935 | + fi |
2936 | + done |
2937 | +fi |
2938 | + |
2939 | +if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || |
2940 | + test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then |
2941 | + # The Solaris, AIX, and Digital Unix default echo programs unquote |
2942 | + # backslashes. This makes it impossible to quote backslashes using |
2943 | # echo "$something" | sed 's/\\/\\\\/g' |
2944 | - # So, we emulate echo with printf '%s\n' |
2945 | - echo="printf %s\\n" |
2946 | - if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : |
2947 | - else |
2948 | - # Oops. We have no working printf. Try to find a not-so-buggy echo. |
2949 | - echo=echo |
2950 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" |
2951 | - for dir in $PATH /usr/ucb; do |
2952 | - if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then |
2953 | - echo="$dir/echo" |
2954 | - break |
2955 | + # |
2956 | + # So, first we look for a working echo in the user's PATH. |
2957 | + |
2958 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
2959 | + for dir in $PATH /usr/ucb; do |
2960 | + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
2961 | + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
2962 | + test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then |
2963 | + echo="$dir/echo" |
2964 | + break |
2965 | + fi |
2966 | + done |
2967 | + IFS="$save_ifs" |
2968 | + |
2969 | + if test "X$echo" = Xecho; then |
2970 | + # We didn't find a better echo, so look for alternatives. |
2971 | + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
2972 | + test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then |
2973 | + # This shell has a builtin print -r that does the trick. |
2974 | + echo='print -r' |
2975 | + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
2976 | + test "X$CONFIG_SHELL" != X/bin/ksh; then |
2977 | + # If we have ksh, try running ltconfig again with it. |
2978 | + ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" |
2979 | + export ORIGINAL_CONFIG_SHELL |
2980 | + CONFIG_SHELL=/bin/ksh |
2981 | + export CONFIG_SHELL |
2982 | + exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} |
2983 | + else |
2984 | + # Try using printf. |
2985 | + echo='printf "%s\n"' |
2986 | + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
2987 | + test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then |
2988 | + # Cool, printf works |
2989 | + : |
2990 | + elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && |
2991 | + test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then |
2992 | + CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" |
2993 | + export CONFIG_SHELL |
2994 | + SHELL="$CONFIG_SHELL" |
2995 | + export SHELL |
2996 | + echo="$CONFIG_SHELL $0 --fallback-echo" |
2997 | + elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && |
2998 | + test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then |
2999 | + echo="$CONFIG_SHELL $0 --fallback-echo" |
3000 | + else |
3001 | + # maybe with a smaller string... |
3002 | + prev=: |
3003 | + |
3004 | + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do |
3005 | + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then |
3006 | + break |
3007 | + fi |
3008 | + prev="$cmd" |
3009 | + done |
3010 | + |
3011 | + if test "$prev" != 'sed 50q "$0"'; then |
3012 | + echo_test_string=`eval $prev` |
3013 | + export echo_test_string |
3014 | + exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} |
3015 | + else |
3016 | + # Oops. We lost completely, so just stick with echo. |
3017 | + echo=echo |
3018 | + fi |
3019 | fi |
3020 | - done |
3021 | - IFS="$save_ifs" |
3022 | + fi |
3023 | fi |
3024 | fi |
3025 | |
3026 | @@ -60,24 +159,34 @@ |
3027 | # Same as above, but do not quote variable references. |
3028 | double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' |
3029 | |
3030 | +# Sed substitution to delay expansion of an escaped shell variable in a |
3031 | +# double_quote_subst'ed string. |
3032 | +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
3033 | + |
3034 | # The name of this program. |
3035 | progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` |
3036 | |
3037 | # Constants: |
3038 | PROGRAM=ltconfig |
3039 | PACKAGE=libtool |
3040 | -VERSION=1.2 |
3041 | -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' |
3042 | -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' |
3043 | +VERSION=1.3.5 |
3044 | +TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" |
3045 | +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
3046 | +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
3047 | rm="rm -f" |
3048 | |
3049 | help="Try \`$progname --help' for more information." |
3050 | |
3051 | # Global variables: |
3052 | +default_ofile=libtool |
3053 | can_build_shared=yes |
3054 | enable_shared=yes |
3055 | -# All known linkers require a `.a' archive for static linking. |
3056 | +# All known linkers require a `.a' archive for static linking (except M$VC, |
3057 | +# which needs '.lib'). |
3058 | enable_static=yes |
3059 | +enable_fast_install=yes |
3060 | +enable_dlopen=unknown |
3061 | +enable_win32_dll=no |
3062 | ltmain= |
3063 | silent= |
3064 | srcdir= |
3065 | @@ -85,18 +194,30 @@ |
3066 | ac_config_sub= |
3067 | host= |
3068 | nonopt= |
3069 | +ofile="$default_ofile" |
3070 | verify_host=yes |
3071 | with_gcc=no |
3072 | with_gnu_ld=no |
3073 | +need_locks=yes |
3074 | +ac_ext=c |
3075 | +objext=o |
3076 | +libext=a |
3077 | +exeext= |
3078 | +cache_file= |
3079 | |
3080 | old_AR="$AR" |
3081 | old_CC="$CC" |
3082 | old_CFLAGS="$CFLAGS" |
3083 | old_CPPFLAGS="$CPPFLAGS" |
3084 | +old_LDFLAGS="$LDFLAGS" |
3085 | old_LD="$LD" |
3086 | old_LN_S="$LN_S" |
3087 | +old_LIBS="$LIBS" |
3088 | old_NM="$NM" |
3089 | old_RANLIB="$RANLIB" |
3090 | +old_DLLTOOL="$DLLTOOL" |
3091 | +old_OBJDUMP="$OBJDUMP" |
3092 | +old_AS="$AS" |
3093 | |
3094 | # Parse the command line options. |
3095 | args= |
3096 | @@ -117,33 +238,51 @@ |
3097 | |
3098 | case "$option" in |
3099 | --help) cat <<EOM |
3100 | -Usage: $progname [OPTION]... LTMAIN [HOST] |
3101 | +Usage: $progname [OPTION]... [HOST [LTMAIN]] |
3102 | |
3103 | Generate a system-specific libtool script. |
3104 | |
3105 | + --debug enable verbose shell tracing |
3106 | --disable-shared do not build shared libraries |
3107 | --disable-static do not build static libraries |
3108 | + --disable-fast-install do not optimize for fast installation |
3109 | + --enable-dlopen enable dlopen support |
3110 | + --enable-win32-dll enable building dlls on win32 hosts |
3111 | --help display this help and exit |
3112 | --no-verify do not verify that HOST is a valid host type |
3113 | +-o, --output=FILE specify the output file [default=$default_ofile] |
3114 | --quiet same as \`--silent' |
3115 | --silent do not print informational messages |
3116 | --srcdir=DIR find \`config.guess' in DIR |
3117 | --version output version information and exit |
3118 | --with-gcc assume that the GNU C compiler will be used |
3119 | --with-gnu-ld assume that the C compiler uses the GNU linker |
3120 | + --disable-lock disable file locking |
3121 | + --cache-file=FILE configure cache file |
3122 | |
3123 | -LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool |
3124 | -functionality. |
3125 | +LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program |
3126 | +that provides basic libtool functionality. |
3127 | |
3128 | HOST is the canonical host system name [default=guessed]. |
3129 | EOM |
3130 | exit 0 |
3131 | ;; |
3132 | |
3133 | + --debug) |
3134 | + echo "$progname: enabling shell trace mode" |
3135 | + set -x |
3136 | + ;; |
3137 | + |
3138 | --disable-shared) enable_shared=no ;; |
3139 | |
3140 | --disable-static) enable_static=no ;; |
3141 | |
3142 | + --disable-fast-install) enable_fast_install=no ;; |
3143 | + |
3144 | + --enable-dlopen) enable_dlopen=yes ;; |
3145 | + |
3146 | + --enable-win32-dll) enable_win32_dll=yes ;; |
3147 | + |
3148 | --quiet | --silent) silent=yes ;; |
3149 | |
3150 | --srcdir) prev=srcdir ;; |
3151 | @@ -151,11 +290,18 @@ |
3152 | |
3153 | --no-verify) verify_host=no ;; |
3154 | |
3155 | - --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;; |
3156 | + --output | -o) prev=ofile ;; |
3157 | + --output=*) ofile="$optarg" ;; |
3158 | + |
3159 | + --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;; |
3160 | |
3161 | --with-gcc) with_gcc=yes ;; |
3162 | --with-gnu-ld) with_gnu_ld=yes ;; |
3163 | |
3164 | + --disable-lock) need_locks=no ;; |
3165 | + |
3166 | + --cache-file=*) cache_file="$optarg" ;; |
3167 | + |
3168 | -*) |
3169 | echo "$progname: unrecognized option \`$option'" 1>&2 |
3170 | echo "$help" 1>&2 |
3171 | @@ -185,8 +331,7 @@ |
3172 | exit 1 |
3173 | fi |
3174 | |
3175 | -if test -f "$ltmain"; then : |
3176 | -else |
3177 | +if test ! -f "$ltmain"; then |
3178 | echo "$progname: \`$ltmain' does not exist" 1>&2 |
3179 | echo "$help" 1>&2 |
3180 | exit 1 |
3181 | @@ -224,8 +369,13 @@ |
3182 | # Only set LANG and LC_ALL to C if already set. |
3183 | # These must not be set unconditionally because not all systems understand |
3184 | # e.g. LANG=C (notably SCO). |
3185 | -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
3186 | -if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
3187 | +if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi |
3188 | +if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi |
3189 | + |
3190 | +if test -n "$cache_file" && test -r "$cache_file"; then |
3191 | + echo "loading cache $cache_file within ltconfig" |
3192 | + . $cache_file |
3193 | +fi |
3194 | |
3195 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
3196 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
3197 | @@ -240,8 +390,8 @@ |
3198 | fi |
3199 | |
3200 | if test -z "$srcdir"; then |
3201 | - # Assume the source directory is the same one as the path to ltmain.sh. |
3202 | - srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'` |
3203 | + # Assume the source directory is the same one as the path to LTMAIN. |
3204 | + srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` |
3205 | test "$srcdir" = "$ltmain" && srcdir=. |
3206 | fi |
3207 | |
3208 | @@ -264,7 +414,7 @@ |
3209 | ac_config_sub=$ac_aux_dir/config.sub |
3210 | |
3211 | # Make sure we can run config.sub. |
3212 | - if $ac_config_sub sun4 >/dev/null 2>&1; then : |
3213 | + if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : |
3214 | else |
3215 | echo "$progname: cannot run $ac_config_sub" 1>&2 |
3216 | echo "$help" 1>&2 |
3217 | @@ -276,14 +426,14 @@ |
3218 | host_alias=$host |
3219 | case "$host_alias" in |
3220 | "") |
3221 | - if host_alias=`$ac_config_guess`; then : |
3222 | + if host_alias=`$SHELL $ac_config_guess`; then : |
3223 | else |
3224 | echo "$progname: cannot guess host type; you must specify one" 1>&2 |
3225 | echo "$help" 1>&2 |
3226 | exit 1 |
3227 | fi ;; |
3228 | esac |
3229 | - host=`$ac_config_sub $host_alias` |
3230 | + host=`$SHELL $ac_config_sub $host_alias` |
3231 | echo "$ac_t$host" 1>&6 |
3232 | |
3233 | # Make sure the host verified. |
3234 | @@ -312,7 +462,7 @@ |
3235 | # AIX sometimes has problems with the GCC collect2 program. For some |
3236 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
3237 | # vanish in a puff of smoke. |
3238 | - if test "${COLLECT_NAMES+set}" != set; then |
3239 | + if test "X${COLLECT_NAMES+set}" != Xset; then |
3240 | COLLECT_NAMES= |
3241 | export COLLECT_NAMES |
3242 | fi |
3243 | @@ -327,15 +477,18 @@ |
3244 | # Set a sane default for `AR'. |
3245 | test -z "$AR" && AR=ar |
3246 | |
3247 | +# Set a sane default for `OBJDUMP'. |
3248 | +test -z "$OBJDUMP" && OBJDUMP=objdump |
3249 | + |
3250 | # If RANLIB is not set, then run the test. |
3251 | if test "${RANLIB+set}" != "set"; then |
3252 | result=no |
3253 | |
3254 | echo $ac_n "checking for ranlib... $ac_c" 1>&6 |
3255 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" |
3256 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
3257 | for dir in $PATH; do |
3258 | test -z "$dir" && dir=. |
3259 | - if test -f $dir/ranlib; then |
3260 | + if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then |
3261 | RANLIB="ranlib" |
3262 | result="ranlib" |
3263 | break |
3264 | @@ -347,20 +500,24 @@ |
3265 | fi |
3266 | |
3267 | if test -n "$RANLIB"; then |
3268 | - old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib" |
3269 | - old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds" |
3270 | + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
3271 | + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" |
3272 | fi |
3273 | |
3274 | +# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. |
3275 | +test -z "$DLLTOOL" && DLLTOOL=dlltool |
3276 | +test -z "$OBJDUMP" && OBJDUMP=objdump |
3277 | +test -z "$AS" && AS=as |
3278 | + |
3279 | # Check to see if we are using GCC. |
3280 | if test "$with_gcc" != yes || test -z "$CC"; then |
3281 | # If CC is not set, then try to find GCC or a usable CC. |
3282 | if test -z "$CC"; then |
3283 | echo $ac_n "checking for gcc... $ac_c" 1>&6 |
3284 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" |
3285 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
3286 | for dir in $PATH; do |
3287 | - IFS="$save_ifs" |
3288 | test -z "$dir" && dir=. |
3289 | - if test -f $dir/gcc; then |
3290 | + if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then |
3291 | CC="gcc" |
3292 | break |
3293 | fi |
3294 | @@ -377,11 +534,11 @@ |
3295 | # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". |
3296 | if test -z "$CC"; then |
3297 | echo $ac_n "checking for cc... $ac_c" 1>&6 |
3298 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" |
3299 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
3300 | cc_rejected=no |
3301 | for dir in $PATH; do |
3302 | test -z "$dir" && dir=. |
3303 | - if test -f $dir/cc; then |
3304 | + if test -f $dir/cc || test -f $dir/cc$ac_exeext; then |
3305 | if test "$dir/cc" = "/usr/ucb/cc"; then |
3306 | cc_rejected=yes |
3307 | continue |
3308 | @@ -421,7 +578,7 @@ |
3309 | # Now see if the compiler is really GCC. |
3310 | with_gcc=no |
3311 | echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 |
3312 | - echo "$progname:424: checking whether we are using GNU C" >&5 |
3313 | + echo "$progname:581: checking whether we are using GNU C" >&5 |
3314 | |
3315 | $rm conftest.c |
3316 | cat > conftest.c <<EOF |
3317 | @@ -429,7 +586,7 @@ |
3318 | yes; |
3319 | #endif |
3320 | EOF |
3321 | - if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
3322 | + if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
3323 | with_gcc=yes |
3324 | fi |
3325 | $rm conftest.c |
3326 | @@ -440,6 +597,60 @@ |
3327 | set dummy $CC |
3328 | compiler="$2" |
3329 | |
3330 | +echo $ac_n "checking for object suffix... $ac_c" 1>&6 |
3331 | +$rm conftest* |
3332 | +echo 'int i = 1;' > conftest.c |
3333 | +echo "$progname:603: checking for object suffix" >& 5 |
3334 | +if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then |
3335 | + # Append any warnings to the config.log. |
3336 | + cat conftest.err 1>&5 |
3337 | + |
3338 | + for ac_file in conftest.*; do |
3339 | + case $ac_file in |
3340 | + *.c) ;; |
3341 | + *) objext=`echo $ac_file | sed -e s/conftest.//` ;; |
3342 | + esac |
3343 | + done |
3344 | +else |
3345 | + cat conftest.err 1>&5 |
3346 | + echo "$progname: failed program was:" >&5 |
3347 | + cat conftest.c >&5 |
3348 | +fi |
3349 | +$rm conftest* |
3350 | +echo "$ac_t$objext" 1>&6 |
3351 | + |
3352 | +echo $ac_n "checking for executable suffix... $ac_c" 1>&6 |
3353 | +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
3354 | + echo $ac_n "(cached) $ac_c" 1>&6 |
3355 | +else |
3356 | + ac_cv_exeext="no" |
3357 | + $rm conftest* |
3358 | + echo 'main () { return 0; }' > conftest.c |
3359 | + echo "$progname:629: checking for executable suffix" >& 5 |
3360 | + if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then |
3361 | + # Append any warnings to the config.log. |
3362 | + cat conftest.err 1>&5 |
3363 | + |
3364 | + for ac_file in conftest.*; do |
3365 | + case $ac_file in |
3366 | + *.c | *.err | *.$objext ) ;; |
3367 | + *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;; |
3368 | + esac |
3369 | + done |
3370 | + else |
3371 | + cat conftest.err 1>&5 |
3372 | + echo "$progname: failed program was:" >&5 |
3373 | + cat conftest.c >&5 |
3374 | + fi |
3375 | + $rm conftest* |
3376 | +fi |
3377 | +if test "X$ac_cv_exeext" = Xno; then |
3378 | + exeext="" |
3379 | +else |
3380 | + exeext="$ac_cv_exeext" |
3381 | +fi |
3382 | +echo "$ac_t$ac_cv_exeext" 1>&6 |
3383 | + |
3384 | echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 |
3385 | pic_flag= |
3386 | special_shlib_compile_flags= |
3387 | @@ -450,21 +661,39 @@ |
3388 | if test "$with_gcc" = yes; then |
3389 | wl='-Wl,' |
3390 | link_static_flag='-static' |
3391 | - no_builtin_flag=' -fno-builtin' |
3392 | |
3393 | case "$host_os" in |
3394 | - aix3* | aix4* | irix5* | irix6* | osf3* | osf4*) |
3395 | + beos* | irix5* | irix6* | osf3* | osf4* | osf5*) |
3396 | # PIC is the default for these OSes. |
3397 | ;; |
3398 | - os2*) |
3399 | + aix*) |
3400 | + # Below there is a dirty hack to force normal static linking with -ldl |
3401 | + # The problem is because libdl dynamically linked with both libc and |
3402 | + # libC (AIX C++ library), which obviously doesn't included in libraries |
3403 | + # list by gcc. This cause undefined symbols with -static flags. |
3404 | + # This hack allows C programs to be linked with "-static -ldl", but |
3405 | + # we not sure about C++ programs. |
3406 | + link_static_flag="$link_static_flag ${wl}-lC" |
3407 | + ;; |
3408 | + cygwin* | mingw* | os2*) |
3409 | # We can build DLLs from non-PIC. |
3410 | ;; |
3411 | + darwin* | rhapsody*) |
3412 | + # PIC is the default on this platform |
3413 | + # Common symbols not allowed in MH_DYLIB files |
3414 | + pic_flag='-fno-common' |
3415 | + ;; |
3416 | amigaos*) |
3417 | # FIXME: we need at least 68020 code to build shared libraries, but |
3418 | # adding the `-m68020' flag to GCC prevents building anything better, |
3419 | # like `-m68040'. |
3420 | pic_flag='-m68020 -resident32 -malways-restore-a4' |
3421 | ;; |
3422 | + sysv4*MP*) |
3423 | + if test -d /usr/nec; then |
3424 | + pic_flag=-Kconform_pic |
3425 | + fi |
3426 | + ;; |
3427 | *) |
3428 | pic_flag='-fPIC' |
3429 | ;; |
3430 | @@ -477,7 +706,7 @@ |
3431 | link_static_flag='-bnso -bI:/lib/syscalls.exp' |
3432 | ;; |
3433 | |
3434 | - hpux9* | hpux10*) |
3435 | + hpux9* | hpux10* | hpux11*) |
3436 | # Is there a better link_static_flag that works with the bundled CC? |
3437 | wl='-Wl,' |
3438 | link_static_flag="${wl}-a ${wl}archive" |
3439 | @@ -490,11 +719,11 @@ |
3440 | # PIC (with -KPIC) is the default. |
3441 | ;; |
3442 | |
3443 | - os2*) |
3444 | + cygwin* | mingw* | os2*) |
3445 | # We can build DLLs from non-PIC. |
3446 | ;; |
3447 | |
3448 | - osf3* | osf4*) |
3449 | + osf3* | osf4* | osf5*) |
3450 | # All OSF/1 code is PIC. |
3451 | wl='-Wl,' |
3452 | link_static_flag='-non_shared' |
3453 | @@ -506,7 +735,7 @@ |
3454 | special_shlib_compile_flags='-belf' |
3455 | ;; |
3456 | |
3457 | - solaris2*) |
3458 | + solaris*) |
3459 | pic_flag='-KPIC' |
3460 | link_static_flag='-Bstatic' |
3461 | wl='-Wl,' |
3462 | @@ -518,7 +747,7 @@ |
3463 | wl='-Qoption ld ' |
3464 | ;; |
3465 | |
3466 | - sysv4.2uw2*) |
3467 | + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
3468 | pic_flag='-KPIC' |
3469 | link_static_flag='-Bstatic' |
3470 | wl='-Wl,' |
3471 | @@ -528,7 +757,12 @@ |
3472 | pic_flag='-pic' |
3473 | link_static_flag='-Bstatic' |
3474 | ;; |
3475 | - |
3476 | + sysv4*MP*) |
3477 | + if test -d /usr/nec ;then |
3478 | + pic_flag='-Kconform_pic' |
3479 | + link_static_flag='-Bstatic' |
3480 | + fi |
3481 | + ;; |
3482 | *) |
3483 | can_build_shared=no |
3484 | ;; |
3485 | @@ -541,25 +775,33 @@ |
3486 | # Check to make sure the pic_flag actually works. |
3487 | echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 |
3488 | $rm conftest* |
3489 | - echo > conftest.c |
3490 | + echo "int some_variable = 0;" > conftest.c |
3491 | save_CFLAGS="$CFLAGS" |
3492 | CFLAGS="$CFLAGS $pic_flag -DPIC" |
3493 | - echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5 |
3494 | - if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then |
3495 | + echo "$progname:781: checking if $compiler PIC flag $pic_flag works" >&5 |
3496 | + if { (eval echo $progname:782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then |
3497 | # Append any warnings to the config.log. |
3498 | cat conftest.err 1>&5 |
3499 | - |
3500 | - # On HP-UX, both CC and GCC only warn that PIC is supported... then they |
3501 | - # create non-PIC objects. So, if there were any warnings, we assume that |
3502 | - # PIC is not supported. |
3503 | - if test -s conftest.err; then |
3504 | - echo "$ac_t"no 1>&6 |
3505 | - can_build_shared=no |
3506 | - pic_flag= |
3507 | - else |
3508 | + |
3509 | + case "$host_os" in |
3510 | + hpux9* | hpux10* | hpux11*) |
3511 | + # On HP-UX, both CC and GCC only warn that PIC is supported... then they |
3512 | + # create non-PIC objects. So, if there were any warnings, we assume that |
3513 | + # PIC is not supported. |
3514 | + if test -s conftest.err; then |
3515 | + echo "$ac_t"no 1>&6 |
3516 | + can_build_shared=no |
3517 | + pic_flag= |
3518 | + else |
3519 | + echo "$ac_t"yes 1>&6 |
3520 | + pic_flag=" $pic_flag" |
3521 | + fi |
3522 | + ;; |
3523 | + *) |
3524 | echo "$ac_t"yes 1>&6 |
3525 | pic_flag=" $pic_flag" |
3526 | - fi |
3527 | + ;; |
3528 | + esac |
3529 | else |
3530 | # Append any errors to the config.log. |
3531 | cat conftest.err 1>&5 |
3532 | @@ -573,6 +815,136 @@ |
3533 | echo "$ac_t"none 1>&6 |
3534 | fi |
3535 | |
3536 | +# Check to see if options -o and -c are simultaneously supported by compiler |
3537 | +echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 |
3538 | +$rm -r conftest 2>/dev/null |
3539 | +mkdir conftest |
3540 | +cd conftest |
3541 | +$rm conftest* |
3542 | +echo "int some_variable = 0;" > conftest.c |
3543 | +mkdir out |
3544 | +# According to Tom Tromey, Ian Lance Taylor reported there are C compilers |
3545 | +# that will create temporary files in the current directory regardless of |
3546 | +# the output directory. Thus, making CWD read-only will cause this test |
3547 | +# to fail, enabling locking or at least warning the user not to do parallel |
3548 | +# builds. |
3549 | +chmod -w . |
3550 | +save_CFLAGS="$CFLAGS" |
3551 | +CFLAGS="$CFLAGS -o out/conftest2.o" |
3552 | +echo "$progname:834: checking if $compiler supports -c -o file.o" >&5 |
3553 | +if { (eval echo $progname:835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then |
3554 | + |
3555 | + # The compiler can only warn and ignore the option if not recognized |
3556 | + # So say no if there are warnings |
3557 | + if test -s out/conftest.err; then |
3558 | + echo "$ac_t"no 1>&6 |
3559 | + compiler_c_o=no |
3560 | + else |
3561 | + echo "$ac_t"yes 1>&6 |
3562 | + compiler_c_o=yes |
3563 | + fi |
3564 | +else |
3565 | + # Append any errors to the config.log. |
3566 | + cat out/conftest.err 1>&5 |
3567 | + compiler_c_o=no |
3568 | + echo "$ac_t"no 1>&6 |
3569 | +fi |
3570 | +CFLAGS="$save_CFLAGS" |
3571 | +chmod u+w . |
3572 | +$rm conftest* out/* |
3573 | +rmdir out |
3574 | +cd .. |
3575 | +rmdir conftest |
3576 | +$rm -r conftest 2>/dev/null |
3577 | + |
3578 | +if test x"$compiler_c_o" = x"yes"; then |
3579 | + # Check to see if we can write to a .lo |
3580 | + echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 |
3581 | + $rm conftest* |
3582 | + echo "int some_variable = 0;" > conftest.c |
3583 | + save_CFLAGS="$CFLAGS" |
3584 | + CFLAGS="$CFLAGS -c -o conftest.lo" |
3585 | + echo "$progname:867: checking if $compiler supports -c -o file.lo" >&5 |
3586 | +if { (eval echo $progname:868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then |
3587 | + |
3588 | + # The compiler can only warn and ignore the option if not recognized |
3589 | + # So say no if there are warnings |
3590 | + if test -s conftest.err; then |
3591 | + echo "$ac_t"no 1>&6 |
3592 | + compiler_o_lo=no |
3593 | + else |
3594 | + echo "$ac_t"yes 1>&6 |
3595 | + compiler_o_lo=yes |
3596 | + fi |
3597 | + else |
3598 | + # Append any errors to the config.log. |
3599 | + cat conftest.err 1>&5 |
3600 | + compiler_o_lo=no |
3601 | + echo "$ac_t"no 1>&6 |
3602 | + fi |
3603 | + CFLAGS="$save_CFLAGS" |
3604 | + $rm conftest* |
3605 | +else |
3606 | + compiler_o_lo=no |
3607 | +fi |
3608 | + |
3609 | +# Check to see if we can do hard links to lock some files if needed |
3610 | +hard_links="nottested" |
3611 | +if test "$compiler_c_o" = no && test "$need_locks" != no; then |
3612 | + # do not overwrite the value of need_locks provided by the user |
3613 | + echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 |
3614 | + hard_links=yes |
3615 | + $rm conftest* |
3616 | + ln conftest.a conftest.b 2>/dev/null && hard_links=no |
3617 | + touch conftest.a |
3618 | + ln conftest.a conftest.b 2>&5 || hard_links=no |
3619 | + ln conftest.a conftest.b 2>/dev/null && hard_links=no |
3620 | + echo "$ac_t$hard_links" 1>&6 |
3621 | + $rm conftest* |
3622 | + if test "$hard_links" = no; then |
3623 | + echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 |
3624 | + need_locks=warn |
3625 | + fi |
3626 | +else |
3627 | + need_locks=no |
3628 | +fi |
3629 | + |
3630 | +if test "$with_gcc" = yes; then |
3631 | + # Check to see if options -fno-rtti -fno-exceptions are supported by compiler |
3632 | + echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 |
3633 | + $rm conftest* |
3634 | + echo "int some_variable = 0;" > conftest.c |
3635 | + save_CFLAGS="$CFLAGS" |
3636 | + CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" |
3637 | + echo "$progname:919: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 |
3638 | + if { (eval echo $progname:920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then |
3639 | + |
3640 | + # The compiler can only warn and ignore the option if not recognized |
3641 | + # So say no if there are warnings |
3642 | + if test -s conftest.err; then |
3643 | + echo "$ac_t"no 1>&6 |
3644 | + compiler_rtti_exceptions=no |
3645 | + else |
3646 | + echo "$ac_t"yes 1>&6 |
3647 | + compiler_rtti_exceptions=yes |
3648 | + fi |
3649 | + else |
3650 | + # Append any errors to the config.log. |
3651 | + cat conftest.err 1>&5 |
3652 | + compiler_rtti_exceptions=no |
3653 | + echo "$ac_t"no 1>&6 |
3654 | + fi |
3655 | + CFLAGS="$save_CFLAGS" |
3656 | + $rm conftest* |
3657 | + |
3658 | + if test "$compiler_rtti_exceptions" = "yes"; then |
3659 | + no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' |
3660 | + else |
3661 | + no_builtin_flag=' -fno-builtin' |
3662 | + fi |
3663 | + |
3664 | +fi |
3665 | + |
3666 | # Check for any special shared library compilation flags. |
3667 | if test -n "$special_shlib_compile_flags"; then |
3668 | echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 |
3669 | @@ -588,8 +960,8 @@ |
3670 | echo 'main(){return(0);}' > conftest.c |
3671 | save_LDFLAGS="$LDFLAGS" |
3672 | LDFLAGS="$LDFLAGS $link_static_flag" |
3673 | -echo "$progname:591: checking if $compiler static flag $link_static_flag works" >&5 |
3674 | -if { (eval echo $progname:592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
3675 | +echo "$progname:963: checking if $compiler static flag $link_static_flag works" >&5 |
3676 | +if { (eval echo $progname:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
3677 | echo "$ac_t$link_static_flag" 1>&6 |
3678 | else |
3679 | echo "$ac_t"none 1>&6 |
3680 | @@ -601,9 +973,9 @@ |
3681 | if test -z "$LN_S"; then |
3682 | # Check to see if we can use ln -s, or we need hard links. |
3683 | echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 |
3684 | - $rm conftestdata |
3685 | - if ln -s X conftestdata 2>/dev/null; then |
3686 | - $rm conftestdata |
3687 | + $rm conftest.dat |
3688 | + if ln -s X conftest.dat 2>/dev/null; then |
3689 | + $rm conftest.dat |
3690 | LN_S="ln -s" |
3691 | else |
3692 | LN_S=ln |
3693 | @@ -621,11 +993,17 @@ |
3694 | if test "$with_gcc" = yes; then |
3695 | # Check if gcc -print-prog-name=ld gives a path. |
3696 | echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 |
3697 | - echo "$progname:624: checking for ld used by GCC" >&5 |
3698 | + echo "$progname:996: checking for ld used by GCC" >&5 |
3699 | ac_prog=`($CC -print-prog-name=ld) 2>&5` |
3700 | case "$ac_prog" in |
3701 | # Accept absolute paths. |
3702 | - /* | [A-Za-z]:\\*) |
3703 | + [\\/]* | [A-Za-z]:[\\/]*) |
3704 | + re_direlt='/[^/][^/]*/\.\./' |
3705 | + # Canonicalize the path of ld |
3706 | + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
3707 | + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
3708 | + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
3709 | + done |
3710 | test -z "$LD" && LD="$ac_prog" |
3711 | ;; |
3712 | "") |
3713 | @@ -639,17 +1017,17 @@ |
3714 | esac |
3715 | elif test "$with_gnu_ld" = yes; then |
3716 | echo $ac_n "checking for GNU ld... $ac_c" 1>&6 |
3717 | - echo "$progname:642: checking for GNU ld" >&5 |
3718 | + echo "$progname:1020: checking for GNU ld" >&5 |
3719 | else |
3720 | echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 |
3721 | - echo "$progname:645: checking for non-GNU ld" >&5 |
3722 | + echo "$progname:1023: checking for non-GNU ld" >&5 |
3723 | fi |
3724 | |
3725 | if test -z "$LD"; then |
3726 | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
3727 | + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
3728 | for ac_dir in $PATH; do |
3729 | test -z "$ac_dir" && ac_dir=. |
3730 | - if test -f "$ac_dir/$ac_prog"; then |
3731 | + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
3732 | LD="$ac_dir/$ac_prog" |
3733 | # Check to see if the program is GNU ld. I'd rather use --version, |
3734 | # but apparently some GNU ld's only accept -v. |
3735 | @@ -691,48 +1069,208 @@ |
3736 | |
3737 | allow_undefined_flag= |
3738 | no_undefined_flag= |
3739 | +need_lib_prefix=unknown |
3740 | +need_version=unknown |
3741 | +# when you set need_version to no, make sure it does not cause -set_version |
3742 | +# flags to be left without arguments |
3743 | archive_cmds= |
3744 | +archive_expsym_cmds= |
3745 | old_archive_from_new_cmds= |
3746 | export_dynamic_flag_spec= |
3747 | +whole_archive_flag_spec= |
3748 | +thread_safe_flag_spec= |
3749 | hardcode_libdir_flag_spec= |
3750 | hardcode_libdir_separator= |
3751 | hardcode_direct=no |
3752 | hardcode_minus_L=no |
3753 | hardcode_shlibpath_var=unsupported |
3754 | runpath_var= |
3755 | +always_export_symbols=no |
3756 | +export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
3757 | +# include_expsyms should be a list of space-separated symbols to be *always* |
3758 | +# included in the symbol list |
3759 | +include_expsyms= |
3760 | +# exclude_expsyms can be an egrep regular expression of symbols to exclude |
3761 | +# it will be wrapped by ` (' and `)$', so one must not match beginning or |
3762 | +# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
3763 | +# as well as any symbol that contains `d'. |
3764 | +exclude_expsyms="_GLOBAL_OFFSET_TABLE_" |
3765 | +# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
3766 | +# platforms (ab)use it in PIC code, but their linkers get confused if |
3767 | +# the symbol is explicitly referenced. Since portable code cannot |
3768 | +# rely on this symbol name, it's probably fine to never include it in |
3769 | +# preloaded symbol tables. |
3770 | |
3771 | case "$host_os" in |
3772 | -amigaos* | sunos4*) |
3773 | - # On these operating systems, we should treat GNU ld like the system ld. |
3774 | - gnu_ld_acts_native=yes |
3775 | - ;; |
3776 | -*) |
3777 | - gnu_ld_acts_native=no |
3778 | +cygwin* | mingw*) |
3779 | + # FIXME: the MSVC++ port hasn't been tested in a loooong time |
3780 | + # When not using gcc, we currently assume that we are using |
3781 | + # Microsoft Visual C++. |
3782 | + if test "$with_gcc" != yes; then |
3783 | + with_gnu_ld=no |
3784 | + fi |
3785 | ;; |
3786 | + |
3787 | esac |
3788 | |
3789 | ld_shlibs=yes |
3790 | -if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then |
3791 | +if test "$with_gnu_ld" = yes; then |
3792 | + # If archive_cmds runs LD, not CC, wlarc should be empty |
3793 | + wlarc='${wl}' |
3794 | |
3795 | # See if GNU ld supports shared libraries. |
3796 | - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
3797 | - archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs' |
3798 | - runpath_var=LD_RUN_PATH |
3799 | - ld_shlibs=yes |
3800 | - else |
3801 | + case "$host_os" in |
3802 | + aix3* | aix4*) |
3803 | + # On AIX, the GNU linker is very broken |
3804 | ld_shlibs=no |
3805 | - fi |
3806 | + cat <<EOF 1>&2 |
3807 | + |
3808 | +*** Warning: the GNU linker, at least up to release 2.9.1, is reported |
3809 | +*** to be unable to reliably create shared libraries on AIX. |
3810 | +*** Therefore, libtool is disabling shared libraries support. If you |
3811 | +*** really care for shared libraries, you may want to modify your PATH |
3812 | +*** so that a non-GNU linker is found, and then restart. |
3813 | + |
3814 | +EOF |
3815 | + ;; |
3816 | + |
3817 | + amigaos*) |
3818 | + archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' |
3819 | + hardcode_libdir_flag_spec='-L$libdir' |
3820 | + hardcode_minus_L=yes |
3821 | + |
3822 | + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
3823 | + # that the semantics of dynamic libraries on AmigaOS, at least up |
3824 | + # to version 4, is to share data among multiple programs linked |
3825 | + # with the same dynamic library. Since this doesn't match the |
3826 | + # behavior of shared libraries on other platforms, we can use |
3827 | + # them. |
3828 | + ld_shlibs=no |
3829 | + ;; |
3830 | + |
3831 | + beos*) |
3832 | + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
3833 | + allow_undefined_flag=unsupported |
3834 | + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
3835 | + # support --undefined. This deserves some investigation. FIXME |
3836 | + archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' |
3837 | + else |
3838 | + ld_shlibs=no |
3839 | + fi |
3840 | + ;; |
3841 | + |
3842 | + cygwin* | mingw*) |
3843 | + # hardcode_libdir_flag_spec is actually meaningless, as there is |
3844 | + # no search path for DLLs. |
3845 | + hardcode_libdir_flag_spec='-L$libdir' |
3846 | + allow_undefined_flag=unsupported |
3847 | + always_export_symbols=yes |
3848 | + |
3849 | + # Extract the symbol export list from an `--export-all' def file, |
3850 | + # then regenerate the def file from the symbol export list, so that |
3851 | + # the compiled dll only exports the symbol export list. |
3852 | + # Be careful not to strip the DATA tag left by newer dlltools. |
3853 | + export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ |
3854 | + test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ |
3855 | + $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~ |
3856 | + sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols' |
3857 | + |
3858 | + # If DATA tags from a recent dlltool are present, honour them! |
3859 | + archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ |
3860 | + _lt_hint=1; |
3861 | + cat $export_symbols | while read symbol; do |
3862 | + set dummy \$symbol; |
3863 | + case \$# in |
3864 | + 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;; |
3865 | + *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;; |
3866 | + esac; |
3867 | + _lt_hint=`expr 1 + \$_lt_hint`; |
3868 | + done~ |
3869 | + test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ |
3870 | + test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ |
3871 | + $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ |
3872 | + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ |
3873 | + $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ |
3874 | + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ |
3875 | + $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' |
3876 | + |
3877 | + old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' |
3878 | + ;; |
3879 | + |
3880 | + netbsd*) |
3881 | + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
3882 | + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' |
3883 | + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
3884 | + else |
3885 | + archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' |
3886 | + # can we support soname and/or expsyms with a.out? -oliva |
3887 | + fi |
3888 | + ;; |
3889 | + |
3890 | + solaris* | sysv5*) |
3891 | + if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
3892 | + ld_shlibs=no |
3893 | + cat <<EOF 1>&2 |
3894 | + |
3895 | +*** Warning: The releases 2.8.* of the GNU linker cannot reliably |
3896 | +*** create shared libraries on Solaris systems. Therefore, libtool |
3897 | +*** is disabling shared libraries support. We urge you to upgrade GNU |
3898 | +*** binutils to release 2.9.1 or newer. Another option is to modify |
3899 | +*** your PATH or compiler configuration so that the native linker is |
3900 | +*** used, and then restart. |
3901 | + |
3902 | +EOF |
3903 | + elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
3904 | + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' |
3905 | + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
3906 | + else |
3907 | + ld_shlibs=no |
3908 | + fi |
3909 | + ;; |
3910 | + |
3911 | + sunos4*) |
3912 | + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' |
3913 | + wlarc= |
3914 | + hardcode_direct=yes |
3915 | + hardcode_shlibpath_var=no |
3916 | + ;; |
3917 | + |
3918 | + *) |
3919 | + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
3920 | + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' |
3921 | + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
3922 | + else |
3923 | + ld_shlibs=no |
3924 | + fi |
3925 | + ;; |
3926 | + esac |
3927 | |
3928 | if test "$ld_shlibs" = yes; then |
3929 | + runpath_var=LD_RUN_PATH |
3930 | hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' |
3931 | export_dynamic_flag_spec='${wl}--export-dynamic' |
3932 | + case $host_os in |
3933 | + cygwin* | mingw*) |
3934 | + # dlltool doesn't understand --whole-archive et. al. |
3935 | + whole_archive_flag_spec= |
3936 | + ;; |
3937 | + *) |
3938 | + # ancient GNU ld didn't support --whole-archive et. al. |
3939 | + if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
3940 | + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
3941 | + else |
3942 | + whole_archive_flag_spec= |
3943 | + fi |
3944 | + ;; |
3945 | + esac |
3946 | fi |
3947 | else |
3948 | # PORTME fill in a description of your system's linker (not GNU ld) |
3949 | case "$host_os" in |
3950 | aix3*) |
3951 | allow_undefined_flag=unsupported |
3952 | - archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname' |
3953 | + always_export_symbols=yes |
3954 | + archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' |
3955 | # Note: this linker hardcodes the directories in LIBPATH if there |
3956 | # are no directories specified by -L. |
3957 | hardcode_minus_L=yes |
3958 | @@ -744,16 +1282,67 @@ |
3959 | ;; |
3960 | |
3961 | aix4*) |
3962 | - allow_undefined_flag=unsupported |
3963 | - archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname' |
3964 | - hardcode_direct=yes |
3965 | - hardcode_minus_L=yes |
3966 | - ;; |
3967 | + hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' |
3968 | + hardcode_libdir_separator=':' |
3969 | + if test "$with_gcc" = yes; then |
3970 | + collect2name=`${CC} -print-prog-name=collect2` |
3971 | + if test -f "$collect2name" && \ |
3972 | + strings "$collect2name" | grep resolve_lib_name >/dev/null |
3973 | + then |
3974 | + # We have reworked collect2 |
3975 | + hardcode_direct=yes |
3976 | + else |
3977 | + # We have old collect2 |
3978 | + hardcode_direct=unsupported |
3979 | + # It fails to find uninstalled libraries when the uninstalled |
3980 | + # path is not listed in the libpath. Setting hardcode_minus_L |
3981 | + # to unsupported forces relinking |
3982 | + hardcode_minus_L=yes |
3983 | + hardcode_libdir_flag_spec='-L$libdir' |
3984 | + hardcode_libdir_separator= |
3985 | + fi |
3986 | + shared_flag='-shared' |
3987 | + else |
3988 | + shared_flag='${wl}-bM:SRE' |
3989 | + hardcode_direct=yes |
3990 | + fi |
3991 | + allow_undefined_flag=' ${wl}-berok' |
3992 | + archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' |
3993 | + archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' |
3994 | + case "$host_os" in aix4.[01]|aix4.[01].*) |
3995 | + # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on |
3996 | + always_export_symbols=yes ;; |
3997 | + esac |
3998 | + ;; |
3999 | |
4000 | amigaos*) |
4001 | - archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' |
4002 | + archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' |
4003 | hardcode_libdir_flag_spec='-L$libdir' |
4004 | hardcode_minus_L=yes |
4005 | + # see comment about different semantics on the GNU ld section |
4006 | + ld_shlibs=no |
4007 | + ;; |
4008 | + |
4009 | + cygwin* | mingw*) |
4010 | + # When not using gcc, we currently assume that we are using |
4011 | + # Microsoft Visual C++. |
4012 | + # hardcode_libdir_flag_spec is actually meaningless, as there is |
4013 | + # no search path for DLLs. |
4014 | + hardcode_libdir_flag_spec=' ' |
4015 | + allow_undefined_flag=unsupported |
4016 | + # Tell ltmain to make .lib files, not .a files. |
4017 | + libext=lib |
4018 | + # FIXME: Setting linknames here is a bad hack. |
4019 | + archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
4020 | + # The linker will automatically build a .lib file if we build a DLL. |
4021 | + old_archive_from_new_cmds='true' |
4022 | + # FIXME: Should let the user specify the lib program. |
4023 | + old_archive_cmds='lib /OUT:$oldlib$oldobjs' |
4024 | + fix_srcfile_path='`cygpath -w $srcfile`' |
4025 | + ;; |
4026 | + |
4027 | + freebsd1*) |
4028 | + ld_shlibs=no |
4029 | ;; |
4030 | |
4031 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
4032 | @@ -761,61 +1350,85 @@ |
4033 | # does not break anything, and helps significantly (at the cost of a little |
4034 | # extra space). |
4035 | freebsd2.2*) |
4036 | - archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o' |
4037 | + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' |
4038 | hardcode_libdir_flag_spec='-R$libdir' |
4039 | hardcode_direct=yes |
4040 | - hardcode_minus_L=yes |
4041 | hardcode_shlibpath_var=no |
4042 | ;; |
4043 | |
4044 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
4045 | freebsd2*) |
4046 | - archive_cmds='$LD -Bshareable -o $lib$libobjs' |
4047 | + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' |
4048 | hardcode_direct=yes |
4049 | hardcode_minus_L=yes |
4050 | hardcode_shlibpath_var=no |
4051 | ;; |
4052 | |
4053 | - # FreeBSD 3, at last, uses gcc -shared to do shared libraries. |
4054 | - freebsd3*) |
4055 | - archive_cmds='$CC -shared -o $lib$libobjs' |
4056 | + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
4057 | + freebsd*) |
4058 | + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' |
4059 | hardcode_libdir_flag_spec='-R$libdir' |
4060 | hardcode_direct=yes |
4061 | - hardcode_minus_L=yes |
4062 | hardcode_shlibpath_var=no |
4063 | ;; |
4064 | |
4065 | - hpux9*) |
4066 | - archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib' |
4067 | - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
4068 | + darwin[15]* | rhapsody*) |
4069 | + allow_undefined_flag='-undefined error' |
4070 | + archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)' |
4071 | + # We need to add '_' to the symbols in $export_symbols first |
4072 | + #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib' |
4073 | hardcode_direct=yes |
4074 | - hardcode_minus_L=yes |
4075 | - export_dynamic_flag_spec='${wl}-E' |
4076 | + hardcode_shlibpath_var=no |
4077 | + whole_archive_flag_spec='-all_load $convenience' |
4078 | + ;; |
4079 | + |
4080 | + # Mac OS X v10.2 uses bash for /bin/sh instead of zsh, and the quoting syntax is incompatible |
4081 | + darwin*) |
4082 | + allow_undefined_flag='-undefined error' |
4083 | + archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test x$module != xyes && echo -install_name $rpath/$soname $tmp_verstring)' |
4084 | + # We need to add '_' to the symbols in $export_symbols first |
4085 | + #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib' |
4086 | + hardcode_direct=yes |
4087 | + hardcode_shlibpath_var=no |
4088 | + whole_archive_flag_spec='-all_load $convenience' |
4089 | ;; |
4090 | |
4091 | - hpux10*) |
4092 | - archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs' |
4093 | + hpux9* | hpux10* | hpux11*) |
4094 | + case "$host_os" in |
4095 | + hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; |
4096 | + *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; |
4097 | + esac |
4098 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
4099 | + hardcode_libdir_separator=: |
4100 | hardcode_direct=yes |
4101 | - hardcode_minus_L=yes |
4102 | + hardcode_minus_L=yes # Not in the search PATH, but as the default |
4103 | + # location of the library. |
4104 | export_dynamic_flag_spec='${wl}-E' |
4105 | ;; |
4106 | |
4107 | irix5* | irix6*) |
4108 | - archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs' |
4109 | + if test "$with_gcc" = yes; then |
4110 | + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
4111 | + else |
4112 | + archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
4113 | + fi |
4114 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
4115 | + hardcode_libdir_separator=: |
4116 | ;; |
4117 | |
4118 | netbsd*) |
4119 | - # Tested with NetBSD 1.2 ld |
4120 | - archive_cmds='$LD -Bshareable -o $lib$libobjs' |
4121 | - hardcode_libdir_flag_spec='-R$libdir' |
4122 | + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
4123 | + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out |
4124 | + else |
4125 | + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF |
4126 | + fi |
4127 | + hardcode_libdir_flag_spec='${wl}-R$libdir' |
4128 | hardcode_direct=yes |
4129 | hardcode_shlibpath_var=no |
4130 | ;; |
4131 | |
4132 | openbsd*) |
4133 | - archive_cmds='$LD -Bshareable -o $lib$libobjs' |
4134 | + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' |
4135 | hardcode_libdir_flag_spec='-R$libdir' |
4136 | hardcode_direct=yes |
4137 | hardcode_shlibpath_var=no |
4138 | @@ -825,88 +1438,163 @@ |
4139 | hardcode_libdir_flag_spec='-L$libdir' |
4140 | hardcode_minus_L=yes |
4141 | allow_undefined_flag=unsupported |
4142 | - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def' |
4143 | + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' |
4144 | old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' |
4145 | ;; |
4146 | |
4147 | - osf3* | osf4*) |
4148 | - allow_undefined_flag=' -expect_unresolved \*' |
4149 | - archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs' |
4150 | + osf3*) |
4151 | + if test "$with_gcc" = yes; then |
4152 | + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
4153 | + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
4154 | + else |
4155 | + allow_undefined_flag=' -expect_unresolved \*' |
4156 | + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
4157 | + fi |
4158 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
4159 | hardcode_libdir_separator=: |
4160 | ;; |
4161 | |
4162 | + osf4* | osf5*) # As osf3* with the addition of the -msym flag |
4163 | + if test "$with_gcc" = yes; then |
4164 | + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
4165 | + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
4166 | + else |
4167 | + allow_undefined_flag=' -expect_unresolved \*' |
4168 | + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
4169 | + fi |
4170 | + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
4171 | + hardcode_libdir_separator=: |
4172 | + ;; |
4173 | + |
4174 | sco3.2v5*) |
4175 | - archive_cmds='$LD -G -o $lib$libobjs' |
4176 | - hardcode_direct=yes |
4177 | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
4178 | + hardcode_shlibpath_var=no |
4179 | + runpath_var=LD_RUN_PATH |
4180 | + hardcode_runpath_var=yes |
4181 | ;; |
4182 | |
4183 | - solaris2*) |
4184 | + solaris*) |
4185 | no_undefined_flag=' -z text' |
4186 | - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs' |
4187 | + # $CC -shared without GNU ld will not create a library from C++ |
4188 | + # object files and a static libstdc++, better avoid it by now |
4189 | + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' |
4190 | + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
4191 | + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' |
4192 | hardcode_libdir_flag_spec='-R$libdir' |
4193 | hardcode_shlibpath_var=no |
4194 | - |
4195 | - # Solaris 2 before 2.5 hardcodes -L paths. |
4196 | case "$host_os" in |
4197 | - solaris2.[0-4]*) |
4198 | - hardcode_minus_L=yes |
4199 | - ;; |
4200 | + solaris2.[0-5] | solaris2.[0-5].*) ;; |
4201 | + *) # Supported since Solaris 2.6 (maybe 2.5.1?) |
4202 | + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; |
4203 | esac |
4204 | ;; |
4205 | |
4206 | sunos4*) |
4207 | - if test "$with_gcc" = yes; then |
4208 | - archive_cmds='$CC -shared -o $lib$libobjs' |
4209 | - else |
4210 | - archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' |
4211 | - fi |
4212 | - |
4213 | - if test "$with_gnu_ld" = yes; then |
4214 | - export_dynamic_flag_spec='${wl}-export-dynamic' |
4215 | - fi |
4216 | + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' |
4217 | hardcode_libdir_flag_spec='-L$libdir' |
4218 | hardcode_direct=yes |
4219 | hardcode_minus_L=yes |
4220 | hardcode_shlibpath_var=no |
4221 | ;; |
4222 | |
4223 | - uts4*) |
4224 | - archive_cmds='$LD -G -h $soname -o $lib$libobjs' |
4225 | - hardcode_libdir_flag_spec='-L$libdir' |
4226 | - hardcode_direct=no |
4227 | - hardcode_minus_L=no |
4228 | + sysv4) |
4229 | + if test "x$host_vendor" = xsequent; then |
4230 | + # Use $CC to link under sequent, because it throws in some extra .o |
4231 | + # files that make .init and .fini sections work. |
4232 | + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts' |
4233 | + else |
4234 | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
4235 | + fi |
4236 | + runpath_var='LD_RUN_PATH' |
4237 | + hardcode_shlibpath_var=no |
4238 | + hardcode_direct=no #Motorola manual says yes, but my tests say they lie |
4239 | + ;; |
4240 | + |
4241 | + sysv4.3*) |
4242 | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
4243 | + hardcode_shlibpath_var=no |
4244 | + export_dynamic_flag_spec='-Bexport' |
4245 | + ;; |
4246 | + |
4247 | + sysv5*) |
4248 | + no_undefined_flag=' -z text' |
4249 | + # $CC -shared without GNU ld will not create a library from C++ |
4250 | + # object files and a static libstdc++, better avoid it by now |
4251 | + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' |
4252 | + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
4253 | + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' |
4254 | + hardcode_libdir_flag_spec= |
4255 | + hardcode_shlibpath_var=no |
4256 | + runpath_var='LD_RUN_PATH' |
4257 | + ;; |
4258 | + |
4259 | + uts4*) |
4260 | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
4261 | + hardcode_libdir_flag_spec='-L$libdir' |
4262 | + hardcode_shlibpath_var=no |
4263 | + ;; |
4264 | + |
4265 | + dgux*) |
4266 | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
4267 | + hardcode_libdir_flag_spec='-L$libdir' |
4268 | + hardcode_shlibpath_var=no |
4269 | + ;; |
4270 | + |
4271 | + sysv4*MP*) |
4272 | + if test -d /usr/nec; then |
4273 | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
4274 | + hardcode_shlibpath_var=no |
4275 | + runpath_var=LD_RUN_PATH |
4276 | + hardcode_runpath_var=yes |
4277 | + ld_shlibs=yes |
4278 | + fi |
4279 | + ;; |
4280 | + |
4281 | + sysv4.2uw2*) |
4282 | + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' |
4283 | + hardcode_direct=yes |
4284 | + hardcode_minus_L=no |
4285 | + hardcode_shlibpath_var=no |
4286 | + hardcode_runpath_var=yes |
4287 | + runpath_var=LD_RUN_PATH |
4288 | + ;; |
4289 | + |
4290 | + unixware7*) |
4291 | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
4292 | + runpath_var='LD_RUN_PATH' |
4293 | hardcode_shlibpath_var=no |
4294 | ;; |
4295 | |
4296 | *) |
4297 | ld_shlibs=no |
4298 | - can_build_shared=no |
4299 | ;; |
4300 | esac |
4301 | fi |
4302 | echo "$ac_t$ld_shlibs" 1>&6 |
4303 | +test "$ld_shlibs" = no && can_build_shared=no |
4304 | |
4305 | if test -z "$NM"; then |
4306 | echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 |
4307 | case "$NM" in |
4308 | - /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path. |
4309 | + [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. |
4310 | *) |
4311 | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
4312 | - for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do |
4313 | + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
4314 | + for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do |
4315 | test -z "$ac_dir" && ac_dir=. |
4316 | - if test -f $ac_dir/nm; then |
4317 | - # Check to see if the nm accepts a BSD-compat flag. |
4318 | - # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
4319 | - # nm: unknown option "B" ignored |
4320 | - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
4321 | - NM="$ac_dir/nm -B" |
4322 | - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
4323 | - NM="$ac_dir/nm -p" |
4324 | + if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then |
4325 | + # Check to see if the nm accepts a BSD-compat flag. |
4326 | + # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
4327 | + # nm: unknown option "B" ignored |
4328 | + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
4329 | + NM="$ac_dir/nm -B" |
4330 | + break |
4331 | + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
4332 | + NM="$ac_dir/nm -p" |
4333 | + break |
4334 | else |
4335 | - NM="$ac_dir/nm" |
4336 | + NM=${NM="$ac_dir/nm"} # keep the first match, but |
4337 | + continue # so that we can try to find one that supports BSD flags |
4338 | fi |
4339 | - break |
4340 | fi |
4341 | done |
4342 | IFS="$ac_save_ifs" |
4343 | @@ -923,40 +1611,54 @@ |
4344 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
4345 | |
4346 | # Character class describing NM global symbol codes. |
4347 | -symcode='[BCDEGRSTU]' |
4348 | +symcode='[BCDEGRST]' |
4349 | |
4350 | # Regexp to match symbols that can be accessed directly from C. |
4351 | sympat='\([_A-Za-z][_A-Za-z0-9]*\)' |
4352 | |
4353 | # Transform the above into a raw symbol and a C symbol. |
4354 | -symxfrm='\1 \1' |
4355 | +symxfrm='\1 \2\3 \3' |
4356 | + |
4357 | +# Transform an extracted symbol line into a proper C declaration |
4358 | +global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" |
4359 | |
4360 | # Define system-specific variables. |
4361 | case "$host_os" in |
4362 | aix*) |
4363 | - symcode='[BCDTU]' |
4364 | + symcode='[BCDT]' |
4365 | + ;; |
4366 | +cygwin* | mingw*) |
4367 | + symcode='[ABCDGISTW]' |
4368 | + ;; |
4369 | +hpux*) # Its linker distinguishes data from code symbols |
4370 | + global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" |
4371 | ;; |
4372 | irix*) |
4373 | - # Cannot use undefined symbols on IRIX because inlined functions mess us up. |
4374 | symcode='[BCDEGRST]' |
4375 | ;; |
4376 | -solaris2*) |
4377 | - symcode='[BDTU]' |
4378 | +solaris*) |
4379 | + symcode='[BDT]' |
4380 | + ;; |
4381 | +sysv4) |
4382 | + symcode='[DFNSTU]' |
4383 | ;; |
4384 | esac |
4385 | |
4386 | # If we're using GNU nm, then use its standard symbol codes. |
4387 | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
4388 | - symcode='[ABCDGISTUW]' |
4389 | + symcode='[ABCDGISTW]' |
4390 | fi |
4391 | |
4392 | -# Write the raw and C identifiers. |
4393 | -global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'" |
4394 | +# Try without a prefix undercore, then with it. |
4395 | +for ac_symprfx in "" "_"; do |
4396 | |
4397 | -# Check to see that the pipe works correctly. |
4398 | -pipe_works=no |
4399 | -$rm conftest* |
4400 | -cat > conftest.c <<EOF |
4401 | + # Write the raw and C identifiers. |
4402 | + global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" |
4403 | + |
4404 | + # Check to see that the pipe works correctly. |
4405 | + pipe_works=no |
4406 | + $rm conftest* |
4407 | + cat > conftest.c <<EOF |
4408 | #ifdef __cplusplus |
4409 | extern "C" { |
4410 | #endif |
4411 | @@ -968,93 +1670,100 @@ |
4412 | main(){nm_test_var='a';nm_test_func();return(0);} |
4413 | EOF |
4414 | |
4415 | -echo "$progname:971: checking if global_symbol_pipe works" >&5 |
4416 | -if { (eval echo $progname:972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then |
4417 | - # Now try to grab the symbols. |
4418 | - nlist=conftest.nm |
4419 | - if { echo "$progname:975: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then |
4420 | - |
4421 | - # Try sorting and uniquifying the output. |
4422 | - if sort "$nlist" | uniq > "$nlist"T; then |
4423 | - mv -f "$nlist"T "$nlist" |
4424 | - wcout=`wc "$nlist" 2>/dev/null` |
4425 | - count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` |
4426 | - (test "$count" -ge 0) 2>/dev/null || count=-1 |
4427 | - else |
4428 | - rm -f "$nlist"T |
4429 | - count=-1 |
4430 | - fi |
4431 | + echo "$progname:1662: checking if global_symbol_pipe works" >&5 |
4432 | + if { (eval echo $progname:1663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then |
4433 | + # Now try to grab the symbols. |
4434 | + nlist=conftest.nm |
4435 | + if { echo "$progname:1666: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then |
4436 | + |
4437 | + # Try sorting and uniquifying the output. |
4438 | + if sort "$nlist" | uniq > "$nlist"T; then |
4439 | + mv -f "$nlist"T "$nlist" |
4440 | + else |
4441 | + rm -f "$nlist"T |
4442 | + fi |
4443 | |
4444 | - # Make sure that we snagged all the symbols we need. |
4445 | - if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
4446 | - if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
4447 | - cat <<EOF > conftest.c |
4448 | + # Make sure that we snagged all the symbols we need. |
4449 | + if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
4450 | + if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
4451 | + cat <<EOF > conftest.c |
4452 | #ifdef __cplusplus |
4453 | extern "C" { |
4454 | #endif |
4455 | |
4456 | EOF |
4457 | - # Now generate the symbol file. |
4458 | - sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c |
4459 | + # Now generate the symbol file. |
4460 | + eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' |
4461 | |
4462 | - cat <<EOF >> conftest.c |
4463 | + cat <<EOF >> conftest.c |
4464 | #if defined (__STDC__) && __STDC__ |
4465 | -# define __ptr_t void * |
4466 | +# define lt_ptr_t void * |
4467 | #else |
4468 | -# define __ptr_t char * |
4469 | +# define lt_ptr_t char * |
4470 | +# define const |
4471 | #endif |
4472 | |
4473 | -/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ |
4474 | -int dld_preloaded_symbol_count = $count; |
4475 | - |
4476 | /* The mapping between symbol names and symbols. */ |
4477 | -struct { |
4478 | - char *name; |
4479 | - __ptr_t address; |
4480 | +const struct { |
4481 | + const char *name; |
4482 | + lt_ptr_t address; |
4483 | } |
4484 | -dld_preloaded_symbols[] = |
4485 | +lt_preloaded_symbols[] = |
4486 | { |
4487 | EOF |
4488 | - sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c |
4489 | - cat <<\EOF >> conftest.c |
4490 | - {0, (__ptr_t) 0} |
4491 | + sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c |
4492 | + cat <<\EOF >> conftest.c |
4493 | + {0, (lt_ptr_t) 0} |
4494 | }; |
4495 | |
4496 | #ifdef __cplusplus |
4497 | } |
4498 | #endif |
4499 | EOF |
4500 | - # Now try linking the two files. |
4501 | - mv conftest.o conftestm.o |
4502 | - save_LIBS="$LIBS" |
4503 | - save_CFLAGS="$CFLAGS" |
4504 | - LIBS='conftestm.o' |
4505 | - CFLAGS="$CFLAGS$no_builtin_flag" |
4506 | - if { (eval echo $progname:1033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
4507 | - pipe_works=yes |
4508 | - else |
4509 | - echo "$progname: failed program was:" >&5 |
4510 | - cat conftest.c >&5 |
4511 | - fi |
4512 | - LIBS="$save_LIBS" |
4513 | + # Now try linking the two files. |
4514 | + mv conftest.$objext conftstm.$objext |
4515 | + save_LIBS="$LIBS" |
4516 | + save_CFLAGS="$CFLAGS" |
4517 | + LIBS="conftstm.$objext" |
4518 | + CFLAGS="$CFLAGS$no_builtin_flag" |
4519 | + if { (eval echo $progname:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
4520 | + pipe_works=yes |
4521 | + else |
4522 | + echo "$progname: failed program was:" >&5 |
4523 | + cat conftest.c >&5 |
4524 | + fi |
4525 | + LIBS="$save_LIBS" |
4526 | + else |
4527 | + echo "cannot find nm_test_func in $nlist" >&5 |
4528 | + fi |
4529 | else |
4530 | - echo "cannot find nm_test_func in $nlist" >&5 |
4531 | + echo "cannot find nm_test_var in $nlist" >&5 |
4532 | fi |
4533 | else |
4534 | - echo "cannot find nm_test_var in $nlist" >&5 |
4535 | + echo "cannot run $global_symbol_pipe" >&5 |
4536 | fi |
4537 | else |
4538 | - echo "cannot run $global_symbol_pipe" >&5 |
4539 | + echo "$progname: failed program was:" >&5 |
4540 | + cat conftest.c >&5 |
4541 | fi |
4542 | + $rm conftest* conftst* |
4543 | + |
4544 | + # Do not use the global_symbol_pipe unless it works. |
4545 | + if test "$pipe_works" = yes; then |
4546 | + break |
4547 | + else |
4548 | + global_symbol_pipe= |
4549 | + fi |
4550 | +done |
4551 | +if test "$pipe_works" = yes; then |
4552 | + echo "${ac_t}ok" 1>&6 |
4553 | else |
4554 | - echo "$progname: failed program was:" >&5 |
4555 | - cat conftest.c >&5 |
4556 | + echo "${ac_t}failed" 1>&6 |
4557 | fi |
4558 | -$rm conftest* |
4559 | |
4560 | -# Do not use the global_symbol_pipe unless it works. |
4561 | -echo "$ac_t$pipe_works" 1>&6 |
4562 | -test "$pipe_works" = yes || global_symbol_pipe= |
4563 | +if test -z "$global_symbol_pipe"; then |
4564 | + global_symbol_to_cdecl= |
4565 | +fi |
4566 | |
4567 | # Check hardcoding attributes. |
4568 | echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 |
4569 | @@ -1063,35 +1772,32 @@ |
4570 | test -n "$runpath_var"; then |
4571 | |
4572 | # We can hardcode non-existant directories. |
4573 | - if test "$hardcode_direct" != no && \ |
4574 | - test "$hardcode_minus_L" != no && \ |
4575 | - test "$hardcode_shlibpath_var" != no; then |
4576 | - |
4577 | + if test "$hardcode_direct" != no && |
4578 | + # If the only mechanism to avoid hardcoding is shlibpath_var, we |
4579 | + # have to relink, otherwise we might link with an installed library |
4580 | + # when we should be linking with a yet-to-be-installed one |
4581 | + ## test "$hardcode_shlibpath_var" != no && |
4582 | + test "$hardcode_minus_L" != no; then |
4583 | # Linking always hardcodes the temporary library directory. |
4584 | hardcode_action=relink |
4585 | else |
4586 | # We can link without hardcoding, and we can hardcode nonexisting dirs. |
4587 | hardcode_action=immediate |
4588 | fi |
4589 | -elif test "$hardcode_direct" != yes && \ |
4590 | - test "$hardcode_minus_L" != yes && \ |
4591 | - test "$hardcode_shlibpath_var" != yes; then |
4592 | - # We cannot hardcode anything. |
4593 | - hardcode_action=unsupported |
4594 | else |
4595 | - # We can only hardcode existing directories. |
4596 | - hardcode_action=relink |
4597 | + # We cannot hardcode anything, or else we can only hardcode existing |
4598 | + # directories. |
4599 | + hardcode_action=unsupported |
4600 | fi |
4601 | echo "$ac_t$hardcode_action" 1>&6 |
4602 | -test "$hardcode_action" = unsupported && can_build_shared=no |
4603 | |
4604 | |
4605 | reload_flag= |
4606 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
4607 | echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 |
4608 | -# PORTME Some linker may need a different reload flag. |
4609 | +# PORTME Some linkers may need a different reload flag. |
4610 | reload_flag='-r' |
4611 | -echo "$ac_t$reload_flag" |
4612 | +echo "$ac_t$reload_flag" 1>&6 |
4613 | test -n "$reload_flag" && reload_flag=" $reload_flag" |
4614 | |
4615 | # PORTME Fill in your ld.so characteristics |
4616 | @@ -1103,18 +1809,45 @@ |
4617 | finish_cmds= |
4618 | finish_eval= |
4619 | shlibpath_var= |
4620 | +shlibpath_overrides_runpath=unknown |
4621 | version_type=none |
4622 | dynamic_linker="$host_os ld.so" |
4623 | - |
4624 | +sys_lib_dlsearch_path_spec="/lib /usr/lib" |
4625 | +sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
4626 | +file_magic_cmd= |
4627 | +file_magic_test_file= |
4628 | +deplibs_check_method='unknown' |
4629 | +# Need to set the preceding variable on all platforms that support |
4630 | +# interlibrary dependencies. |
4631 | +# 'none' -- dependencies not supported. |
4632 | +# `unknown' -- same as none, but documents that we really don't know. |
4633 | +# 'pass_all' -- all dependencies passed with no checks. |
4634 | +# 'test_compile' -- check by making test program. |
4635 | +# 'file_magic [regex]' -- check by looking for files in library path |
4636 | +# which responds to the $file_magic_cmd with a given egrep regex. |
4637 | +# If you have `file' or equivalent on your system and you're not sure |
4638 | +# whether `pass_all' will *always* work, you probably want this one. |
4639 | echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 |
4640 | case "$host_os" in |
4641 | -aix3* | aix4*) |
4642 | +aix3*) |
4643 | version_type=linux |
4644 | - library_names_spec='${libname}${release}.so.$versuffix $libname.a' |
4645 | + library_names_spec='${libname}${release}.so$versuffix $libname.a' |
4646 | shlibpath_var=LIBPATH |
4647 | |
4648 | # AIX has no versioning support, so we append a major version to the name. |
4649 | - soname_spec='${libname}${release}.so.$major' |
4650 | + soname_spec='${libname}${release}.so$major' |
4651 | + ;; |
4652 | + |
4653 | +aix4*) |
4654 | + version_type=linux |
4655 | + # AIX has no versioning support, so currently we can not hardcode correct |
4656 | + # soname into executable. Probably we can add versioning support to |
4657 | + # collect2, so additional links can be useful in future. |
4658 | + # We preserve .a as extension for shared libraries though AIX4.2 |
4659 | + # and later linker supports .so |
4660 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' |
4661 | + shlibpath_var=LIBPATH |
4662 | + deplibs_check_method=pass_all |
4663 | ;; |
4664 | |
4665 | amigaos*) |
4666 | @@ -1123,36 +1856,166 @@ |
4667 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' |
4668 | ;; |
4669 | |
4670 | -freebsd2* | freebsd3*) |
4671 | - version_type=sunos |
4672 | - library_names_spec='${libname}${release}.so.$versuffix $libname.so' |
4673 | - finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' |
4674 | +beos*) |
4675 | + library_names_spec='${libname}.so' |
4676 | + dynamic_linker="$host_os ld.so" |
4677 | + shlibpath_var=LIBRARY_PATH |
4678 | + deplibs_check_method=pass_all |
4679 | + lt_cv_dlopen="load_add_on" |
4680 | + lt_cv_dlopen_libs= |
4681 | + lt_cv_dlopen_self=yes |
4682 | + ;; |
4683 | + |
4684 | +bsdi4*) |
4685 | + version_type=linux |
4686 | + need_version=no |
4687 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
4688 | + soname_spec='${libname}${release}.so$major' |
4689 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
4690 | shlibpath_var=LD_LIBRARY_PATH |
4691 | + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' |
4692 | + file_magic_cmd=/usr/bin/file |
4693 | + file_magic_test_file=/shlib/libc.so |
4694 | + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
4695 | + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
4696 | + export_dynamic_flag_spec=-rdynamic |
4697 | + # the default ld.so.conf also contains /usr/contrib/lib and |
4698 | + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
4699 | + # libtool to hard-code these into programs |
4700 | + ;; |
4701 | + |
4702 | +cygwin* | mingw*) |
4703 | + version_type=windows |
4704 | + need_version=no |
4705 | + need_lib_prefix=no |
4706 | + if test "$with_gcc" = yes; then |
4707 | + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' |
4708 | + else |
4709 | + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' |
4710 | + fi |
4711 | + dynamic_linker='Win32 ld.exe' |
4712 | + deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
4713 | + file_magic_cmd='${OBJDUMP} -f' |
4714 | + # FIXME: first we should search . and the directory the executable is in |
4715 | + shlibpath_var=PATH |
4716 | + lt_cv_dlopen="LoadLibrary" |
4717 | + lt_cv_dlopen_libs= |
4718 | + ;; |
4719 | + |
4720 | +freebsd1*) |
4721 | + dynamic_linker=no |
4722 | + ;; |
4723 | + |
4724 | +freebsd*) |
4725 | + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` |
4726 | + version_type=freebsd-$objformat |
4727 | + case "$version_type" in |
4728 | + freebsd-elf*) |
4729 | + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' |
4730 | + file_magic_cmd=/usr/bin/file |
4731 | + file_magic_test_file=`echo /usr/lib/libc.so*` |
4732 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
4733 | + need_version=no |
4734 | + need_lib_prefix=no |
4735 | + ;; |
4736 | + freebsd-*) |
4737 | + deplibs_check_method=unknown |
4738 | + library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' |
4739 | + need_version=yes |
4740 | + ;; |
4741 | + esac |
4742 | + shlibpath_var=LD_LIBRARY_PATH |
4743 | + case "$host_os" in |
4744 | + freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) |
4745 | + shlibpath_overrides_runpath=yes |
4746 | + ;; |
4747 | + *) # from 3.2 on |
4748 | + shlibpath_overrides_runpath=no |
4749 | + ;; |
4750 | + esac |
4751 | + ;; |
4752 | + |
4753 | +darwin* | rhapsody*) |
4754 | + dynamic_linker="$host_os dyld" |
4755 | + version_type=darwin |
4756 | + need_lib_prefix=no |
4757 | + need_version=no |
4758 | + deplibs_check_method='file_magic Mach-O dynamically linked shared library' |
4759 | + file_magic_cmd='/usr/bin/file -L' |
4760 | + case "$host_os" in |
4761 | + rhapsody* | darwin1.[012]) |
4762 | + file_magic_test_file='/System/Library/Frameworks/System.framework/System' |
4763 | + ;; |
4764 | + *) # Darwin 1.3 on |
4765 | + file_magic_test_file='/usr/lib/libSystem.dylib' |
4766 | + ;; |
4767 | + esac |
4768 | + library_names_spec='${libname}${release}${versuffix}.$(test x$module = xyes && echo so || echo dylib) ${libname}${release}${major}.$(test x$module = xyes && echo so || echo dylib) ${libname}.$(test x$module = xyes && echo so || echo dylib)' |
4769 | + soname_spec='${libname}${release}${major}.$(test x$module = xyes && echo so || echo dylib)' |
4770 | + shlibpath_overrides_runpath=yes |
4771 | + shlibpath_var=DYLD_LIBRARY_PATH |
4772 | ;; |
4773 | |
4774 | gnu*) |
4775 | - version_type=sunos |
4776 | - library_names_spec='${libname}${release}.so.$versuffix' |
4777 | + version_type=linux |
4778 | + need_lib_prefix=no |
4779 | + need_version=no |
4780 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' |
4781 | + soname_spec='${libname}${release}.so$major' |
4782 | shlibpath_var=LD_LIBRARY_PATH |
4783 | ;; |
4784 | |
4785 | -hpux9* | hpux10*) |
4786 | +hpux9* | hpux10* | hpux11*) |
4787 | # Give a soname corresponding to the major version so that dld.sl refuses to |
4788 | # link against other versions. |
4789 | dynamic_linker="$host_os dld.sl" |
4790 | version_type=sunos |
4791 | + need_lib_prefix=no |
4792 | + need_version=no |
4793 | shlibpath_var=SHLIB_PATH |
4794 | - library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl' |
4795 | - soname_spec='${libname}${release}.sl.$major' |
4796 | + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
4797 | + library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' |
4798 | + soname_spec='${libname}${release}.sl$major' |
4799 | # HP-UX runs *really* slowly unless shared libraries are mode 555. |
4800 | postinstall_cmds='chmod 555 $lib' |
4801 | + case "$host_os" in |
4802 | + hpux10.20*) |
4803 | + # TODO: Does this work for hpux-11 too? |
4804 | + deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' |
4805 | + file_magic_cmd=/usr/bin/file |
4806 | + file_magic_test_file=/usr/lib/libc.sl |
4807 | + ;; |
4808 | + esac |
4809 | ;; |
4810 | |
4811 | irix5* | irix6*) |
4812 | - version_type=osf |
4813 | - soname_spec='${libname}${release}.so' |
4814 | - library_names_spec='${libname}${release}.so.$versuffix $libname.so' |
4815 | - shlibpath_var=LD_LIBRARY_PATH |
4816 | + version_type=irix |
4817 | + need_lib_prefix=no |
4818 | + need_version=no |
4819 | + soname_spec='${libname}${release}.so.$major' |
4820 | + library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' |
4821 | + case "$host_os" in |
4822 | + irix5*) |
4823 | + libsuff= shlibsuff= |
4824 | + # this will be overridden with pass_all, but let us keep it just in case |
4825 | + deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" |
4826 | + ;; |
4827 | + *) |
4828 | + case "$LD" in # libtool.m4 will add one of these switches to LD |
4829 | + *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; |
4830 | + *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; |
4831 | + *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; |
4832 | + *) libsuff= shlibsuff= libmagic=never-match;; |
4833 | + esac |
4834 | + ;; |
4835 | + esac |
4836 | + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
4837 | + shlibpath_overrides_runpath=no |
4838 | + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
4839 | + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
4840 | + file_magic_cmd=/usr/bin/file |
4841 | + file_magic_test_file=`echo /lib${libsuff}/libc.so*` |
4842 | + deplibs_check_method='pass_all' |
4843 | ;; |
4844 | |
4845 | # No shared lib support for Linux oldld, aout, or coff. |
4846 | @@ -1163,10 +2026,14 @@ |
4847 | # This must be Linux ELF. |
4848 | linux-gnu*) |
4849 | version_type=linux |
4850 | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' |
4851 | - soname_spec='${libname}${release}.so.$major' |
4852 | - finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir' |
4853 | + need_lib_prefix=no |
4854 | + need_version=no |
4855 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
4856 | + soname_spec='${libname}${release}.so$major' |
4857 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
4858 | shlibpath_var=LD_LIBRARY_PATH |
4859 | + shlibpath_overrides_runpath=no |
4860 | + deplibs_check_method=pass_all |
4861 | |
4862 | if test -f /lib/ld.so.1; then |
4863 | dynamic_linker='GNU ld.so' |
4864 | @@ -1179,85 +2046,200 @@ |
4865 | fi |
4866 | ;; |
4867 | |
4868 | -netbsd* | openbsd*) |
4869 | +netbsd*) |
4870 | + version_type=sunos |
4871 | + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
4872 | + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
4873 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
4874 | + dynamic_linker='NetBSD (a.out) ld.so' |
4875 | + else |
4876 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' |
4877 | + soname_spec='${libname}${release}.so$major' |
4878 | + dynamic_linker='NetBSD ld.elf_so' |
4879 | + fi |
4880 | + shlibpath_var=LD_LIBRARY_PATH |
4881 | + ;; |
4882 | + |
4883 | +openbsd*) |
4884 | version_type=sunos |
4885 | - library_names_spec='${libname}${release}.so.$versuffix' |
4886 | - finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' |
4887 | + if test "$with_gnu_ld" = yes; then |
4888 | + need_lib_prefix=no |
4889 | + need_version=no |
4890 | + fi |
4891 | + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
4892 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
4893 | shlibpath_var=LD_LIBRARY_PATH |
4894 | ;; |
4895 | |
4896 | os2*) |
4897 | libname_spec='$name' |
4898 | + need_lib_prefix=no |
4899 | library_names_spec='$libname.dll $libname.a' |
4900 | dynamic_linker='OS/2 ld.exe' |
4901 | shlibpath_var=LIBPATH |
4902 | ;; |
4903 | |
4904 | -osf3* | osf4*) |
4905 | +osf3* | osf4* | osf5*) |
4906 | version_type=osf |
4907 | + need_version=no |
4908 | soname_spec='${libname}${release}.so' |
4909 | - library_names_spec='${libname}${release}.so.$versuffix $libname.so' |
4910 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
4911 | shlibpath_var=LD_LIBRARY_PATH |
4912 | + # this will be overridden with pass_all, but let us keep it just in case |
4913 | + deplibs_check_method='file_magic COFF format alpha shared library' |
4914 | + file_magic_cmd=/usr/bin/file |
4915 | + file_magic_test_file=/shlib/libc.so |
4916 | + deplibs_check_method='pass_all' |
4917 | + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
4918 | + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
4919 | ;; |
4920 | |
4921 | sco3.2v5*) |
4922 | version_type=osf |
4923 | - soname_spec='${libname}${release}.so.$major' |
4924 | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' |
4925 | + soname_spec='${libname}${release}.so$major' |
4926 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
4927 | shlibpath_var=LD_LIBRARY_PATH |
4928 | ;; |
4929 | |
4930 | -solaris2*) |
4931 | +solaris*) |
4932 | version_type=linux |
4933 | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' |
4934 | - soname_spec='${libname}${release}.so.$major' |
4935 | + need_lib_prefix=no |
4936 | + need_version=no |
4937 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
4938 | + soname_spec='${libname}${release}.so$major' |
4939 | shlibpath_var=LD_LIBRARY_PATH |
4940 | + shlibpath_overrides_runpath=yes |
4941 | + # ldd complains unless libraries are executable |
4942 | + postinstall_cmds='chmod +x $lib' |
4943 | + deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" |
4944 | + file_magic_cmd=/usr/bin/file |
4945 | + file_magic_test_file=/lib/libc.so |
4946 | ;; |
4947 | |
4948 | sunos4*) |
4949 | version_type=sunos |
4950 | - library_names_spec='${libname}${release}.so.$versuffix' |
4951 | - finish_cmds='PATH="$PATH:/usr/etc" ldconfig $libdir' |
4952 | + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
4953 | + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
4954 | shlibpath_var=LD_LIBRARY_PATH |
4955 | + shlibpath_overrides_runpath=yes |
4956 | + if test "$with_gnu_ld" = yes; then |
4957 | + need_lib_prefix=no |
4958 | + fi |
4959 | + need_version=yes |
4960 | ;; |
4961 | |
4962 | -sysv4.2uw2*) |
4963 | +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
4964 | version_type=linux |
4965 | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' |
4966 | - soname_spec='${libname}${release}.so.$major' |
4967 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
4968 | + soname_spec='${libname}${release}.so$major' |
4969 | shlibpath_var=LD_LIBRARY_PATH |
4970 | + case "$host_vendor" in |
4971 | + sequent) |
4972 | + file_magic_cmd='/bin/file' |
4973 | + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' |
4974 | + ;; |
4975 | + ncr) |
4976 | + deplibs_check_method='pass_all' |
4977 | + ;; |
4978 | + motorola) |
4979 | + need_lib_prefix=no |
4980 | + need_version=no |
4981 | + shlibpath_overrides_runpath=no |
4982 | + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
4983 | + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' |
4984 | + file_magic_cmd=/usr/bin/file |
4985 | + file_magic_test_file=`echo /usr/lib/libc.so*` |
4986 | + ;; |
4987 | + esac |
4988 | ;; |
4989 | |
4990 | uts4*) |
4991 | version_type=linux |
4992 | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' |
4993 | - soname_spec='${libname}${release}.so.$major' |
4994 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
4995 | + soname_spec='${libname}${release}.so$major' |
4996 | + shlibpath_var=LD_LIBRARY_PATH |
4997 | + ;; |
4998 | + |
4999 | +dgux*) |
5000 | + version_type=linux |
5001 | + need_lib_prefix=no |
5002 | + need_version=no |
5003 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
5004 | + soname_spec='${libname}${release}.so$major' |
5005 | shlibpath_var=LD_LIBRARY_PATH |
5006 | ;; |
5007 | |
5008 | +sysv4*MP*) |
5009 | + if test -d /usr/nec ;then |
5010 | + version_type=linux |
5011 | + library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' |
5012 | + soname_spec='$libname.so.$major' |
5013 | + shlibpath_var=LD_LIBRARY_PATH |
5014 | + fi |
5015 | + ;; |
5016 | + |
5017 | *) |
5018 | dynamic_linker=no |
5019 | ;; |
5020 | esac |
5021 | -echo "$ac_t$dynamic_linker" |
5022 | +echo "$ac_t$dynamic_linker" 1>&6 |
5023 | test "$dynamic_linker" = no && can_build_shared=no |
5024 | |
5025 | # Report the final consequences. |
5026 | echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 |
5027 | |
5028 | +# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in |
5029 | +# configure.in, otherwise build static only libraries. |
5030 | +case "$host_os" in |
5031 | +cygwin* | mingw* | os2*) |
5032 | + if test x$can_build_shared = xyes; then |
5033 | + test x$enable_win32_dll = xno && can_build_shared=no |
5034 | + echo "checking if package supports dlls... $can_build_shared" 1>&6 |
5035 | + fi |
5036 | +;; |
5037 | +esac |
5038 | + |
5039 | +if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then |
5040 | + case "$deplibs_check_method" in |
5041 | + "file_magic "*) |
5042 | + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
5043 | + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
5044 | + egrep "$file_magic_regex" > /dev/null; then |
5045 | + : |
5046 | + else |
5047 | + cat <<EOF 1>&2 |
5048 | + |
5049 | +*** Warning: the command libtool uses to detect shared libraries, |
5050 | +*** $file_magic_cmd, produces output that libtool cannot recognize. |
5051 | +*** The result is that libtool may fail to recognize shared libraries |
5052 | +*** as such. This will affect the creation of libtool libraries that |
5053 | +*** depend on shared libraries, but programs linked with such libtool |
5054 | +*** libraries will work regardless of this problem. Nevertheless, you |
5055 | +*** may want to report the problem to your system manager and/or to |
5056 | +*** bug-libtool@gnu.org |
5057 | + |
5058 | +EOF |
5059 | + fi ;; |
5060 | + esac |
5061 | +fi |
5062 | + |
5063 | echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 |
5064 | test "$can_build_shared" = "no" && enable_shared=no |
5065 | |
5066 | # On AIX, shared libraries and static libraries use the same namespace, and |
5067 | # are all built from PIC. |
5068 | case "$host_os" in |
5069 | -aix*) |
5070 | +aix3*) |
5071 | test "$enable_shared" = yes && enable_static=no |
5072 | if test -n "$RANLIB"; then |
5073 | - archive_cmds="$archive_cmds;\$RANLIB \$lib" |
5074 | + archive_cmds="$archive_cmds~\$RANLIB \$lib" |
5075 | postinstall_cmds='$RANLIB $lib' |
5076 | fi |
5077 | ;; |
5078 | + |
5079 | +aix4*) |
5080 | + test "$enable_shared" = yes && enable_static=no |
5081 | + ;; |
5082 | esac |
5083 | |
5084 | echo "$ac_t$enable_shared" 1>&6 |
5085 | @@ -1265,8 +2247,20 @@ |
5086 | # Make sure either enable_shared or enable_static is yes. |
5087 | test "$enable_shared" = yes || enable_static=yes |
5088 | |
5089 | +# Propagate what we've learned... |
5090 | +ac_cv_can_build_shared="$can_build_shared" |
5091 | + |
5092 | echo "checking whether to build static libraries... $enable_static" 1>&6 |
5093 | |
5094 | +if test "$hardcode_action" = relink; then |
5095 | + # Fast installation is not supported |
5096 | + enable_fast_install=no |
5097 | +elif test "$shlibpath_overrides_runpath" = yes || |
5098 | + test "$enable_shared" = no; then |
5099 | + # Fast installation is not necessary |
5100 | + enable_fast_install=needless |
5101 | +fi |
5102 | + |
5103 | echo $ac_n "checking for objdir... $ac_c" 1>&6 |
5104 | rm -f .libs 2>/dev/null |
5105 | mkdir .libs 2>/dev/null |
5106 | @@ -1279,47 +2273,512 @@ |
5107 | rmdir .libs 2>/dev/null |
5108 | echo "$ac_t$objdir" 1>&6 |
5109 | |
5110 | +if test "x$enable_dlopen" != xyes; then |
5111 | + enable_dlopen=unknown |
5112 | + enable_dlopen_self=unknown |
5113 | + enable_dlopen_self_static=unknown |
5114 | +else |
5115 | +if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then |
5116 | + lt_cv_dlopen=no lt_cv_dlopen_libs= |
5117 | +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
5118 | +echo "$progname:2270: checking for dlopen in -ldl" >&5 |
5119 | +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
5120 | +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
5121 | + echo $ac_n "(cached) $ac_c" 1>&6 |
5122 | +else |
5123 | + ac_save_LIBS="$LIBS" |
5124 | +LIBS="-ldl $LIBS" |
5125 | +cat > conftest.$ac_ext <<EOF |
5126 | +#line 2278 "ltconfig" |
5127 | +/* Override any gcc2 internal prototype to avoid an error. */ |
5128 | +/* We use char because int might match the return type of a gcc2 |
5129 | + builtin and then its argument prototype would still apply. */ |
5130 | +#ifdef __cplusplus |
5131 | +extern "C" |
5132 | +#endif |
5133 | +char dlopen(); |
5134 | + |
5135 | +int main() { |
5136 | +dlopen() |
5137 | +; return 0; } |
5138 | +EOF |
5139 | +if { (eval echo $progname:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5140 | + rm -rf conftest* |
5141 | + eval "ac_cv_lib_$ac_lib_var=yes" |
5142 | +else |
5143 | + echo "$progname: failed program was:" >&5 |
5144 | + cat conftest.$ac_ext >&5 |
5145 | + rm -rf conftest* |
5146 | + eval "ac_cv_lib_$ac_lib_var=no" |
5147 | +fi |
5148 | +rm -f conftest* |
5149 | +LIBS="$ac_save_LIBS" |
5150 | + |
5151 | +fi |
5152 | +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
5153 | + echo "$ac_t""yes" 1>&6 |
5154 | + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" |
5155 | +else |
5156 | + echo "$ac_t""no" 1>&6 |
5157 | +echo $ac_n "checking for dlopen""... $ac_c" 1>&6 |
5158 | +echo "$progname:2310: checking for dlopen" >&5 |
5159 | +if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then |
5160 | + echo $ac_n "(cached) $ac_c" 1>&6 |
5161 | +else |
5162 | + cat > conftest.$ac_ext <<EOF |
5163 | +#line 2315 "ltconfig" |
5164 | +/* System header to define __stub macros and hopefully few prototypes, |
5165 | + which can conflict with char dlopen(); below. */ |
5166 | +#include <assert.h> |
5167 | +/* Override any gcc2 internal prototype to avoid an error. */ |
5168 | +/* We use char because int might match the return type of a gcc2 |
5169 | + builtin and then its argument prototype would still apply. */ |
5170 | +#ifdef __cplusplus |
5171 | +extern "C" |
5172 | +#endif |
5173 | +char dlopen(); |
5174 | + |
5175 | +int main() { |
5176 | + |
5177 | +/* The GNU C library defines this for functions which it implements |
5178 | + to always fail with ENOSYS. Some functions are actually named |
5179 | + something starting with __ and the normal name is an alias. */ |
5180 | +#if defined (__stub_dlopen) || defined (__stub___dlopen) |
5181 | +choke me |
5182 | +#else |
5183 | +dlopen(); |
5184 | +#endif |
5185 | + |
5186 | +; return 0; } |
5187 | +EOF |
5188 | +if { (eval echo $progname:2340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5189 | + rm -rf conftest* |
5190 | + eval "ac_cv_func_dlopen=yes" |
5191 | +else |
5192 | + echo "$progname: failed program was:" >&5 |
5193 | + cat conftest.$ac_ext >&5 |
5194 | + rm -rf conftest* |
5195 | + eval "ac_cv_func_dlopen=no" |
5196 | +fi |
5197 | +rm -f conftest* |
5198 | +fi |
5199 | +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then |
5200 | + echo "$ac_t""yes" 1>&6 |
5201 | + lt_cv_dlopen="dlopen" |
5202 | +else |
5203 | + echo "$ac_t""no" 1>&6 |
5204 | +echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 |
5205 | +echo "$progname:2357: checking for dld_link in -ldld" >&5 |
5206 | +ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` |
5207 | +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
5208 | + echo $ac_n "(cached) $ac_c" 1>&6 |
5209 | +else |
5210 | + ac_save_LIBS="$LIBS" |
5211 | +LIBS="-ldld $LIBS" |
5212 | +cat > conftest.$ac_ext <<EOF |
5213 | +#line 2365 "ltconfig" |
5214 | +/* Override any gcc2 internal prototype to avoid an error. */ |
5215 | +/* We use char because int might match the return type of a gcc2 |
5216 | + builtin and then its argument prototype would still apply. */ |
5217 | +#ifdef __cplusplus |
5218 | +extern "C" |
5219 | +#endif |
5220 | +char dld_link(); |
5221 | + |
5222 | +int main() { |
5223 | +dld_link() |
5224 | +; return 0; } |
5225 | +EOF |
5226 | +if { (eval echo $progname:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5227 | + rm -rf conftest* |
5228 | + eval "ac_cv_lib_$ac_lib_var=yes" |
5229 | +else |
5230 | + echo "$progname: failed program was:" >&5 |
5231 | + cat conftest.$ac_ext >&5 |
5232 | + rm -rf conftest* |
5233 | + eval "ac_cv_lib_$ac_lib_var=no" |
5234 | +fi |
5235 | +rm -f conftest* |
5236 | +LIBS="$ac_save_LIBS" |
5237 | + |
5238 | +fi |
5239 | +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
5240 | + echo "$ac_t""yes" 1>&6 |
5241 | + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" |
5242 | +else |
5243 | + echo "$ac_t""no" 1>&6 |
5244 | +echo $ac_n "checking for shl_load""... $ac_c" 1>&6 |
5245 | +echo "$progname:2397: checking for shl_load" >&5 |
5246 | +if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then |
5247 | + echo $ac_n "(cached) $ac_c" 1>&6 |
5248 | +else |
5249 | + cat > conftest.$ac_ext <<EOF |
5250 | +#line 2402 "ltconfig" |
5251 | +/* System header to define __stub macros and hopefully few prototypes, |
5252 | + which can conflict with char shl_load(); below. */ |
5253 | +#include <assert.h> |
5254 | +/* Override any gcc2 internal prototype to avoid an error. */ |
5255 | +/* We use char because int might match the return type of a gcc2 |
5256 | + builtin and then its argument prototype would still apply. */ |
5257 | +#ifdef __cplusplus |
5258 | +extern "C" |
5259 | +#endif |
5260 | +char shl_load(); |
5261 | + |
5262 | +int main() { |
5263 | + |
5264 | +/* The GNU C library defines this for functions which it implements |
5265 | + to always fail with ENOSYS. Some functions are actually named |
5266 | + something starting with __ and the normal name is an alias. */ |
5267 | +#if defined (__stub_shl_load) || defined (__stub___shl_load) |
5268 | +choke me |
5269 | +#else |
5270 | +shl_load(); |
5271 | +#endif |
5272 | + |
5273 | +; return 0; } |
5274 | +EOF |
5275 | +if { (eval echo $progname:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5276 | + rm -rf conftest* |
5277 | + eval "ac_cv_func_shl_load=yes" |
5278 | +else |
5279 | + echo "$progname: failed program was:" >&5 |
5280 | + cat conftest.$ac_ext >&5 |
5281 | + rm -rf conftest* |
5282 | + eval "ac_cv_func_shl_load=no" |
5283 | +fi |
5284 | +rm -f conftest* |
5285 | +fi |
5286 | + |
5287 | +if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then |
5288 | + echo "$ac_t""yes" 1>&6 |
5289 | + lt_cv_dlopen="shl_load" |
5290 | +else |
5291 | + echo "$ac_t""no" 1>&6 |
5292 | +echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
5293 | +echo "$progname:2445: checking for shl_load in -ldld" >&5 |
5294 | +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
5295 | +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
5296 | + echo $ac_n "(cached) $ac_c" 1>&6 |
5297 | +else |
5298 | + ac_save_LIBS="$LIBS" |
5299 | +LIBS="-ldld $LIBS" |
5300 | +cat > conftest.$ac_ext <<EOF |
5301 | +#line 2453 "ltconfig" |
5302 | +#include "confdefs.h" |
5303 | +/* Override any gcc2 internal prototype to avoid an error. */ |
5304 | +/* We use char because int might match the return type of a gcc2 |
5305 | + builtin and then its argument prototype would still apply. */ |
5306 | +#ifdef __cplusplus |
5307 | +extern "C" |
5308 | +#endif |
5309 | +char shl_load(); |
5310 | + |
5311 | +int main() { |
5312 | +shl_load() |
5313 | +; return 0; } |
5314 | +EOF |
5315 | +if { (eval echo $progname:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5316 | + rm -rf conftest* |
5317 | + eval "ac_cv_lib_$ac_lib_var=yes" |
5318 | +else |
5319 | + echo "$progname: failed program was:" >&5 |
5320 | + cat conftest.$ac_ext >&5 |
5321 | + rm -rf conftest* |
5322 | + eval "ac_cv_lib_$ac_lib_var=no" |
5323 | +fi |
5324 | +rm -f conftest* |
5325 | +LIBS="$ac_save_LIBS" |
5326 | + |
5327 | +fi |
5328 | +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
5329 | + echo "$ac_t""yes" 1>&6 |
5330 | + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" |
5331 | +else |
5332 | + echo "$ac_t""no" 1>&6 |
5333 | +fi |
5334 | + |
5335 | + |
5336 | +fi |
5337 | + |
5338 | + |
5339 | +fi |
5340 | + |
5341 | + |
5342 | +fi |
5343 | + |
5344 | + |
5345 | +fi |
5346 | + |
5347 | +fi |
5348 | + |
5349 | + if test "x$lt_cv_dlopen" != xno; then |
5350 | + enable_dlopen=yes |
5351 | + fi |
5352 | + |
5353 | + case "$lt_cv_dlopen" in |
5354 | + dlopen) |
5355 | +for ac_hdr in dlfcn.h; do |
5356 | +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
5357 | +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
5358 | +echo "$progname:2510: checking for $ac_hdr" >&5 |
5359 | +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5360 | + echo $ac_n "(cached) $ac_c" 1>&6 |
5361 | +else |
5362 | + cat > conftest.$ac_ext <<EOF |
5363 | +#line 2515 "ltconfig" |
5364 | +#include <$ac_hdr> |
5365 | +int fnord = 0; |
5366 | +EOF |
5367 | +ac_try="$ac_compile >/dev/null 2>conftest.out" |
5368 | +{ (eval echo $progname:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5369 | +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5370 | +if test -z "$ac_err"; then |
5371 | + rm -rf conftest* |
5372 | + eval "ac_cv_header_$ac_safe=yes" |
5373 | +else |
5374 | + echo "$ac_err" >&5 |
5375 | + echo "$progname: failed program was:" >&5 |
5376 | + cat conftest.$ac_ext >&5 |
5377 | + rm -rf conftest* |
5378 | + eval "ac_cv_header_$ac_safe=no" |
5379 | +fi |
5380 | +rm -f conftest* |
5381 | +fi |
5382 | +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5383 | + echo "$ac_t""yes" 1>&6 |
5384 | +else |
5385 | + echo "$ac_t""no" 1>&6 |
5386 | +fi |
5387 | +done |
5388 | + |
5389 | + if test "x$ac_cv_header_dlfcn_h" = xyes; then |
5390 | + CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
5391 | + fi |
5392 | + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
5393 | + LIBS="$lt_cv_dlopen_libs $LIBS" |
5394 | + |
5395 | + echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 |
5396 | +echo "$progname:2548: checking whether a program can dlopen itself" >&5 |
5397 | +if test "${lt_cv_dlopen_self+set}" = set; then |
5398 | + echo $ac_n "(cached) $ac_c" 1>&6 |
5399 | +else |
5400 | + if test "$cross_compiling" = yes; then |
5401 | + lt_cv_dlopen_self=cross |
5402 | + else |
5403 | + cat > conftest.c <<EOF |
5404 | +#line 2556 "ltconfig" |
5405 | + |
5406 | +#if HAVE_DLFCN_H |
5407 | +#include <dlfcn.h> |
5408 | +#endif |
5409 | + |
5410 | +#include <stdio.h> |
5411 | + |
5412 | +#ifdef RTLD_GLOBAL |
5413 | +# define LTDL_GLOBAL RTLD_GLOBAL |
5414 | +#else |
5415 | +# ifdef DL_GLOBAL |
5416 | +# define LTDL_GLOBAL DL_GLOBAL |
5417 | +# else |
5418 | +# define LTDL_GLOBAL 0 |
5419 | +# endif |
5420 | +#endif |
5421 | + |
5422 | +/* We may have to define LTDL_LAZY_OR_NOW in the command line if we |
5423 | + find out it does not work in some platform. */ |
5424 | +#ifndef LTDL_LAZY_OR_NOW |
5425 | +# ifdef RTLD_LAZY |
5426 | +# define LTDL_LAZY_OR_NOW RTLD_LAZY |
5427 | +# else |
5428 | +# ifdef DL_LAZY |
5429 | +# define LTDL_LAZY_OR_NOW DL_LAZY |
5430 | +# else |
5431 | +# ifdef RTLD_NOW |
5432 | +# define LTDL_LAZY_OR_NOW RTLD_NOW |
5433 | +# else |
5434 | +# ifdef DL_NOW |
5435 | +# define LTDL_LAZY_OR_NOW DL_NOW |
5436 | +# else |
5437 | +# define LTDL_LAZY_OR_NOW 0 |
5438 | +# endif |
5439 | +# endif |
5440 | +# endif |
5441 | +# endif |
5442 | +#endif |
5443 | + |
5444 | +fnord() { int i=42;} |
5445 | +main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); |
5446 | + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); |
5447 | + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } |
5448 | + |
5449 | +EOF |
5450 | +if { (eval echo $progname:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
5451 | +then |
5452 | + lt_cv_dlopen_self=yes |
5453 | +else |
5454 | + echo "$progname: failed program was:" >&5 |
5455 | + cat conftest.$ac_ext >&5 |
5456 | + rm -fr conftest* |
5457 | + lt_cv_dlopen_self=no |
5458 | +fi |
5459 | +rm -fr conftest* |
5460 | +fi |
5461 | + |
5462 | +fi |
5463 | + |
5464 | +echo "$ac_t""$lt_cv_dlopen_self" 1>&6 |
5465 | + |
5466 | + if test "$lt_cv_dlopen_self" = yes; then |
5467 | + LDFLAGS="$LDFLAGS $link_static_flag" |
5468 | + echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 |
5469 | +echo "$progname:2621: checking whether a statically linked program can dlopen itself" >&5 |
5470 | +if test "${lt_cv_dlopen_self_static+set}" = set; then |
5471 | + echo $ac_n "(cached) $ac_c" 1>&6 |
5472 | +else |
5473 | + if test "$cross_compiling" = yes; then |
5474 | + lt_cv_dlopen_self_static=cross |
5475 | + else |
5476 | + cat > conftest.c <<EOF |
5477 | +#line 2629 "ltconfig" |
5478 | + |
5479 | +#if HAVE_DLFCN_H |
5480 | +#include <dlfcn.h> |
5481 | +#endif |
5482 | + |
5483 | +#include <stdio.h> |
5484 | + |
5485 | +#ifdef RTLD_GLOBAL |
5486 | +# define LTDL_GLOBAL RTLD_GLOBAL |
5487 | +#else |
5488 | +# ifdef DL_GLOBAL |
5489 | +# define LTDL_GLOBAL DL_GLOBAL |
5490 | +# else |
5491 | +# define LTDL_GLOBAL 0 |
5492 | +# endif |
5493 | +#endif |
5494 | + |
5495 | +/* We may have to define LTDL_LAZY_OR_NOW in the command line if we |
5496 | + find out it does not work in some platform. */ |
5497 | +#ifndef LTDL_LAZY_OR_NOW |
5498 | +# ifdef RTLD_LAZY |
5499 | +# define LTDL_LAZY_OR_NOW RTLD_LAZY |
5500 | +# else |
5501 | +# ifdef DL_LAZY |
5502 | +# define LTDL_LAZY_OR_NOW DL_LAZY |
5503 | +# else |
5504 | +# ifdef RTLD_NOW |
5505 | +# define LTDL_LAZY_OR_NOW RTLD_NOW |
5506 | +# else |
5507 | +# ifdef DL_NOW |
5508 | +# define LTDL_LAZY_OR_NOW DL_NOW |
5509 | +# else |
5510 | +# define LTDL_LAZY_OR_NOW 0 |
5511 | +# endif |
5512 | +# endif |
5513 | +# endif |
5514 | +# endif |
5515 | +#endif |
5516 | + |
5517 | +fnord() { int i=42;} |
5518 | +main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); |
5519 | + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); |
5520 | + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } |
5521 | + |
5522 | +EOF |
5523 | +if { (eval echo $progname:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
5524 | +then |
5525 | + lt_cv_dlopen_self_static=yes |
5526 | +else |
5527 | + echo "$progname: failed program was:" >&5 |
5528 | + cat conftest.$ac_ext >&5 |
5529 | + rm -fr conftest* |
5530 | + lt_cv_dlopen_self_static=no |
5531 | +fi |
5532 | +rm -fr conftest* |
5533 | +fi |
5534 | + |
5535 | +fi |
5536 | + |
5537 | +echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 |
5538 | +fi |
5539 | + ;; |
5540 | + esac |
5541 | + |
5542 | + case "$lt_cv_dlopen_self" in |
5543 | + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
5544 | + *) enable_dlopen_self=unknown ;; |
5545 | + esac |
5546 | + |
5547 | + case "$lt_cv_dlopen_self_static" in |
5548 | + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
5549 | + *) enable_dlopen_self_static=unknown ;; |
5550 | + esac |
5551 | +fi |
5552 | + |
5553 | # Copy echo and quote the copy, instead of the original, because it is |
5554 | # used later. |
5555 | ltecho="$echo" |
5556 | +if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then |
5557 | + ltecho="$CONFIG_SHELL \$0 --fallback-echo" |
5558 | +fi |
5559 | +LTSHELL="$SHELL" |
5560 | |
5561 | -# Now quote all the things that may contain metacharacters. |
5562 | -for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \ |
5563 | - old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \ |
5564 | - link_static_flag no_builtin_flag export_dynamic_flag_spec \ |
5565 | - libname_spec library_names_spec soname_spec RANLIB \ |
5566 | - old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ |
5567 | - old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \ |
5568 | - allow_undefined_flag no_undefined_flag \ |
5569 | - finish_cmds finish_eval global_symbol_pipe \ |
5570 | - hardcode_libdir_flag_spec hardcode_libdir_separator; do |
5571 | - |
5572 | - case "$var" in |
5573 | - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ |
5574 | - old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \ |
5575 | - postinstall_cmds | postuninstall_cmds | finish_cmds) |
5576 | - # Double-quote double-evaled strings. |
5577 | - eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`" |
5578 | - ;; |
5579 | - *) |
5580 | - eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`" |
5581 | +LTCONFIG_VERSION="$VERSION" |
5582 | + |
5583 | +# Only quote variables if we're using ltmain.sh. |
5584 | +case "$ltmain" in |
5585 | +*.sh) |
5586 | + # Now quote all the things that may contain metacharacters. |
5587 | + for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ |
5588 | + old_LD old_LDFLAGS old_LIBS \ |
5589 | + old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ |
5590 | + AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ |
5591 | + reload_flag reload_cmds wl \ |
5592 | + pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ |
5593 | + thread_safe_flag_spec whole_archive_flag_spec libname_spec \ |
5594 | + library_names_spec soname_spec \ |
5595 | + RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ |
5596 | + old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ |
5597 | + file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ |
5598 | + finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ |
5599 | + hardcode_libdir_flag_spec hardcode_libdir_separator \ |
5600 | + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
5601 | + compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do |
5602 | + |
5603 | + case "$var" in |
5604 | + reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ |
5605 | + old_postinstall_cmds | old_postuninstall_cmds | \ |
5606 | + export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ |
5607 | + postinstall_cmds | postuninstall_cmds | \ |
5608 | + finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
5609 | + # Double-quote double-evaled strings. |
5610 | + eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
5611 | + ;; |
5612 | + *) |
5613 | + eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
5614 | + ;; |
5615 | + esac |
5616 | + done |
5617 | + |
5618 | + case "$ltecho" in |
5619 | + *'\$0 --fallback-echo"') |
5620 | + ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` |
5621 | ;; |
5622 | esac |
5623 | -done |
5624 | |
5625 | -ofile=libtool |
5626 | -trap "$rm $ofile; exit 1" 1 2 15 |
5627 | -echo creating $ofile |
5628 | -$rm $ofile |
5629 | -cat <<EOF > $ofile |
5630 | -#! /bin/sh |
5631 | + trap "$rm \"$ofile\"; exit 1" 1 2 15 |
5632 | + echo "creating $ofile" |
5633 | + $rm "$ofile" |
5634 | + cat <<EOF > "$ofile" |
5635 | +#! $SHELL |
5636 | |
5637 | -# libtool - Provide generalized library-building support services. |
5638 | -# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION |
5639 | +# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
5640 | +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
5641 | # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. |
5642 | # |
5643 | -# Copyright (C) 1996-1998 Free Software Foundation, Inc. |
5644 | -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
5645 | +# Copyright (C) 1996-1999 Free Software Foundation, Inc. |
5646 | +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
5647 | # |
5648 | # This program is free software; you can redistribute it and/or modify |
5649 | # it under the terms of the GNU General Public License as published by |
5650 | @@ -1340,120 +2799,208 @@ |
5651 | # configuration script generated by Autoconf, you may include it under |
5652 | # the same distribution terms that you use for the rest of that program. |
5653 | |
5654 | -# This program was configured as follows, |
5655 | -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
5656 | -# |
5657 | -# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\ |
5658 | -# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\ |
5659 | -# $0$ltconfig_args |
5660 | -# |
5661 | -# Compiler and other test output produced by $progname, useful for |
5662 | -# debugging $progname, is in ./config.log if it exists. |
5663 | - |
5664 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. |
5665 | Xsed="sed -e s/^X//" |
5666 | |
5667 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
5668 | # if CDPATH is set. |
5669 | -if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi |
5670 | +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
5671 | |
5672 | -# An echo program that does not interpret backslashes. |
5673 | -echo="$ltecho" |
5674 | +### BEGIN LIBTOOL CONFIG |
5675 | +EOF |
5676 | + cfgfile="$ofile" |
5677 | + ;; |
5678 | + |
5679 | +*) |
5680 | + # Double-quote the variables that need it (for aesthetics). |
5681 | + for var in old_CC old_CFLAGS old_CPPFLAGS \ |
5682 | + old_LD old_LDFLAGS old_LIBS \ |
5683 | + old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do |
5684 | + eval "$var=\\\"\$var\\\"" |
5685 | + done |
5686 | + |
5687 | + # Just create a config file. |
5688 | + cfgfile="$ofile.cfg" |
5689 | + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 |
5690 | + echo "creating $cfgfile" |
5691 | + $rm "$cfgfile" |
5692 | + cat <<EOF > "$cfgfile" |
5693 | +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. |
5694 | +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
5695 | +EOF |
5696 | + ;; |
5697 | +esac |
5698 | + |
5699 | +cat <<EOF >> "$cfgfile" |
5700 | +# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
5701 | +# |
5702 | +# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ |
5703 | +# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ |
5704 | +# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ |
5705 | +# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ |
5706 | +# $0$ltconfig_args |
5707 | +# |
5708 | +# Compiler and other test output produced by $progname, useful for |
5709 | +# debugging $progname, is in ./config.log if it exists. |
5710 | |
5711 | # The version of $progname that generated this script. |
5712 | -LTCONFIG_VERSION="$VERSION" |
5713 | +LTCONFIG_VERSION=$LTCONFIG_VERSION |
5714 | |
5715 | # Shell to use when invoking shell scripts. |
5716 | -SHELL=${CONFIG_SHELL-/bin/sh} |
5717 | +SHELL=$LTSHELL |
5718 | |
5719 | -# Whether or not to build libtool libraries. |
5720 | +# Whether or not to build shared libraries. |
5721 | build_libtool_libs=$enable_shared |
5722 | |
5723 | -# Whether or not to build old-style libraries. |
5724 | +# Whether or not to build static libraries. |
5725 | build_old_libs=$enable_static |
5726 | |
5727 | +# Whether or not to optimize for fast installation. |
5728 | +fast_install=$enable_fast_install |
5729 | + |
5730 | # The host system. |
5731 | -host_alias="$host_alias" |
5732 | -host="$host" |
5733 | +host_alias=$host_alias |
5734 | +host=$host |
5735 | + |
5736 | +# An echo program that does not interpret backslashes. |
5737 | +echo=$ltecho |
5738 | |
5739 | # The archiver. |
5740 | -AR="$AR" |
5741 | +AR=$AR |
5742 | |
5743 | # The default C compiler. |
5744 | -CC="$CC" |
5745 | +CC=$CC |
5746 | |
5747 | # The linker used to build libraries. |
5748 | -LD="$LD" |
5749 | +LD=$LD |
5750 | |
5751 | # Whether we need hard or soft links. |
5752 | -LN_S="$LN_S" |
5753 | +LN_S=$LN_S |
5754 | |
5755 | # A BSD-compatible nm program. |
5756 | -NM="$NM" |
5757 | +NM=$NM |
5758 | + |
5759 | +# Used on cygwin: DLL creation program. |
5760 | +DLLTOOL="$DLLTOOL" |
5761 | + |
5762 | +# Used on cygwin: object dumper. |
5763 | +OBJDUMP="$OBJDUMP" |
5764 | + |
5765 | +# Used on cygwin: assembler. |
5766 | +AS="$AS" |
5767 | |
5768 | # The name of the directory that contains temporary libtool files. |
5769 | -objdir="$objdir" |
5770 | +objdir=$objdir |
5771 | |
5772 | # How to create reloadable object files. |
5773 | -reload_flag="$reload_flag" |
5774 | -reload_cmds="$reload_cmds" |
5775 | +reload_flag=$reload_flag |
5776 | +reload_cmds=$reload_cmds |
5777 | |
5778 | # How to pass a linker flag through the compiler. |
5779 | -wl="$wl" |
5780 | +wl=$wl |
5781 | + |
5782 | +# Object file suffix (normally "o"). |
5783 | +objext="$objext" |
5784 | + |
5785 | +# Old archive suffix (normally "a"). |
5786 | +libext="$libext" |
5787 | + |
5788 | +# Executable file suffix (normally ""). |
5789 | +exeext="$exeext" |
5790 | |
5791 | # Additional compiler flags for building library objects. |
5792 | -pic_flag="$pic_flag" |
5793 | +pic_flag=$pic_flag |
5794 | + |
5795 | +# Does compiler simultaneously support -c and -o options? |
5796 | +compiler_c_o=$compiler_c_o |
5797 | + |
5798 | +# Can we write directly to a .lo ? |
5799 | +compiler_o_lo=$compiler_o_lo |
5800 | + |
5801 | +# Must we lock files when doing compilation ? |
5802 | +need_locks=$need_locks |
5803 | + |
5804 | +# Do we need the lib prefix for modules? |
5805 | +need_lib_prefix=$need_lib_prefix |
5806 | + |
5807 | +# Do we need a version for libraries? |
5808 | +need_version=$need_version |
5809 | + |
5810 | +# Whether dlopen is supported. |
5811 | +dlopen=$enable_dlopen |
5812 | + |
5813 | +# Whether dlopen of programs is supported. |
5814 | +dlopen_self=$enable_dlopen_self |
5815 | + |
5816 | +# Whether dlopen of statically linked programs is supported. |
5817 | +dlopen_self_static=$enable_dlopen_self_static |
5818 | |
5819 | # Compiler flag to prevent dynamic linking. |
5820 | -link_static_flag="$link_static_flag" |
5821 | +link_static_flag=$link_static_flag |
5822 | |
5823 | # Compiler flag to turn off builtin functions. |
5824 | -no_builtin_flag="$no_builtin_flag" |
5825 | +no_builtin_flag=$no_builtin_flag |
5826 | |
5827 | # Compiler flag to allow reflexive dlopens. |
5828 | -export_dynamic_flag_spec="$export_dynamic_flag_spec" |
5829 | +export_dynamic_flag_spec=$export_dynamic_flag_spec |
5830 | + |
5831 | +# Compiler flag to generate shared objects directly from archives. |
5832 | +whole_archive_flag_spec=$whole_archive_flag_spec |
5833 | + |
5834 | +# Compiler flag to generate thread-safe objects. |
5835 | +thread_safe_flag_spec=$thread_safe_flag_spec |
5836 | |
5837 | # Library versioning type. |
5838 | version_type=$version_type |
5839 | |
5840 | # Format of library name prefix. |
5841 | -libname_spec="$libname_spec" |
5842 | +libname_spec=$libname_spec |
5843 | |
5844 | # List of archive names. First name is the real one, the rest are links. |
5845 | # The last name is the one that the linker finds with -lNAME. |
5846 | -library_names_spec="$library_names_spec" |
5847 | +library_names_spec=$library_names_spec |
5848 | |
5849 | # The coded name of the library, if different from the real name. |
5850 | -soname_spec="$soname_spec" |
5851 | +soname_spec=$soname_spec |
5852 | |
5853 | # Commands used to build and install an old-style archive. |
5854 | -RANLIB="$RANLIB" |
5855 | -old_archive_cmds="$old_archive_cmds" |
5856 | -old_postinstall_cmds="$old_postinstall_cmds" |
5857 | -old_postuninstall_cmds="$old_postuninstall_cmds" |
5858 | +RANLIB=$RANLIB |
5859 | +old_archive_cmds=$old_archive_cmds |
5860 | +old_postinstall_cmds=$old_postinstall_cmds |
5861 | +old_postuninstall_cmds=$old_postuninstall_cmds |
5862 | |
5863 | # Create an old-style archive from a shared archive. |
5864 | -old_archive_from_new_cmds="$old_archive_from_new_cmds" |
5865 | +old_archive_from_new_cmds=$old_archive_from_new_cmds |
5866 | |
5867 | # Commands used to build and install a shared archive. |
5868 | -archive_cmds="$archive_cmds" |
5869 | -postinstall_cmds="$postinstall_cmds" |
5870 | -postuninstall_cmds="$postuninstall_cmds" |
5871 | +archive_cmds=$archive_cmds |
5872 | +archive_expsym_cmds=$archive_expsym_cmds |
5873 | +postinstall_cmds=$postinstall_cmds |
5874 | +postuninstall_cmds=$postuninstall_cmds |
5875 | + |
5876 | +# Method to check whether dependent libraries are shared objects. |
5877 | +deplibs_check_method=$deplibs_check_method |
5878 | + |
5879 | +# Command to use when deplibs_check_method == file_magic. |
5880 | +file_magic_cmd=$file_magic_cmd |
5881 | |
5882 | # Flag that allows shared libraries with undefined symbols to be built. |
5883 | -allow_undefined_flag="$allow_undefined_flag" |
5884 | +allow_undefined_flag=$allow_undefined_flag |
5885 | |
5886 | # Flag that forces no undefined symbols. |
5887 | -no_undefined_flag="$no_undefined_flag" |
5888 | +no_undefined_flag=$no_undefined_flag |
5889 | |
5890 | # Commands used to finish a libtool library installation in a directory. |
5891 | -finish_cmds="$finish_cmds" |
5892 | +finish_cmds=$finish_cmds |
5893 | |
5894 | # Same as above, but a single script fragment to be evaled but not shown. |
5895 | -finish_eval="$finish_eval" |
5896 | +finish_eval=$finish_eval |
5897 | |
5898 | # Take the output of nm and produce a listing of raw symbols and C names. |
5899 | -global_symbol_pipe="$global_symbol_pipe" |
5900 | +global_symbol_pipe=$global_symbol_pipe |
5901 | + |
5902 | +# Transform the output of nm in a proper C declaration |
5903 | +global_symbol_to_cdecl=$global_symbol_to_cdecl |
5904 | |
5905 | # This is the shared library runtime path variable. |
5906 | runpath_var=$runpath_var |
5907 | @@ -1461,15 +3008,18 @@ |
5908 | # This is the shared library path variable. |
5909 | shlibpath_var=$shlibpath_var |
5910 | |
5911 | +# Is shlibpath searched before the hard-coded library search path? |
5912 | +shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
5913 | + |
5914 | # How to hardcode a shared library path into an executable. |
5915 | hardcode_action=$hardcode_action |
5916 | |
5917 | # Flag to hardcode \$libdir into a binary during linking. |
5918 | # This must work even if \$libdir does not exist. |
5919 | -hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec" |
5920 | +hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec |
5921 | |
5922 | # Whether we need a single -rpath flag with a separated argument. |
5923 | -hardcode_libdir_separator="$hardcode_libdir_separator" |
5924 | +hardcode_libdir_separator=$hardcode_libdir_separator |
5925 | |
5926 | # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
5927 | # resulting binary. |
5928 | @@ -1483,27 +3033,115 @@ |
5929 | # the resulting binary. |
5930 | hardcode_shlibpath_var=$hardcode_shlibpath_var |
5931 | |
5932 | +# Compile-time system search path for libraries |
5933 | +sys_lib_search_path_spec=$sys_lib_search_path_spec |
5934 | + |
5935 | +# Run-time system search path for libraries |
5936 | +sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec |
5937 | + |
5938 | +# Fix the shell variable \$srcfile for the compiler. |
5939 | +fix_srcfile_path="$fix_srcfile_path" |
5940 | + |
5941 | +# Set to yes if exported symbols are required. |
5942 | +always_export_symbols=$always_export_symbols |
5943 | + |
5944 | +# The commands to list exported symbols. |
5945 | +export_symbols_cmds=$export_symbols_cmds |
5946 | + |
5947 | +# Symbols that should not be listed in the preloaded symbols. |
5948 | +exclude_expsyms=$exclude_expsyms |
5949 | + |
5950 | +# Symbols that must always be exported. |
5951 | +include_expsyms=$include_expsyms |
5952 | + |
5953 | EOF |
5954 | |
5955 | -case "$host_os" in |
5956 | -aix3*) |
5957 | - cat <<\EOF >> $ofile |
5958 | +case "$ltmain" in |
5959 | +*.sh) |
5960 | + echo '### END LIBTOOL CONFIG' >> "$ofile" |
5961 | + echo >> "$ofile" |
5962 | + case "$host_os" in |
5963 | + aix3*) |
5964 | + cat <<\EOF >> "$ofile" |
5965 | + |
5966 | # AIX sometimes has problems with the GCC collect2 program. For some |
5967 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
5968 | # vanish in a puff of smoke. |
5969 | -if test "${COLLECT_NAMES+set}" != set; then |
5970 | +if test "X${COLLECT_NAMES+set}" != Xset; then |
5971 | COLLECT_NAMES= |
5972 | export COLLECT_NAMES |
5973 | fi |
5974 | - |
5975 | EOF |
5976 | + ;; |
5977 | + esac |
5978 | + |
5979 | + # Append the ltmain.sh script. |
5980 | + sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) |
5981 | + # We use sed instead of cat because bash on DJGPP gets confused if |
5982 | + # if finds mixed CR/LF and LF-only lines. Since sed operates in |
5983 | + # text mode, it properly converts lines to CR/LF. This bash problem |
5984 | + # is reportedly fixed, but why not run on old versions too? |
5985 | + |
5986 | + chmod +x "$ofile" |
5987 | + ;; |
5988 | + |
5989 | +*) |
5990 | + # Compile the libtool program. |
5991 | + echo "FIXME: would compile $ltmain" |
5992 | ;; |
5993 | esac |
5994 | |
5995 | -# Append the ltmain.sh script. |
5996 | -cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1) |
5997 | +test -n "$cache_file" || exit 0 |
5998 | + |
5999 | +# AC_CACHE_SAVE |
6000 | +trap '' 1 2 15 |
6001 | +cat > confcache <<\EOF |
6002 | +# This file is a shell script that caches the results of configure |
6003 | +# tests run on this system so they can be shared between configure |
6004 | +# scripts and configure runs. It is not useful on other systems. |
6005 | +# If it contains results you don't want to keep, you may remove or edit it. |
6006 | +# |
6007 | +# By default, configure uses ./config.cache as the cache file, |
6008 | +# creating it if it does not exist already. You can give configure |
6009 | +# the --cache-file=FILE option to use a different cache file; that is |
6010 | +# what configure does when it calls configure scripts in |
6011 | +# subdirectories, so they share the cache. |
6012 | +# Giving --cache-file=/dev/null disables caching, for debugging configure. |
6013 | +# config.status only pays attention to the cache file if you give it the |
6014 | +# --recheck option to rerun configure. |
6015 | +# |
6016 | +EOF |
6017 | +# The following way of writing the cache mishandles newlines in values, |
6018 | +# but we know of no workaround that is simple, portable, and efficient. |
6019 | +# So, don't put newlines in cache variables' values. |
6020 | +# Ultrix sh set writes to stderr and can't be redirected directly, |
6021 | +# and sets the high bit in the cache file unless we assign to the vars. |
6022 | +(set) 2>&1 | |
6023 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in |
6024 | + *ac_space=\ *) |
6025 | + # `set' does not quote correctly, so add quotes (double-quote substitution |
6026 | + # turns \\\\ into \\, and sed turns \\ into \). |
6027 | + sed -n \ |
6028 | + -e "s/'/'\\\\''/g" \ |
6029 | + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
6030 | + ;; |
6031 | + *) |
6032 | + # `set' quotes correctly as required by POSIX, so do not add quotes. |
6033 | + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
6034 | + ;; |
6035 | + esac >> confcache |
6036 | +if cmp -s $cache_file confcache; then |
6037 | + : |
6038 | +else |
6039 | + if test -w $cache_file; then |
6040 | + echo "updating cache $cache_file" |
6041 | + cat confcache > $cache_file |
6042 | + else |
6043 | + echo "not updating unwritable cache $cache_file" |
6044 | + fi |
6045 | +fi |
6046 | +rm -f confcache |
6047 | |
6048 | -chmod +x $ofile |
6049 | exit 0 |
6050 | |
6051 | # Local Variables: |
6052 | diff -Naur jpeg-6b.orig/ltmain.sh jpeg-6b/ltmain.sh |
6053 | --- jpeg-6b.orig/ltmain.sh 1998-03-25 15:25:39.000000000 +0000 |
6054 | +++ jpeg-6b/ltmain.sh 2006-06-21 15:41:12.000000000 +0000 |
6055 | @@ -1,8 +1,8 @@ |
6056 | # ltmain.sh - Provide generalized library-building support services. |
6057 | # NOTE: Changing this file will not affect anything until you rerun ltconfig. |
6058 | # |
6059 | -# Copyright (C) 1996-1998 Free Software Foundation, Inc. |
6060 | -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
6061 | +# Copyright (C) 1996-1999 Free Software Foundation, Inc. |
6062 | +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
6063 | # |
6064 | # This program is free software; you can redistribute it and/or modify |
6065 | # it under the terms of the GNU General Public License as published by |
6066 | @@ -23,6 +23,30 @@ |
6067 | # configuration script generated by Autoconf, you may include it under |
6068 | # the same distribution terms that you use for the rest of that program. |
6069 | |
6070 | +# Check that we have a working $echo. |
6071 | +if test "X$1" = X--no-reexec; then |
6072 | + # Discard the --no-reexec flag, and continue. |
6073 | + shift |
6074 | +elif test "X$1" = X--fallback-echo; then |
6075 | + # Avoid inline document here, it may be left over |
6076 | + : |
6077 | +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then |
6078 | + # Yippee, $echo works! |
6079 | + : |
6080 | +else |
6081 | + # Restart under the correct shell, and then maybe $echo will work. |
6082 | + exec $SHELL "$0" --no-reexec ${1+"$@"} |
6083 | +fi |
6084 | + |
6085 | +if test "X$1" = X--fallback-echo; then |
6086 | + # used as fallback echo |
6087 | + shift |
6088 | + cat <<EOF |
6089 | +$* |
6090 | +EOF |
6091 | + exit 0 |
6092 | +fi |
6093 | + |
6094 | # The name of this program. |
6095 | progname=`$echo "$0" | sed 's%^.*/%%'` |
6096 | modename="$progname" |
6097 | @@ -30,7 +54,8 @@ |
6098 | # Constants. |
6099 | PROGRAM=ltmain.sh |
6100 | PACKAGE=libtool |
6101 | -VERSION=1.2 |
6102 | +VERSION=1.3.5 |
6103 | +TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" |
6104 | |
6105 | default_mode= |
6106 | help="Try \`$progname --help' for more information." |
6107 | @@ -41,15 +66,31 @@ |
6108 | |
6109 | # Sed substitution that helps us do robust quoting. It backslashifies |
6110 | # metacharacters that are still active within double-quoted strings. |
6111 | -Xsed='sed -e s/^X//' |
6112 | +Xsed='sed -e 1s/^X//' |
6113 | sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' |
6114 | +# test EBCDIC or ASCII |
6115 | +case `echo '' | od -x` in |
6116 | +*15*) # EBCDIC based system |
6117 | + SP2NL='tr \100 \025' |
6118 | + NL2SP='tr \025 \100' |
6119 | + ;; |
6120 | +*) # Assume ASCII based system |
6121 | + SP2NL='tr \040 \012' |
6122 | + NL2SP='tr \015\012 \040\040' |
6123 | + ;; |
6124 | +esac |
6125 | |
6126 | # NLS nuisances. |
6127 | # Only set LANG and LC_ALL to C if already set. |
6128 | # These must not be set unconditionally because not all systems understand |
6129 | # e.g. LANG=C (notably SCO). |
6130 | -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
6131 | -if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
6132 | +# We save the old values to restore during execute mode. |
6133 | +if test "${LC_ALL+set}" = set; then |
6134 | + save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL |
6135 | +fi |
6136 | +if test "${LANG+set}" = set; then |
6137 | + save_LANG="$LANG"; LANG=C; export LANG |
6138 | +fi |
6139 | |
6140 | if test "$LTCONFIG_VERSION" != "$VERSION"; then |
6141 | echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 |
6142 | @@ -72,6 +113,8 @@ |
6143 | show="$echo" |
6144 | show_help= |
6145 | execute_dlfiles= |
6146 | +lo2o="s/\\.lo\$/.${objext}/" |
6147 | +o2lo="s/\\.${objext}\$/.lo/" |
6148 | |
6149 | # Parse our command line options once, thoroughly. |
6150 | while test $# -gt 0 |
6151 | @@ -107,10 +150,20 @@ |
6152 | ;; |
6153 | |
6154 | --version) |
6155 | - echo "$PROGRAM (GNU $PACKAGE) $VERSION" |
6156 | + echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" |
6157 | + exit 0 |
6158 | + ;; |
6159 | + |
6160 | + --config) |
6161 | + sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 |
6162 | exit 0 |
6163 | ;; |
6164 | |
6165 | + --debug) |
6166 | + echo "$progname: enabling shell trace mode" |
6167 | + set -x |
6168 | + ;; |
6169 | + |
6170 | --dry-run | -n) |
6171 | run=: |
6172 | ;; |
6173 | @@ -172,15 +225,15 @@ |
6174 | mode=link |
6175 | for arg |
6176 | do |
6177 | - case "$arg" in |
6178 | - -c) |
6179 | - mode=compile |
6180 | - break |
6181 | - ;; |
6182 | - esac |
6183 | + case "$arg" in |
6184 | + -c) |
6185 | + mode=compile |
6186 | + break |
6187 | + ;; |
6188 | + esac |
6189 | done |
6190 | ;; |
6191 | - *db | *dbx) |
6192 | + *db | *dbx | *strace | *truss) |
6193 | mode=execute |
6194 | ;; |
6195 | *install*|cp|mv) |
6196 | @@ -195,11 +248,11 @@ |
6197 | |
6198 | # Just use the default operation mode. |
6199 | if test -z "$mode"; then |
6200 | - if test -n "$nonopt"; then |
6201 | - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 |
6202 | - else |
6203 | - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 |
6204 | - fi |
6205 | + if test -n "$nonopt"; then |
6206 | + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 |
6207 | + else |
6208 | + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 |
6209 | + fi |
6210 | fi |
6211 | ;; |
6212 | esac |
6213 | @@ -227,23 +280,39 @@ |
6214 | srcfile="$nonopt" |
6215 | suppress_output= |
6216 | |
6217 | + user_target=no |
6218 | for arg |
6219 | do |
6220 | # Accept any command-line options. |
6221 | case "$arg" in |
6222 | -o) |
6223 | - $echo "$modename: you cannot specify the output filename with \`-o'" 1>&2 |
6224 | - $echo "$help" 1>&2 |
6225 | - exit 1 |
6226 | + if test "$user_target" != "no"; then |
6227 | + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 |
6228 | + exit 1 |
6229 | + fi |
6230 | + user_target=next |
6231 | ;; |
6232 | |
6233 | -static) |
6234 | - build_libtool_libs=no |
6235 | build_old_libs=yes |
6236 | continue |
6237 | ;; |
6238 | esac |
6239 | |
6240 | + case "$user_target" in |
6241 | + next) |
6242 | + # The next one is the -o target name |
6243 | + user_target=yes |
6244 | + continue |
6245 | + ;; |
6246 | + yes) |
6247 | + # We got the output file |
6248 | + user_target=set |
6249 | + libobj="$arg" |
6250 | + continue |
6251 | + ;; |
6252 | + esac |
6253 | + |
6254 | # Accept the current argument as the source file. |
6255 | lastarg="$srcfile" |
6256 | srcfile="$arg" |
6257 | @@ -272,11 +341,22 @@ |
6258 | fi |
6259 | done |
6260 | |
6261 | - # Get the name of the library object. |
6262 | - libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` |
6263 | + case "$user_target" in |
6264 | + set) |
6265 | + ;; |
6266 | + no) |
6267 | + # Get the name of the library object. |
6268 | + libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` |
6269 | + ;; |
6270 | + *) |
6271 | + $echo "$modename: you must specify a target with \`-o'" 1>&2 |
6272 | + exit 1 |
6273 | + ;; |
6274 | + esac |
6275 | |
6276 | # Recognize several different file suffixes. |
6277 | - xform='[cCFSfms]' |
6278 | + # If the user specifies -o file.o, it is replaced with file.lo |
6279 | + xform='[cCFSfmso]' |
6280 | case "$libobj" in |
6281 | *.ada) xform=ada ;; |
6282 | *.adb) xform=adb ;; |
6283 | @@ -293,9 +373,9 @@ |
6284 | libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` |
6285 | |
6286 | case "$libobj" in |
6287 | - *.lo) obj=`$echo "X$libobj" | $Xsed -e 's/\.lo$/.o/'` ;; |
6288 | + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; |
6289 | *) |
6290 | - $echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2 |
6291 | + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 |
6292 | exit 1 |
6293 | ;; |
6294 | esac |
6295 | @@ -308,11 +388,54 @@ |
6296 | |
6297 | # Delete any leftover library objects. |
6298 | if test "$build_old_libs" = yes; then |
6299 | - $run $rm $obj $libobj |
6300 | - trap "$run $rm $obj $libobj; exit 1" 1 2 15 |
6301 | + removelist="$obj $libobj" |
6302 | else |
6303 | - $run $rm $libobj |
6304 | - trap "$run $rm $libobj; exit 1" 1 2 15 |
6305 | + removelist="$libobj" |
6306 | + fi |
6307 | + |
6308 | + $run $rm $removelist |
6309 | + trap "$run $rm $removelist; exit 1" 1 2 15 |
6310 | + |
6311 | + # Calculate the filename of the output object if compiler does |
6312 | + # not support -o with -c |
6313 | + if test "$compiler_c_o" = no; then |
6314 | + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} |
6315 | + lockfile="$output_obj.lock" |
6316 | + removelist="$removelist $output_obj $lockfile" |
6317 | + trap "$run $rm $removelist; exit 1" 1 2 15 |
6318 | + else |
6319 | + need_locks=no |
6320 | + lockfile= |
6321 | + fi |
6322 | + |
6323 | + # Lock this critical section if it is needed |
6324 | + # We use this script file to make the link, it avoids creating a new file |
6325 | + if test "$need_locks" = yes; then |
6326 | + until ln "$0" "$lockfile" 2>/dev/null; do |
6327 | + $show "Waiting for $lockfile to be removed" |
6328 | + sleep 2 |
6329 | + done |
6330 | + elif test "$need_locks" = warn; then |
6331 | + if test -f "$lockfile"; then |
6332 | + echo "\ |
6333 | +*** ERROR, $lockfile exists and contains: |
6334 | +`cat $lockfile 2>/dev/null` |
6335 | + |
6336 | +This indicates that another process is trying to use the same |
6337 | +temporary object file, and libtool could not work around it because |
6338 | +your compiler does not support \`-c' and \`-o' together. If you |
6339 | +repeat this compilation, it may succeed, by chance, but you had better |
6340 | +avoid parallel builds (make -j) in this platform, or get a better |
6341 | +compiler." |
6342 | + |
6343 | + $run $rm $removelist |
6344 | + exit 1 |
6345 | + fi |
6346 | + echo $srcfile > "$lockfile" |
6347 | + fi |
6348 | + |
6349 | + if test -n "$fix_srcfile_path"; then |
6350 | + eval srcfile=\"$fix_srcfile_path\" |
6351 | fi |
6352 | |
6353 | # Only build a PIC object if we are building libtool libraries. |
6354 | @@ -321,23 +444,110 @@ |
6355 | fbsd_hideous_sh_bug=$base_compile |
6356 | |
6357 | # All platforms use -DPIC, to notify preprocessed assembler code. |
6358 | - $show "$base_compile$pic_flag -DPIC $srcfile" |
6359 | - if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then : |
6360 | + command="$base_compile $srcfile $pic_flag -DPIC" |
6361 | + if test "$build_old_libs" = yes; then |
6362 | + lo_libobj="$libobj" |
6363 | + dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` |
6364 | + if test "X$dir" = "X$libobj"; then |
6365 | + dir="$objdir" |
6366 | + else |
6367 | + dir="$dir/$objdir" |
6368 | + fi |
6369 | + libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` |
6370 | + |
6371 | + if test -d "$dir"; then |
6372 | + $show "$rm $libobj" |
6373 | + $run $rm $libobj |
6374 | + else |
6375 | + $show "$mkdir $dir" |
6376 | + $run $mkdir $dir |
6377 | + status=$? |
6378 | + if test $status -ne 0 && test ! -d $dir; then |
6379 | + exit $status |
6380 | + fi |
6381 | + fi |
6382 | + fi |
6383 | + if test "$compiler_o_lo" = yes; then |
6384 | + output_obj="$libobj" |
6385 | + command="$command -o $output_obj" |
6386 | + elif test "$compiler_c_o" = yes; then |
6387 | + output_obj="$obj" |
6388 | + command="$command -o $output_obj" |
6389 | + fi |
6390 | + |
6391 | + $run $rm "$output_obj" |
6392 | + $show "$command" |
6393 | + if $run eval "$command"; then : |
6394 | else |
6395 | - test -n "$obj" && $run $rm $obj |
6396 | - exit 1 |
6397 | + test -n "$output_obj" && $run $rm $removelist |
6398 | + exit 1 |
6399 | fi |
6400 | |
6401 | - # If we have no pic_flag, then copy the object into place and finish. |
6402 | - if test -z "$pic_flag"; then |
6403 | - $show "$LN_S $obj $libobj" |
6404 | - $run $LN_S $obj $libobj |
6405 | - exit $? |
6406 | + if test "$need_locks" = warn && |
6407 | + test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then |
6408 | + echo "\ |
6409 | +*** ERROR, $lockfile contains: |
6410 | +`cat $lockfile 2>/dev/null` |
6411 | + |
6412 | +but it should contain: |
6413 | +$srcfile |
6414 | + |
6415 | +This indicates that another process is trying to use the same |
6416 | +temporary object file, and libtool could not work around it because |
6417 | +your compiler does not support \`-c' and \`-o' together. If you |
6418 | +repeat this compilation, it may succeed, by chance, but you had better |
6419 | +avoid parallel builds (make -j) in this platform, or get a better |
6420 | +compiler." |
6421 | + |
6422 | + $run $rm $removelist |
6423 | + exit 1 |
6424 | + fi |
6425 | + |
6426 | + # Just move the object if needed, then go on to compile the next one |
6427 | + if test x"$output_obj" != x"$libobj"; then |
6428 | + $show "$mv $output_obj $libobj" |
6429 | + if $run $mv $output_obj $libobj; then : |
6430 | + else |
6431 | + error=$? |
6432 | + $run $rm $removelist |
6433 | + exit $error |
6434 | + fi |
6435 | fi |
6436 | |
6437 | - # Just move the object, then go on to compile the next one |
6438 | - $show "$mv $obj $libobj" |
6439 | - $run $mv $obj $libobj || exit 1 |
6440 | + # If we have no pic_flag, then copy the object into place and finish. |
6441 | + if test -z "$pic_flag" && test "$build_old_libs" = yes; then |
6442 | + # Rename the .lo from within objdir to obj |
6443 | + if test -f $obj; then |
6444 | + $show $rm $obj |
6445 | + $run $rm $obj |
6446 | + fi |
6447 | + |
6448 | + $show "$mv $libobj $obj" |
6449 | + if $run $mv $libobj $obj; then : |
6450 | + else |
6451 | + error=$? |
6452 | + $run $rm $removelist |
6453 | + exit $error |
6454 | + fi |
6455 | + |
6456 | + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` |
6457 | + if test "X$xdir" = "X$obj"; then |
6458 | + xdir="." |
6459 | + else |
6460 | + xdir="$xdir" |
6461 | + fi |
6462 | + baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` |
6463 | + libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` |
6464 | + # Now arrange that obj and lo_libobj become the same file |
6465 | + $show "(cd $xdir && $LN_S $baseobj $libobj)" |
6466 | + if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then |
6467 | + exit 0 |
6468 | + else |
6469 | + error=$? |
6470 | + $run $rm $removelist |
6471 | + exit $error |
6472 | + fi |
6473 | + fi |
6474 | |
6475 | # Allow error messages only from the first compilation. |
6476 | suppress_output=' >/dev/null 2>&1' |
6477 | @@ -345,20 +555,73 @@ |
6478 | |
6479 | # Only build a position-dependent object if we build old libraries. |
6480 | if test "$build_old_libs" = yes; then |
6481 | + command="$base_compile $srcfile" |
6482 | + if test "$compiler_c_o" = yes; then |
6483 | + command="$command -o $obj" |
6484 | + output_obj="$obj" |
6485 | + fi |
6486 | + |
6487 | # Suppress compiler output if we already did a PIC compilation. |
6488 | - $show "$base_compile $srcfile$suppress_output" |
6489 | - if $run eval "$base_compile \$srcfile$suppress_output"; then : |
6490 | + command="$command$suppress_output" |
6491 | + $run $rm "$output_obj" |
6492 | + $show "$command" |
6493 | + if $run eval "$command"; then : |
6494 | + else |
6495 | + $run $rm $removelist |
6496 | + exit 1 |
6497 | + fi |
6498 | + |
6499 | + if test "$need_locks" = warn && |
6500 | + test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then |
6501 | + echo "\ |
6502 | +*** ERROR, $lockfile contains: |
6503 | +`cat $lockfile 2>/dev/null` |
6504 | + |
6505 | +but it should contain: |
6506 | +$srcfile |
6507 | + |
6508 | +This indicates that another process is trying to use the same |
6509 | +temporary object file, and libtool could not work around it because |
6510 | +your compiler does not support \`-c' and \`-o' together. If you |
6511 | +repeat this compilation, it may succeed, by chance, but you had better |
6512 | +avoid parallel builds (make -j) in this platform, or get a better |
6513 | +compiler." |
6514 | + |
6515 | + $run $rm $removelist |
6516 | + exit 1 |
6517 | + fi |
6518 | + |
6519 | + # Just move the object if needed |
6520 | + if test x"$output_obj" != x"$obj"; then |
6521 | + $show "$mv $output_obj $obj" |
6522 | + if $run $mv $output_obj $obj; then : |
6523 | + else |
6524 | + error=$? |
6525 | + $run $rm $removelist |
6526 | + exit $error |
6527 | + fi |
6528 | + fi |
6529 | + |
6530 | + # Create an invalid libtool object if no PIC, so that we do not |
6531 | + # accidentally link it into a program. |
6532 | + if test "$build_libtool_libs" != yes; then |
6533 | + $show "echo timestamp > $libobj" |
6534 | + $run eval "echo timestamp > \$libobj" || exit $? |
6535 | else |
6536 | - $run $rm $obj $libobj |
6537 | - exit 1 |
6538 | + # Move the .lo from within objdir |
6539 | + $show "$mv $libobj $lo_libobj" |
6540 | + if $run $mv $libobj $lo_libobj; then : |
6541 | + else |
6542 | + error=$? |
6543 | + $run $rm $removelist |
6544 | + exit $error |
6545 | + fi |
6546 | fi |
6547 | fi |
6548 | |
6549 | - # Create an invalid libtool object if no PIC, so that we do not |
6550 | - # accidentally link it into a program. |
6551 | - if test "$build_libtool_libs" != yes; then |
6552 | - $show "echo timestamp > $libobj" |
6553 | - $run eval "echo timestamp > \$libobj" || exit $? |
6554 | + # Unlock the critical section if it was locked |
6555 | + if test "$need_locks" != no; then |
6556 | + $rm "$lockfile" |
6557 | fi |
6558 | |
6559 | exit 0 |
6560 | @@ -367,28 +630,238 @@ |
6561 | # libtool link mode |
6562 | link) |
6563 | modename="$modename: link" |
6564 | - CC="$nonopt" |
6565 | - allow_undefined=yes |
6566 | - compile_command="$CC" |
6567 | - finalize_command="$CC" |
6568 | + case "$host" in |
6569 | + *-*-cygwin* | *-*-mingw* | *-*-os2*) |
6570 | + # It is impossible to link a dll without this setting, and |
6571 | + # we shouldn't force the makefile maintainer to figure out |
6572 | + # which system we are compiling for in order to pass an extra |
6573 | + # flag for every libtool invokation. |
6574 | + # allow_undefined=no |
6575 | + |
6576 | + # FIXME: Unfortunately, there are problems with the above when trying |
6577 | + # to make a dll which has undefined symbols, in which case not |
6578 | + # even a static library is built. For now, we need to specify |
6579 | + # -no-undefined on the libtool link line when we can be certain |
6580 | + # that all symbols are satisfied, otherwise we get a static library. |
6581 | + allow_undefined=yes |
6582 | + |
6583 | + # This is a source program that is used to create dlls on Windows |
6584 | + # Don't remove nor modify the starting and closing comments |
6585 | +# /* ltdll.c starts here */ |
6586 | +# #define WIN32_LEAN_AND_MEAN |
6587 | +# #include <windows.h> |
6588 | +# #undef WIN32_LEAN_AND_MEAN |
6589 | +# #include <stdio.h> |
6590 | +# |
6591 | +# #ifndef __CYGWIN__ |
6592 | +# # ifdef __CYGWIN32__ |
6593 | +# # define __CYGWIN__ __CYGWIN32__ |
6594 | +# # endif |
6595 | +# #endif |
6596 | +# |
6597 | +# #ifdef __cplusplus |
6598 | +# extern "C" { |
6599 | +# #endif |
6600 | +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
6601 | +# #ifdef __cplusplus |
6602 | +# } |
6603 | +# #endif |
6604 | +# |
6605 | +# #ifdef __CYGWIN__ |
6606 | +# #include <cygwin/cygwin_dll.h> |
6607 | +# DECLARE_CYGWIN_DLL( DllMain ); |
6608 | +# #endif |
6609 | +# HINSTANCE __hDllInstance_base; |
6610 | +# |
6611 | +# BOOL APIENTRY |
6612 | +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
6613 | +# { |
6614 | +# __hDllInstance_base = hInst; |
6615 | +# return TRUE; |
6616 | +# } |
6617 | +# /* ltdll.c ends here */ |
6618 | + # This is a source program that is used to create import libraries |
6619 | + # on Windows for dlls which lack them. Don't remove nor modify the |
6620 | + # starting and closing comments |
6621 | +# /* impgen.c starts here */ |
6622 | +# /* Copyright (C) 1999 Free Software Foundation, Inc. |
6623 | +# |
6624 | +# This file is part of GNU libtool. |
6625 | +# |
6626 | +# This program is free software; you can redistribute it and/or modify |
6627 | +# it under the terms of the GNU General Public License as published by |
6628 | +# the Free Software Foundation; either version 2 of the License, or |
6629 | +# (at your option) any later version. |
6630 | +# |
6631 | +# This program is distributed in the hope that it will be useful, |
6632 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
6633 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6634 | +# GNU General Public License for more details. |
6635 | +# |
6636 | +# You should have received a copy of the GNU General Public License |
6637 | +# along with this program; if not, write to the Free Software |
6638 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
6639 | +# */ |
6640 | +# |
6641 | +# #include <stdio.h> /* for printf() */ |
6642 | +# #include <unistd.h> /* for open(), lseek(), read() */ |
6643 | +# #include <fcntl.h> /* for O_RDONLY, O_BINARY */ |
6644 | +# #include <string.h> /* for strdup() */ |
6645 | +# |
6646 | +# static unsigned int |
6647 | +# pe_get16 (fd, offset) |
6648 | +# int fd; |
6649 | +# int offset; |
6650 | +# { |
6651 | +# unsigned char b[2]; |
6652 | +# lseek (fd, offset, SEEK_SET); |
6653 | +# read (fd, b, 2); |
6654 | +# return b[0] + (b[1]<<8); |
6655 | +# } |
6656 | +# |
6657 | +# static unsigned int |
6658 | +# pe_get32 (fd, offset) |
6659 | +# int fd; |
6660 | +# int offset; |
6661 | +# { |
6662 | +# unsigned char b[4]; |
6663 | +# lseek (fd, offset, SEEK_SET); |
6664 | +# read (fd, b, 4); |
6665 | +# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
6666 | +# } |
6667 | +# |
6668 | +# static unsigned int |
6669 | +# pe_as32 (ptr) |
6670 | +# void *ptr; |
6671 | +# { |
6672 | +# unsigned char *b = ptr; |
6673 | +# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
6674 | +# } |
6675 | +# |
6676 | +# int |
6677 | +# main (argc, argv) |
6678 | +# int argc; |
6679 | +# char *argv[]; |
6680 | +# { |
6681 | +# int dll; |
6682 | +# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; |
6683 | +# unsigned long export_rva, export_size, nsections, secptr, expptr; |
6684 | +# unsigned long name_rvas, nexp; |
6685 | +# unsigned char *expdata, *erva; |
6686 | +# char *filename, *dll_name; |
6687 | +# |
6688 | +# filename = argv[1]; |
6689 | +# |
6690 | +# dll = open(filename, O_RDONLY|O_BINARY); |
6691 | +# if (!dll) |
6692 | +# return 1; |
6693 | +# |
6694 | +# dll_name = filename; |
6695 | +# |
6696 | +# for (i=0; filename[i]; i++) |
6697 | +# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') |
6698 | +# dll_name = filename + i +1; |
6699 | +# |
6700 | +# pe_header_offset = pe_get32 (dll, 0x3c); |
6701 | +# opthdr_ofs = pe_header_offset + 4 + 20; |
6702 | +# num_entries = pe_get32 (dll, opthdr_ofs + 92); |
6703 | +# |
6704 | +# if (num_entries < 1) /* no exports */ |
6705 | +# return 1; |
6706 | +# |
6707 | +# export_rva = pe_get32 (dll, opthdr_ofs + 96); |
6708 | +# export_size = pe_get32 (dll, opthdr_ofs + 100); |
6709 | +# nsections = pe_get16 (dll, pe_header_offset + 4 +2); |
6710 | +# secptr = (pe_header_offset + 4 + 20 + |
6711 | +# pe_get16 (dll, pe_header_offset + 4 + 16)); |
6712 | +# |
6713 | +# expptr = 0; |
6714 | +# for (i = 0; i < nsections; i++) |
6715 | +# { |
6716 | +# char sname[8]; |
6717 | +# unsigned long secptr1 = secptr + 40 * i; |
6718 | +# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); |
6719 | +# unsigned long vsize = pe_get32 (dll, secptr1 + 16); |
6720 | +# unsigned long fptr = pe_get32 (dll, secptr1 + 20); |
6721 | +# lseek(dll, secptr1, SEEK_SET); |
6722 | +# read(dll, sname, 8); |
6723 | +# if (vaddr <= export_rva && vaddr+vsize > export_rva) |
6724 | +# { |
6725 | +# expptr = fptr + (export_rva - vaddr); |
6726 | +# if (export_rva + export_size > vaddr + vsize) |
6727 | +# export_size = vsize - (export_rva - vaddr); |
6728 | +# break; |
6729 | +# } |
6730 | +# } |
6731 | +# |
6732 | +# expdata = (unsigned char*)malloc(export_size); |
6733 | +# lseek (dll, expptr, SEEK_SET); |
6734 | +# read (dll, expdata, export_size); |
6735 | +# erva = expdata - export_rva; |
6736 | +# |
6737 | +# nexp = pe_as32 (expdata+24); |
6738 | +# name_rvas = pe_as32 (expdata+32); |
6739 | +# |
6740 | +# printf ("EXPORTS\n"); |
6741 | +# for (i = 0; i<nexp; i++) |
6742 | +# { |
6743 | +# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); |
6744 | +# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); |
6745 | +# } |
6746 | +# |
6747 | +# return 0; |
6748 | +# } |
6749 | +# /* impgen.c ends here */ |
6750 | + ;; |
6751 | + *) |
6752 | + allow_undefined=yes |
6753 | + ;; |
6754 | + esac |
6755 | + compile_command="$nonopt" |
6756 | + finalize_command="$nonopt" |
6757 | |
6758 | + compile_rpath= |
6759 | + finalize_rpath= |
6760 | compile_shlibpath= |
6761 | finalize_shlibpath= |
6762 | + convenience= |
6763 | + old_convenience= |
6764 | deplibs= |
6765 | + linkopts= |
6766 | + |
6767 | + if test -n "$shlibpath_var"; then |
6768 | + # get the directories listed in $shlibpath_var |
6769 | + eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` |
6770 | + else |
6771 | + lib_search_path= |
6772 | + fi |
6773 | + # now prepend the system-specific ones |
6774 | + eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\" |
6775 | + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" |
6776 | + |
6777 | + avoid_version=no |
6778 | dlfiles= |
6779 | dlprefiles= |
6780 | + dlself=no |
6781 | export_dynamic=no |
6782 | - hardcode_libdirs= |
6783 | + export_symbols= |
6784 | + export_symbols_regex= |
6785 | + generated= |
6786 | libobjs= |
6787 | link_against_libtool_libs= |
6788 | ltlibs= |
6789 | + module=no |
6790 | objs= |
6791 | + prefer_static_libs=no |
6792 | + preload=no |
6793 | prev= |
6794 | prevarg= |
6795 | release= |
6796 | rpath= |
6797 | + xrpath= |
6798 | perm_rpath= |
6799 | temp_rpath= |
6800 | + thread_safe=no |
6801 | vinfo= |
6802 | |
6803 | # We need to know -static, to get the right output filenames. |
6804 | @@ -396,13 +869,23 @@ |
6805 | do |
6806 | case "$arg" in |
6807 | -all-static | -static) |
6808 | - if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then |
6809 | + if test "X$arg" = "X-all-static"; then |
6810 | + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then |
6811 | $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 |
6812 | - fi |
6813 | - build_libtool_libs=no |
6814 | + fi |
6815 | + if test -n "$link_static_flag"; then |
6816 | + dlopen_self=$dlopen_self_static |
6817 | + fi |
6818 | + else |
6819 | + if test -z "$pic_flag" && test -n "$link_static_flag"; then |
6820 | + dlopen_self=$dlopen_self_static |
6821 | + fi |
6822 | + fi |
6823 | + build_libtool_libs=no |
6824 | build_old_libs=yes |
6825 | - break |
6826 | - ;; |
6827 | + prefer_static_libs=yes |
6828 | + break |
6829 | + ;; |
6830 | esac |
6831 | done |
6832 | |
6833 | @@ -410,44 +893,107 @@ |
6834 | test -n "$old_archive_from_new_cmds" && build_old_libs=yes |
6835 | |
6836 | # Go through the arguments, transforming them on the way. |
6837 | - for arg |
6838 | - do |
6839 | + while test $# -gt 0; do |
6840 | + arg="$1" |
6841 | + shift |
6842 | + |
6843 | # If the previous option needs an argument, assign it. |
6844 | if test -n "$prev"; then |
6845 | - case "$prev" in |
6846 | - output) |
6847 | - compile_command="$compile_command @OUTPUT@" |
6848 | - finalize_command="$finalize_command @OUTPUT@" |
6849 | - ;; |
6850 | - esac |
6851 | - |
6852 | - case "$prev" in |
6853 | - dlfiles|dlprefiles) |
6854 | - case "$arg" in |
6855 | - *.la | *.lo) ;; # We handle these cases below. |
6856 | - *) |
6857 | - dlprefiles="$dlprefiles $arg" |
6858 | - test "$prev" = dlfiles && dlfiles="$dlfiles $arg" |
6859 | - prev= |
6860 | - ;; |
6861 | - esac |
6862 | - ;; |
6863 | + case "$prev" in |
6864 | + output) |
6865 | + compile_command="$compile_command @OUTPUT@" |
6866 | + finalize_command="$finalize_command @OUTPUT@" |
6867 | + ;; |
6868 | + esac |
6869 | + |
6870 | + case "$prev" in |
6871 | + dlfiles|dlprefiles) |
6872 | + if test "$preload" = no; then |
6873 | + # Add the symbol object into the linking commands. |
6874 | + compile_command="$compile_command @SYMFILE@" |
6875 | + finalize_command="$finalize_command @SYMFILE@" |
6876 | + preload=yes |
6877 | + fi |
6878 | + case "$arg" in |
6879 | + *.la | *.lo) ;; # We handle these cases below. |
6880 | + force) |
6881 | + if test "$dlself" = no; then |
6882 | + dlself=needless |
6883 | + export_dynamic=yes |
6884 | + fi |
6885 | + prev= |
6886 | + continue |
6887 | + ;; |
6888 | + self) |
6889 | + if test "$prev" = dlprefiles; then |
6890 | + dlself=yes |
6891 | + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then |
6892 | + dlself=yes |
6893 | + else |
6894 | + dlself=needless |
6895 | + export_dynamic=yes |
6896 | + fi |
6897 | + prev= |
6898 | + continue |
6899 | + ;; |
6900 | + *) |
6901 | + if test "$prev" = dlfiles; then |
6902 | + dlfiles="$dlfiles $arg" |
6903 | + else |
6904 | + dlprefiles="$dlprefiles $arg" |
6905 | + fi |
6906 | + prev= |
6907 | + ;; |
6908 | + esac |
6909 | + ;; |
6910 | + expsyms) |
6911 | + export_symbols="$arg" |
6912 | + if test ! -f "$arg"; then |
6913 | + $echo "$modename: symbol file \`$arg' does not exist" |
6914 | + exit 1 |
6915 | + fi |
6916 | + prev= |
6917 | + continue |
6918 | + ;; |
6919 | + expsyms_regex) |
6920 | + export_symbols_regex="$arg" |
6921 | + prev= |
6922 | + continue |
6923 | + ;; |
6924 | release) |
6925 | release="-$arg" |
6926 | prev= |
6927 | continue |
6928 | ;; |
6929 | - rpath) |
6930 | - rpath="$rpath $arg" |
6931 | + rpath | xrpath) |
6932 | + # We need an absolute path. |
6933 | + case "$arg" in |
6934 | + [\\/]* | [A-Za-z]:[\\/]*) ;; |
6935 | + *) |
6936 | + $echo "$modename: only absolute run-paths are allowed" 1>&2 |
6937 | + exit 1 |
6938 | + ;; |
6939 | + esac |
6940 | + if test "$prev" = rpath; then |
6941 | + case "$rpath " in |
6942 | + *" $arg "*) ;; |
6943 | + *) rpath="$rpath $arg" ;; |
6944 | + esac |
6945 | + else |
6946 | + case "$xrpath " in |
6947 | + *" $arg "*) ;; |
6948 | + *) xrpath="$xrpath $arg" ;; |
6949 | + esac |
6950 | + fi |
6951 | + prev= |
6952 | + continue |
6953 | + ;; |
6954 | + *) |
6955 | + eval "$prev=\"\$arg\"" |
6956 | prev= |
6957 | continue |
6958 | ;; |
6959 | - *) |
6960 | - eval "$prev=\"\$arg\"" |
6961 | - prev= |
6962 | - continue |
6963 | - ;; |
6964 | - esac |
6965 | + esac |
6966 | fi |
6967 | |
6968 | prevarg="$arg" |
6969 | @@ -455,10 +1001,10 @@ |
6970 | case "$arg" in |
6971 | -all-static) |
6972 | if test -n "$link_static_flag"; then |
6973 | - compile_command="$compile_command $link_static_flag" |
6974 | + compile_command="$compile_command $link_static_flag" |
6975 | finalize_command="$finalize_command $link_static_flag" |
6976 | - fi |
6977 | - continue |
6978 | + fi |
6979 | + continue |
6980 | ;; |
6981 | |
6982 | -allow-undefined) |
6983 | @@ -467,46 +1013,107 @@ |
6984 | continue |
6985 | ;; |
6986 | |
6987 | + -avoid-version) |
6988 | + avoid_version=yes |
6989 | + continue |
6990 | + ;; |
6991 | + |
6992 | -dlopen) |
6993 | - prev=dlfiles |
6994 | - continue |
6995 | - ;; |
6996 | + prev=dlfiles |
6997 | + continue |
6998 | + ;; |
6999 | |
7000 | -dlpreopen) |
7001 | - prev=dlprefiles |
7002 | - continue |
7003 | - ;; |
7004 | + prev=dlprefiles |
7005 | + continue |
7006 | + ;; |
7007 | |
7008 | -export-dynamic) |
7009 | - if test "$export_dynamic" != yes; then |
7010 | - export_dynamic=yes |
7011 | - if test -n "$export_dynamic_flag_spec"; then |
7012 | - eval arg=\"$export_dynamic_flag_spec\" |
7013 | - else |
7014 | - arg= |
7015 | - fi |
7016 | + export_dynamic=yes |
7017 | + continue |
7018 | + ;; |
7019 | |
7020 | - # Add the symbol object into the linking commands. |
7021 | - compile_command="$compile_command @SYMFILE@" |
7022 | - finalize_command="$finalize_command @SYMFILE@" |
7023 | - fi |
7024 | - ;; |
7025 | + -export-symbols | -export-symbols-regex) |
7026 | + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then |
7027 | + $echo "$modename: not more than one -exported-symbols argument allowed" |
7028 | + exit 1 |
7029 | + fi |
7030 | + if test "X$arg" = "X-export-symbols"; then |
7031 | + prev=expsyms |
7032 | + else |
7033 | + prev=expsyms_regex |
7034 | + fi |
7035 | + continue |
7036 | + ;; |
7037 | |
7038 | -L*) |
7039 | - dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'` |
7040 | - case "$dir" in |
7041 | - /* | [A-Za-z]:\\*) |
7042 | - # Add the corresponding hardcode_libdir_flag, if it is not identical. |
7043 | - ;; |
7044 | - *) |
7045 | - $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2 |
7046 | - exit 1 |
7047 | - ;; |
7048 | - esac |
7049 | - deplibs="$deplibs $arg" |
7050 | - ;; |
7051 | + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` |
7052 | + # We need an absolute path. |
7053 | + case "$dir" in |
7054 | + [\\/]* | [A-Za-z]:[\\/]*) ;; |
7055 | + *) |
7056 | + absdir=`cd "$dir" && pwd` |
7057 | + if test -z "$absdir"; then |
7058 | + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 |
7059 | + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 |
7060 | + absdir="$dir" |
7061 | + fi |
7062 | + dir="$absdir" |
7063 | + ;; |
7064 | + esac |
7065 | + case " $deplibs " in |
7066 | + *" $arg "*) ;; |
7067 | + *) deplibs="$deplibs $arg";; |
7068 | + esac |
7069 | + case " $lib_search_path " in |
7070 | + *" $dir "*) ;; |
7071 | + *) lib_search_path="$lib_search_path $dir";; |
7072 | + esac |
7073 | + case "$host" in |
7074 | + *-*-cygwin* | *-*-mingw* | *-*-os2*) |
7075 | + dllsearchdir=`cd "$dir" && pwd || echo "$dir"` |
7076 | + case ":$dllsearchpath:" in |
7077 | + ::) dllsearchpath="$dllsearchdir";; |
7078 | + *":$dllsearchdir:"*) ;; |
7079 | + *) dllsearchpath="$dllsearchpath:$dllsearchdir";; |
7080 | + esac |
7081 | + ;; |
7082 | + esac |
7083 | + ;; |
7084 | + |
7085 | + -l*) |
7086 | + if test "$arg" = "-lc"; then |
7087 | + case "$host" in |
7088 | + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) |
7089 | + # These systems don't actually have c library (as such) |
7090 | + continue |
7091 | + ;; |
7092 | + *-*-rhapsody* | *-*-darwin1.[012]) |
7093 | + # Rhapsody C library is in the System framework |
7094 | + deplibs="$deplibs -framework System" |
7095 | + continue |
7096 | + ;; |
7097 | + esac |
7098 | + elif test "$arg" = "-lm"; then |
7099 | + case "$host" in |
7100 | + *-*-cygwin* | *-*-beos*) |
7101 | + # These systems don't actually have math library (as such) |
7102 | + continue |
7103 | + ;; |
7104 | + *-*-rhapsody* | *-*-darwin1.[012]) |
7105 | + # Rhapsody math library is in the System framework |
7106 | + deplibs="$deplibs -framework System" |
7107 | + continue |
7108 | + ;; |
7109 | + esac |
7110 | + fi |
7111 | + deplibs="$deplibs $arg" |
7112 | + ;; |
7113 | |
7114 | - -l*) deplibs="$deplibs $arg" ;; |
7115 | + -module) |
7116 | + module=yes |
7117 | + continue |
7118 | + ;; |
7119 | |
7120 | -no-undefined) |
7121 | allow_undefined=no |
7122 | @@ -521,23 +1128,50 @@ |
7123 | ;; |
7124 | |
7125 | -rpath) |
7126 | - prev=rpath |
7127 | - continue |
7128 | - ;; |
7129 | + prev=rpath |
7130 | + continue |
7131 | + ;; |
7132 | + |
7133 | + -R) |
7134 | + prev=xrpath |
7135 | + continue |
7136 | + ;; |
7137 | + |
7138 | + -R*) |
7139 | + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` |
7140 | + # We need an absolute path. |
7141 | + case "$dir" in |
7142 | + [\\/]* | [A-Za-z]:[\\/]*) ;; |
7143 | + *) |
7144 | + $echo "$modename: only absolute run-paths are allowed" 1>&2 |
7145 | + exit 1 |
7146 | + ;; |
7147 | + esac |
7148 | + case "$xrpath " in |
7149 | + *" $dir "*) ;; |
7150 | + *) xrpath="$xrpath $dir" ;; |
7151 | + esac |
7152 | + continue |
7153 | + ;; |
7154 | |
7155 | -static) |
7156 | # If we have no pic_flag, then this is the same as -all-static. |
7157 | if test -z "$pic_flag" && test -n "$link_static_flag"; then |
7158 | - compile_command="$compile_command $link_static_flag" |
7159 | + compile_command="$compile_command $link_static_flag" |
7160 | finalize_command="$finalize_command $link_static_flag" |
7161 | - fi |
7162 | + fi |
7163 | + continue |
7164 | + ;; |
7165 | + |
7166 | + -thread-safe) |
7167 | + thread_safe=yes |
7168 | continue |
7169 | ;; |
7170 | |
7171 | -version-info) |
7172 | - prev=vinfo |
7173 | - continue |
7174 | - ;; |
7175 | + prev=vinfo |
7176 | + continue |
7177 | + ;; |
7178 | |
7179 | # Some other compiler flag. |
7180 | -* | +*) |
7181 | @@ -549,18 +1183,18 @@ |
7182 | arg="\"$arg\"" |
7183 | ;; |
7184 | esac |
7185 | - ;; |
7186 | + ;; |
7187 | |
7188 | - *.o | *.a) |
7189 | - # A standard object. |
7190 | - objs="$objs $arg" |
7191 | - ;; |
7192 | + *.o | *.obj | *.a | *.lib) |
7193 | + # A standard object. |
7194 | + objs="$objs $arg" |
7195 | + ;; |
7196 | |
7197 | *.lo) |
7198 | - # A library object. |
7199 | + # A library object. |
7200 | if test "$prev" = dlfiles; then |
7201 | dlfiles="$dlfiles $arg" |
7202 | - if test "$build_libtool_libs" = yes; then |
7203 | + if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then |
7204 | prev= |
7205 | continue |
7206 | else |
7207 | @@ -571,210 +1205,304 @@ |
7208 | |
7209 | if test "$prev" = dlprefiles; then |
7210 | # Preload the old-style object. |
7211 | - dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'` |
7212 | + dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` |
7213 | prev= |
7214 | fi |
7215 | libobjs="$libobjs $arg" |
7216 | - ;; |
7217 | + ;; |
7218 | |
7219 | *.la) |
7220 | - # A libtool-controlled library. |
7221 | + # A libtool-controlled library. |
7222 | |
7223 | - dlname= |
7224 | - libdir= |
7225 | - library_names= |
7226 | - old_library= |
7227 | - |
7228 | - # Check to see that this really is a libtool archive. |
7229 | - if (sed -e '2q' $arg | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : |
7230 | - else |
7231 | - $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 |
7232 | - exit 1 |
7233 | - fi |
7234 | - |
7235 | - # If there is no directory component, then add one. |
7236 | - case "$arg" in |
7237 | - */* | *\\*) . $arg ;; |
7238 | - *) . ./$arg ;; |
7239 | - esac |
7240 | - |
7241 | - if test -z "$libdir"; then |
7242 | - $echo "$modename: \`$arg' contains no -rpath information" 1>&2 |
7243 | - exit 1 |
7244 | - fi |
7245 | - |
7246 | - # Get the name of the library we link against. |
7247 | - linklib= |
7248 | - for l in $old_library $library_names; do |
7249 | - linklib="$l" |
7250 | - done |
7251 | - |
7252 | - if test -z "$linklib"; then |
7253 | - $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 |
7254 | - exit 1 |
7255 | - fi |
7256 | - |
7257 | - # Find the relevant object directory and library name. |
7258 | - name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` |
7259 | - dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` |
7260 | - if test "X$dir" = "X$arg"; then |
7261 | - dir="$objdir" |
7262 | - else |
7263 | - dir="$dir/$objdir" |
7264 | - fi |
7265 | - |
7266 | - # This library was specified with -dlopen. |
7267 | - if test "$prev" = dlfiles; then |
7268 | - dlfiles="$dlfiles $arg" |
7269 | - if test -z "$dlname"; then |
7270 | - # If there is no dlname, we need to preload. |
7271 | - prev=dlprefiles |
7272 | - else |
7273 | - # We should not create a dependency on this library, but we |
7274 | - # may need any libraries it requires. |
7275 | - compile_command="$compile_command$dependency_libs" |
7276 | - finalize_command="$finalize_command$dependency_libs" |
7277 | - prev= |
7278 | - continue |
7279 | - fi |
7280 | - fi |
7281 | - |
7282 | - # The library was specified with -dlpreopen. |
7283 | - if test "$prev" = dlprefiles; then |
7284 | - # Prefer using a static library (so that no silly _DYNAMIC symbols |
7285 | - # are required to link). |
7286 | - if test -n "$old_library"; then |
7287 | - dlprefiles="$dlprefiles $dir/$old_library" |
7288 | - else |
7289 | - dlprefiles="$dlprefiles $dir/$linklib" |
7290 | - fi |
7291 | - prev= |
7292 | - fi |
7293 | - |
7294 | - if test "$build_libtool_libs" = yes && test -n "$library_names"; then |
7295 | - link_against_libtool_libs="$link_against_libtool_libs $arg" |
7296 | - if test -n "$shlibpath_var"; then |
7297 | - # Make sure the rpath contains only unique directories. |
7298 | - case "$temp_rpath " in |
7299 | - *" $dir "*) ;; |
7300 | - *) temp_rpath="$temp_rpath $dir" ;; |
7301 | - esac |
7302 | - fi |
7303 | + dlname= |
7304 | + libdir= |
7305 | + library_names= |
7306 | + old_library= |
7307 | |
7308 | - # This is the magic to use -rpath. |
7309 | - if test -n "$hardcode_libdir_flag_spec"; then |
7310 | - if test -n "$hardcode_libdir_separator"; then |
7311 | - if test -z "$hardcode_libdirs"; then |
7312 | - # Put the magic libdir with the hardcode flag. |
7313 | - hardcode_libdirs="$libdir" |
7314 | - libdir="@HARDCODE_LIBDIRS@" |
7315 | - else |
7316 | - # Just accumulate the unique libdirs. |
7317 | - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in |
7318 | - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
7319 | - ;; |
7320 | - *) |
7321 | - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" |
7322 | - ;; |
7323 | - esac |
7324 | - libdir= |
7325 | - fi |
7326 | - fi |
7327 | - |
7328 | - if test -n "$libdir"; then |
7329 | - eval flag=\"$hardcode_libdir_flag_spec\" |
7330 | - |
7331 | - compile_command="$compile_command $flag" |
7332 | - finalize_command="$finalize_command $flag" |
7333 | - fi |
7334 | - elif test -n "$runpath_var"; then |
7335 | - # Do the same for the permanent run path. |
7336 | - case "$perm_rpath " in |
7337 | - *" $libdir "*) ;; |
7338 | - *) perm_rpath="$perm_rpath $libdir" ;; |
7339 | - esac |
7340 | - fi |
7341 | - |
7342 | - |
7343 | - case "$hardcode_action" in |
7344 | - immediate) |
7345 | - if test "$hardcode_direct" = no; then |
7346 | - compile_command="$compile_command $dir/$linklib" |
7347 | - elif test "$hardcode_minus_L" = no; then |
7348 | - compile_command="$compile_command -L$dir -l$name" |
7349 | - elif test "$hardcode_shlibpath_var" = no; then |
7350 | - compile_shlibpath="$compile_shlibpath$dir:" |
7351 | - compile_command="$compile_command -l$name" |
7352 | - fi |
7353 | - ;; |
7354 | - |
7355 | - relink) |
7356 | - # We need an absolute path. |
7357 | - case "$dir" in |
7358 | - /* | [A-Za-z]:\\*) ;; |
7359 | - *) |
7360 | - absdir=`cd "$dir" && pwd` |
7361 | - if test -z "$absdir"; then |
7362 | - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 |
7363 | - exit 1 |
7364 | - fi |
7365 | - dir="$absdir" |
7366 | - ;; |
7367 | - esac |
7368 | - |
7369 | - if test "$hardcode_direct" = yes; then |
7370 | - compile_command="$compile_command $dir/$linklib" |
7371 | - elif test "$hardcode_minus_L" = yes; then |
7372 | - compile_command="$compile_command -L$dir -l$name" |
7373 | - elif test "$hardcode_shlibpath_var" = yes; then |
7374 | - compile_shlibpath="$compile_shlibpath$dir:" |
7375 | - compile_command="$compile_command -l$name" |
7376 | - fi |
7377 | - ;; |
7378 | - |
7379 | - *) |
7380 | - $echo "$modename: \`$hardcode_action' is an unknown hardcode action" 1>&2 |
7381 | - exit 1 |
7382 | - ;; |
7383 | - esac |
7384 | - |
7385 | - # Finalize command for both is simple: just hardcode it. |
7386 | - if test "$hardcode_direct" = yes; then |
7387 | - finalize_command="$finalize_command $libdir/$linklib" |
7388 | - elif test "$hardcode_minus_L" = yes; then |
7389 | - finalize_command="$finalize_command -L$libdir -l$name" |
7390 | - elif test "$hardcode_shlibpath_var" = yes; then |
7391 | - finalize_shlibpath="$finalize_shlibpath$libdir:" |
7392 | - finalize_command="$finalize_command -l$name" |
7393 | - else |
7394 | - # We cannot seem to hardcode it, guess we'll fake it. |
7395 | - finalize_command="$finalize_command -L$libdir -l$name" |
7396 | - fi |
7397 | - else |
7398 | - # Transform directly to old archives if we don't build new libraries. |
7399 | - if test -n "$pic_flag" && test -z "$old_library"; then |
7400 | - $echo "$modename: cannot find static library for \`$arg'" 1>&2 |
7401 | - exit 1 |
7402 | - fi |
7403 | + # Check to see that this really is a libtool archive. |
7404 | + if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
7405 | + else |
7406 | + $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 |
7407 | + exit 1 |
7408 | + fi |
7409 | |
7410 | - # Here we assume that one of hardcode_direct or hardcode_minus_L |
7411 | - # is not unsupported. This is valid on all known static and |
7412 | - # shared platforms. |
7413 | - if test "$hardcode_direct" != unsupported; then |
7414 | - test -n "$old_library" && linklib="$old_library" |
7415 | - compile_command="$compile_command $dir/$linklib" |
7416 | - finalize_command="$finalize_command $dir/$linklib" |
7417 | + # If the library was installed with an old release of libtool, |
7418 | + # it will not redefine variable installed. |
7419 | + installed=yes |
7420 | + |
7421 | + # Read the .la file |
7422 | + # If there is no directory component, then add one. |
7423 | + case "$arg" in |
7424 | + */* | *\\*) . $arg ;; |
7425 | + *) . ./$arg ;; |
7426 | + esac |
7427 | + |
7428 | + # Get the name of the library we link against. |
7429 | + linklib= |
7430 | + for l in $old_library $library_names; do |
7431 | + linklib="$l" |
7432 | + done |
7433 | + |
7434 | + if test -z "$linklib"; then |
7435 | + $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 |
7436 | + exit 1 |
7437 | + fi |
7438 | + |
7439 | + # Find the relevant object directory and library name. |
7440 | + name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` |
7441 | + |
7442 | + if test "X$installed" = Xyes; then |
7443 | + dir="$libdir" |
7444 | + else |
7445 | + dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` |
7446 | + if test "X$dir" = "X$arg"; then |
7447 | + dir="$objdir" |
7448 | else |
7449 | - compile_command="$compile_command -L$dir -l$name" |
7450 | - finalize_command="$finalize_command -L$dir -l$name" |
7451 | + dir="$dir/$objdir" |
7452 | fi |
7453 | - fi |
7454 | + fi |
7455 | |
7456 | - # Add in any libraries that this one depends upon. |
7457 | - compile_command="$compile_command$dependency_libs" |
7458 | + if test -n "$dependency_libs"; then |
7459 | + # Extract -R and -L from dependency_libs |
7460 | + temp_deplibs= |
7461 | + for deplib in $dependency_libs; do |
7462 | + case "$deplib" in |
7463 | + -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` |
7464 | + case " $rpath $xrpath " in |
7465 | + *" $temp_xrpath "*) ;; |
7466 | + *) xrpath="$xrpath $temp_xrpath";; |
7467 | + esac;; |
7468 | + -L*) case "$compile_command $temp_deplibs " in |
7469 | + *" $deplib "*) ;; |
7470 | + *) temp_deplibs="$temp_deplibs $deplib";; |
7471 | + esac |
7472 | + temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'` |
7473 | + case " $lib_search_path " in |
7474 | + *" $temp_dir "*) ;; |
7475 | + *) lib_search_path="$lib_search_path $temp_dir";; |
7476 | + esac |
7477 | + ;; |
7478 | + *) temp_deplibs="$temp_deplibs $deplib";; |
7479 | + esac |
7480 | + done |
7481 | + dependency_libs="$temp_deplibs" |
7482 | + fi |
7483 | + |
7484 | + if test -z "$libdir"; then |
7485 | + # It is a libtool convenience library, so add in its objects. |
7486 | + convenience="$convenience $dir/$old_library" |
7487 | + old_convenience="$old_convenience $dir/$old_library" |
7488 | + deplibs="$deplibs$dependency_libs" |
7489 | + compile_command="$compile_command $dir/$old_library$dependency_libs" |
7490 | + finalize_command="$finalize_command $dir/$old_library$dependency_libs" |
7491 | + continue |
7492 | + fi |
7493 | + |
7494 | + # This library was specified with -dlopen. |
7495 | + if test "$prev" = dlfiles; then |
7496 | + dlfiles="$dlfiles $arg" |
7497 | + if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then |
7498 | + # If there is no dlname, no dlopen support or we're linking statically, |
7499 | + # we need to preload. |
7500 | + prev=dlprefiles |
7501 | + else |
7502 | + # We should not create a dependency on this library, but we |
7503 | + # may need any libraries it requires. |
7504 | + compile_command="$compile_command$dependency_libs" |
7505 | + finalize_command="$finalize_command$dependency_libs" |
7506 | + prev= |
7507 | + continue |
7508 | + fi |
7509 | + fi |
7510 | + |
7511 | + # The library was specified with -dlpreopen. |
7512 | + if test "$prev" = dlprefiles; then |
7513 | + # Prefer using a static library (so that no silly _DYNAMIC symbols |
7514 | + # are required to link). |
7515 | + if test -n "$old_library"; then |
7516 | + dlprefiles="$dlprefiles $dir/$old_library" |
7517 | + else |
7518 | + dlprefiles="$dlprefiles $dir/$linklib" |
7519 | + fi |
7520 | + prev= |
7521 | + fi |
7522 | + |
7523 | + if test -n "$library_names" && |
7524 | + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then |
7525 | + link_against_libtool_libs="$link_against_libtool_libs $arg" |
7526 | + if test -n "$shlibpath_var"; then |
7527 | + # Make sure the rpath contains only unique directories. |
7528 | + case "$temp_rpath " in |
7529 | + *" $dir "*) ;; |
7530 | + *) temp_rpath="$temp_rpath $dir" ;; |
7531 | + esac |
7532 | + fi |
7533 | + |
7534 | + # We need an absolute path. |
7535 | + case "$dir" in |
7536 | + [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; |
7537 | + *) |
7538 | + absdir=`cd "$dir" && pwd` |
7539 | + if test -z "$absdir"; then |
7540 | + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 |
7541 | + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 |
7542 | + absdir="$dir" |
7543 | + fi |
7544 | + ;; |
7545 | + esac |
7546 | + |
7547 | + # This is the magic to use -rpath. |
7548 | + # Skip directories that are in the system default run-time |
7549 | + # search path, unless they have been requested with -R. |
7550 | + case " $sys_lib_dlsearch_path " in |
7551 | + *" $absdir "*) ;; |
7552 | + *) |
7553 | + case "$compile_rpath " in |
7554 | + *" $absdir "*) ;; |
7555 | + *) compile_rpath="$compile_rpath $absdir" |
7556 | + esac |
7557 | + ;; |
7558 | + esac |
7559 | + |
7560 | + case " $sys_lib_dlsearch_path " in |
7561 | + *" $libdir "*) ;; |
7562 | + *) |
7563 | + case "$finalize_rpath " in |
7564 | + *" $libdir "*) ;; |
7565 | + *) finalize_rpath="$finalize_rpath $libdir" |
7566 | + esac |
7567 | + ;; |
7568 | + esac |
7569 | + |
7570 | + lib_linked=yes |
7571 | + case "$hardcode_action" in |
7572 | + immediate | unsupported) |
7573 | + if test "$hardcode_direct" = no; then |
7574 | + compile_command="$compile_command $dir/$linklib" |
7575 | + deplibs="$deplibs $dir/$linklib" |
7576 | + case "$host" in |
7577 | + *-*-cygwin* | *-*-mingw* | *-*-os2*) |
7578 | + dllsearchdir=`cd "$dir" && pwd || echo "$dir"` |
7579 | + if test -n "$dllsearchpath"; then |
7580 | + dllsearchpath="$dllsearchpath:$dllsearchdir" |
7581 | + else |
7582 | + dllsearchpath="$dllsearchdir" |
7583 | + fi |
7584 | + ;; |
7585 | + esac |
7586 | + elif test "$hardcode_minus_L" = no; then |
7587 | + case "$host" in |
7588 | + *-*-sunos*) |
7589 | + compile_shlibpath="$compile_shlibpath$dir:" |
7590 | + ;; |
7591 | + esac |
7592 | + case "$compile_command " in |
7593 | + *" -L$dir "*) ;; |
7594 | + *) compile_command="$compile_command -L$dir";; |
7595 | + esac |
7596 | + compile_command="$compile_command -l$name" |
7597 | + deplibs="$deplibs -L$dir -l$name" |
7598 | + elif test "$hardcode_shlibpath_var" = no; then |
7599 | + case ":$compile_shlibpath:" in |
7600 | + *":$dir:"*) ;; |
7601 | + *) compile_shlibpath="$compile_shlibpath$dir:";; |
7602 | + esac |
7603 | + compile_command="$compile_command -l$name" |
7604 | + deplibs="$deplibs -l$name" |
7605 | + else |
7606 | + lib_linked=no |
7607 | + fi |
7608 | + ;; |
7609 | + |
7610 | + relink) |
7611 | + if test "$hardcode_direct" = yes; then |
7612 | + compile_command="$compile_command $absdir/$linklib" |
7613 | + deplibs="$deplibs $absdir/$linklib" |
7614 | + elif test "$hardcode_minus_L" = yes; then |
7615 | + case "$compile_command " in |
7616 | + *" -L$absdir "*) ;; |
7617 | + *) compile_command="$compile_command -L$absdir";; |
7618 | + esac |
7619 | + compile_command="$compile_command -l$name" |
7620 | + deplibs="$deplibs -L$absdir -l$name" |
7621 | + elif test "$hardcode_shlibpath_var" = yes; then |
7622 | + case ":$compile_shlibpath:" in |
7623 | + *":$absdir:"*) ;; |
7624 | + *) compile_shlibpath="$compile_shlibpath$absdir:";; |
7625 | + esac |
7626 | + compile_command="$compile_command -l$name" |
7627 | + deplibs="$deplibs -l$name" |
7628 | + else |
7629 | + lib_linked=no |
7630 | + fi |
7631 | + ;; |
7632 | + |
7633 | + *) |
7634 | + lib_linked=no |
7635 | + ;; |
7636 | + esac |
7637 | + |
7638 | + if test "$lib_linked" != yes; then |
7639 | + $echo "$modename: configuration error: unsupported hardcode properties" |
7640 | + exit 1 |
7641 | + fi |
7642 | + |
7643 | + # Finalize command for both is simple: just hardcode it. |
7644 | + if test "$hardcode_direct" = yes; then |
7645 | + finalize_command="$finalize_command $libdir/$linklib" |
7646 | + elif test "$hardcode_minus_L" = yes; then |
7647 | + case "$finalize_command " in |
7648 | + *" -L$libdir "*) ;; |
7649 | + *) finalize_command="$finalize_command -L$libdir";; |
7650 | + esac |
7651 | + finalize_command="$finalize_command -l$name" |
7652 | + elif test "$hardcode_shlibpath_var" = yes; then |
7653 | + case ":$finalize_shlibpath:" in |
7654 | + *":$libdir:"*) ;; |
7655 | + *) finalize_shlibpath="$finalize_shlibpath$libdir:";; |
7656 | + esac |
7657 | + finalize_command="$finalize_command -l$name" |
7658 | + else |
7659 | + # We cannot seem to hardcode it, guess we'll fake it. |
7660 | + case "$finalize_command " in |
7661 | + *" -L$dir "*) ;; |
7662 | + *) finalize_command="$finalize_command -L$libdir";; |
7663 | + esac |
7664 | + finalize_command="$finalize_command -l$name" |
7665 | + fi |
7666 | + else |
7667 | + # Transform directly to old archives if we don't build new libraries. |
7668 | + if test -n "$pic_flag" && test -z "$old_library"; then |
7669 | + $echo "$modename: cannot find static library for \`$arg'" 1>&2 |
7670 | + exit 1 |
7671 | + fi |
7672 | + |
7673 | + # Here we assume that one of hardcode_direct or hardcode_minus_L |
7674 | + # is not unsupported. This is valid on all known static and |
7675 | + # shared platforms. |
7676 | + if test "$hardcode_direct" != unsupported; then |
7677 | + test -n "$old_library" && linklib="$old_library" |
7678 | + compile_command="$compile_command $dir/$linklib" |
7679 | + finalize_command="$finalize_command $dir/$linklib" |
7680 | + else |
7681 | + case "$compile_command " in |
7682 | + *" -L$dir "*) ;; |
7683 | + *) compile_command="$compile_command -L$dir";; |
7684 | + esac |
7685 | + compile_command="$compile_command -l$name" |
7686 | + case "$finalize_command " in |
7687 | + *" -L$dir "*) ;; |
7688 | + *) finalize_command="$finalize_command -L$dir";; |
7689 | + esac |
7690 | + finalize_command="$finalize_command -l$name" |
7691 | + fi |
7692 | + fi |
7693 | + |
7694 | + # Add in any libraries that this one depends upon. |
7695 | + compile_command="$compile_command$dependency_libs" |
7696 | finalize_command="$finalize_command$dependency_libs" |
7697 | continue |
7698 | - ;; |
7699 | + ;; |
7700 | |
7701 | # Some other compiler argument. |
7702 | *) |
7703 | @@ -786,7 +1514,7 @@ |
7704 | arg="\"$arg\"" |
7705 | ;; |
7706 | esac |
7707 | - ;; |
7708 | + ;; |
7709 | esac |
7710 | |
7711 | # Now actually substitute the argument into the commands. |
7712 | @@ -802,14 +1530,17 @@ |
7713 | exit 1 |
7714 | fi |
7715 | |
7716 | - if test -n "$vinfo" && test -n "$release"; then |
7717 | - $echo "$modename: you cannot specify both \`-version-info' and \`-release'" 1>&2 |
7718 | - $echo "$help" 1>&2 |
7719 | - exit 1 |
7720 | + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then |
7721 | + eval arg=\"$export_dynamic_flag_spec\" |
7722 | + compile_command="$compile_command $arg" |
7723 | + finalize_command="$finalize_command $arg" |
7724 | fi |
7725 | |
7726 | - oldlib= |
7727 | - oldobjs= |
7728 | + oldlibs= |
7729 | + # calculate the name of the file, without its directory |
7730 | + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` |
7731 | + libobjs_save="$libobjs" |
7732 | + |
7733 | case "$output" in |
7734 | "") |
7735 | $echo "$modename: you must specify an output file" 1>&2 |
7736 | @@ -817,64 +1548,88 @@ |
7737 | exit 1 |
7738 | ;; |
7739 | |
7740 | - */* | *\\*) |
7741 | - $echo "$modename: output file \`$output' must have no directory components" 1>&2 |
7742 | - exit 1 |
7743 | - ;; |
7744 | + *.a | *.lib) |
7745 | + if test -n "$link_against_libtool_libs"; then |
7746 | + $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 |
7747 | + exit 1 |
7748 | + fi |
7749 | + |
7750 | + if test -n "$deplibs"; then |
7751 | + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 |
7752 | + fi |
7753 | + |
7754 | + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then |
7755 | + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 |
7756 | + fi |
7757 | + |
7758 | + if test -n "$rpath"; then |
7759 | + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 |
7760 | + fi |
7761 | + |
7762 | + if test -n "$xrpath"; then |
7763 | + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 |
7764 | + fi |
7765 | + |
7766 | + if test -n "$vinfo"; then |
7767 | + $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 |
7768 | + fi |
7769 | + |
7770 | + if test -n "$release"; then |
7771 | + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 |
7772 | + fi |
7773 | + |
7774 | + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then |
7775 | + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 |
7776 | + fi |
7777 | |
7778 | - *.a) |
7779 | # Now set the variables for building old libraries. |
7780 | build_libtool_libs=no |
7781 | - build_old_libs=yes |
7782 | - oldlib="$output" |
7783 | - $show "$rm $oldlib" |
7784 | - $run $rm $oldlib |
7785 | + oldlibs="$output" |
7786 | ;; |
7787 | |
7788 | *.la) |
7789 | # Make sure we only generate libraries of the form `libNAME.la'. |
7790 | - case "$output" in |
7791 | - lib*) ;; |
7792 | + case "$outputname" in |
7793 | + lib*) |
7794 | + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` |
7795 | + eval libname=\"$libname_spec\" |
7796 | + ;; |
7797 | *) |
7798 | - $echo "$modename: libtool library \`$arg' must begin with \`lib'" 1>&2 |
7799 | - $echo "$help" 1>&2 |
7800 | - exit 1 |
7801 | + if test "$module" = no; then |
7802 | + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 |
7803 | + $echo "$help" 1>&2 |
7804 | + exit 1 |
7805 | + fi |
7806 | + if test "$need_lib_prefix" != no; then |
7807 | + # Add the "lib" prefix for modules if required |
7808 | + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` |
7809 | + eval libname=\"$libname_spec\" |
7810 | + else |
7811 | + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` |
7812 | + fi |
7813 | ;; |
7814 | esac |
7815 | |
7816 | - name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'` |
7817 | - eval libname=\"$libname_spec\" |
7818 | - |
7819 | - # All the library-specific variables (install_libdir is set above). |
7820 | - library_names= |
7821 | - old_library= |
7822 | - dlname= |
7823 | - current=0 |
7824 | - revision=0 |
7825 | - age=0 |
7826 | + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` |
7827 | + if test "X$output_objdir" = "X$output"; then |
7828 | + output_objdir="$objdir" |
7829 | + else |
7830 | + output_objdir="$output_objdir/$objdir" |
7831 | + fi |
7832 | |
7833 | if test -n "$objs"; then |
7834 | - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 |
7835 | - exit 1 |
7836 | + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 |
7837 | + exit 1 |
7838 | fi |
7839 | |
7840 | # How the heck are we supposed to write a wrapper for a shared library? |
7841 | if test -n "$link_against_libtool_libs"; then |
7842 | - $echo "$modename: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2 |
7843 | - exit 1 |
7844 | + $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 |
7845 | + exit 1 |
7846 | fi |
7847 | |
7848 | - if test -n "$dlfiles$dlprefiles"; then |
7849 | - $echo "$modename: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2 |
7850 | - # Nullify the symbol file. |
7851 | - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` |
7852 | - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` |
7853 | - fi |
7854 | - |
7855 | - if test -z "$rpath"; then |
7856 | - $echo "$modename: you must specify an installation directory with \`-rpath'" 1>&2 |
7857 | - $echo "$help" 1>&2 |
7858 | - exit 1 |
7859 | + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then |
7860 | + $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 |
7861 | fi |
7862 | |
7863 | set dummy $rpath |
7864 | @@ -883,587 +1638,1235 @@ |
7865 | fi |
7866 | install_libdir="$2" |
7867 | |
7868 | - # Parse the version information argument. |
7869 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' |
7870 | - set dummy $vinfo |
7871 | - IFS="$save_ifs" |
7872 | + oldlibs= |
7873 | + if test -z "$rpath"; then |
7874 | + if test "$build_libtool_libs" = yes; then |
7875 | + # Building a libtool convenience library. |
7876 | + libext=al |
7877 | + oldlibs="$output_objdir/$libname.$libext $oldlibs" |
7878 | + build_libtool_libs=convenience |
7879 | + build_old_libs=yes |
7880 | + fi |
7881 | + dependency_libs="$deplibs" |
7882 | |
7883 | - if test -n "$5"; then |
7884 | - $echo "$modename: too many parameters to \`-version-info'" 1>&2 |
7885 | - $echo "$help" 1>&2 |
7886 | - exit 1 |
7887 | - fi |
7888 | + if test -n "$vinfo"; then |
7889 | + $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 |
7890 | + fi |
7891 | |
7892 | - test -n "$2" && current="$2" |
7893 | - test -n "$3" && revision="$3" |
7894 | - test -n "$4" && age="$4" |
7895 | - |
7896 | - # Check that each of the things are valid numbers. |
7897 | - case "$current" in |
7898 | - 0 | [1-9] | [1-9][0-9]*) ;; |
7899 | - *) |
7900 | - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 |
7901 | - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
7902 | - exit 1 |
7903 | - ;; |
7904 | - esac |
7905 | + if test -n "$release"; then |
7906 | + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 |
7907 | + fi |
7908 | + else |
7909 | |
7910 | - case "$revision" in |
7911 | - 0 | [1-9] | [1-9][0-9]*) ;; |
7912 | - *) |
7913 | - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 |
7914 | - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
7915 | - exit 1 |
7916 | - ;; |
7917 | - esac |
7918 | + # Parse the version information argument. |
7919 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' |
7920 | + set dummy $vinfo 0 0 0 |
7921 | + IFS="$save_ifs" |
7922 | + |
7923 | + if test -n "$8"; then |
7924 | + $echo "$modename: too many parameters to \`-version-info'" 1>&2 |
7925 | + $echo "$help" 1>&2 |
7926 | + exit 1 |
7927 | + fi |
7928 | |
7929 | - case "$age" in |
7930 | - 0 | [1-9] | [1-9][0-9]*) ;; |
7931 | - *) |
7932 | - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 |
7933 | - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
7934 | - exit 1 |
7935 | - ;; |
7936 | - esac |
7937 | + current="$2" |
7938 | + revision="$3" |
7939 | + age="$4" |
7940 | + |
7941 | + # Check that each of the things are valid numbers. |
7942 | + case "$current" in |
7943 | + 0 | [1-9] | [1-9][0-9]*) ;; |
7944 | + *) |
7945 | + $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 |
7946 | + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
7947 | + exit 1 |
7948 | + ;; |
7949 | + esac |
7950 | + |
7951 | + case "$revision" in |
7952 | + 0 | [1-9] | [1-9][0-9]*) ;; |
7953 | + *) |
7954 | + $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 |
7955 | + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
7956 | + exit 1 |
7957 | + ;; |
7958 | + esac |
7959 | |
7960 | - if test $age -gt $current; then |
7961 | - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 |
7962 | - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
7963 | - exit 1 |
7964 | - fi |
7965 | - |
7966 | - # Calculate the version variables. |
7967 | - version_vars="version_type current age revision" |
7968 | - case "$version_type" in |
7969 | - none) ;; |
7970 | - |
7971 | - linux) |
7972 | - version_vars="$version_vars major versuffix" |
7973 | - major=`expr $current - $age` |
7974 | - versuffix="$major.$age.$revision" |
7975 | - ;; |
7976 | - |
7977 | - osf) |
7978 | - version_vars="$version_vars versuffix verstring" |
7979 | - major=`expr $current - $age` |
7980 | - versuffix="$current.$age.$revision" |
7981 | - verstring="$versuffix" |
7982 | - |
7983 | - # Add in all the interfaces that we are compatible with. |
7984 | - loop=$age |
7985 | - while test $loop != 0; do |
7986 | - iface=`expr $current - $loop` |
7987 | - loop=`expr $loop - 1` |
7988 | - verstring="$verstring:${iface}.0" |
7989 | - done |
7990 | - |
7991 | - # Make executables depend on our current version. |
7992 | - verstring="$verstring:${current}.0" |
7993 | - ;; |
7994 | - |
7995 | - sunos) |
7996 | - version_vars="$version_vars major versuffix" |
7997 | - major="$current" |
7998 | - versuffix="$current.$revision" |
7999 | - ;; |
8000 | + case "$age" in |
8001 | + 0 | [1-9] | [1-9][0-9]*) ;; |
8002 | + *) |
8003 | + $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 |
8004 | + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
8005 | + exit 1 |
8006 | + ;; |
8007 | + esac |
8008 | |
8009 | - *) |
8010 | - $echo "$modename: unknown library version type \`$version_type'" 1>&2 |
8011 | - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 |
8012 | - exit 1 |
8013 | - ;; |
8014 | - esac |
8015 | + if test $age -gt $current; then |
8016 | + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 |
8017 | + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
8018 | + exit 1 |
8019 | + fi |
8020 | + |
8021 | + # Calculate the version variables. |
8022 | + major= |
8023 | + versuffix= |
8024 | + verstring= |
8025 | + case "$version_type" in |
8026 | + none) ;; |
8027 | + |
8028 | + irix) |
8029 | + major=`expr $current - $age + 1` |
8030 | + versuffix="$major.$revision" |
8031 | + verstring="sgi$major.$revision" |
8032 | + |
8033 | + # Add in all the interfaces that we are compatible with. |
8034 | + loop=$revision |
8035 | + while test $loop != 0; do |
8036 | + iface=`expr $revision - $loop` |
8037 | + loop=`expr $loop - 1` |
8038 | + verstring="sgi$major.$iface:$verstring" |
8039 | + done |
8040 | + ;; |
8041 | + |
8042 | + linux) |
8043 | + major=.`expr $current - $age` |
8044 | + versuffix="$major.$age.$revision" |
8045 | + ;; |
8046 | + |
8047 | + osf) |
8048 | + major=`expr $current - $age` |
8049 | + versuffix=".$current.$age.$revision" |
8050 | + verstring="$current.$age.$revision" |
8051 | + |
8052 | + # Add in all the interfaces that we are compatible with. |
8053 | + loop=$age |
8054 | + while test $loop != 0; do |
8055 | + iface=`expr $current - $loop` |
8056 | + loop=`expr $loop - 1` |
8057 | + verstring="$verstring:${iface}.0" |
8058 | + done |
8059 | + |
8060 | + # Make executables depend on our current version. |
8061 | + verstring="$verstring:${current}.0" |
8062 | + ;; |
8063 | + |
8064 | + sunos) |
8065 | + major=".$current" |
8066 | + versuffix=".$current.$revision" |
8067 | + ;; |
8068 | + |
8069 | + freebsd-aout) |
8070 | + major=".$current" |
8071 | + versuffix=".$current.$revision"; |
8072 | + ;; |
8073 | + |
8074 | + freebsd-elf) |
8075 | + major=".$current" |
8076 | + versuffix=".$current"; |
8077 | + ;; |
8078 | + |
8079 | + windows) |
8080 | + # Like Linux, but with '-' rather than '.', since we only |
8081 | + # want one extension on Windows 95. |
8082 | + major=`expr $current - $age` |
8083 | + versuffix="-$major-$age-$revision" |
8084 | + ;; |
8085 | + |
8086 | + darwin) |
8087 | + # Like Linux, but with the current version available in |
8088 | + # verstring for coding it into the library header |
8089 | + major=.`expr $current - $age` |
8090 | + versuffix="$major.$age.$revision" |
8091 | + # Darwin ld doesn't like 0 for these options... |
8092 | + minor_current=`expr $current + 1` |
8093 | + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" |
8094 | + ;; |
8095 | + |
8096 | + *) |
8097 | + $echo "$modename: unknown library version type \`$version_type'" 1>&2 |
8098 | + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 |
8099 | + exit 1 |
8100 | + ;; |
8101 | + esac |
8102 | + |
8103 | + # Clear the version info if we defaulted, and they specified a release. |
8104 | + if test -z "$vinfo" && test -n "$release"; then |
8105 | + major= |
8106 | + verstring="0.0" |
8107 | + if test "$need_version" = no; then |
8108 | + versuffix= |
8109 | + else |
8110 | + versuffix=".0.0" |
8111 | + fi |
8112 | + fi |
8113 | + |
8114 | + # Remove version info from name if versioning should be avoided |
8115 | + if test "$avoid_version" = yes && test "$need_version" = no; then |
8116 | + major= |
8117 | + versuffix= |
8118 | + verstring="" |
8119 | + fi |
8120 | + |
8121 | + # Check to see if the archive will have undefined symbols. |
8122 | + if test "$allow_undefined" = yes; then |
8123 | + if test "$allow_undefined_flag" = unsupported; then |
8124 | + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 |
8125 | + build_libtool_libs=no |
8126 | + build_old_libs=yes |
8127 | + fi |
8128 | + else |
8129 | + # Don't allow undefined symbols. |
8130 | + allow_undefined_flag="$no_undefined_flag" |
8131 | + fi |
8132 | + |
8133 | + dependency_libs="$deplibs" |
8134 | + case "$host" in |
8135 | + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) |
8136 | + # these systems don't actually have a c library (as such)! |
8137 | + ;; |
8138 | + *-*-rhapsody* | *-*-darwin1.[012]) |
8139 | + # Rhapsody C library is in the System framework |
8140 | + deplibs="$deplibs -framework System" |
8141 | + ;; |
8142 | + *) |
8143 | + # Add libc to deplibs on all other systems. |
8144 | + deplibs="$deplibs -lc" |
8145 | + ;; |
8146 | + esac |
8147 | + fi |
8148 | |
8149 | # Create the output directory, or remove our outputs if we need to. |
8150 | - if test -d $objdir; then |
8151 | - $show "$rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*" |
8152 | - $run $rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.* |
8153 | + if test -d $output_objdir; then |
8154 | + $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" |
8155 | + $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* |
8156 | else |
8157 | - $show "$mkdir $objdir" |
8158 | - $run $mkdir $objdir |
8159 | + $show "$mkdir $output_objdir" |
8160 | + $run $mkdir $output_objdir |
8161 | status=$? |
8162 | - if test $status -eq 0 || test -d $objdir; then : |
8163 | - else |
8164 | + if test $status -ne 0 && test ! -d $output_objdir; then |
8165 | exit $status |
8166 | fi |
8167 | fi |
8168 | |
8169 | - # Check to see if the archive will have undefined symbols. |
8170 | - if test "$allow_undefined" = yes; then |
8171 | - if test "$allow_undefined_flag" = unsupported; then |
8172 | - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 |
8173 | - build_libtool_libs=no |
8174 | - build_old_libs=yes |
8175 | - fi |
8176 | - else |
8177 | - # Don't allow undefined symbols. |
8178 | - allow_undefined_flag="$no_undefined_flag" |
8179 | + # Now set the variables for building old libraries. |
8180 | + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then |
8181 | + oldlibs="$oldlibs $output_objdir/$libname.$libext" |
8182 | + |
8183 | + # Transform .lo files to .o files. |
8184 | + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` |
8185 | fi |
8186 | |
8187 | - # Add libc to deplibs on all systems. |
8188 | - dependency_libs="$deplibs" |
8189 | - deplibs="$deplibs -lc" |
8190 | + if test "$build_libtool_libs" = yes; then |
8191 | + # Transform deplibs into only deplibs that can be linked in shared. |
8192 | + name_save=$name |
8193 | + libname_save=$libname |
8194 | + release_save=$release |
8195 | + versuffix_save=$versuffix |
8196 | + major_save=$major |
8197 | + # I'm not sure if I'm treating the release correctly. I think |
8198 | + # release should show up in the -l (ie -lgmp5) so we don't want to |
8199 | + # add it in twice. Is that correct? |
8200 | + release="" |
8201 | + versuffix="" |
8202 | + major="" |
8203 | + newdeplibs= |
8204 | + droppeddeps=no |
8205 | + case "$deplibs_check_method" in |
8206 | + pass_all) |
8207 | + # Don't check for shared/static. Everything works. |
8208 | + # This might be a little naive. We might want to check |
8209 | + # whether the library exists or not. But this is on |
8210 | + # osf3 & osf4 and I'm not really sure... Just |
8211 | + # implementing what was already the behaviour. |
8212 | + newdeplibs=$deplibs |
8213 | + ;; |
8214 | + test_compile) |
8215 | + # This code stresses the "libraries are programs" paradigm to its |
8216 | + # limits. Maybe even breaks it. We compile a program, linking it |
8217 | + # against the deplibs as a proxy for the library. Then we can check |
8218 | + # whether they linked in statically or dynamically with ldd. |
8219 | + $rm conftest.c |
8220 | + cat > conftest.c <<EOF |
8221 | + int main() { return 0; } |
8222 | +EOF |
8223 | + $rm conftest |
8224 | + $CC -o conftest conftest.c $deplibs |
8225 | + if test $? -eq 0 ; then |
8226 | + ldd_output=`ldd conftest` |
8227 | + for i in $deplibs; do |
8228 | + name="`expr X$i : 'X-l\(.*\)'`" |
8229 | + # If $name is empty we are operating on a -L argument. |
8230 | + if test "$name" != "" ; then |
8231 | + libname=`eval \\$echo \"$libname_spec\"` |
8232 | + deplib_matches=`eval \\$echo \"$library_names_spec\"` |
8233 | + set dummy $deplib_matches |
8234 | + deplib_match=$2 |
8235 | + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then |
8236 | + newdeplibs="$newdeplibs $i" |
8237 | + else |
8238 | + droppeddeps=yes |
8239 | + echo |
8240 | + echo "*** Warning: This library needs some functionality provided by $i." |
8241 | + echo "*** I have the capability to make that library automatically link in when" |
8242 | + echo "*** you link to this library. But I can only do this if you have a" |
8243 | + echo "*** shared version of the library, which you do not appear to have." |
8244 | + fi |
8245 | + else |
8246 | + newdeplibs="$newdeplibs $i" |
8247 | + fi |
8248 | + done |
8249 | + else |
8250 | + # Error occured in the first compile. Let's try to salvage the situation: |
8251 | + # Compile a seperate program for each library. |
8252 | + for i in $deplibs; do |
8253 | + name="`expr X$i : 'X-l\(.*\)'`" |
8254 | + # If $name is empty we are operating on a -L argument. |
8255 | + if test "$name" != "" ; then |
8256 | + $rm conftest |
8257 | + $CC -o conftest conftest.c $i |
8258 | + # Did it work? |
8259 | + if test $? -eq 0 ; then |
8260 | + ldd_output=`ldd conftest` |
8261 | + libname=`eval \\$echo \"$libname_spec\"` |
8262 | + deplib_matches=`eval \\$echo \"$library_names_spec\"` |
8263 | + set dummy $deplib_matches |
8264 | + deplib_match=$2 |
8265 | + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then |
8266 | + newdeplibs="$newdeplibs $i" |
8267 | + else |
8268 | + droppeddeps=yes |
8269 | + echo |
8270 | + echo "*** Warning: This library needs some functionality provided by $i." |
8271 | + echo "*** I have the capability to make that library automatically link in when" |
8272 | + echo "*** you link to this library. But I can only do this if you have a" |
8273 | + echo "*** shared version of the library, which you do not appear to have." |
8274 | + fi |
8275 | + else |
8276 | + droppeddeps=yes |
8277 | + echo |
8278 | + echo "*** Warning! Library $i is needed by this library but I was not able to" |
8279 | + echo "*** make it link in! You will probably need to install it or some" |
8280 | + echo "*** library that it depends on before this library will be fully" |
8281 | + echo "*** functional. Installing it before continuing would be even better." |
8282 | + fi |
8283 | + else |
8284 | + newdeplibs="$newdeplibs $i" |
8285 | + fi |
8286 | + done |
8287 | + fi |
8288 | + ;; |
8289 | + file_magic*) |
8290 | + set dummy $deplibs_check_method |
8291 | + file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`" |
8292 | + for a_deplib in $deplibs; do |
8293 | + name="`expr X$a_deplib : 'X-l\(.*\)'`" |
8294 | + # If $name is empty we are operating on a -L argument. |
8295 | + if test "$name" != "" ; then |
8296 | + libname=`eval \\$echo \"$libname_spec\"` |
8297 | + for i in $lib_search_path; do |
8298 | + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
8299 | + for potent_lib in $potential_libs; do |
8300 | + # Follow soft links. |
8301 | + if ls -lLd "$potent_lib" 2>/dev/null \ |
8302 | + | grep " -> " >/dev/null; then |
8303 | + continue |
8304 | + fi |
8305 | + # The statement above tries to avoid entering an |
8306 | + # endless loop below, in case of cyclic links. |
8307 | + # We might still enter an endless loop, since a link |
8308 | + # loop can be closed while we follow links, |
8309 | + # but so what? |
8310 | + potlib="$potent_lib" |
8311 | + while test -h "$potlib" 2>/dev/null; do |
8312 | + potliblink=`ls -ld $potlib | sed 's/.* -> //'` |
8313 | + case "$potliblink" in |
8314 | + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; |
8315 | + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; |
8316 | + esac |
8317 | + done |
8318 | + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ |
8319 | + | sed 10q \ |
8320 | + | egrep "$file_magic_regex" > /dev/null; then |
8321 | + newdeplibs="$newdeplibs $a_deplib" |
8322 | + a_deplib="" |
8323 | + break 2 |
8324 | + fi |
8325 | + done |
8326 | + done |
8327 | + if test -n "$a_deplib" ; then |
8328 | + droppeddeps=yes |
8329 | + echo |
8330 | + echo "*** Warning: This library needs some functionality provided by $a_deplib." |
8331 | + echo "*** I have the capability to make that library automatically link in when" |
8332 | + echo "*** you link to this library. But I can only do this if you have a" |
8333 | + echo "*** shared version of the library, which you do not appear to have." |
8334 | + fi |
8335 | + else |
8336 | + # Add a -L argument. |
8337 | + newdeplibs="$newdeplibs $a_deplib" |
8338 | + fi |
8339 | + done # Gone through all deplibs. |
8340 | + ;; |
8341 | + none | unknown | *) |
8342 | + newdeplibs="" |
8343 | + if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ |
8344 | + -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | |
8345 | + grep . >/dev/null; then |
8346 | + echo |
8347 | + if test "X$deplibs_check_method" = "Xnone"; then |
8348 | + echo "*** Warning: inter-library dependencies are not supported in this platform." |
8349 | + else |
8350 | + echo "*** Warning: inter-library dependencies are not known to be supported." |
8351 | + fi |
8352 | + echo "*** All declared inter-library dependencies are being dropped." |
8353 | + droppeddeps=yes |
8354 | + fi |
8355 | + ;; |
8356 | + esac |
8357 | + versuffix=$versuffix_save |
8358 | + major=$major_save |
8359 | + release=$release_save |
8360 | + libname=$libname_save |
8361 | + name=$name_save |
8362 | + |
8363 | + if test "$droppeddeps" = yes; then |
8364 | + if test "$module" = yes; then |
8365 | + echo |
8366 | + echo "*** Warning: libtool could not satisfy all declared inter-library" |
8367 | + echo "*** dependencies of module $libname. Therefore, libtool will create" |
8368 | + echo "*** a static module, that should work as long as the dlopening" |
8369 | + echo "*** application is linked with the -dlopen flag." |
8370 | + if test -z "$global_symbol_pipe"; then |
8371 | + echo |
8372 | + echo "*** However, this would only work if libtool was able to extract symbol" |
8373 | + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" |
8374 | + echo "*** not find such a program. So, this module is probably useless." |
8375 | + echo "*** \`nm' from GNU binutils and a full rebuild may help." |
8376 | + fi |
8377 | + if test "$build_old_libs" = no; then |
8378 | + oldlibs="$output_objdir/$libname.$libext" |
8379 | + build_libtool_libs=module |
8380 | + build_old_libs=yes |
8381 | + else |
8382 | + build_libtool_libs=no |
8383 | + fi |
8384 | + else |
8385 | + echo "*** The inter-library dependencies that have been dropped here will be" |
8386 | + echo "*** automatically added whenever a program is linked with this library" |
8387 | + echo "*** or is declared to -dlopen it." |
8388 | + fi |
8389 | + fi |
8390 | + # Done checking deplibs! |
8391 | + deplibs=$newdeplibs |
8392 | + fi |
8393 | |
8394 | + # All the library-specific variables (install_libdir is set above). |
8395 | + library_names= |
8396 | + old_library= |
8397 | + dlname= |
8398 | + |
8399 | + # Test again, we may have decided not to build it any more |
8400 | if test "$build_libtool_libs" = yes; then |
8401 | - # Get the real and link names of the library. |
8402 | - eval library_names=\"$library_names_spec\" |
8403 | - set dummy $library_names |
8404 | - realname="$2" |
8405 | - shift; shift |
8406 | - |
8407 | - if test -n "$soname_spec"; then |
8408 | - eval soname=\"$soname_spec\" |
8409 | - else |
8410 | - soname="$realname" |
8411 | - fi |
8412 | + # Get the real and link names of the library. |
8413 | + eval library_names=\"$library_names_spec\" |
8414 | + set dummy $library_names |
8415 | + realname="$2" |
8416 | + shift; shift |
8417 | |
8418 | - lib="$objdir/$realname" |
8419 | + if test -n "$soname_spec"; then |
8420 | + eval soname=\"$soname_spec\" |
8421 | + else |
8422 | + soname="$realname" |
8423 | + fi |
8424 | + |
8425 | + lib="$output_objdir/$realname" |
8426 | for link |
8427 | do |
8428 | linknames="$linknames $link" |
8429 | done |
8430 | |
8431 | - # Use standard objects if they are PIC. |
8432 | - test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'` |
8433 | + # Ensure that we have .o objects for linkers which dislike .lo |
8434 | + # (e.g. aix) in case we are running --disable-static |
8435 | + for obj in $libobjs; do |
8436 | + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` |
8437 | + if test "X$xdir" = "X$obj"; then |
8438 | + xdir="." |
8439 | + else |
8440 | + xdir="$xdir" |
8441 | + fi |
8442 | + baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` |
8443 | + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` |
8444 | + if test ! -f $xdir/$oldobj; then |
8445 | + $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" |
8446 | + $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? |
8447 | + fi |
8448 | + done |
8449 | |
8450 | - # Do each of the archive commands. |
8451 | - eval cmds=\"$archive_cmds\" |
8452 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' |
8453 | - for cmd in $cmds; do |
8454 | - IFS="$save_ifs" |
8455 | - $show "$cmd" |
8456 | - $run eval "$cmd" || exit $? |
8457 | - done |
8458 | - IFS="$save_ifs" |
8459 | - |
8460 | - # Create links to the real library. |
8461 | - for linkname in $linknames; do |
8462 | - $show "(cd $objdir && $LN_S $realname $linkname)" |
8463 | - $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $? |
8464 | - done |
8465 | - |
8466 | - # If -export-dynamic was specified, set the dlname. |
8467 | - if test "$export_dynamic" = yes; then |
8468 | - # On all known operating systems, these are identical. |
8469 | - dlname="$soname" |
8470 | - fi |
8471 | - fi |
8472 | + # Use standard objects if they are pic |
8473 | + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` |
8474 | |
8475 | - # Now set the variables for building old libraries. |
8476 | - oldlib="$objdir/$libname.a" |
8477 | + # Prepare the list of exported symbols |
8478 | + if test -z "$export_symbols"; then |
8479 | + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then |
8480 | + $show "generating symbol list for \`$libname.la'" |
8481 | + export_symbols="$output_objdir/$libname.exp" |
8482 | + $run $rm $export_symbols |
8483 | + eval cmds=\"$export_symbols_cmds\" |
8484 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
8485 | + for cmd in $cmds; do |
8486 | + IFS="$save_ifs" |
8487 | + $show "$cmd" |
8488 | + $run eval "$cmd" || exit $? |
8489 | + done |
8490 | + IFS="$save_ifs" |
8491 | + if test -n "$export_symbols_regex"; then |
8492 | + $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" |
8493 | + $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' |
8494 | + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" |
8495 | + $run eval '$mv "${export_symbols}T" "$export_symbols"' |
8496 | + fi |
8497 | + fi |
8498 | + fi |
8499 | + |
8500 | + if test -n "$export_symbols" && test -n "$include_expsyms"; then |
8501 | + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' |
8502 | + fi |
8503 | + |
8504 | + if test -n "$convenience"; then |
8505 | + if test -n "$whole_archive_flag_spec"; then |
8506 | + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" |
8507 | + else |
8508 | + gentop="$output_objdir/${outputname}x" |
8509 | + $show "${rm}r $gentop" |
8510 | + $run ${rm}r "$gentop" |
8511 | + $show "mkdir $gentop" |
8512 | + $run mkdir "$gentop" |
8513 | + status=$? |
8514 | + if test $status -ne 0 && test ! -d "$gentop"; then |
8515 | + exit $status |
8516 | + fi |
8517 | + generated="$generated $gentop" |
8518 | + |
8519 | + for xlib in $convenience; do |
8520 | + # Extract the objects. |
8521 | + case "$xlib" in |
8522 | + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; |
8523 | + *) xabs=`pwd`"/$xlib" ;; |
8524 | + esac |
8525 | + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` |
8526 | + xdir="$gentop/$xlib" |
8527 | + |
8528 | + $show "${rm}r $xdir" |
8529 | + $run ${rm}r "$xdir" |
8530 | + $show "mkdir $xdir" |
8531 | + $run mkdir "$xdir" |
8532 | + status=$? |
8533 | + if test $status -ne 0 && test ! -d "$xdir"; then |
8534 | + exit $status |
8535 | + fi |
8536 | + $show "(cd $xdir && $AR x $xabs)" |
8537 | + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? |
8538 | + |
8539 | + libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` |
8540 | + done |
8541 | + fi |
8542 | + fi |
8543 | + |
8544 | + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then |
8545 | + eval flag=\"$thread_safe_flag_spec\" |
8546 | + linkopts="$linkopts $flag" |
8547 | + fi |
8548 | + |
8549 | + # Do each of the archive commands. |
8550 | + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then |
8551 | + eval cmds=\"$archive_expsym_cmds\" |
8552 | + else |
8553 | + if test "x$verstring" = "x0.0"; then |
8554 | + tmp_verstring= |
8555 | + else |
8556 | + tmp_verstring="$verstring" |
8557 | + fi |
8558 | + eval cmds=\"$archive_cmds\" |
8559 | + fi |
8560 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
8561 | + for cmd in $cmds; do |
8562 | + IFS="$save_ifs" |
8563 | + $show "$cmd" |
8564 | + $run eval "$cmd" || exit $? |
8565 | + done |
8566 | + IFS="$save_ifs" |
8567 | + |
8568 | + # Create links to the real library. |
8569 | + for linkname in $linknames; do |
8570 | + if test "$realname" != "$linkname"; then |
8571 | + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" |
8572 | + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? |
8573 | + fi |
8574 | + done |
8575 | + |
8576 | + # If -module or -export-dynamic was specified, set the dlname. |
8577 | + if test "$module" = yes || test "$export_dynamic" = yes; then |
8578 | + # On all known operating systems, these are identical. |
8579 | + dlname="$soname" |
8580 | + fi |
8581 | + fi |
8582 | ;; |
8583 | |
8584 | - *.lo | *.o) |
8585 | + *.lo | *.o | *.obj) |
8586 | if test -n "$link_against_libtool_libs"; then |
8587 | - $echo "$modename: error: cannot link libtool libraries into reloadable objects" 1>&2 |
8588 | - exit 1 |
8589 | + $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 |
8590 | + exit 1 |
8591 | fi |
8592 | |
8593 | if test -n "$deplibs"; then |
8594 | - $echo "$modename: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2 |
8595 | + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 |
8596 | fi |
8597 | |
8598 | - if test -n "$dlfiles$dlprefiles"; then |
8599 | - $echo "$modename: warning: \`-dlopen' is ignored while creating objects" 1>&2 |
8600 | - # Nullify the symbol file. |
8601 | - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` |
8602 | - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` |
8603 | + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then |
8604 | + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 |
8605 | fi |
8606 | |
8607 | if test -n "$rpath"; then |
8608 | - $echo "$modename: warning: \`-rpath' is ignored while creating objects" 1>&2 |
8609 | + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 |
8610 | + fi |
8611 | + |
8612 | + if test -n "$xrpath"; then |
8613 | + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 |
8614 | fi |
8615 | |
8616 | if test -n "$vinfo"; then |
8617 | - $echo "$modename: warning: \`-version-info' is ignored while creating objects" 1>&2 |
8618 | + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 |
8619 | fi |
8620 | |
8621 | if test -n "$release"; then |
8622 | - $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2 |
8623 | + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 |
8624 | fi |
8625 | |
8626 | case "$output" in |
8627 | *.lo) |
8628 | - if test -n "$objs"; then |
8629 | - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 |
8630 | - exit 1 |
8631 | - fi |
8632 | - libobj="$output" |
8633 | - obj=`$echo "X$output" | $Xsed -e 's/\.lo$/.o/'` |
8634 | - ;; |
8635 | + if test -n "$objs"; then |
8636 | + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 |
8637 | + exit 1 |
8638 | + fi |
8639 | + libobj="$output" |
8640 | + obj=`$echo "X$output" | $Xsed -e "$lo2o"` |
8641 | + ;; |
8642 | *) |
8643 | - libobj= |
8644 | - obj="$output" |
8645 | - ;; |
8646 | + libobj= |
8647 | + obj="$output" |
8648 | + ;; |
8649 | esac |
8650 | |
8651 | # Delete the old objects. |
8652 | $run $rm $obj $libobj |
8653 | |
8654 | + # Objects from convenience libraries. This assumes |
8655 | + # single-version convenience libraries. Whenever we create |
8656 | + # different ones for PIC/non-PIC, this we'll have to duplicate |
8657 | + # the extraction. |
8658 | + reload_conv_objs= |
8659 | + gentop= |
8660 | + # reload_cmds runs $LD directly, so let us get rid of |
8661 | + # -Wl from whole_archive_flag_spec |
8662 | + wl= |
8663 | + |
8664 | + if test -n "$convenience"; then |
8665 | + if test -n "$whole_archive_flag_spec"; then |
8666 | + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" |
8667 | + else |
8668 | + gentop="$output_objdir/${obj}x" |
8669 | + $show "${rm}r $gentop" |
8670 | + $run ${rm}r "$gentop" |
8671 | + $show "mkdir $gentop" |
8672 | + $run mkdir "$gentop" |
8673 | + status=$? |
8674 | + if test $status -ne 0 && test ! -d "$gentop"; then |
8675 | + exit $status |
8676 | + fi |
8677 | + generated="$generated $gentop" |
8678 | + |
8679 | + for xlib in $convenience; do |
8680 | + # Extract the objects. |
8681 | + case "$xlib" in |
8682 | + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; |
8683 | + *) xabs=`pwd`"/$xlib" ;; |
8684 | + esac |
8685 | + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` |
8686 | + xdir="$gentop/$xlib" |
8687 | + |
8688 | + $show "${rm}r $xdir" |
8689 | + $run ${rm}r "$xdir" |
8690 | + $show "mkdir $xdir" |
8691 | + $run mkdir "$xdir" |
8692 | + status=$? |
8693 | + if test $status -ne 0 && test ! -d "$xdir"; then |
8694 | + exit $status |
8695 | + fi |
8696 | + $show "(cd $xdir && $AR x $xabs)" |
8697 | + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? |
8698 | + |
8699 | + reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` |
8700 | + done |
8701 | + fi |
8702 | + fi |
8703 | + |
8704 | # Create the old-style object. |
8705 | - reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` |
8706 | + reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" |
8707 | |
8708 | output="$obj" |
8709 | eval cmds=\"$reload_cmds\" |
8710 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' |
8711 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
8712 | for cmd in $cmds; do |
8713 | - IFS="$save_ifs" |
8714 | - $show "$cmd" |
8715 | - $run eval "$cmd" || exit $? |
8716 | + IFS="$save_ifs" |
8717 | + $show "$cmd" |
8718 | + $run eval "$cmd" || exit $? |
8719 | done |
8720 | IFS="$save_ifs" |
8721 | |
8722 | # Exit if we aren't doing a library object file. |
8723 | - test -z "$libobj" && exit 0 |
8724 | + if test -z "$libobj"; then |
8725 | + if test -n "$gentop"; then |
8726 | + $show "${rm}r $gentop" |
8727 | + $run ${rm}r $gentop |
8728 | + fi |
8729 | + |
8730 | + exit 0 |
8731 | + fi |
8732 | |
8733 | if test "$build_libtool_libs" != yes; then |
8734 | - # Create an invalid libtool object if no PIC, so that we don't |
8735 | - # accidentally link it into a program. |
8736 | - $show "echo timestamp > $libobj" |
8737 | - $run eval "echo timestamp > $libobj" || exit $? |
8738 | - exit 0 |
8739 | + if test -n "$gentop"; then |
8740 | + $show "${rm}r $gentop" |
8741 | + $run ${rm}r $gentop |
8742 | + fi |
8743 | + |
8744 | + # Create an invalid libtool object if no PIC, so that we don't |
8745 | + # accidentally link it into a program. |
8746 | + $show "echo timestamp > $libobj" |
8747 | + $run eval "echo timestamp > $libobj" || exit $? |
8748 | + exit 0 |
8749 | fi |
8750 | |
8751 | if test -n "$pic_flag"; then |
8752 | - # Only do commands if we really have different PIC objects. |
8753 | - reload_objs="$libobjs" |
8754 | - output="$libobj" |
8755 | - eval cmds=\"$reload_cmds\" |
8756 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' |
8757 | - for cmd in $cmds; do |
8758 | - IFS="$save_ifs" |
8759 | - $show "$cmd" |
8760 | - $run eval "$cmd" || exit $? |
8761 | - done |
8762 | - IFS="$save_ifs" |
8763 | + # Only do commands if we really have different PIC objects. |
8764 | + reload_objs="$libobjs $reload_conv_objs" |
8765 | + output="$libobj" |
8766 | + eval cmds=\"$reload_cmds\" |
8767 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
8768 | + for cmd in $cmds; do |
8769 | + IFS="$save_ifs" |
8770 | + $show "$cmd" |
8771 | + $run eval "$cmd" || exit $? |
8772 | + done |
8773 | + IFS="$save_ifs" |
8774 | else |
8775 | - # Just create a symlink. |
8776 | - $show "$LN_S $obj $libobj" |
8777 | - $run $LN_S $obj $libobj || exit 1 |
8778 | + # Just create a symlink. |
8779 | + $show $rm $libobj |
8780 | + $run $rm $libobj |
8781 | + xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` |
8782 | + if test "X$xdir" = "X$libobj"; then |
8783 | + xdir="." |
8784 | + else |
8785 | + xdir="$xdir" |
8786 | + fi |
8787 | + baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` |
8788 | + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` |
8789 | + $show "(cd $xdir && $LN_S $oldobj $baseobj)" |
8790 | + $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? |
8791 | + fi |
8792 | + |
8793 | + if test -n "$gentop"; then |
8794 | + $show "${rm}r $gentop" |
8795 | + $run ${rm}r $gentop |
8796 | fi |
8797 | |
8798 | exit 0 |
8799 | ;; |
8800 | |
8801 | + # Anything else should be a program. |
8802 | *) |
8803 | if test -n "$vinfo"; then |
8804 | - $echo "$modename: warning: \`-version-info' is ignored while linking programs" 1>&2 |
8805 | + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 |
8806 | fi |
8807 | |
8808 | if test -n "$release"; then |
8809 | - $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2 |
8810 | + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 |
8811 | fi |
8812 | |
8813 | - if test -n "$rpath"; then |
8814 | + if test "$preload" = yes; then |
8815 | + if test "$dlopen" = unknown && test "$dlopen_self" = unknown && |
8816 | + test "$dlopen_self_static" = unknown; then |
8817 | + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." |
8818 | + fi |
8819 | + fi |
8820 | + |
8821 | + if test -n "$rpath$xrpath"; then |
8822 | # If the user specified any rpath flags, then add them. |
8823 | - for libdir in $rpath; do |
8824 | - if test -n "$hardcode_libdir_flag_spec"; then |
8825 | - if test -n "$hardcode_libdir_separator"; then |
8826 | - if test -z "$hardcode_libdirs"; then |
8827 | - # Put the magic libdir with the hardcode flag. |
8828 | - hardcode_libdirs="$libdir" |
8829 | - libdir="@HARDCODE_LIBDIRS@" |
8830 | - else |
8831 | - # Just accumulate the unique libdirs. |
8832 | - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in |
8833 | - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
8834 | - ;; |
8835 | - *) |
8836 | - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" |
8837 | - ;; |
8838 | - esac |
8839 | - libdir= |
8840 | - fi |
8841 | - fi |
8842 | - |
8843 | - if test -n "$libdir"; then |
8844 | - eval flag=\"$hardcode_libdir_flag_spec\" |
8845 | - |
8846 | - compile_command="$compile_command $flag" |
8847 | - finalize_command="$finalize_command $flag" |
8848 | - fi |
8849 | - elif test -n "$runpath_var"; then |
8850 | - case "$perm_rpath " in |
8851 | - *" $libdir "*) ;; |
8852 | - *) perm_rpath="$perm_rpath $libdir" ;; |
8853 | - esac |
8854 | - fi |
8855 | + for libdir in $rpath $xrpath; do |
8856 | + # This is the magic to use -rpath. |
8857 | + case "$compile_rpath " in |
8858 | + *" $libdir "*) ;; |
8859 | + *) compile_rpath="$compile_rpath $libdir" ;; |
8860 | + esac |
8861 | + case "$finalize_rpath " in |
8862 | + *" $libdir "*) ;; |
8863 | + *) finalize_rpath="$finalize_rpath $libdir" ;; |
8864 | + esac |
8865 | done |
8866 | fi |
8867 | |
8868 | - # Substitute the hardcoded libdirs into the compile commands. |
8869 | - if test -n "$hardcode_libdir_separator"; then |
8870 | - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` |
8871 | - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` |
8872 | + # Now hardcode the library paths |
8873 | + rpath= |
8874 | + hardcode_libdirs= |
8875 | + for libdir in $compile_rpath $finalize_rpath; do |
8876 | + if test -n "$hardcode_libdir_flag_spec"; then |
8877 | + if test -n "$hardcode_libdir_separator"; then |
8878 | + if test -z "$hardcode_libdirs"; then |
8879 | + hardcode_libdirs="$libdir" |
8880 | + else |
8881 | + # Just accumulate the unique libdirs. |
8882 | + case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in |
8883 | + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
8884 | + ;; |
8885 | + *) |
8886 | + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" |
8887 | + ;; |
8888 | + esac |
8889 | + fi |
8890 | + else |
8891 | + eval flag=\"$hardcode_libdir_flag_spec\" |
8892 | + rpath="$rpath $flag" |
8893 | + fi |
8894 | + elif test -n "$runpath_var"; then |
8895 | + case "$perm_rpath " in |
8896 | + *" $libdir "*) ;; |
8897 | + *) perm_rpath="$perm_rpath $libdir" ;; |
8898 | + esac |
8899 | + fi |
8900 | + done |
8901 | + # Substitute the hardcoded libdirs into the rpath. |
8902 | + if test -n "$hardcode_libdir_separator" && |
8903 | + test -n "$hardcode_libdirs"; then |
8904 | + libdir="$hardcode_libdirs" |
8905 | + eval rpath=\" $hardcode_libdir_flag_spec\" |
8906 | + fi |
8907 | + compile_rpath="$rpath" |
8908 | + |
8909 | + rpath= |
8910 | + hardcode_libdirs= |
8911 | + for libdir in $finalize_rpath; do |
8912 | + if test -n "$hardcode_libdir_flag_spec"; then |
8913 | + if test -n "$hardcode_libdir_separator"; then |
8914 | + if test -z "$hardcode_libdirs"; then |
8915 | + hardcode_libdirs="$libdir" |
8916 | + else |
8917 | + # Just accumulate the unique libdirs. |
8918 | + case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in |
8919 | + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
8920 | + ;; |
8921 | + *) |
8922 | + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" |
8923 | + ;; |
8924 | + esac |
8925 | + fi |
8926 | + else |
8927 | + eval flag=\"$hardcode_libdir_flag_spec\" |
8928 | + rpath="$rpath $flag" |
8929 | + fi |
8930 | + elif test -n "$runpath_var"; then |
8931 | + case "$finalize_perm_rpath " in |
8932 | + *" $libdir "*) ;; |
8933 | + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; |
8934 | + esac |
8935 | + fi |
8936 | + done |
8937 | + # Substitute the hardcoded libdirs into the rpath. |
8938 | + if test -n "$hardcode_libdir_separator" && |
8939 | + test -n "$hardcode_libdirs"; then |
8940 | + libdir="$hardcode_libdirs" |
8941 | + eval rpath=\" $hardcode_libdir_flag_spec\" |
8942 | + fi |
8943 | + finalize_rpath="$rpath" |
8944 | + |
8945 | + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` |
8946 | + if test "X$output_objdir" = "X$output"; then |
8947 | + output_objdir="$objdir" |
8948 | + else |
8949 | + output_objdir="$output_objdir/$objdir" |
8950 | + fi |
8951 | + |
8952 | + # Create the binary in the object directory, then wrap it. |
8953 | + if test ! -d $output_objdir; then |
8954 | + $show "$mkdir $output_objdir" |
8955 | + $run $mkdir $output_objdir |
8956 | + status=$? |
8957 | + if test $status -ne 0 && test ! -d $output_objdir; then |
8958 | + exit $status |
8959 | + fi |
8960 | fi |
8961 | |
8962 | if test -n "$libobjs" && test "$build_old_libs" = yes; then |
8963 | - # Transform all the library objects into standard objects. |
8964 | - compile_command=`$echo "X$compile_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` |
8965 | - finalize_command=`$echo "X$finalize_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` |
8966 | - fi |
8967 | - |
8968 | - if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then |
8969 | - dlsyms="${output}S.c" |
8970 | - else |
8971 | - dlsyms= |
8972 | + # Transform all the library objects into standard objects. |
8973 | + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` |
8974 | + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` |
8975 | fi |
8976 | |
8977 | - if test -n "$dlsyms"; then |
8978 | - # Add our own program objects to the preloaded list. |
8979 | - dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` |
8980 | - |
8981 | - # Discover the nlist of each of the dlfiles. |
8982 | - nlist="$objdir/${output}.nm" |
8983 | - |
8984 | - if test -d $objdir; then |
8985 | - $show "$rm $nlist ${nlist}T" |
8986 | - $run $rm "$nlist" "${nlist}T" |
8987 | + dlsyms= |
8988 | + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then |
8989 | + if test -n "$NM" && test -n "$global_symbol_pipe"; then |
8990 | + dlsyms="${outputname}S.c" |
8991 | else |
8992 | - $show "$mkdir $objdir" |
8993 | - $run $mkdir $objdir |
8994 | - status=$? |
8995 | - if test $status -eq 0 || test -d $objdir; then : |
8996 | - else |
8997 | - exit $status |
8998 | - fi |
8999 | + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 |
9000 | fi |
9001 | + fi |
9002 | |
9003 | - for arg in $dlprefiles; do |
9004 | - $show "extracting global C symbols from \`$arg'" |
9005 | - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" |
9006 | - done |
9007 | - |
9008 | - # Parse the name list into a source file. |
9009 | - $show "creating $objdir/$dlsyms" |
9010 | - if test -z "$run"; then |
9011 | - # Make sure we at least have an empty file. |
9012 | - test -f "$nlist" || : > "$nlist" |
9013 | - |
9014 | - # Try sorting and uniquifying the output. |
9015 | - if sort "$nlist" | uniq > "$nlist"T; then |
9016 | - mv -f "$nlist"T "$nlist" |
9017 | - wcout=`wc "$nlist" 2>/dev/null` |
9018 | - count=`echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` |
9019 | - (test "$count" -ge 0) 2>/dev/null || count=-1 |
9020 | - else |
9021 | - $rm "$nlist"T |
9022 | - count=-1 |
9023 | - fi |
9024 | - |
9025 | - case "$dlsyms" in |
9026 | - "") ;; |
9027 | - *.c) |
9028 | - $echo > "$objdir/$dlsyms" "\ |
9029 | -/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */ |
9030 | -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */ |
9031 | + if test -n "$dlsyms"; then |
9032 | + case "$dlsyms" in |
9033 | + "") ;; |
9034 | + *.c) |
9035 | + # Discover the nlist of each of the dlfiles. |
9036 | + nlist="$output_objdir/${outputname}.nm" |
9037 | + |
9038 | + $show "$rm $nlist ${nlist}S ${nlist}T" |
9039 | + $run $rm "$nlist" "${nlist}S" "${nlist}T" |
9040 | + |
9041 | + # Parse the name list into a source file. |
9042 | + $show "creating $output_objdir/$dlsyms" |
9043 | + |
9044 | + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ |
9045 | +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ |
9046 | +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ |
9047 | |
9048 | #ifdef __cplusplus |
9049 | extern \"C\" { |
9050 | #endif |
9051 | |
9052 | /* Prevent the only kind of declaration conflicts we can make. */ |
9053 | -#define dld_preloaded_symbol_count some_other_symbol |
9054 | -#define dld_preloaded_symbols some_other_symbol |
9055 | +#define lt_preloaded_symbols some_other_symbol |
9056 | |
9057 | /* External symbol declarations for the compiler. */\ |
9058 | " |
9059 | |
9060 | - if test -f "$nlist"; then |
9061 | - sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms" |
9062 | + if test "$dlself" = yes; then |
9063 | + $show "generating symbol list for \`$output'" |
9064 | + |
9065 | + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" |
9066 | + |
9067 | + # Add our own program objects to the symbol list. |
9068 | + progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` |
9069 | + for arg in $progfiles; do |
9070 | + $show "extracting global C symbols from \`$arg'" |
9071 | + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" |
9072 | + done |
9073 | + |
9074 | + if test -n "$exclude_expsyms"; then |
9075 | + $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' |
9076 | + $run eval '$mv "$nlist"T "$nlist"' |
9077 | + fi |
9078 | + |
9079 | + if test -n "$export_symbols_regex"; then |
9080 | + $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' |
9081 | + $run eval '$mv "$nlist"T "$nlist"' |
9082 | + fi |
9083 | + |
9084 | + # Prepare the list of exported symbols |
9085 | + if test -z "$export_symbols"; then |
9086 | + export_symbols="$output_objdir/$output.exp" |
9087 | + $run $rm $export_symbols |
9088 | + $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' |
9089 | else |
9090 | - echo '/* NONE */' >> "$objdir/$dlsyms" |
9091 | + $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' |
9092 | + $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' |
9093 | + $run eval 'mv "$nlist"T "$nlist"' |
9094 | + fi |
9095 | + fi |
9096 | + |
9097 | + for arg in $dlprefiles; do |
9098 | + $show "extracting global C symbols from \`$arg'" |
9099 | + name=`echo "$arg" | sed -e 's%^.*/%%'` |
9100 | + $run eval 'echo ": $name " >> "$nlist"' |
9101 | + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" |
9102 | + done |
9103 | + |
9104 | + if test -z "$run"; then |
9105 | + # Make sure we have at least an empty file. |
9106 | + test -f "$nlist" || : > "$nlist" |
9107 | + |
9108 | + if test -n "$exclude_expsyms"; then |
9109 | + egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T |
9110 | + $mv "$nlist"T "$nlist" |
9111 | + fi |
9112 | + |
9113 | + # Try sorting and uniquifying the output. |
9114 | + if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then |
9115 | + : |
9116 | + else |
9117 | + grep -v "^: " < "$nlist" > "$nlist"S |
9118 | + fi |
9119 | + |
9120 | + if test -f "$nlist"S; then |
9121 | + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' |
9122 | + else |
9123 | + echo '/* NONE */' >> "$output_objdir/$dlsyms" |
9124 | fi |
9125 | |
9126 | - $echo >> "$objdir/$dlsyms" "\ |
9127 | + $echo >> "$output_objdir/$dlsyms" "\ |
9128 | |
9129 | -#undef dld_preloaded_symbol_count |
9130 | -#undef dld_preloaded_symbols |
9131 | +#undef lt_preloaded_symbols |
9132 | |
9133 | #if defined (__STDC__) && __STDC__ |
9134 | -# define __ptr_t void * |
9135 | +# define lt_ptr_t void * |
9136 | #else |
9137 | -# define __ptr_t char * |
9138 | +# define lt_ptr_t char * |
9139 | +# define const |
9140 | #endif |
9141 | |
9142 | -/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ |
9143 | -int dld_preloaded_symbol_count = $count; |
9144 | - |
9145 | /* The mapping between symbol names and symbols. */ |
9146 | -struct { |
9147 | - char *name; |
9148 | - __ptr_t address; |
9149 | +const struct { |
9150 | + const char *name; |
9151 | + lt_ptr_t address; |
9152 | } |
9153 | -dld_preloaded_symbols[] = |
9154 | +lt_preloaded_symbols[] = |
9155 | {\ |
9156 | " |
9157 | |
9158 | - if test -f "$nlist"; then |
9159 | - sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms" |
9160 | - fi |
9161 | + sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ |
9162 | + -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ |
9163 | + < "$nlist" >> "$output_objdir/$dlsyms" |
9164 | |
9165 | - $echo >> "$objdir/$dlsyms" "\ |
9166 | - {0, (__ptr_t) 0} |
9167 | + $echo >> "$output_objdir/$dlsyms" "\ |
9168 | + {0, (lt_ptr_t) 0} |
9169 | }; |
9170 | |
9171 | +/* This works around a problem in FreeBSD linker */ |
9172 | +#ifdef FREEBSD_WORKAROUND |
9173 | +static const void *lt_preloaded_setup() { |
9174 | + return lt_preloaded_symbols; |
9175 | +} |
9176 | +#endif |
9177 | + |
9178 | #ifdef __cplusplus |
9179 | } |
9180 | #endif\ |
9181 | " |
9182 | - ;; |
9183 | + fi |
9184 | |
9185 | - *) |
9186 | - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 |
9187 | - exit 1 |
9188 | - ;; |
9189 | + pic_flag_for_symtable= |
9190 | + case "$host" in |
9191 | + # compiling the symbol table file with pic_flag works around |
9192 | + # a FreeBSD bug that causes programs to crash when -lm is |
9193 | + # linked before any other PIC object. But we must not use |
9194 | + # pic_flag when linking with -static. The problem exists in |
9195 | + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. |
9196 | + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) |
9197 | + case "$compile_command " in |
9198 | + *" -static "*) ;; |
9199 | + *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; |
9200 | + esac;; |
9201 | + *-*-hpux*) |
9202 | + case "$compile_command " in |
9203 | + *" -static "*) ;; |
9204 | + *) pic_flag_for_symtable=" $pic_flag -DPIC";; |
9205 | + esac |
9206 | esac |
9207 | - fi |
9208 | |
9209 | - # Now compile the dynamic symbol file. |
9210 | - $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")" |
9211 | - $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $? |
9212 | - |
9213 | - # Transform the symbol file into the correct name. |
9214 | - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` |
9215 | - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` |
9216 | - elif test "$export_dynamic" != yes; then |
9217 | - test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2 |
9218 | + # Now compile the dynamic symbol file. |
9219 | + $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" |
9220 | + $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? |
9221 | + |
9222 | + # Clean up the generated files. |
9223 | + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" |
9224 | + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" |
9225 | + |
9226 | + # Transform the symbol file into the correct name. |
9227 | + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
9228 | + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
9229 | + ;; |
9230 | + *) |
9231 | + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 |
9232 | + exit 1 |
9233 | + ;; |
9234 | + esac |
9235 | else |
9236 | - # We keep going just in case the user didn't refer to |
9237 | - # dld_preloaded_symbols. The linker will fail if global_symbol_pipe |
9238 | - # really was required. |
9239 | - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 |
9240 | - |
9241 | - # Nullify the symbol file. |
9242 | - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` |
9243 | - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` |
9244 | + # We keep going just in case the user didn't refer to |
9245 | + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe |
9246 | + # really was required. |
9247 | + |
9248 | + # Nullify the symbol file. |
9249 | + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` |
9250 | + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` |
9251 | fi |
9252 | |
9253 | if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then |
9254 | - # Replace the output file specification. |
9255 | - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` |
9256 | - finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` |
9257 | - |
9258 | - # We have no uninstalled library dependencies, so finalize right now. |
9259 | - $show "$compile_command" |
9260 | - $run eval "$compile_command" |
9261 | - exit $? |
9262 | - fi |
9263 | - |
9264 | - # Replace the output file specification. |
9265 | - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'` |
9266 | - finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'` |
9267 | - |
9268 | - # Create the binary in the object directory, then wrap it. |
9269 | - if test -d $objdir; then : |
9270 | - else |
9271 | - $show "$mkdir $objdir" |
9272 | - $run $mkdir $objdir |
9273 | + # Replace the output file specification. |
9274 | + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` |
9275 | + link_command="$compile_command$compile_rpath" |
9276 | + |
9277 | + # We have no uninstalled library dependencies, so finalize right now. |
9278 | + $show "$link_command" |
9279 | + $run eval "$link_command" |
9280 | status=$? |
9281 | - if test $status -eq 0 || test -d $objdir; then : |
9282 | - else |
9283 | - exit $status |
9284 | + |
9285 | + # Delete the generated files. |
9286 | + if test -n "$dlsyms"; then |
9287 | + $show "$rm $output_objdir/${outputname}S.${objext}" |
9288 | + $run $rm "$output_objdir/${outputname}S.${objext}" |
9289 | fi |
9290 | + |
9291 | + exit $status |
9292 | fi |
9293 | |
9294 | if test -n "$shlibpath_var"; then |
9295 | - # We should set the shlibpath_var |
9296 | - rpath= |
9297 | - for dir in $temp_rpath; do |
9298 | - case "$dir" in |
9299 | - /* | [A-Za-z]:\\*) |
9300 | - # Absolute path. |
9301 | - rpath="$rpath$dir:" |
9302 | - ;; |
9303 | - *) |
9304 | - # Relative path: add a thisdir entry. |
9305 | - rpath="$rpath\$thisdir/$dir:" |
9306 | - ;; |
9307 | - esac |
9308 | - done |
9309 | - temp_rpath="$rpath" |
9310 | + # We should set the shlibpath_var |
9311 | + rpath= |
9312 | + for dir in $temp_rpath; do |
9313 | + case "$dir" in |
9314 | + [\\/]* | [A-Za-z]:[\\/]*) |
9315 | + # Absolute path. |
9316 | + rpath="$rpath$dir:" |
9317 | + ;; |
9318 | + *) |
9319 | + # Relative path: add a thisdir entry. |
9320 | + rpath="$rpath\$thisdir/$dir:" |
9321 | + ;; |
9322 | + esac |
9323 | + done |
9324 | + temp_rpath="$rpath" |
9325 | fi |
9326 | |
9327 | - # Delete the old output file. |
9328 | - $run $rm $output |
9329 | - |
9330 | - if test -n "$compile_shlibpath"; then |
9331 | - compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command" |
9332 | + if test -n "$compile_shlibpath$finalize_shlibpath"; then |
9333 | + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" |
9334 | fi |
9335 | if test -n "$finalize_shlibpath"; then |
9336 | - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" |
9337 | + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" |
9338 | fi |
9339 | |
9340 | - if test -n "$runpath_var" && test -n "$perm_rpath"; then |
9341 | - # We should set the runpath_var. |
9342 | - rpath= |
9343 | - for dir in $perm_rpath; do |
9344 | - rpath="$rpath$dir:" |
9345 | - done |
9346 | - compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command" |
9347 | - finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command" |
9348 | - fi |
9349 | - |
9350 | - case "$hardcode_action" in |
9351 | - relink) |
9352 | - # AGH! Flame the AIX and HP-UX people for me, will ya? |
9353 | - $echo "$modename: warning: using a buggy system linker" 1>&2 |
9354 | - $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2 |
9355 | - ;; |
9356 | - esac |
9357 | + compile_var= |
9358 | + finalize_var= |
9359 | + if test -n "$runpath_var"; then |
9360 | + if test -n "$perm_rpath"; then |
9361 | + # We should set the runpath_var. |
9362 | + rpath= |
9363 | + for dir in $perm_rpath; do |
9364 | + rpath="$rpath$dir:" |
9365 | + done |
9366 | + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " |
9367 | + fi |
9368 | + if test -n "$finalize_perm_rpath"; then |
9369 | + # We should set the runpath_var. |
9370 | + rpath= |
9371 | + for dir in $finalize_perm_rpath; do |
9372 | + rpath="$rpath$dir:" |
9373 | + done |
9374 | + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " |
9375 | + fi |
9376 | + fi |
9377 | + |
9378 | + if test "$hardcode_action" = relink; then |
9379 | + # Fast installation is not supported |
9380 | + link_command="$compile_var$compile_command$compile_rpath" |
9381 | + relink_command="$finalize_var$finalize_command$finalize_rpath" |
9382 | + |
9383 | + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 |
9384 | + $echo "$modename: \`$output' will be relinked during installation" 1>&2 |
9385 | + else |
9386 | + if test "$fast_install" != no; then |
9387 | + link_command="$finalize_var$compile_command$finalize_rpath" |
9388 | + if test "$fast_install" = yes; then |
9389 | + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` |
9390 | + else |
9391 | + # fast_install is set to needless |
9392 | + relink_command= |
9393 | + fi |
9394 | + else |
9395 | + link_command="$compile_var$compile_command$compile_rpath" |
9396 | + relink_command="$finalize_var$finalize_command$finalize_rpath" |
9397 | + fi |
9398 | + fi |
9399 | + |
9400 | + # Replace the output file specification. |
9401 | + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` |
9402 | + |
9403 | + # Delete the old output files. |
9404 | + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname |
9405 | |
9406 | - $show "$compile_command" |
9407 | - $run eval "$compile_command" || exit $? |
9408 | + $show "$link_command" |
9409 | + $run eval "$link_command" || exit $? |
9410 | |
9411 | # Now create the wrapper script. |
9412 | $show "creating $output" |
9413 | |
9414 | - # Quote the finalize command for shipping. |
9415 | - finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"` |
9416 | + # Quote the relink command for shipping. |
9417 | + if test -n "$relink_command"; then |
9418 | + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` |
9419 | + fi |
9420 | |
9421 | # Quote $echo for shipping. |
9422 | - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` |
9423 | + if test "X$echo" = "X$SHELL $0 --fallback-echo"; then |
9424 | + case "$0" in |
9425 | + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; |
9426 | + *) qecho="$SHELL `pwd`/$0 --fallback-echo";; |
9427 | + esac |
9428 | + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` |
9429 | + else |
9430 | + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` |
9431 | + fi |
9432 | |
9433 | # Only actually do things if our run command is non-null. |
9434 | if test -z "$run"; then |
9435 | - $rm $output |
9436 | - trap "$rm $output; exit 1" 1 2 15 |
9437 | + # win32 will think the script is a binary if it has |
9438 | + # a .exe suffix, so we strip it off here. |
9439 | + case $output in |
9440 | + *.exe) output=`echo $output|sed 's,.exe$,,'` ;; |
9441 | + esac |
9442 | + $rm $output |
9443 | + trap "$rm $output; exit 1" 1 2 15 |
9444 | |
9445 | - $echo > $output "\ |
9446 | -#! /bin/sh |
9447 | + $echo > $output "\ |
9448 | +#! $SHELL |
9449 | |
9450 | -# $output - temporary wrapper script for $objdir/$output |
9451 | -# Generated by ltmain.sh - GNU $PACKAGE $VERSION |
9452 | +# $output - temporary wrapper script for $objdir/$outputname |
9453 | +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP |
9454 | # |
9455 | # The $output program cannot be directly executed until all the libtool |
9456 | # libraries that it depends on are installed. |
9457 | # |
9458 | -# This wrapper script should never be moved out of \``pwd`'. |
9459 | +# This wrapper script should never be moved out of the build directory. |
9460 | # If it is, it will not operate correctly. |
9461 | |
9462 | # Sed substitution that helps us do robust quoting. It backslashifies |
9463 | # metacharacters that are still active within double-quoted strings. |
9464 | -Xsed='sed -e s/^X//' |
9465 | +Xsed='sed -e 1s/^X//' |
9466 | sed_quote_subst='$sed_quote_subst' |
9467 | |
9468 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
9469 | # if CDPATH is set. |
9470 | -if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi |
9471 | +if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi |
9472 | + |
9473 | +relink_command=\"$relink_command\" |
9474 | |
9475 | # This environment variable determines our operation mode. |
9476 | if test \"\$libtool_install_magic\" = \"$magic\"; then |
9477 | - # install mode needs the following variables: |
9478 | + # install mode needs the following variable: |
9479 | link_against_libtool_libs='$link_against_libtool_libs' |
9480 | - finalize_command=\"$finalize_command\" |
9481 | else |
9482 | # When we are sourced in execute mode, \$file and \$echo are already set. |
9483 | - if test \"\$libtool_execute_magic\" = \"$magic\"; then : |
9484 | - else |
9485 | + if test \"\$libtool_execute_magic\" != \"$magic\"; then |
9486 | echo=\"$qecho\" |
9487 | file=\"\$0\" |
9488 | + # Make sure echo works. |
9489 | + if test \"X\$1\" = X--no-reexec; then |
9490 | + # Discard the --no-reexec flag, and continue. |
9491 | + shift |
9492 | + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then |
9493 | + # Yippee, \$echo works! |
9494 | + : |
9495 | + else |
9496 | + # Restart under the correct shell, and then maybe \$echo will work. |
9497 | + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} |
9498 | + fi |
9499 | fi\ |
9500 | " |
9501 | - $echo >> $output "\ |
9502 | + $echo >> $output "\ |
9503 | |
9504 | # Find the directory that this script lives in. |
9505 | thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` |
9506 | @@ -1477,7 +2880,7 @@ |
9507 | # If there was a directory component, then change thisdir. |
9508 | if test \"x\$destdir\" != \"x\$file\"; then |
9509 | case \"\$destdir\" in |
9510 | - /* | [A-Za-z]:\\*) thisdir=\"\$destdir\" ;; |
9511 | + [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; |
9512 | *) thisdir=\"\$thisdir/\$destdir\" ;; |
9513 | esac |
9514 | fi |
9515 | @@ -1489,35 +2892,105 @@ |
9516 | # Try to get the absolute directory name. |
9517 | absdir=\`cd \"\$thisdir\" && pwd\` |
9518 | test -n \"\$absdir\" && thisdir=\"\$absdir\" |
9519 | +" |
9520 | + |
9521 | + if test "$fast_install" = yes; then |
9522 | + echo >> $output "\ |
9523 | + program=lt-'$outputname' |
9524 | + progdir=\"\$thisdir/$objdir\" |
9525 | + |
9526 | + if test ! -f \"\$progdir/\$program\" || \\ |
9527 | + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ |
9528 | + test \"X\$file\" != \"X\$progdir/\$program\"; }; then |
9529 | |
9530 | + file=\"\$\$-\$program\" |
9531 | + |
9532 | + if test ! -d \"\$progdir\"; then |
9533 | + $mkdir \"\$progdir\" |
9534 | + else |
9535 | + $rm \"\$progdir/\$file\" |
9536 | + fi" |
9537 | + |
9538 | + echo >> $output "\ |
9539 | + |
9540 | + # relink executable if necessary |
9541 | + if test -n \"\$relink_command\"; then |
9542 | + if (cd \"\$thisdir\" && eval \$relink_command); then : |
9543 | + else |
9544 | + $rm \"\$progdir/\$file\" |
9545 | + exit 1 |
9546 | + fi |
9547 | + fi |
9548 | + |
9549 | + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || |
9550 | + { $rm \"\$progdir/\$program\"; |
9551 | + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } |
9552 | + $rm \"\$progdir/\$file\" |
9553 | + fi" |
9554 | + else |
9555 | + echo >> $output "\ |
9556 | + program='$outputname' |
9557 | progdir=\"\$thisdir/$objdir\" |
9558 | - program='$output' |
9559 | +" |
9560 | + fi |
9561 | + |
9562 | + echo >> $output "\ |
9563 | |
9564 | if test -f \"\$progdir/\$program\"; then" |
9565 | |
9566 | - # Export our shlibpath_var if we have one. |
9567 | - if test -n "$shlibpath_var" && test -n "$temp_rpath"; then |
9568 | - $echo >> $output "\ |
9569 | + # Export our shlibpath_var if we have one. |
9570 | + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then |
9571 | + $echo >> $output "\ |
9572 | # Add our own library path to $shlibpath_var |
9573 | $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" |
9574 | |
9575 | # Some systems cannot cope with colon-terminated $shlibpath_var |
9576 | - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\` |
9577 | + # The second colon is a workaround for a bug in BeOS R4 sed |
9578 | + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` |
9579 | |
9580 | export $shlibpath_var |
9581 | " |
9582 | - fi |
9583 | + fi |
9584 | + |
9585 | + # fixup the dll searchpath if we need to. |
9586 | + if test -n "$dllsearchpath"; then |
9587 | + $echo >> $output "\ |
9588 | + # Add the dll search path components to the executable PATH |
9589 | + PATH=$dllsearchpath:\$PATH |
9590 | +" |
9591 | + fi |
9592 | |
9593 | - $echo >> $output "\ |
9594 | + $echo >> $output "\ |
9595 | if test \"\$libtool_execute_magic\" != \"$magic\"; then |
9596 | # Run the actual program with our arguments. |
9597 | +" |
9598 | + case $host in |
9599 | + # win32 systems need to use the prog path for dll |
9600 | + # lookup to work |
9601 | + *-*-cygwin*) |
9602 | + $echo >> $output "\ |
9603 | + exec \$progdir/\$program \${1+\"\$@\"} |
9604 | +" |
9605 | + ;; |
9606 | |
9607 | + # Backslashes separate directories on plain windows |
9608 | + *-*-mingw | *-*-os2*) |
9609 | + $echo >> $output "\ |
9610 | + exec \$progdir\\\\\$program \${1+\"\$@\"} |
9611 | +" |
9612 | + ;; |
9613 | + |
9614 | + *) |
9615 | + $echo >> $output "\ |
9616 | # Export the path to the program. |
9617 | PATH=\"\$progdir:\$PATH\" |
9618 | export PATH |
9619 | |
9620 | exec \$program \${1+\"\$@\"} |
9621 | - |
9622 | +" |
9623 | + ;; |
9624 | + esac |
9625 | + $echo >> $output "\ |
9626 | \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" |
9627 | exit 1 |
9628 | fi |
9629 | @@ -1530,45 +3003,135 @@ |
9630 | fi |
9631 | fi\ |
9632 | " |
9633 | - chmod +x $output |
9634 | + chmod +x $output |
9635 | fi |
9636 | exit 0 |
9637 | ;; |
9638 | esac |
9639 | |
9640 | # See if we need to build an old-fashioned archive. |
9641 | - if test "$build_old_libs" = "yes"; then |
9642 | - # Transform .lo files to .o files. |
9643 | - oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` |
9644 | + for oldlib in $oldlibs; do |
9645 | + |
9646 | + if test "$build_libtool_libs" = convenience; then |
9647 | + oldobjs="$libobjs_save" |
9648 | + addlibs="$convenience" |
9649 | + build_libtool_libs=no |
9650 | + else |
9651 | + if test "$build_libtool_libs" = module; then |
9652 | + oldobjs="$libobjs_save" |
9653 | + build_libtool_libs=no |
9654 | + else |
9655 | + oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` |
9656 | + fi |
9657 | + addlibs="$old_convenience" |
9658 | + fi |
9659 | + |
9660 | + if test -n "$addlibs"; then |
9661 | + gentop="$output_objdir/${outputname}x" |
9662 | + $show "${rm}r $gentop" |
9663 | + $run ${rm}r "$gentop" |
9664 | + $show "mkdir $gentop" |
9665 | + $run mkdir "$gentop" |
9666 | + status=$? |
9667 | + if test $status -ne 0 && test ! -d "$gentop"; then |
9668 | + exit $status |
9669 | + fi |
9670 | + generated="$generated $gentop" |
9671 | + |
9672 | + # Add in members from convenience archives. |
9673 | + for xlib in $addlibs; do |
9674 | + # Extract the objects. |
9675 | + case "$xlib" in |
9676 | + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; |
9677 | + *) xabs=`pwd`"/$xlib" ;; |
9678 | + esac |
9679 | + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` |
9680 | + xdir="$gentop/$xlib" |
9681 | + |
9682 | + $show "${rm}r $xdir" |
9683 | + $run ${rm}r "$xdir" |
9684 | + $show "mkdir $xdir" |
9685 | + $run mkdir "$xdir" |
9686 | + status=$? |
9687 | + if test $status -ne 0 && test ! -d "$xdir"; then |
9688 | + exit $status |
9689 | + fi |
9690 | + $show "(cd $xdir && $AR x $xabs)" |
9691 | + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? |
9692 | + |
9693 | + oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` |
9694 | + done |
9695 | + fi |
9696 | |
9697 | # Do each command in the archive commands. |
9698 | if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then |
9699 | eval cmds=\"$old_archive_from_new_cmds\" |
9700 | else |
9701 | + # Ensure that we have .o objects in place in case we decided |
9702 | + # not to build a shared library, and have fallen back to building |
9703 | + # static libs even though --disable-static was passed! |
9704 | + for oldobj in $oldobjs; do |
9705 | + if test ! -f $oldobj; then |
9706 | + xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` |
9707 | + if test "X$xdir" = "X$oldobj"; then |
9708 | + xdir="." |
9709 | + else |
9710 | + xdir="$xdir" |
9711 | + fi |
9712 | + baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` |
9713 | + obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` |
9714 | + $show "(cd $xdir && ${LN_S} $obj $baseobj)" |
9715 | + $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? |
9716 | + fi |
9717 | + done |
9718 | + |
9719 | eval cmds=\"$old_archive_cmds\" |
9720 | fi |
9721 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' |
9722 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
9723 | for cmd in $cmds; do |
9724 | - IFS="$save_ifs" |
9725 | - $show "$cmd" |
9726 | - $run eval "$cmd" || exit $? |
9727 | + IFS="$save_ifs" |
9728 | + $show "$cmd" |
9729 | + $run eval "$cmd" || exit $? |
9730 | done |
9731 | IFS="$save_ifs" |
9732 | + done |
9733 | + |
9734 | + if test -n "$generated"; then |
9735 | + $show "${rm}r$generated" |
9736 | + $run ${rm}r$generated |
9737 | fi |
9738 | |
9739 | # Now create the libtool archive. |
9740 | case "$output" in |
9741 | *.la) |
9742 | old_library= |
9743 | - test "$build_old_libs" = yes && old_library="$libname.a" |
9744 | - |
9745 | + test "$build_old_libs" = yes && old_library="$libname.$libext" |
9746 | $show "creating $output" |
9747 | |
9748 | + if test -n "$xrpath"; then |
9749 | + temp_xrpath= |
9750 | + for libdir in $xrpath; do |
9751 | + temp_xrpath="$temp_xrpath -R$libdir" |
9752 | + done |
9753 | + dependency_libs="$temp_xrpath $dependency_libs" |
9754 | + fi |
9755 | + |
9756 | # Only create the output if not a dry run. |
9757 | if test -z "$run"; then |
9758 | - $echo > $output "\ |
9759 | -# $output - a libtool library file |
9760 | -# Generated by ltmain.sh - GNU $PACKAGE $VERSION |
9761 | + for installed in no yes; do |
9762 | + if test "$installed" = yes; then |
9763 | + if test -z "$install_libdir"; then |
9764 | + break |
9765 | + fi |
9766 | + output="$output_objdir/$outputname"i |
9767 | + fi |
9768 | + $rm $output |
9769 | + $echo > $output "\ |
9770 | +# $outputname - a libtool library file |
9771 | +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP |
9772 | +# |
9773 | +# Please DO NOT delete this file! |
9774 | +# It is necessary for linking the library. |
9775 | |
9776 | # The name that we can dlopen(3). |
9777 | dlname='$dlname' |
9778 | @@ -1587,15 +3150,19 @@ |
9779 | age=$age |
9780 | revision=$revision |
9781 | |
9782 | +# Is this an already installed library? |
9783 | +installed=$installed |
9784 | + |
9785 | # Directory that this library needs to be installed in: |
9786 | libdir='$install_libdir'\ |
9787 | " |
9788 | + done |
9789 | fi |
9790 | |
9791 | # Do a symbolic link so that the libtool archive can be found in |
9792 | # LD_LIBRARY_PATH before the program is installed. |
9793 | - $show "(cd $objdir && $LN_S ../$output $output)" |
9794 | - $run eval "(cd $objdir && $LN_S ../$output $output)" || exit 1 |
9795 | + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" |
9796 | + $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $? |
9797 | ;; |
9798 | esac |
9799 | exit 0 |
9800 | @@ -1605,9 +3172,9 @@ |
9801 | install) |
9802 | modename="$modename: install" |
9803 | |
9804 | - # There may be an optional /bin/sh argument at the beginning of |
9805 | + # There may be an optional sh(1) argument at the beginning of |
9806 | # install_prog (especially on Windows NT). |
9807 | - if test "$nonopt" = "$SHELL"; then |
9808 | + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then |
9809 | # Aesthetically quote it. |
9810 | arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` |
9811 | case "$arg" in |
9812 | @@ -1639,14 +3206,14 @@ |
9813 | opts= |
9814 | prev= |
9815 | install_type= |
9816 | - isdir= |
9817 | + isdir=no |
9818 | stripme= |
9819 | for arg |
9820 | do |
9821 | if test -n "$dest"; then |
9822 | - files="$files $dest" |
9823 | - dest="$arg" |
9824 | - continue |
9825 | + files="$files $dest" |
9826 | + dest="$arg" |
9827 | + continue |
9828 | fi |
9829 | |
9830 | case "$arg" in |
9831 | @@ -1656,20 +3223,20 @@ |
9832 | -m) prev="-m" ;; |
9833 | -o) prev="-o" ;; |
9834 | -s) |
9835 | - stripme=" -s" |
9836 | - continue |
9837 | - ;; |
9838 | + stripme=" -s" |
9839 | + continue |
9840 | + ;; |
9841 | -*) ;; |
9842 | |
9843 | *) |
9844 | - # If the previous option needed an argument, then skip it. |
9845 | - if test -n "$prev"; then |
9846 | - prev= |
9847 | - else |
9848 | - dest="$arg" |
9849 | - continue |
9850 | - fi |
9851 | - ;; |
9852 | + # If the previous option needed an argument, then skip it. |
9853 | + if test -n "$prev"; then |
9854 | + prev= |
9855 | + else |
9856 | + dest="$arg" |
9857 | + continue |
9858 | + fi |
9859 | + ;; |
9860 | esac |
9861 | |
9862 | # Aesthetically quote the argument. |
9863 | @@ -1696,9 +3263,9 @@ |
9864 | |
9865 | if test -z "$files"; then |
9866 | if test -z "$dest"; then |
9867 | - $echo "$modename: no file or destination specified" 1>&2 |
9868 | + $echo "$modename: no file or destination specified" 1>&2 |
9869 | else |
9870 | - $echo "$modename: you must specify a destination" 1>&2 |
9871 | + $echo "$modename: you must specify a destination" 1>&2 |
9872 | fi |
9873 | $echo "$help" 1>&2 |
9874 | exit 1 |
9875 | @@ -1709,7 +3276,7 @@ |
9876 | |
9877 | # Check to see that the destination is a directory. |
9878 | test -d "$dest" && isdir=yes |
9879 | - if test -n "$isdir"; then |
9880 | + if test "$isdir" = yes; then |
9881 | destdir="$dest" |
9882 | destname= |
9883 | else |
9884 | @@ -1720,23 +3287,23 @@ |
9885 | # Not a directory, so check to see that there is only one file specified. |
9886 | set dummy $files |
9887 | if test $# -gt 2; then |
9888 | - $echo "$modename: \`$dest' is not a directory" 1>&2 |
9889 | - $echo "$help" 1>&2 |
9890 | - exit 1 |
9891 | + $echo "$modename: \`$dest' is not a directory" 1>&2 |
9892 | + $echo "$help" 1>&2 |
9893 | + exit 1 |
9894 | fi |
9895 | fi |
9896 | case "$destdir" in |
9897 | - /* | [A-Za-z]:\\*) ;; |
9898 | + [\\/]* | [A-Za-z]:[\\/]*) ;; |
9899 | *) |
9900 | for file in $files; do |
9901 | - case "$file" in |
9902 | - *.lo) ;; |
9903 | - *) |
9904 | - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 |
9905 | - $echo "$help" 1>&2 |
9906 | - exit 1 |
9907 | - ;; |
9908 | - esac |
9909 | + case "$file" in |
9910 | + *.lo) ;; |
9911 | + *) |
9912 | + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 |
9913 | + $echo "$help" 1>&2 |
9914 | + exit 1 |
9915 | + ;; |
9916 | + esac |
9917 | done |
9918 | ;; |
9919 | esac |
9920 | @@ -1752,209 +3319,214 @@ |
9921 | |
9922 | # Do each installation. |
9923 | case "$file" in |
9924 | - *.a) |
9925 | - # Do the static libraries later. |
9926 | - staticlibs="$staticlibs $file" |
9927 | - ;; |
9928 | + *.a | *.lib) |
9929 | + # Do the static libraries later. |
9930 | + staticlibs="$staticlibs $file" |
9931 | + ;; |
9932 | |
9933 | *.la) |
9934 | - # Check to see that this really is a libtool archive. |
9935 | - if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : |
9936 | - else |
9937 | - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 |
9938 | - $echo "$help" 1>&2 |
9939 | - exit 1 |
9940 | - fi |
9941 | - |
9942 | - library_names= |
9943 | - old_library= |
9944 | - # If there is no directory component, then add one. |
9945 | - case "$file" in |
9946 | - */* | *\\*) . $file ;; |
9947 | - *) . ./$file ;; |
9948 | - esac |
9949 | - |
9950 | - # Add the libdir to current_libdirs if it is the destination. |
9951 | - if test "X$destdir" = "X$libdir"; then |
9952 | - case "$current_libdirs " in |
9953 | - *" $libdir "*) ;; |
9954 | - *) current_libdirs="$current_libdirs $libdir" ;; |
9955 | - esac |
9956 | - else |
9957 | - # Note the libdir as a future libdir. |
9958 | - case "$future_libdirs " in |
9959 | - *" $libdir "*) ;; |
9960 | - *) future_libdirs="$future_libdirs $libdir" ;; |
9961 | - esac |
9962 | - fi |
9963 | - |
9964 | - dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" |
9965 | - test "X$dir" = "X$file/" && dir= |
9966 | - dir="$dir$objdir" |
9967 | - |
9968 | - # See the names of the shared library. |
9969 | - set dummy $library_names |
9970 | - if test -n "$2"; then |
9971 | - realname="$2" |
9972 | - shift |
9973 | - shift |
9974 | - |
9975 | - # Install the shared library and build the symlinks. |
9976 | - $show "$install_prog $dir/$realname $destdir/$realname" |
9977 | - $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? |
9978 | - test "X$dlname" = "X$realname" && dlname= |
9979 | - |
9980 | - if test $# -gt 0; then |
9981 | - # Delete the old symlinks. |
9982 | - rmcmd="$rm" |
9983 | - for linkname |
9984 | - do |
9985 | - rmcmd="$rmcmd $destdir/$linkname" |
9986 | - done |
9987 | - $show "$rmcmd" |
9988 | - $run $rmcmd |
9989 | - |
9990 | - # ... and create new ones. |
9991 | - for linkname |
9992 | - do |
9993 | - test "X$dlname" = "X$linkname" && dlname= |
9994 | - $show "(cd $destdir && $LN_S $realname $linkname)" |
9995 | - $run eval "(cd $destdir && $LN_S $realname $linkname)" |
9996 | - done |
9997 | - fi |
9998 | - |
9999 | - if test -n "$dlname"; then |
10000 | - # Install the dynamically-loadable library. |
10001 | - $show "$install_prog $dir/$dlname $destdir/$dlname" |
10002 | - $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $? |
10003 | - fi |
10004 | - |
10005 | - # Do each command in the postinstall commands. |
10006 | - lib="$destdir/$realname" |
10007 | - eval cmds=\"$postinstall_cmds\" |
10008 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' |
10009 | - for cmd in $cmds; do |
10010 | - IFS="$save_ifs" |
10011 | - $show "$cmd" |
10012 | - $run eval "$cmd" || exit $? |
10013 | - done |
10014 | - IFS="$save_ifs" |
10015 | - fi |
10016 | - |
10017 | - # Install the pseudo-library for information purposes. |
10018 | - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
10019 | - $show "$install_prog $file $destdir/$name" |
10020 | - $run eval "$install_prog $file $destdir/$name" || exit $? |
10021 | - |
10022 | - # Maybe install the static library, too. |
10023 | - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" |
10024 | - ;; |
10025 | + # Check to see that this really is a libtool archive. |
10026 | + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
10027 | + else |
10028 | + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 |
10029 | + $echo "$help" 1>&2 |
10030 | + exit 1 |
10031 | + fi |
10032 | + |
10033 | + library_names= |
10034 | + old_library= |
10035 | + # If there is no directory component, then add one. |
10036 | + case "$file" in |
10037 | + */* | *\\*) . $file ;; |
10038 | + *) . ./$file ;; |
10039 | + esac |
10040 | + |
10041 | + # Add the libdir to current_libdirs if it is the destination. |
10042 | + if test "X$destdir" = "X$libdir"; then |
10043 | + case "$current_libdirs " in |
10044 | + *" $libdir "*) ;; |
10045 | + *) current_libdirs="$current_libdirs $libdir" ;; |
10046 | + esac |
10047 | + else |
10048 | + # Note the libdir as a future libdir. |
10049 | + case "$future_libdirs " in |
10050 | + *" $libdir "*) ;; |
10051 | + *) future_libdirs="$future_libdirs $libdir" ;; |
10052 | + esac |
10053 | + fi |
10054 | + |
10055 | + dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" |
10056 | + test "X$dir" = "X$file/" && dir= |
10057 | + dir="$dir$objdir" |
10058 | + |
10059 | + # See the names of the shared library. |
10060 | + set dummy $library_names |
10061 | + if test -n "$2"; then |
10062 | + realname="$2" |
10063 | + shift |
10064 | + shift |
10065 | + |
10066 | + # Install the shared library and build the symlinks. |
10067 | + $show "$install_prog $dir/$realname $destdir/$realname" |
10068 | + $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? |
10069 | + |
10070 | + if test $# -gt 0; then |
10071 | + # Delete the old symlinks, and create new ones. |
10072 | + for linkname |
10073 | + do |
10074 | + if test "$linkname" != "$realname"; then |
10075 | + $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" |
10076 | + $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" |
10077 | + fi |
10078 | + done |
10079 | + fi |
10080 | + |
10081 | + # Do each command in the postinstall commands. |
10082 | + lib="$destdir/$realname" |
10083 | + eval cmds=\"$postinstall_cmds\" |
10084 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
10085 | + for cmd in $cmds; do |
10086 | + IFS="$save_ifs" |
10087 | + $show "$cmd" |
10088 | + $run eval "$cmd" || exit $? |
10089 | + done |
10090 | + IFS="$save_ifs" |
10091 | + fi |
10092 | + |
10093 | + # Install the pseudo-library for information purposes. |
10094 | + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
10095 | + instname="$dir/$name"i |
10096 | + $show "$install_prog $instname $destdir/$name" |
10097 | + $run eval "$install_prog $instname $destdir/$name" || exit $? |
10098 | + |
10099 | + # Maybe install the static library, too. |
10100 | + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" |
10101 | + ;; |
10102 | |
10103 | *.lo) |
10104 | - # Install (i.e. copy) a libtool object. |
10105 | + # Install (i.e. copy) a libtool object. |
10106 | + |
10107 | + # Figure out destination file name, if it wasn't already specified. |
10108 | + if test -n "$destname"; then |
10109 | + destfile="$destdir/$destname" |
10110 | + else |
10111 | + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
10112 | + destfile="$destdir/$destfile" |
10113 | + fi |
10114 | + |
10115 | + # Deduce the name of the destination old-style object file. |
10116 | + case "$destfile" in |
10117 | + *.lo) |
10118 | + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` |
10119 | + ;; |
10120 | + *.o | *.obj) |
10121 | + staticdest="$destfile" |
10122 | + destfile= |
10123 | + ;; |
10124 | + *) |
10125 | + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 |
10126 | + $echo "$help" 1>&2 |
10127 | + exit 1 |
10128 | + ;; |
10129 | + esac |
10130 | + |
10131 | + # Install the libtool object if requested. |
10132 | + if test -n "$destfile"; then |
10133 | + $show "$install_prog $file $destfile" |
10134 | + $run eval "$install_prog $file $destfile" || exit $? |
10135 | + fi |
10136 | + |
10137 | + # Install the old object if enabled. |
10138 | + if test "$build_old_libs" = yes; then |
10139 | + # Deduce the name of the old-style object file. |
10140 | + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` |
10141 | |
10142 | - # Figure out destination file name, if it wasn't already specified. |
10143 | - if test -n "$destname"; then |
10144 | - destfile="$destdir/$destname" |
10145 | - else |
10146 | - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
10147 | - destfile="$destdir/$destfile" |
10148 | - fi |
10149 | - |
10150 | - # Deduce the name of the destination old-style object file. |
10151 | - case "$destfile" in |
10152 | - *.lo) |
10153 | - staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/\.o/'` |
10154 | - ;; |
10155 | - *.o) |
10156 | - staticdest="$destfile" |
10157 | - destfile= |
10158 | - ;; |
10159 | - *) |
10160 | - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 |
10161 | - $echo "$help" 1>&2 |
10162 | - exit 1 |
10163 | - ;; |
10164 | - esac |
10165 | - |
10166 | - # Install the libtool object if requested. |
10167 | - if test -n "$destfile"; then |
10168 | - $show "$install_prog $file $destfile" |
10169 | - $run eval "$install_prog $file $destfile" || exit $? |
10170 | - fi |
10171 | - |
10172 | - # Install the old object if enabled. |
10173 | - if test "$build_old_libs" = yes; then |
10174 | - # Deduce the name of the old-style object file. |
10175 | - staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/\.o/'` |
10176 | - |
10177 | - $show "$install_prog $staticobj $staticdest" |
10178 | - $run eval "$install_prog \$staticobj \$staticdest" || exit $? |
10179 | - fi |
10180 | - exit 0 |
10181 | - ;; |
10182 | + $show "$install_prog $staticobj $staticdest" |
10183 | + $run eval "$install_prog \$staticobj \$staticdest" || exit $? |
10184 | + fi |
10185 | + exit 0 |
10186 | + ;; |
10187 | |
10188 | *) |
10189 | - # Do a test to see if this is really a libtool program. |
10190 | - if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then |
10191 | - link_against_libtool_libs= |
10192 | - finalize_command= |
10193 | - |
10194 | - # If there is no directory component, then add one. |
10195 | - case "$file" in |
10196 | - */* | *\\*) . $file ;; |
10197 | - *) . ./$file ;; |
10198 | - esac |
10199 | - |
10200 | - # Check the variables that should have been set. |
10201 | - if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then |
10202 | - $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 |
10203 | - exit 1 |
10204 | - fi |
10205 | - |
10206 | - finalize=yes |
10207 | - for lib in $link_against_libtool_libs; do |
10208 | - # Check to see that each library is installed. |
10209 | - libdir= |
10210 | - if test -f "$lib"; then |
10211 | - # If there is no directory component, then add one. |
10212 | - case "$lib" in |
10213 | - */* | *\\*) . $lib ;; |
10214 | - *) . ./$lib ;; |
10215 | - esac |
10216 | - fi |
10217 | - libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" |
10218 | - if test -z "$libdir"; then |
10219 | - $echo "$modename: warning: \`$lib' contains no -rpath information" 1>&2 |
10220 | - elif test -f "$libfile"; then : |
10221 | - else |
10222 | - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 |
10223 | - finalize=no |
10224 | - fi |
10225 | - done |
10226 | - |
10227 | - if test "$hardcode_action" = relink; then |
10228 | - if test "$finalize" = yes; then |
10229 | - $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2 |
10230 | - $show "$finalize_command" |
10231 | - if $run eval "$finalize_command"; then : |
10232 | - else |
10233 | - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 |
10234 | - continue |
10235 | - fi |
10236 | - file="$objdir/$file"T |
10237 | - else |
10238 | - $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2 |
10239 | - fi |
10240 | - else |
10241 | - # Install the binary that we compiled earlier. |
10242 | + # Figure out destination file name, if it wasn't already specified. |
10243 | + if test -n "$destname"; then |
10244 | + destfile="$destdir/$destname" |
10245 | + else |
10246 | + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
10247 | + destfile="$destdir/$destfile" |
10248 | + fi |
10249 | + |
10250 | + # Do a test to see if this is really a libtool program. |
10251 | + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
10252 | + link_against_libtool_libs= |
10253 | + relink_command= |
10254 | + |
10255 | + # If there is no directory component, then add one. |
10256 | + case "$file" in |
10257 | + */* | *\\*) . $file ;; |
10258 | + *) . ./$file ;; |
10259 | + esac |
10260 | + |
10261 | + # Check the variables that should have been set. |
10262 | + if test -z "$link_against_libtool_libs"; then |
10263 | + $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 |
10264 | + exit 1 |
10265 | + fi |
10266 | + |
10267 | + finalize=yes |
10268 | + for lib in $link_against_libtool_libs; do |
10269 | + # Check to see that each library is installed. |
10270 | + libdir= |
10271 | + if test -f "$lib"; then |
10272 | + # If there is no directory component, then add one. |
10273 | + case "$lib" in |
10274 | + */* | *\\*) . $lib ;; |
10275 | + *) . ./$lib ;; |
10276 | + esac |
10277 | + fi |
10278 | + libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" |
10279 | + if test -n "$libdir" && test ! -f "$libfile"; then |
10280 | + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 |
10281 | + finalize=no |
10282 | + fi |
10283 | + done |
10284 | + |
10285 | + outputname= |
10286 | + if test "$fast_install" = no && test -n "$relink_command"; then |
10287 | + if test "$finalize" = yes && test -z "$run"; then |
10288 | + tmpdir="/tmp" |
10289 | + test -n "$TMPDIR" && tmpdir="$TMPDIR" |
10290 | + tmpdir="$tmpdir/libtool-$$" |
10291 | + if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : |
10292 | + else |
10293 | + $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 |
10294 | + continue |
10295 | + fi |
10296 | + outputname="$tmpdir/$file" |
10297 | + # Replace the output file specification. |
10298 | + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` |
10299 | + |
10300 | + $show "$relink_command" |
10301 | + if $run eval "$relink_command"; then : |
10302 | + else |
10303 | + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 |
10304 | + ${rm}r "$tmpdir" |
10305 | + continue |
10306 | + fi |
10307 | + file="$outputname" |
10308 | + else |
10309 | + $echo "$modename: warning: cannot relink \`$file'" 1>&2 |
10310 | + fi |
10311 | + else |
10312 | + # Install the binary that we compiled earlier. |
10313 | file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` |
10314 | - fi |
10315 | - fi |
10316 | + fi |
10317 | + fi |
10318 | |
10319 | - $show "$install_prog$stripme $file $dest" |
10320 | - $run eval "$install_prog\$stripme \$file \$dest" || exit $? |
10321 | - ;; |
10322 | + $show "$install_prog$stripme $file $destfile" |
10323 | + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? |
10324 | + test -n "$outputname" && ${rm}r "$tmpdir" |
10325 | + ;; |
10326 | esac |
10327 | done |
10328 | |
10329 | @@ -1969,11 +3541,11 @@ |
10330 | |
10331 | # Do each command in the postinstall commands. |
10332 | eval cmds=\"$old_postinstall_cmds\" |
10333 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' |
10334 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
10335 | for cmd in $cmds; do |
10336 | - IFS="$save_ifs" |
10337 | - $show "$cmd" |
10338 | - $run eval "$cmd" || exit $? |
10339 | + IFS="$save_ifs" |
10340 | + $show "$cmd" |
10341 | + $run eval "$cmd" || exit $? |
10342 | done |
10343 | IFS="$save_ifs" |
10344 | done |
10345 | @@ -1996,43 +3568,49 @@ |
10346 | finish) |
10347 | modename="$modename: finish" |
10348 | libdirs="$nonopt" |
10349 | + admincmds= |
10350 | |
10351 | if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then |
10352 | for dir |
10353 | do |
10354 | - libdirs="$libdirs $dir" |
10355 | + libdirs="$libdirs $dir" |
10356 | done |
10357 | |
10358 | for libdir in $libdirs; do |
10359 | if test -n "$finish_cmds"; then |
10360 | # Do each command in the finish commands. |
10361 | eval cmds=\"$finish_cmds\" |
10362 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' |
10363 | - for cmd in $cmds; do |
10364 | - IFS="$save_ifs" |
10365 | - $show "$cmd" |
10366 | - $run eval "$cmd" |
10367 | - done |
10368 | - IFS="$save_ifs" |
10369 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
10370 | + for cmd in $cmds; do |
10371 | + IFS="$save_ifs" |
10372 | + $show "$cmd" |
10373 | + $run eval "$cmd" || admincmds="$admincmds |
10374 | + $cmd" |
10375 | + done |
10376 | + IFS="$save_ifs" |
10377 | fi |
10378 | if test -n "$finish_eval"; then |
10379 | # Do the single finish_eval. |
10380 | eval cmds=\"$finish_eval\" |
10381 | - $run eval "$cmds" |
10382 | + $run eval "$cmds" || admincmds="$admincmds |
10383 | + $cmds" |
10384 | fi |
10385 | done |
10386 | fi |
10387 | |
10388 | - echo "------------------------------------------------------------------------------" |
10389 | + # Exit here if they wanted silent mode. |
10390 | + test "$show" = : && exit 0 |
10391 | + |
10392 | + echo "----------------------------------------------------------------------" |
10393 | echo "Libraries have been installed in:" |
10394 | for libdir in $libdirs; do |
10395 | echo " $libdir" |
10396 | done |
10397 | echo |
10398 | - echo "To link against installed libraries in a given directory, LIBDIR," |
10399 | - echo "you must use the \`-LLIBDIR' flag during linking." |
10400 | - echo |
10401 | - echo " You will also need to do one of the following:" |
10402 | + echo "If you ever happen to want to link against installed libraries" |
10403 | + echo "in a given directory, LIBDIR, you must either use libtool, and" |
10404 | + echo "specify the full pathname of the library, or use \`-LLIBDIR'" |
10405 | + echo "flag during linking and do at least one of the following:" |
10406 | if test -n "$shlibpath_var"; then |
10407 | echo " - add LIBDIR to the \`$shlibpath_var' environment variable" |
10408 | echo " during execution" |
10409 | @@ -2047,13 +3625,16 @@ |
10410 | |
10411 | echo " - use the \`$flag' linker flag" |
10412 | fi |
10413 | + if test -n "$admincmds"; then |
10414 | + echo " - have your system administrator run these commands:$admincmds" |
10415 | + fi |
10416 | if test -f /etc/ld.so.conf; then |
10417 | echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" |
10418 | fi |
10419 | echo |
10420 | echo "See any operating system documentation about shared libraries for" |
10421 | echo "more information, such as the ld(1) and ld.so(8) manual pages." |
10422 | - echo "------------------------------------------------------------------------------" |
10423 | + echo "----------------------------------------------------------------------" |
10424 | exit 0 |
10425 | ;; |
10426 | |
10427 | @@ -2071,8 +3652,7 @@ |
10428 | |
10429 | # Handle -dlopen flags immediately. |
10430 | for file in $execute_dlfiles; do |
10431 | - if test -f "$file"; then : |
10432 | - else |
10433 | + if test ! -f "$file"; then |
10434 | $echo "$modename: \`$file' is not a file" 1>&2 |
10435 | $echo "$help" 1>&2 |
10436 | exit 1 |
10437 | @@ -2081,22 +3661,22 @@ |
10438 | dir= |
10439 | case "$file" in |
10440 | *.la) |
10441 | - # Check to see that this really is a libtool archive. |
10442 | - if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : |
10443 | - else |
10444 | - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
10445 | - $echo "$help" 1>&2 |
10446 | - exit 1 |
10447 | - fi |
10448 | + # Check to see that this really is a libtool archive. |
10449 | + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
10450 | + else |
10451 | + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
10452 | + $echo "$help" 1>&2 |
10453 | + exit 1 |
10454 | + fi |
10455 | |
10456 | # Read the libtool library. |
10457 | dlname= |
10458 | library_names= |
10459 | |
10460 | - # If there is no directory component, then add one. |
10461 | + # If there is no directory component, then add one. |
10462 | case "$file" in |
10463 | */* | *\\*) . $file ;; |
10464 | - *) . ./$file ;; |
10465 | + *) . ./$file ;; |
10466 | esac |
10467 | |
10468 | # Skip this library if it cannot be dlopened. |
10469 | @@ -2125,7 +3705,7 @@ |
10470 | |
10471 | *) |
10472 | $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 |
10473 | - continue |
10474 | + continue |
10475 | ;; |
10476 | esac |
10477 | |
10478 | @@ -2152,8 +3732,8 @@ |
10479 | case "$file" in |
10480 | -*) ;; |
10481 | *) |
10482 | - # Do a test to see if this is really a libtool program. |
10483 | - if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then |
10484 | + # Do a test to see if this is really a libtool program. |
10485 | + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
10486 | # If there is no directory component, then add one. |
10487 | case "$file" in |
10488 | */* | *\\*) . $file ;; |
10489 | @@ -2163,7 +3743,7 @@ |
10490 | # Transform arg to wrapped name. |
10491 | file="$progdir/$program" |
10492 | fi |
10493 | - ;; |
10494 | + ;; |
10495 | esac |
10496 | # Quote arguments (to preserve shell metacharacters). |
10497 | file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` |
10498 | @@ -2171,8 +3751,18 @@ |
10499 | done |
10500 | |
10501 | if test -z "$run"; then |
10502 | - # Export the shlibpath_var. |
10503 | - eval "export $shlibpath_var" |
10504 | + if test -n "$shlibpath_var"; then |
10505 | + # Export the shlibpath_var. |
10506 | + eval "export $shlibpath_var" |
10507 | + fi |
10508 | + |
10509 | + # Restore saved enviroment variables |
10510 | + if test "${save_LC_ALL+set}" = set; then |
10511 | + LC_ALL="$save_LC_ALL"; export LC_ALL |
10512 | + fi |
10513 | + if test "${save_LANG+set}" = set; then |
10514 | + LANG="$save_LANG"; export LANG |
10515 | + fi |
10516 | |
10517 | # Now actually exec the command. |
10518 | eval "exec \$cmd$args" |
10519 | @@ -2181,8 +3771,10 @@ |
10520 | exit 1 |
10521 | else |
10522 | # Display what would be done. |
10523 | - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" |
10524 | - $echo "export $shlibpath_var" |
10525 | + if test -n "$shlibpath_var"; then |
10526 | + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" |
10527 | + $echo "export $shlibpath_var" |
10528 | + fi |
10529 | $echo "$cmd$args" |
10530 | exit 0 |
10531 | fi |
10532 | @@ -2217,17 +3809,15 @@ |
10533 | |
10534 | case "$name" in |
10535 | *.la) |
10536 | - # Possibly a libtool archive, so verify it. |
10537 | - if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then |
10538 | - . $dir/$name |
10539 | - |
10540 | - # Delete the libtool libraries and symlinks. |
10541 | - for n in $library_names; do |
10542 | - rmfiles="$rmfiles $dir/$n" |
10543 | - test "X$n" = "X$dlname" && dlname= |
10544 | - done |
10545 | - test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname" |
10546 | - test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" |
10547 | + # Possibly a libtool archive, so verify it. |
10548 | + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
10549 | + . $dir/$name |
10550 | + |
10551 | + # Delete the libtool libraries and symlinks. |
10552 | + for n in $library_names; do |
10553 | + rmfiles="$rmfiles $dir/$n" |
10554 | + done |
10555 | + test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" |
10556 | |
10557 | $show "$rm $rmfiles" |
10558 | $run $rm $rmfiles |
10559 | @@ -2235,7 +3825,7 @@ |
10560 | if test -n "$library_names"; then |
10561 | # Do each command in the postuninstall commands. |
10562 | eval cmds=\"$postuninstall_cmds\" |
10563 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' |
10564 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
10565 | for cmd in $cmds; do |
10566 | IFS="$save_ifs" |
10567 | $show "$cmd" |
10568 | @@ -2244,10 +3834,10 @@ |
10569 | IFS="$save_ifs" |
10570 | fi |
10571 | |
10572 | - if test -n "$old_library"; then |
10573 | + if test -n "$old_library"; then |
10574 | # Do each command in the old_postuninstall commands. |
10575 | eval cmds=\"$old_postuninstall_cmds\" |
10576 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' |
10577 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' |
10578 | for cmd in $cmds; do |
10579 | IFS="$save_ifs" |
10580 | $show "$cmd" |
10581 | @@ -2256,21 +3846,21 @@ |
10582 | IFS="$save_ifs" |
10583 | fi |
10584 | |
10585 | - # FIXME: should reinstall the best remaining shared library. |
10586 | - fi |
10587 | - ;; |
10588 | + # FIXME: should reinstall the best remaining shared library. |
10589 | + fi |
10590 | + ;; |
10591 | |
10592 | *.lo) |
10593 | - if test "$build_old_libs" = yes; then |
10594 | - oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/\.o/'` |
10595 | - rmfiles="$rmfiles $dir/$oldobj" |
10596 | - fi |
10597 | + if test "$build_old_libs" = yes; then |
10598 | + oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` |
10599 | + rmfiles="$rmfiles $dir/$oldobj" |
10600 | + fi |
10601 | $show "$rm $rmfiles" |
10602 | $run $rm $rmfiles |
10603 | - ;; |
10604 | + ;; |
10605 | |
10606 | *) |
10607 | - $show "$rm $rmfiles" |
10608 | + $show "$rm $rmfiles" |
10609 | $run $rm $rmfiles |
10610 | ;; |
10611 | esac |
10612 | @@ -2297,8 +3887,10 @@ |
10613 | |
10614 | Provide generalized library-building support services. |
10615 | |
10616 | + --config show all configuration variables |
10617 | + --debug enable verbose shell tracing |
10618 | -n, --dry-run display commands without modifying any files |
10619 | - --features display configuration information and exit |
10620 | + --features display basic configuration information and exit |
10621 | --finish same as \`--mode=finish' |
10622 | --help display this help message and exit |
10623 | --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] |
10624 | @@ -2326,6 +3918,11 @@ |
10625 | |
10626 | Compile a source file into a libtool library object. |
10627 | |
10628 | +This mode accepts the following additional options: |
10629 | + |
10630 | + -o OUTPUT-FILE set the output file name to OUTPUT-FILE |
10631 | + -static always build a \`.o' file suitable for static linking |
10632 | + |
10633 | COMPILE-COMMAND is a command to be used in creating a \`standard' object file |
10634 | from the given SOURCEFILE. |
10635 | |
10636 | @@ -2392,18 +3989,25 @@ |
10637 | The following components of LINK-COMMAND are treated specially: |
10638 | |
10639 | -all-static do not do any dynamic linking at all |
10640 | + -avoid-version do not add a version suffix if possible |
10641 | -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime |
10642 | - -dlpreopen FILE link in FILE and add its symbols to dld_preloaded_symbols |
10643 | + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols |
10644 | -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) |
10645 | + -export-symbols SYMFILE |
10646 | + try to export only the symbols listed in SYMFILE |
10647 | + -export-symbols-regex REGEX |
10648 | + try to export only the symbols matching REGEX |
10649 | -LLIBDIR search LIBDIR for required installed libraries |
10650 | -lNAME OUTPUT-FILE requires the installed library libNAME |
10651 | + -module build a library that can dlopened |
10652 | -no-undefined declare that a library does not refer to external symbols |
10653 | -o OUTPUT-FILE create OUTPUT-FILE from the specified objects |
10654 | -release RELEASE specify package release information |
10655 | -rpath LIBDIR the created library will eventually be installed in LIBDIR |
10656 | + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries |
10657 | -static do not do any dynamic linking of libtool libraries |
10658 | -version-info CURRENT[:REVISION[:AGE]] |
10659 | - specify library version info [each variable defaults to 0] |
10660 | + specify library version info [each variable defaults to 0] |
10661 | |
10662 | All other options (arguments beginning with \`-') are ignored. |
10663 | |
10664 | @@ -2411,18 +4015,19 @@ |
10665 | treated as uninstalled libtool libraries, other files are standard or library |
10666 | object files. |
10667 | |
10668 | -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only |
10669 | -library objects (\`.lo' files) may be specified, and \`-rpath' is required. |
10670 | +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, |
10671 | +only library objects (\`.lo' files) may be specified, and \`-rpath' is |
10672 | +required, except when creating a convenience library. |
10673 | |
10674 | -If OUTPUT-FILE ends in \`.a', then a standard library is created using \`ar' |
10675 | -and \`ranlib'. |
10676 | +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created |
10677 | +using \`ar' and \`ranlib', or on Windows using \`lib'. |
10678 | |
10679 | -If OUTPUT-FILE ends in \`.lo' or \`.o', then a reloadable object file is |
10680 | -created, otherwise an executable program is created." |
10681 | +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file |
10682 | +is created, otherwise an executable program is created." |
10683 | ;; |
10684 | |
10685 | uninstall) |
10686 | - $echo |
10687 | + $echo \ |
10688 | "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... |
10689 | |
10690 | Remove libraries from an installation directory. |