Line 0
Link Here
|
|
|
1 |
diff -urN /var/empty/README.TXT config/README.TXT |
2 |
--- /var/empty/README.TXT Thu Jan 1 01:00:00 1970 |
3 |
+++ config/README.TXT Wed Nov 15 05:12:11 2006 |
4 |
@@ -0,0 +1,3 @@ |
5 |
+Files in this directory are used by GNU autoconf/automake system. |
6 |
+These files aren't used/needed in the Windows environment. |
7 |
+ |
8 |
diff -urN /var/empty/am_include.mk config/am_include.mk |
9 |
--- /var/empty/am_include.mk Thu Jan 1 01:00:00 1970 |
10 |
+++ config/am_include.mk Wed Nov 15 05:12:11 2006 |
11 |
@@ -0,0 +1,51 @@ |
12 |
+## vim:tw=78 |
13 |
+## Process this file with automake to create Makefile.in |
14 |
+## |
15 |
+## $Id: am_include.mk,v 1.1.1.1.2.3 2006/04/08 14:14:10 richardash1981 Exp $ |
16 |
+## |
17 |
+## Copyright (C) 2003 - David W. Durham |
18 |
+## |
19 |
+## This file is part of SoundTouch, an audio processing library for pitch/time adjustments |
20 |
+## |
21 |
+## SoundTouch is free software; you can redistribute it and/or modify it under the |
22 |
+## terms of the GNU General Public License as published by the Free Software |
23 |
+## Foundation; either version 2 of the License, or (at your option) any later |
24 |
+## version. |
25 |
+## |
26 |
+## SoundTouch is distributed in the hope that it will be useful, but WITHOUT ANY |
27 |
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
28 |
+## A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
29 |
+## |
30 |
+## You should have received a copy of the GNU General Public License along with |
31 |
+## this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
32 |
+## Place - Suite 330, Boston, MA 02111-1307, USA |
33 |
+ |
34 |
+## These are common definitions used in all Makefiles |
35 |
+## It is actually included when a makefile.am is coverted to Makefile.in |
36 |
+## by automake, so it's ok to have @MACROS@ that will be set by configure |
37 |
+ |
38 |
+ |
39 |
+## INCLUDES is automatically added to CXXFLAGS at compile time. The |
40 |
+## $(top_srcdir) macro is set by configure. It's important to use $(top_srcdir) |
41 |
+## in case a user decides to build in a separate directory from the base package |
42 |
+## directory. Using absolute, or relative paths is a bad idea. |
43 |
+INCLUDES=-I$(top_srcdir)/include |
44 |
+ |
45 |
+ |
46 |
+## CXXFLAGS is also automatically added to the $(CXX) macro at compile time, and |
47 |
+## is passed down to the children as well |
48 |
+## I list these here in case there needs to always be some flags passed to the compiler |
49 |
+CXXFLAGS=@CXXFLAGS@ |
50 |
+ |
51 |
+ |
52 |
+## LDFLAGS will be added at link time |
53 |
+## note that the -l flags are set by the LIBS macro that is set by configure |
54 |
+## This line doesn't need to be here, configure will add LDFLAGS on it's own, |
55 |
+## but I'm leaving here as a place to add LDFLAGS if so desired |
56 |
+LDFLAGS=@LDFLAGS@ |
57 |
+ |
58 |
+ |
59 |
+# doc directory |
60 |
+pkgdocdir=$(prefix)/doc/@PACKAGE@ |
61 |
+ |
62 |
+ |
63 |
diff -urN /var/empty/config.guess config/config.guess |
64 |
--- /var/empty/config.guess Thu Jan 1 01:00:00 1970 |
65 |
+++ config/config.guess Fri Dec 8 22:53:21 2006 |
66 |
@@ -0,0 +1,1407 @@ |
67 |
+#! /bin/sh |
68 |
+# Attempt to guess a canonical system name. |
69 |
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
70 |
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. |
71 |
+ |
72 |
+timestamp='2003-07-02' |
73 |
+ |
74 |
+# This file is free software; you can redistribute it and/or modify it |
75 |
+# under the terms of the GNU General Public License as published by |
76 |
+# the Free Software Foundation; either version 2 of the License, or |
77 |
+# (at your option) any later version. |
78 |
+# |
79 |
+# This program is distributed in the hope that it will be useful, but |
80 |
+# WITHOUT ANY WARRANTY; without even the implied warranty of |
81 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
82 |
+# General Public License for more details. |
83 |
+# |
84 |
+# You should have received a copy of the GNU General Public License |
85 |
+# along with this program; if not, write to the Free Software |
86 |
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
87 |
+# |
88 |
+# As a special exception to the GNU General Public License, if you |
89 |
+# distribute this file as part of a program that contains a |
90 |
+# configuration script generated by Autoconf, you may include it under |
91 |
+# the same distribution terms that you use for the rest of that program. |
92 |
+ |
93 |
+# Originally written by Per Bothner <per@bothner.com>. |
94 |
+# Please send patches to <config-patches@gnu.org>. Submit a context |
95 |
+# diff and a properly formatted ChangeLog entry. |
96 |
+# |
97 |
+# This script attempts to guess a canonical system name similar to |
98 |
+# config.sub. If it succeeds, it prints the system name on stdout, and |
99 |
+# exits with 0. Otherwise, it exits with 1. |
100 |
+# |
101 |
+# The plan is that this can be called by configure scripts if you |
102 |
+# don't specify an explicit build system type. |
103 |
+ |
104 |
+me=`echo "$0" | sed -e 's,.*/,,'` |
105 |
+ |
106 |
+usage="\ |
107 |
+Usage: $0 [OPTION] |
108 |
+ |
109 |
+Output the configuration name of the system \`$me' is run on. |
110 |
+ |
111 |
+Operation modes: |
112 |
+ -h, --help print this help, then exit |
113 |
+ -t, --time-stamp print date of last modification, then exit |
114 |
+ -v, --version print version number, then exit |
115 |
+ |
116 |
+Report bugs and patches to <config-patches@gnu.org>." |
117 |
+ |
118 |
+version="\ |
119 |
+GNU config.guess ($timestamp) |
120 |
+ |
121 |
+Originally written by Per Bothner. |
122 |
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 |
123 |
+Free Software Foundation, Inc. |
124 |
+ |
125 |
+This is free software; see the source for copying conditions. There is NO |
126 |
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
127 |
+ |
128 |
+help=" |
129 |
+Try \`$me --help' for more information." |
130 |
+ |
131 |
+# Parse command line |
132 |
+while test $# -gt 0 ; do |
133 |
+ case $1 in |
134 |
+ --time-stamp | --time* | -t ) |
135 |
+ echo "$timestamp" ; exit 0 ;; |
136 |
+ --version | -v ) |
137 |
+ echo "$version" ; exit 0 ;; |
138 |
+ --help | --h* | -h ) |
139 |
+ echo "$usage"; exit 0 ;; |
140 |
+ -- ) # Stop option processing |
141 |
+ shift; break ;; |
142 |
+ - ) # Use stdin as input. |
143 |
+ break ;; |
144 |
+ -* ) |
145 |
+ echo "$me: invalid option $1$help" >&2 |
146 |
+ exit 1 ;; |
147 |
+ * ) |
148 |
+ break ;; |
149 |
+ esac |
150 |
+done |
151 |
+ |
152 |
+if test $# != 0; then |
153 |
+ echo "$me: too many arguments$help" >&2 |
154 |
+ exit 1 |
155 |
+fi |
156 |
+ |
157 |
+trap 'exit 1' 1 2 15 |
158 |
+ |
159 |
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
160 |
+# compiler to aid in system detection is discouraged as it requires |
161 |
+# temporary files to be created and, as you can see below, it is a |
162 |
+# headache to deal with in a portable fashion. |
163 |
+ |
164 |
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still |
165 |
+# use `HOST_CC' if defined, but it is deprecated. |
166 |
+ |
167 |
+# Portable tmp directory creation inspired by the Autoconf team. |
168 |
+ |
169 |
+set_cc_for_build=' |
170 |
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; |
171 |
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; |
172 |
+: ${TMPDIR=/tmp} ; |
173 |
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || |
174 |
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || |
175 |
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || |
176 |
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; |
177 |
+dummy=$tmp/dummy ; |
178 |
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; |
179 |
+case $CC_FOR_BUILD,$HOST_CC,$CC in |
180 |
+ ,,) echo "int x;" > $dummy.c ; |
181 |
+ for c in cc gcc c89 c99 ; do |
182 |
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then |
183 |
+ CC_FOR_BUILD="$c"; break ; |
184 |
+ fi ; |
185 |
+ done ; |
186 |
+ if test x"$CC_FOR_BUILD" = x ; then |
187 |
+ CC_FOR_BUILD=no_compiler_found ; |
188 |
+ fi |
189 |
+ ;; |
190 |
+ ,,*) CC_FOR_BUILD=$CC ;; |
191 |
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;; |
192 |
+esac ;' |
193 |
+ |
194 |
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
195 |
+# (ghazi@noc.rutgers.edu 1994-08-24) |
196 |
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then |
197 |
+ PATH=$PATH:/.attbin ; export PATH |
198 |
+fi |
199 |
+ |
200 |
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
201 |
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
202 |
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
203 |
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
204 |
+ |
205 |
+# Note: order is significant - the case branches are not exclusive. |
206 |
+ |
207 |
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
208 |
+ *:NetBSD:*:*) |
209 |
+ # NetBSD (nbsd) targets should (where applicable) match one or |
210 |
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, |
211 |
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
212 |
+ # switched to ELF, *-*-netbsd* would select the old |
213 |
+ # object file format. This provides both forward |
214 |
+ # compatibility and a consistent mechanism for selecting the |
215 |
+ # object file format. |
216 |
+ # |
217 |
+ # Note: NetBSD doesn't particularly care about the vendor |
218 |
+ # portion of the name. We always set it to "unknown". |
219 |
+ sysctl="sysctl -n hw.machine_arch" |
220 |
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ |
221 |
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` |
222 |
+ case "${UNAME_MACHINE_ARCH}" in |
223 |
+ armeb) machine=armeb-unknown ;; |
224 |
+ arm*) machine=arm-unknown ;; |
225 |
+ sh3el) machine=shl-unknown ;; |
226 |
+ sh3eb) machine=sh-unknown ;; |
227 |
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;; |
228 |
+ esac |
229 |
+ # The Operating System including object format, if it has switched |
230 |
+ # to ELF recently, or will in the future. |
231 |
+ case "${UNAME_MACHINE_ARCH}" in |
232 |
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
233 |
+ eval $set_cc_for_build |
234 |
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
235 |
+ | grep __ELF__ >/dev/null |
236 |
+ then |
237 |
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). |
238 |
+ # Return netbsd for either. FIX? |
239 |
+ os=netbsd |
240 |
+ else |
241 |
+ os=netbsdelf |
242 |
+ fi |
243 |
+ ;; |
244 |
+ *) |
245 |
+ os=netbsd |
246 |
+ ;; |
247 |
+ esac |
248 |
+ # The OS release |
249 |
+ # Debian GNU/NetBSD machines have a different userland, and |
250 |
+ # thus, need a distinct triplet. However, they do not need |
251 |
+ # kernel version information, so it can be replaced with a |
252 |
+ # suitable tag, in the style of linux-gnu. |
253 |
+ case "${UNAME_VERSION}" in |
254 |
+ Debian*) |
255 |
+ release='-gnu' |
256 |
+ ;; |
257 |
+ *) |
258 |
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
259 |
+ ;; |
260 |
+ esac |
261 |
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
262 |
+ # contains redundant information, the shorter form: |
263 |
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
264 |
+ echo "${machine}-${os}${release}" |
265 |
+ exit 0 ;; |
266 |
+ amiga:OpenBSD:*:*) |
267 |
+ echo m68k-unknown-openbsd${UNAME_RELEASE} |
268 |
+ exit 0 ;; |
269 |
+ arc:OpenBSD:*:*) |
270 |
+ echo mipsel-unknown-openbsd${UNAME_RELEASE} |
271 |
+ exit 0 ;; |
272 |
+ hp300:OpenBSD:*:*) |
273 |
+ echo m68k-unknown-openbsd${UNAME_RELEASE} |
274 |
+ exit 0 ;; |
275 |
+ mac68k:OpenBSD:*:*) |
276 |
+ echo m68k-unknown-openbsd${UNAME_RELEASE} |
277 |
+ exit 0 ;; |
278 |
+ macppc:OpenBSD:*:*) |
279 |
+ echo powerpc-unknown-openbsd${UNAME_RELEASE} |
280 |
+ exit 0 ;; |
281 |
+ mvme68k:OpenBSD:*:*) |
282 |
+ echo m68k-unknown-openbsd${UNAME_RELEASE} |
283 |
+ exit 0 ;; |
284 |
+ mvme88k:OpenBSD:*:*) |
285 |
+ echo m88k-unknown-openbsd${UNAME_RELEASE} |
286 |
+ exit 0 ;; |
287 |
+ mvmeppc:OpenBSD:*:*) |
288 |
+ echo powerpc-unknown-openbsd${UNAME_RELEASE} |
289 |
+ exit 0 ;; |
290 |
+ pmax:OpenBSD:*:*) |
291 |
+ echo mipsel-unknown-openbsd${UNAME_RELEASE} |
292 |
+ exit 0 ;; |
293 |
+ sgi:OpenBSD:*:*) |
294 |
+ echo mipseb-unknown-openbsd${UNAME_RELEASE} |
295 |
+ exit 0 ;; |
296 |
+ sun3:OpenBSD:*:*) |
297 |
+ echo m68k-unknown-openbsd${UNAME_RELEASE} |
298 |
+ exit 0 ;; |
299 |
+ wgrisc:OpenBSD:*:*) |
300 |
+ echo mipsel-unknown-openbsd${UNAME_RELEASE} |
301 |
+ exit 0 ;; |
302 |
+ *:OpenBSD:*:*) |
303 |
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} |
304 |
+ exit 0 ;; |
305 |
+ alpha:OSF1:*:*) |
306 |
+ if test $UNAME_RELEASE = "V4.0"; then |
307 |
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
308 |
+ fi |
309 |
+ # According to Compaq, /usr/sbin/psrinfo has been available on |
310 |
+ # OSF/1 and Tru64 systems produced since 1995. I hope that |
311 |
+ # covers most systems running today. This code pipes the CPU |
312 |
+ # types through head -n 1, so we only detect the type of CPU 0. |
313 |
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
314 |
+ case "$ALPHA_CPU_TYPE" in |
315 |
+ "EV4 (21064)") |
316 |
+ UNAME_MACHINE="alpha" ;; |
317 |
+ "EV4.5 (21064)") |
318 |
+ UNAME_MACHINE="alpha" ;; |
319 |
+ "LCA4 (21066/21068)") |
320 |
+ UNAME_MACHINE="alpha" ;; |
321 |
+ "EV5 (21164)") |
322 |
+ UNAME_MACHINE="alphaev5" ;; |
323 |
+ "EV5.6 (21164A)") |
324 |
+ UNAME_MACHINE="alphaev56" ;; |
325 |
+ "EV5.6 (21164PC)") |
326 |
+ UNAME_MACHINE="alphapca56" ;; |
327 |
+ "EV5.7 (21164PC)") |
328 |
+ UNAME_MACHINE="alphapca57" ;; |
329 |
+ "EV6 (21264)") |
330 |
+ UNAME_MACHINE="alphaev6" ;; |
331 |
+ "EV6.7 (21264A)") |
332 |
+ UNAME_MACHINE="alphaev67" ;; |
333 |
+ "EV6.8CB (21264C)") |
334 |
+ UNAME_MACHINE="alphaev68" ;; |
335 |
+ "EV6.8AL (21264B)") |
336 |
+ UNAME_MACHINE="alphaev68" ;; |
337 |
+ "EV6.8CX (21264D)") |
338 |
+ UNAME_MACHINE="alphaev68" ;; |
339 |
+ "EV6.9A (21264/EV69A)") |
340 |
+ UNAME_MACHINE="alphaev69" ;; |
341 |
+ "EV7 (21364)") |
342 |
+ UNAME_MACHINE="alphaev7" ;; |
343 |
+ "EV7.9 (21364A)") |
344 |
+ UNAME_MACHINE="alphaev79" ;; |
345 |
+ esac |
346 |
+ # A Vn.n version is a released version. |
347 |
+ # A Tn.n version is a released field test version. |
348 |
+ # A Xn.n version is an unreleased experimental baselevel. |
349 |
+ # 1.2 uses "1.2" for uname -r. |
350 |
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
351 |
+ exit 0 ;; |
352 |
+ Alpha*:OpenVMS:*:*) |
353 |
+ echo alpha-hp-vms |
354 |
+ exit 0 ;; |
355 |
+ Alpha\ *:Windows_NT*:*) |
356 |
+ # How do we know it's Interix rather than the generic POSIX subsystem? |
357 |
+ # Should we change UNAME_MACHINE based on the output of uname instead |
358 |
+ # of the specific Alpha model? |
359 |
+ echo alpha-pc-interix |
360 |
+ exit 0 ;; |
361 |
+ 21064:Windows_NT:50:3) |
362 |
+ echo alpha-dec-winnt3.5 |
363 |
+ exit 0 ;; |
364 |
+ Amiga*:UNIX_System_V:4.0:*) |
365 |
+ echo m68k-unknown-sysv4 |
366 |
+ exit 0;; |
367 |
+ *:[Aa]miga[Oo][Ss]:*:*) |
368 |
+ echo ${UNAME_MACHINE}-unknown-amigaos |
369 |
+ exit 0 ;; |
370 |
+ *:[Mm]orph[Oo][Ss]:*:*) |
371 |
+ echo ${UNAME_MACHINE}-unknown-morphos |
372 |
+ exit 0 ;; |
373 |
+ *:OS/390:*:*) |
374 |
+ echo i370-ibm-openedition |
375 |
+ exit 0 ;; |
376 |
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
377 |
+ echo arm-acorn-riscix${UNAME_RELEASE} |
378 |
+ exit 0;; |
379 |
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
380 |
+ echo hppa1.1-hitachi-hiuxmpp |
381 |
+ exit 0;; |
382 |
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
383 |
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. |
384 |
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then |
385 |
+ echo pyramid-pyramid-sysv3 |
386 |
+ else |
387 |
+ echo pyramid-pyramid-bsd |
388 |
+ fi |
389 |
+ exit 0 ;; |
390 |
+ NILE*:*:*:dcosx) |
391 |
+ echo pyramid-pyramid-svr4 |
392 |
+ exit 0 ;; |
393 |
+ DRS?6000:unix:4.0:6*) |
394 |
+ echo sparc-icl-nx6 |
395 |
+ exit 0 ;; |
396 |
+ DRS?6000:UNIX_SV:4.2*:7*) |
397 |
+ case `/usr/bin/uname -p` in |
398 |
+ sparc) echo sparc-icl-nx7 && exit 0 ;; |
399 |
+ esac ;; |
400 |
+ sun4H:SunOS:5.*:*) |
401 |
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
402 |
+ exit 0 ;; |
403 |
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
404 |
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
405 |
+ exit 0 ;; |
406 |
+ i86pc:SunOS:5.*:*) |
407 |
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
408 |
+ exit 0 ;; |
409 |
+ sun4*:SunOS:6*:*) |
410 |
+ # According to config.sub, this is the proper way to canonicalize |
411 |
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
412 |
+ # it's likely to be more like Solaris than SunOS4. |
413 |
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
414 |
+ exit 0 ;; |
415 |
+ sun4*:SunOS:*:*) |
416 |
+ case "`/usr/bin/arch -k`" in |
417 |
+ Series*|S4*) |
418 |
+ UNAME_RELEASE=`uname -v` |
419 |
+ ;; |
420 |
+ esac |
421 |
+ # Japanese Language versions have a version number like `4.1.3-JL'. |
422 |
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` |
423 |
+ exit 0 ;; |
424 |
+ sun3*:SunOS:*:*) |
425 |
+ echo m68k-sun-sunos${UNAME_RELEASE} |
426 |
+ exit 0 ;; |
427 |
+ sun*:*:4.2BSD:*) |
428 |
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
429 |
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 |
430 |
+ case "`/bin/arch`" in |
431 |
+ sun3) |
432 |
+ echo m68k-sun-sunos${UNAME_RELEASE} |
433 |
+ ;; |
434 |
+ sun4) |
435 |
+ echo sparc-sun-sunos${UNAME_RELEASE} |
436 |
+ ;; |
437 |
+ esac |
438 |
+ exit 0 ;; |
439 |
+ aushp:SunOS:*:*) |
440 |
+ echo sparc-auspex-sunos${UNAME_RELEASE} |
441 |
+ exit 0 ;; |
442 |
+ # The situation for MiNT is a little confusing. The machine name |
443 |
+ # can be virtually everything (everything which is not |
444 |
+ # "atarist" or "atariste" at least should have a processor |
445 |
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT" |
446 |
+ # to the lowercase version "mint" (or "freemint"). Finally |
447 |
+ # the system name "TOS" denotes a system which is actually not |
448 |
+ # MiNT. But MiNT is downward compatible to TOS, so this should |
449 |
+ # be no problem. |
450 |
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
451 |
+ echo m68k-atari-mint${UNAME_RELEASE} |
452 |
+ exit 0 ;; |
453 |
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
454 |
+ echo m68k-atari-mint${UNAME_RELEASE} |
455 |
+ exit 0 ;; |
456 |
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
457 |
+ echo m68k-atari-mint${UNAME_RELEASE} |
458 |
+ exit 0 ;; |
459 |
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
460 |
+ echo m68k-milan-mint${UNAME_RELEASE} |
461 |
+ exit 0 ;; |
462 |
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
463 |
+ echo m68k-hades-mint${UNAME_RELEASE} |
464 |
+ exit 0 ;; |
465 |
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
466 |
+ echo m68k-unknown-mint${UNAME_RELEASE} |
467 |
+ exit 0 ;; |
468 |
+ powerpc:machten:*:*) |
469 |
+ echo powerpc-apple-machten${UNAME_RELEASE} |
470 |
+ exit 0 ;; |
471 |
+ RISC*:Mach:*:*) |
472 |
+ echo mips-dec-mach_bsd4.3 |
473 |
+ exit 0 ;; |
474 |
+ RISC*:ULTRIX:*:*) |
475 |
+ echo mips-dec-ultrix${UNAME_RELEASE} |
476 |
+ exit 0 ;; |
477 |
+ VAX*:ULTRIX*:*:*) |
478 |
+ echo vax-dec-ultrix${UNAME_RELEASE} |
479 |
+ exit 0 ;; |
480 |
+ 2020:CLIX:*:* | 2430:CLIX:*:*) |
481 |
+ echo clipper-intergraph-clix${UNAME_RELEASE} |
482 |
+ exit 0 ;; |
483 |
+ mips:*:*:UMIPS | mips:*:*:RISCos) |
484 |
+ eval $set_cc_for_build |
485 |
+ sed 's/^ //' << EOF >$dummy.c |
486 |
+#ifdef __cplusplus |
487 |
+#include <stdio.h> /* for printf() prototype */ |
488 |
+ int main (int argc, char *argv[]) { |
489 |
+#else |
490 |
+ int main (argc, argv) int argc; char *argv[]; { |
491 |
+#endif |
492 |
+ #if defined (host_mips) && defined (MIPSEB) |
493 |
+ #if defined (SYSTYPE_SYSV) |
494 |
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); |
495 |
+ #endif |
496 |
+ #if defined (SYSTYPE_SVR4) |
497 |
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); |
498 |
+ #endif |
499 |
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) |
500 |
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); |
501 |
+ #endif |
502 |
+ #endif |
503 |
+ exit (-1); |
504 |
+ } |
505 |
+EOF |
506 |
+ $CC_FOR_BUILD -o $dummy $dummy.c \ |
507 |
+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ |
508 |
+ && exit 0 |
509 |
+ echo mips-mips-riscos${UNAME_RELEASE} |
510 |
+ exit 0 ;; |
511 |
+ Motorola:PowerMAX_OS:*:*) |
512 |
+ echo powerpc-motorola-powermax |
513 |
+ exit 0 ;; |
514 |
+ Motorola:*:4.3:PL8-*) |
515 |
+ echo powerpc-harris-powermax |
516 |
+ exit 0 ;; |
517 |
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
518 |
+ echo powerpc-harris-powermax |
519 |
+ exit 0 ;; |
520 |
+ Night_Hawk:Power_UNIX:*:*) |
521 |
+ echo powerpc-harris-powerunix |
522 |
+ exit 0 ;; |
523 |
+ m88k:CX/UX:7*:*) |
524 |
+ echo m88k-harris-cxux7 |
525 |
+ exit 0 ;; |
526 |
+ m88k:*:4*:R4*) |
527 |
+ echo m88k-motorola-sysv4 |
528 |
+ exit 0 ;; |
529 |
+ m88k:*:3*:R3*) |
530 |
+ echo m88k-motorola-sysv3 |
531 |
+ exit 0 ;; |
532 |
+ AViiON:dgux:*:*) |
533 |
+ # DG/UX returns AViiON for all architectures |
534 |
+ UNAME_PROCESSOR=`/usr/bin/uname -p` |
535 |
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] |
536 |
+ then |
537 |
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ |
538 |
+ [ ${TARGET_BINARY_INTERFACE}x = x ] |
539 |
+ then |
540 |
+ echo m88k-dg-dgux${UNAME_RELEASE} |
541 |
+ else |
542 |
+ echo m88k-dg-dguxbcs${UNAME_RELEASE} |
543 |
+ fi |
544 |
+ else |
545 |
+ echo i586-dg-dgux${UNAME_RELEASE} |
546 |
+ fi |
547 |
+ exit 0 ;; |
548 |
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
549 |
+ echo m88k-dolphin-sysv3 |
550 |
+ exit 0 ;; |
551 |
+ M88*:*:R3*:*) |
552 |
+ # Delta 88k system running SVR3 |
553 |
+ echo m88k-motorola-sysv3 |
554 |
+ exit 0 ;; |
555 |
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
556 |
+ echo m88k-tektronix-sysv3 |
557 |
+ exit 0 ;; |
558 |
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
559 |
+ echo m68k-tektronix-bsd |
560 |
+ exit 0 ;; |
561 |
+ *:IRIX*:*:*) |
562 |
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` |
563 |
+ exit 0 ;; |
564 |
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
565 |
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
566 |
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' |
567 |
+ i*86:AIX:*:*) |
568 |
+ echo i386-ibm-aix |
569 |
+ exit 0 ;; |
570 |
+ ia64:AIX:*:*) |
571 |
+ if [ -x /usr/bin/oslevel ] ; then |
572 |
+ IBM_REV=`/usr/bin/oslevel` |
573 |
+ else |
574 |
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
575 |
+ fi |
576 |
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} |
577 |
+ exit 0 ;; |
578 |
+ *:AIX:2:3) |
579 |
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
580 |
+ eval $set_cc_for_build |
581 |
+ sed 's/^ //' << EOF >$dummy.c |
582 |
+ #include <sys/systemcfg.h> |
583 |
+ |
584 |
+ main() |
585 |
+ { |
586 |
+ if (!__power_pc()) |
587 |
+ exit(1); |
588 |
+ puts("powerpc-ibm-aix3.2.5"); |
589 |
+ exit(0); |
590 |
+ } |
591 |
+EOF |
592 |
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 |
593 |
+ echo rs6000-ibm-aix3.2.5 |
594 |
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
595 |
+ echo rs6000-ibm-aix3.2.4 |
596 |
+ else |
597 |
+ echo rs6000-ibm-aix3.2 |
598 |
+ fi |
599 |
+ exit 0 ;; |
600 |
+ *:AIX:*:[45]) |
601 |
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
602 |
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then |
603 |
+ IBM_ARCH=rs6000 |
604 |
+ else |
605 |
+ IBM_ARCH=powerpc |
606 |
+ fi |
607 |
+ if [ -x /usr/bin/oslevel ] ; then |
608 |
+ IBM_REV=`/usr/bin/oslevel` |
609 |
+ else |
610 |
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
611 |
+ fi |
612 |
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV} |
613 |
+ exit 0 ;; |
614 |
+ *:AIX:*:*) |
615 |
+ echo rs6000-ibm-aix |
616 |
+ exit 0 ;; |
617 |
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*) |
618 |
+ echo romp-ibm-bsd4.4 |
619 |
+ exit 0 ;; |
620 |
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
621 |
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to |
622 |
+ exit 0 ;; # report: romp-ibm BSD 4.3 |
623 |
+ *:BOSX:*:*) |
624 |
+ echo rs6000-bull-bosx |
625 |
+ exit 0 ;; |
626 |
+ DPX/2?00:B.O.S.:*:*) |
627 |
+ echo m68k-bull-sysv3 |
628 |
+ exit 0 ;; |
629 |
+ 9000/[34]??:4.3bsd:1.*:*) |
630 |
+ echo m68k-hp-bsd |
631 |
+ exit 0 ;; |
632 |
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
633 |
+ echo m68k-hp-bsd4.4 |
634 |
+ exit 0 ;; |
635 |
+ 9000/[34678]??:HP-UX:*:*) |
636 |
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
637 |
+ case "${UNAME_MACHINE}" in |
638 |
+ 9000/31? ) HP_ARCH=m68000 ;; |
639 |
+ 9000/[34]?? ) HP_ARCH=m68k ;; |
640 |
+ 9000/[678][0-9][0-9]) |
641 |
+ if [ -x /usr/bin/getconf ]; then |
642 |
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
643 |
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
644 |
+ case "${sc_cpu_version}" in |
645 |
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 |
646 |
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 |
647 |
+ 532) # CPU_PA_RISC2_0 |
648 |
+ case "${sc_kernel_bits}" in |
649 |
+ 32) HP_ARCH="hppa2.0n" ;; |
650 |
+ 64) HP_ARCH="hppa2.0w" ;; |
651 |
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 |
652 |
+ esac ;; |
653 |
+ esac |
654 |
+ fi |
655 |
+ if [ "${HP_ARCH}" = "" ]; then |
656 |
+ eval $set_cc_for_build |
657 |
+ sed 's/^ //' << EOF >$dummy.c |
658 |
+ |
659 |
+ #define _HPUX_SOURCE |
660 |
+ #include <stdlib.h> |
661 |
+ #include <unistd.h> |
662 |
+ |
663 |
+ int main () |
664 |
+ { |
665 |
+ #if defined(_SC_KERNEL_BITS) |
666 |
+ long bits = sysconf(_SC_KERNEL_BITS); |
667 |
+ #endif |
668 |
+ long cpu = sysconf (_SC_CPU_VERSION); |
669 |
+ |
670 |
+ switch (cpu) |
671 |
+ { |
672 |
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; |
673 |
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; |
674 |
+ case CPU_PA_RISC2_0: |
675 |
+ #if defined(_SC_KERNEL_BITS) |
676 |
+ switch (bits) |
677 |
+ { |
678 |
+ case 64: puts ("hppa2.0w"); break; |
679 |
+ case 32: puts ("hppa2.0n"); break; |
680 |
+ default: puts ("hppa2.0"); break; |
681 |
+ } break; |
682 |
+ #else /* !defined(_SC_KERNEL_BITS) */ |
683 |
+ puts ("hppa2.0"); break; |
684 |
+ #endif |
685 |
+ default: puts ("hppa1.0"); break; |
686 |
+ } |
687 |
+ exit (0); |
688 |
+ } |
689 |
+EOF |
690 |
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
691 |
+ test -z "$HP_ARCH" && HP_ARCH=hppa |
692 |
+ fi ;; |
693 |
+ esac |
694 |
+ if [ ${HP_ARCH} = "hppa2.0w" ] |
695 |
+ then |
696 |
+ # avoid double evaluation of $set_cc_for_build |
697 |
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build |
698 |
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null |
699 |
+ then |
700 |
+ HP_ARCH="hppa2.0w" |
701 |
+ else |
702 |
+ HP_ARCH="hppa64" |
703 |
+ fi |
704 |
+ fi |
705 |
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
706 |
+ exit 0 ;; |
707 |
+ ia64:HP-UX:*:*) |
708 |
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
709 |
+ echo ia64-hp-hpux${HPUX_REV} |
710 |
+ exit 0 ;; |
711 |
+ 3050*:HI-UX:*:*) |
712 |
+ eval $set_cc_for_build |
713 |
+ sed 's/^ //' << EOF >$dummy.c |
714 |
+ #include <unistd.h> |
715 |
+ int |
716 |
+ main () |
717 |
+ { |
718 |
+ long cpu = sysconf (_SC_CPU_VERSION); |
719 |
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns |
720 |
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct |
721 |
+ results, however. */ |
722 |
+ if (CPU_IS_PA_RISC (cpu)) |
723 |
+ { |
724 |
+ switch (cpu) |
725 |
+ { |
726 |
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; |
727 |
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; |
728 |
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; |
729 |
+ default: puts ("hppa-hitachi-hiuxwe2"); break; |
730 |
+ } |
731 |
+ } |
732 |
+ else if (CPU_IS_HP_MC68K (cpu)) |
733 |
+ puts ("m68k-hitachi-hiuxwe2"); |
734 |
+ else puts ("unknown-hitachi-hiuxwe2"); |
735 |
+ exit (0); |
736 |
+ } |
737 |
+EOF |
738 |
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 |
739 |
+ echo unknown-hitachi-hiuxwe2 |
740 |
+ exit 0 ;; |
741 |
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) |
742 |
+ echo hppa1.1-hp-bsd |
743 |
+ exit 0 ;; |
744 |
+ 9000/8??:4.3bsd:*:*) |
745 |
+ echo hppa1.0-hp-bsd |
746 |
+ exit 0 ;; |
747 |
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
748 |
+ echo hppa1.0-hp-mpeix |
749 |
+ exit 0 ;; |
750 |
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) |
751 |
+ echo hppa1.1-hp-osf |
752 |
+ exit 0 ;; |
753 |
+ hp8??:OSF1:*:*) |
754 |
+ echo hppa1.0-hp-osf |
755 |
+ exit 0 ;; |
756 |
+ i*86:OSF1:*:*) |
757 |
+ if [ -x /usr/sbin/sysversion ] ; then |
758 |
+ echo ${UNAME_MACHINE}-unknown-osf1mk |
759 |
+ else |
760 |
+ echo ${UNAME_MACHINE}-unknown-osf1 |
761 |
+ fi |
762 |
+ exit 0 ;; |
763 |
+ parisc*:Lites*:*:*) |
764 |
+ echo hppa1.1-hp-lites |
765 |
+ exit 0 ;; |
766 |
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
767 |
+ echo c1-convex-bsd |
768 |
+ exit 0 ;; |
769 |
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
770 |
+ if getsysinfo -f scalar_acc |
771 |
+ then echo c32-convex-bsd |
772 |
+ else echo c2-convex-bsd |
773 |
+ fi |
774 |
+ exit 0 ;; |
775 |
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
776 |
+ echo c34-convex-bsd |
777 |
+ exit 0 ;; |
778 |
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
779 |
+ echo c38-convex-bsd |
780 |
+ exit 0 ;; |
781 |
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
782 |
+ echo c4-convex-bsd |
783 |
+ exit 0 ;; |
784 |
+ CRAY*Y-MP:*:*:*) |
785 |
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
786 |
+ exit 0 ;; |
787 |
+ CRAY*[A-Z]90:*:*:*) |
788 |
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ |
789 |
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
790 |
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
791 |
+ -e 's/\.[^.]*$/.X/' |
792 |
+ exit 0 ;; |
793 |
+ CRAY*TS:*:*:*) |
794 |
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
795 |
+ exit 0 ;; |
796 |
+ CRAY*T3E:*:*:*) |
797 |
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
798 |
+ exit 0 ;; |
799 |
+ CRAY*SV1:*:*:*) |
800 |
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
801 |
+ exit 0 ;; |
802 |
+ *:UNICOS/mp:*:*) |
803 |
+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
804 |
+ exit 0 ;; |
805 |
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
806 |
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
807 |
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
808 |
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
809 |
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
810 |
+ exit 0 ;; |
811 |
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
812 |
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
813 |
+ exit 0 ;; |
814 |
+ sparc*:BSD/OS:*:*) |
815 |
+ echo sparc-unknown-bsdi${UNAME_RELEASE} |
816 |
+ exit 0 ;; |
817 |
+ *:BSD/OS:*:*) |
818 |
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |
819 |
+ exit 0 ;; |
820 |
+ *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) |
821 |
+ # Determine whether the default compiler uses glibc. |
822 |
+ eval $set_cc_for_build |
823 |
+ sed 's/^ //' << EOF >$dummy.c |
824 |
+ #include <features.h> |
825 |
+ #if __GLIBC__ >= 2 |
826 |
+ LIBC=gnu |
827 |
+ #else |
828 |
+ LIBC= |
829 |
+ #endif |
830 |
+EOF |
831 |
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` |
832 |
+ # GNU/FreeBSD systems have a "k" prefix to indicate we are using |
833 |
+ # FreeBSD's kernel, but not the complete OS. |
834 |
+ case ${LIBC} in gnu) kernel_only='k' ;; esac |
835 |
+ echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} |
836 |
+ exit 0 ;; |
837 |
+ i*:CYGWIN*:*) |
838 |
+ echo ${UNAME_MACHINE}-pc-cygwin |
839 |
+ exit 0 ;; |
840 |
+ i*:MINGW*:*) |
841 |
+ echo ${UNAME_MACHINE}-pc-mingw32 |
842 |
+ exit 0 ;; |
843 |
+ i*:PW*:*) |
844 |
+ echo ${UNAME_MACHINE}-pc-pw32 |
845 |
+ exit 0 ;; |
846 |
+ x86:Interix*:[34]*) |
847 |
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' |
848 |
+ exit 0 ;; |
849 |
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) |
850 |
+ echo i${UNAME_MACHINE}-pc-mks |
851 |
+ exit 0 ;; |
852 |
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*) |
853 |
+ # How do we know it's Interix rather than the generic POSIX subsystem? |
854 |
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we |
855 |
+ # UNAME_MACHINE based on the output of uname instead of i386? |
856 |
+ echo i586-pc-interix |
857 |
+ exit 0 ;; |
858 |
+ i*:UWIN*:*) |
859 |
+ echo ${UNAME_MACHINE}-pc-uwin |
860 |
+ exit 0 ;; |
861 |
+ p*:CYGWIN*:*) |
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 |
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
869 |
+ exit 0 ;; |
870 |
+ i*86:Minix:*:*) |
871 |
+ echo ${UNAME_MACHINE}-pc-minix |
872 |
+ exit 0 ;; |
873 |
+ arm*:Linux:*:*) |
874 |
+ echo ${UNAME_MACHINE}-unknown-linux-gnu |
875 |
+ exit 0 ;; |
876 |
+ cris:Linux:*:*) |
877 |
+ echo cris-axis-linux-gnu |
878 |
+ exit 0 ;; |
879 |
+ ia64:Linux:*:*) |
880 |
+ echo ${UNAME_MACHINE}-unknown-linux-gnu |
881 |
+ exit 0 ;; |
882 |
+ m68*:Linux:*:*) |
883 |
+ echo ${UNAME_MACHINE}-unknown-linux-gnu |
884 |
+ exit 0 ;; |
885 |
+ mips:Linux:*:*) |
886 |
+ eval $set_cc_for_build |
887 |
+ sed 's/^ //' << EOF >$dummy.c |
888 |
+ #undef CPU |
889 |
+ #undef mips |
890 |
+ #undef mipsel |
891 |
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
892 |
+ CPU=mipsel |
893 |
+ #else |
894 |
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
895 |
+ CPU=mips |
896 |
+ #else |
897 |
+ CPU= |
898 |
+ #endif |
899 |
+ #endif |
900 |
+EOF |
901 |
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` |
902 |
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 |
903 |
+ ;; |
904 |
+ mips64:Linux:*:*) |
905 |
+ eval $set_cc_for_build |
906 |
+ sed 's/^ //' << EOF >$dummy.c |
907 |
+ #undef CPU |
908 |
+ #undef mips64 |
909 |
+ #undef mips64el |
910 |
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
911 |
+ CPU=mips64el |
912 |
+ #else |
913 |
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
914 |
+ CPU=mips64 |
915 |
+ #else |
916 |
+ CPU= |
917 |
+ #endif |
918 |
+ #endif |
919 |
+EOF |
920 |
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` |
921 |
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 |
922 |
+ ;; |
923 |
+ ppc:Linux:*:*) |
924 |
+ echo powerpc-unknown-linux-gnu |
925 |
+ exit 0 ;; |
926 |
+ ppc64:Linux:*:*) |
927 |
+ echo powerpc64-unknown-linux-gnu |
928 |
+ exit 0 ;; |
929 |
+ alpha:Linux:*:*) |
930 |
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
931 |
+ EV5) UNAME_MACHINE=alphaev5 ;; |
932 |
+ EV56) UNAME_MACHINE=alphaev56 ;; |
933 |
+ PCA56) UNAME_MACHINE=alphapca56 ;; |
934 |
+ PCA57) UNAME_MACHINE=alphapca56 ;; |
935 |
+ EV6) UNAME_MACHINE=alphaev6 ;; |
936 |
+ EV67) UNAME_MACHINE=alphaev67 ;; |
937 |
+ EV68*) UNAME_MACHINE=alphaev68 ;; |
938 |
+ esac |
939 |
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null |
940 |
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi |
941 |
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} |
942 |
+ exit 0 ;; |
943 |
+ parisc:Linux:*:* | hppa:Linux:*:*) |
944 |
+ # Look for CPU level |
945 |
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
946 |
+ PA7*) echo hppa1.1-unknown-linux-gnu ;; |
947 |
+ PA8*) echo hppa2.0-unknown-linux-gnu ;; |
948 |
+ *) echo hppa-unknown-linux-gnu ;; |
949 |
+ esac |
950 |
+ exit 0 ;; |
951 |
+ parisc64:Linux:*:* | hppa64:Linux:*:*) |
952 |
+ echo hppa64-unknown-linux-gnu |
953 |
+ exit 0 ;; |
954 |
+ s390:Linux:*:* | s390x:Linux:*:*) |
955 |
+ echo ${UNAME_MACHINE}-ibm-linux |
956 |
+ exit 0 ;; |
957 |
+ sh64*:Linux:*:*) |
958 |
+ echo ${UNAME_MACHINE}-unknown-linux-gnu |
959 |
+ exit 0 ;; |
960 |
+ sh*:Linux:*:*) |
961 |
+ echo ${UNAME_MACHINE}-unknown-linux-gnu |
962 |
+ exit 0 ;; |
963 |
+ sparc:Linux:*:* | sparc64:Linux:*:*) |
964 |
+ echo ${UNAME_MACHINE}-unknown-linux-gnu |
965 |
+ exit 0 ;; |
966 |
+ x86_64:Linux:*:*) |
967 |
+ echo x86_64-unknown-linux-gnu |
968 |
+ exit 0 ;; |
969 |
+ i*86:Linux:*:*) |
970 |
+ # The BFD linker knows what the default object file format is, so |
971 |
+ # first see if it will tell us. cd to the root directory to prevent |
972 |
+ # problems with other programs or directories called `ld' in the path. |
973 |
+ # Set LC_ALL=C to ensure ld outputs messages in English. |
974 |
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ |
975 |
+ | sed -ne '/supported targets:/!d |
976 |
+ s/[ ][ ]*/ /g |
977 |
+ s/.*supported targets: *// |
978 |
+ s/ .*// |
979 |
+ p'` |
980 |
+ case "$ld_supported_targets" in |
981 |
+ elf32-i386) |
982 |
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" |
983 |
+ ;; |
984 |
+ a.out-i386-linux) |
985 |
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout" |
986 |
+ exit 0 ;; |
987 |
+ coff-i386) |
988 |
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff" |
989 |
+ exit 0 ;; |
990 |
+ "") |
991 |
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or |
992 |
+ # one that does not give us useful --help. |
993 |
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld" |
994 |
+ exit 0 ;; |
995 |
+ esac |
996 |
+ # Determine whether the default compiler is a.out or elf |
997 |
+ eval $set_cc_for_build |
998 |
+ sed 's/^ //' << EOF >$dummy.c |
999 |
+ #include <features.h> |
1000 |
+ #ifdef __ELF__ |
1001 |
+ # ifdef __GLIBC__ |
1002 |
+ # if __GLIBC__ >= 2 |
1003 |
+ LIBC=gnu |
1004 |
+ # else |
1005 |
+ LIBC=gnulibc1 |
1006 |
+ # endif |
1007 |
+ # else |
1008 |
+ LIBC=gnulibc1 |
1009 |
+ # endif |
1010 |
+ #else |
1011 |
+ #ifdef __INTEL_COMPILER |
1012 |
+ LIBC=gnu |
1013 |
+ #else |
1014 |
+ LIBC=gnuaout |
1015 |
+ #endif |
1016 |
+ #endif |
1017 |
+EOF |
1018 |
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` |
1019 |
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 |
1020 |
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 |
1021 |
+ ;; |
1022 |
+ i*86:DYNIX/ptx:4*:*) |
1023 |
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1024 |
+ # earlier versions are messed up and put the nodename in both |
1025 |
+ # sysname and nodename. |
1026 |
+ echo i386-sequent-sysv4 |
1027 |
+ exit 0 ;; |
1028 |
+ i*86:UNIX_SV:4.2MP:2.*) |
1029 |
+ # Unixware is an offshoot of SVR4, but it has its own version |
1030 |
+ # number series starting with 2... |
1031 |
+ # I am not positive that other SVR4 systems won't match this, |
1032 |
+ # I just have to hope. -- rms. |
1033 |
+ # Use sysv4.2uw... so that sysv4* matches it. |
1034 |
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} |
1035 |
+ exit 0 ;; |
1036 |
+ i*86:OS/2:*:*) |
1037 |
+ # If we were able to find `uname', then EMX Unix compatibility |
1038 |
+ # is probably installed. |
1039 |
+ echo ${UNAME_MACHINE}-pc-os2-emx |
1040 |
+ exit 0 ;; |
1041 |
+ i*86:XTS-300:*:STOP) |
1042 |
+ echo ${UNAME_MACHINE}-unknown-stop |
1043 |
+ exit 0 ;; |
1044 |
+ i*86:atheos:*:*) |
1045 |
+ echo ${UNAME_MACHINE}-unknown-atheos |
1046 |
+ exit 0 ;; |
1047 |
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) |
1048 |
+ echo i386-unknown-lynxos${UNAME_RELEASE} |
1049 |
+ exit 0 ;; |
1050 |
+ i*86:*DOS:*:*) |
1051 |
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp |
1052 |
+ exit 0 ;; |
1053 |
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) |
1054 |
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` |
1055 |
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
1056 |
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} |
1057 |
+ else |
1058 |
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} |
1059 |
+ fi |
1060 |
+ exit 0 ;; |
1061 |
+ i*86:*:5:[78]*) |
1062 |
+ case `/bin/uname -X | grep "^Machine"` in |
1063 |
+ *486*) UNAME_MACHINE=i486 ;; |
1064 |
+ *Pentium) UNAME_MACHINE=i586 ;; |
1065 |
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1066 |
+ esac |
1067 |
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} |
1068 |
+ exit 0 ;; |
1069 |
+ i*86:*:3.2:*) |
1070 |
+ if test -f /usr/options/cb.name; then |
1071 |
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
1072 |
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL |
1073 |
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then |
1074 |
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
1075 |
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
1076 |
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ |
1077 |
+ && UNAME_MACHINE=i586 |
1078 |
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ |
1079 |
+ && UNAME_MACHINE=i686 |
1080 |
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
1081 |
+ && UNAME_MACHINE=i686 |
1082 |
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL |
1083 |
+ else |
1084 |
+ echo ${UNAME_MACHINE}-pc-sysv32 |
1085 |
+ fi |
1086 |
+ exit 0 ;; |
1087 |
+ pc:*:*:*) |
1088 |
+ # Left here for compatibility: |
1089 |
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about |
1090 |
+ # the processor, so we play safe by assuming i386. |
1091 |
+ echo i386-pc-msdosdjgpp |
1092 |
+ exit 0 ;; |
1093 |
+ Intel:Mach:3*:*) |
1094 |
+ echo i386-pc-mach3 |
1095 |
+ exit 0 ;; |
1096 |
+ paragon:*:*:*) |
1097 |
+ echo i860-intel-osf1 |
1098 |
+ exit 0 ;; |
1099 |
+ i860:*:4.*:*) # i860-SVR4 |
1100 |
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
1101 |
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 |
1102 |
+ else # Add other i860-SVR4 vendors below as they are discovered. |
1103 |
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 |
1104 |
+ fi |
1105 |
+ exit 0 ;; |
1106 |
+ mini*:CTIX:SYS*5:*) |
1107 |
+ # "miniframe" |
1108 |
+ echo m68010-convergent-sysv |
1109 |
+ exit 0 ;; |
1110 |
+ mc68k:UNIX:SYSTEM5:3.51m) |
1111 |
+ echo m68k-convergent-sysv |
1112 |
+ exit 0 ;; |
1113 |
+ M680?0:D-NIX:5.3:*) |
1114 |
+ echo m68k-diab-dnix |
1115 |
+ exit 0 ;; |
1116 |
+ M68*:*:R3V[567]*:*) |
1117 |
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; |
1118 |
+ 3[34]??:*: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) |
1119 |
+ OS_REL='' |
1120 |
+ test -r /etc/.relid \ |
1121 |
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1122 |
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1123 |
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 |
1124 |
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1125 |
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; |
1126 |
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
1127 |
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1128 |
+ && echo i486-ncr-sysv4 && exit 0 ;; |
1129 |
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
1130 |
+ echo m68k-unknown-lynxos${UNAME_RELEASE} |
1131 |
+ exit 0 ;; |
1132 |
+ mc68030:UNIX_System_V:4.*:*) |
1133 |
+ echo m68k-atari-sysv4 |
1134 |
+ exit 0 ;; |
1135 |
+ TSUNAMI:LynxOS:2.*:*) |
1136 |
+ echo sparc-unknown-lynxos${UNAME_RELEASE} |
1137 |
+ exit 0 ;; |
1138 |
+ rs6000:LynxOS:2.*:*) |
1139 |
+ echo rs6000-unknown-lynxos${UNAME_RELEASE} |
1140 |
+ exit 0 ;; |
1141 |
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) |
1142 |
+ echo powerpc-unknown-lynxos${UNAME_RELEASE} |
1143 |
+ exit 0 ;; |
1144 |
+ SM[BE]S:UNIX_SV:*:*) |
1145 |
+ echo mips-dde-sysv${UNAME_RELEASE} |
1146 |
+ exit 0 ;; |
1147 |
+ RM*:ReliantUNIX-*:*:*) |
1148 |
+ echo mips-sni-sysv4 |
1149 |
+ exit 0 ;; |
1150 |
+ RM*:SINIX-*:*:*) |
1151 |
+ echo mips-sni-sysv4 |
1152 |
+ exit 0 ;; |
1153 |
+ *:SINIX-*:*:*) |
1154 |
+ if uname -p 2>/dev/null >/dev/null ; then |
1155 |
+ UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1156 |
+ echo ${UNAME_MACHINE}-sni-sysv4 |
1157 |
+ else |
1158 |
+ echo ns32k-sni-sysv |
1159 |
+ fi |
1160 |
+ exit 0 ;; |
1161 |
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
1162 |
+ # says <Richard.M.Bartel@ccMail.Census.GOV> |
1163 |
+ echo i586-unisys-sysv4 |
1164 |
+ exit 0 ;; |
1165 |
+ *:UNIX_System_V:4*:FTX*) |
1166 |
+ # From Gerald Hewes <hewes@openmarket.com>. |
1167 |
+ # How about differentiating between stratus architectures? -djm |
1168 |
+ echo hppa1.1-stratus-sysv4 |
1169 |
+ exit 0 ;; |
1170 |
+ *:*:*:FTX*) |
1171 |
+ # From seanf@swdc.stratus.com. |
1172 |
+ echo i860-stratus-sysv4 |
1173 |
+ exit 0 ;; |
1174 |
+ *:VOS:*:*) |
1175 |
+ # From Paul.Green@stratus.com. |
1176 |
+ echo hppa1.1-stratus-vos |
1177 |
+ exit 0 ;; |
1178 |
+ mc68*:A/UX:*:*) |
1179 |
+ echo m68k-apple-aux${UNAME_RELEASE} |
1180 |
+ exit 0 ;; |
1181 |
+ news*:NEWS-OS:6*:*) |
1182 |
+ echo mips-sony-newsos6 |
1183 |
+ exit 0 ;; |
1184 |
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1185 |
+ if [ -d /usr/nec ]; then |
1186 |
+ echo mips-nec-sysv${UNAME_RELEASE} |
1187 |
+ else |
1188 |
+ echo mips-unknown-sysv${UNAME_RELEASE} |
1189 |
+ fi |
1190 |
+ exit 0 ;; |
1191 |
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1192 |
+ echo powerpc-be-beos |
1193 |
+ exit 0 ;; |
1194 |
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
1195 |
+ echo powerpc-apple-beos |
1196 |
+ exit 0 ;; |
1197 |
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
1198 |
+ echo i586-pc-beos |
1199 |
+ exit 0 ;; |
1200 |
+ SX-4:SUPER-UX:*:*) |
1201 |
+ echo sx4-nec-superux${UNAME_RELEASE} |
1202 |
+ exit 0 ;; |
1203 |
+ SX-5:SUPER-UX:*:*) |
1204 |
+ echo sx5-nec-superux${UNAME_RELEASE} |
1205 |
+ exit 0 ;; |
1206 |
+ SX-6:SUPER-UX:*:*) |
1207 |
+ echo sx6-nec-superux${UNAME_RELEASE} |
1208 |
+ exit 0 ;; |
1209 |
+ Power*:Rhapsody:*:*) |
1210 |
+ echo powerpc-apple-rhapsody${UNAME_RELEASE} |
1211 |
+ exit 0 ;; |
1212 |
+ *:Rhapsody:*:*) |
1213 |
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} |
1214 |
+ exit 0 ;; |
1215 |
+ *:Darwin:*:*) |
1216 |
+ case `uname -p` in |
1217 |
+ *86) UNAME_PROCESSOR=i686 ;; |
1218 |
+ powerpc) UNAME_PROCESSOR=powerpc ;; |
1219 |
+ esac |
1220 |
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
1221 |
+ exit 0 ;; |
1222 |
+ *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1223 |
+ UNAME_PROCESSOR=`uname -p` |
1224 |
+ if test "$UNAME_PROCESSOR" = "x86"; then |
1225 |
+ UNAME_PROCESSOR=i386 |
1226 |
+ UNAME_MACHINE=pc |
1227 |
+ fi |
1228 |
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} |
1229 |
+ exit 0 ;; |
1230 |
+ *:QNX:*:4*) |
1231 |
+ echo i386-pc-qnx |
1232 |
+ exit 0 ;; |
1233 |
+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) |
1234 |
+ echo nsr-tandem-nsk${UNAME_RELEASE} |
1235 |
+ exit 0 ;; |
1236 |
+ *:NonStop-UX:*:*) |
1237 |
+ echo mips-compaq-nonstopux |
1238 |
+ exit 0 ;; |
1239 |
+ BS2000:POSIX*:*:*) |
1240 |
+ echo bs2000-siemens-sysv |
1241 |
+ exit 0 ;; |
1242 |
+ DS/*:UNIX_System_V:*:*) |
1243 |
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} |
1244 |
+ exit 0 ;; |
1245 |
+ *:Plan9:*:*) |
1246 |
+ # "uname -m" is not consistent, so use $cputype instead. 386 |
1247 |
+ # is converted to i386 for consistency with other x86 |
1248 |
+ # operating systems. |
1249 |
+ if test "$cputype" = "386"; then |
1250 |
+ UNAME_MACHINE=i386 |
1251 |
+ else |
1252 |
+ UNAME_MACHINE="$cputype" |
1253 |
+ fi |
1254 |
+ echo ${UNAME_MACHINE}-unknown-plan9 |
1255 |
+ exit 0 ;; |
1256 |
+ *:TOPS-10:*:*) |
1257 |
+ echo pdp10-unknown-tops10 |
1258 |
+ exit 0 ;; |
1259 |
+ *:TENEX:*:*) |
1260 |
+ echo pdp10-unknown-tenex |
1261 |
+ exit 0 ;; |
1262 |
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
1263 |
+ echo pdp10-dec-tops20 |
1264 |
+ exit 0 ;; |
1265 |
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
1266 |
+ echo pdp10-xkl-tops20 |
1267 |
+ exit 0 ;; |
1268 |
+ *:TOPS-20:*:*) |
1269 |
+ echo pdp10-unknown-tops20 |
1270 |
+ exit 0 ;; |
1271 |
+ *:ITS:*:*) |
1272 |
+ echo pdp10-unknown-its |
1273 |
+ exit 0 ;; |
1274 |
+ SEI:*:*:SEIUX) |
1275 |
+ echo mips-sei-seiux${UNAME_RELEASE} |
1276 |
+ exit 0 ;; |
1277 |
+esac |
1278 |
+ |
1279 |
+#echo '(No uname command or uname output not recognized.)' 1>&2 |
1280 |
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 |
1281 |
+ |
1282 |
+eval $set_cc_for_build |
1283 |
+cat >$dummy.c <<EOF |
1284 |
+#ifdef _SEQUENT_ |
1285 |
+# include <sys/types.h> |
1286 |
+# include <sys/utsname.h> |
1287 |
+#endif |
1288 |
+main () |
1289 |
+{ |
1290 |
+#if defined (sony) |
1291 |
+#if defined (MIPSEB) |
1292 |
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, |
1293 |
+ I don't know.... */ |
1294 |
+ printf ("mips-sony-bsd\n"); exit (0); |
1295 |
+#else |
1296 |
+#include <sys/param.h> |
1297 |
+ printf ("m68k-sony-newsos%s\n", |
1298 |
+#ifdef NEWSOS4 |
1299 |
+ "4" |
1300 |
+#else |
1301 |
+ "" |
1302 |
+#endif |
1303 |
+ ); exit (0); |
1304 |
+#endif |
1305 |
+#endif |
1306 |
+ |
1307 |
+#if defined (__arm) && defined (__acorn) && defined (__unix) |
1308 |
+ printf ("arm-acorn-riscix"); exit (0); |
1309 |
+#endif |
1310 |
+ |
1311 |
+#if defined (hp300) && !defined (hpux) |
1312 |
+ printf ("m68k-hp-bsd\n"); exit (0); |
1313 |
+#endif |
1314 |
+ |
1315 |
+#if defined (NeXT) |
1316 |
+#if !defined (__ARCHITECTURE__) |
1317 |
+#define __ARCHITECTURE__ "m68k" |
1318 |
+#endif |
1319 |
+ int version; |
1320 |
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; |
1321 |
+ if (version < 4) |
1322 |
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
1323 |
+ else |
1324 |
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); |
1325 |
+ exit (0); |
1326 |
+#endif |
1327 |
+ |
1328 |
+#if defined (MULTIMAX) || defined (n16) |
1329 |
+#if defined (UMAXV) |
1330 |
+ printf ("ns32k-encore-sysv\n"); exit (0); |
1331 |
+#else |
1332 |
+#if defined (CMU) |
1333 |
+ printf ("ns32k-encore-mach\n"); exit (0); |
1334 |
+#else |
1335 |
+ printf ("ns32k-encore-bsd\n"); exit (0); |
1336 |
+#endif |
1337 |
+#endif |
1338 |
+#endif |
1339 |
+ |
1340 |
+#if defined (__386BSD__) |
1341 |
+ printf ("i386-pc-bsd\n"); exit (0); |
1342 |
+#endif |
1343 |
+ |
1344 |
+#if defined (sequent) |
1345 |
+#if defined (i386) |
1346 |
+ printf ("i386-sequent-dynix\n"); exit (0); |
1347 |
+#endif |
1348 |
+#if defined (ns32000) |
1349 |
+ printf ("ns32k-sequent-dynix\n"); exit (0); |
1350 |
+#endif |
1351 |
+#endif |
1352 |
+ |
1353 |
+#if defined (_SEQUENT_) |
1354 |
+ struct utsname un; |
1355 |
+ |
1356 |
+ uname(&un); |
1357 |
+ |
1358 |
+ if (strncmp(un.version, "V2", 2) == 0) { |
1359 |
+ printf ("i386-sequent-ptx2\n"); exit (0); |
1360 |
+ } |
1361 |
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ |
1362 |
+ printf ("i386-sequent-ptx1\n"); exit (0); |
1363 |
+ } |
1364 |
+ printf ("i386-sequent-ptx\n"); exit (0); |
1365 |
+ |
1366 |
+#endif |
1367 |
+ |
1368 |
+#if defined (vax) |
1369 |
+# if !defined (ultrix) |
1370 |
+# include <sys/param.h> |
1371 |
+# if defined (BSD) |
1372 |
+# if BSD == 43 |
1373 |
+ printf ("vax-dec-bsd4.3\n"); exit (0); |
1374 |
+# else |
1375 |
+# if BSD == 199006 |
1376 |
+ printf ("vax-dec-bsd4.3reno\n"); exit (0); |
1377 |
+# else |
1378 |
+ printf ("vax-dec-bsd\n"); exit (0); |
1379 |
+# endif |
1380 |
+# endif |
1381 |
+# else |
1382 |
+ printf ("vax-dec-bsd\n"); exit (0); |
1383 |
+# endif |
1384 |
+# else |
1385 |
+ printf ("vax-dec-ultrix\n"); exit (0); |
1386 |
+# endif |
1387 |
+#endif |
1388 |
+ |
1389 |
+#if defined (alliant) && defined (i860) |
1390 |
+ printf ("i860-alliant-bsd\n"); exit (0); |
1391 |
+#endif |
1392 |
+ |
1393 |
+ exit (1); |
1394 |
+} |
1395 |
+EOF |
1396 |
+ |
1397 |
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 |
1398 |
+ |
1399 |
+# Apollos put the system type in the environment. |
1400 |
+ |
1401 |
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } |
1402 |
+ |
1403 |
+# Convex versions that predate uname can use getsysinfo(1) |
1404 |
+ |
1405 |
+if [ -x /usr/convex/getsysinfo ] |
1406 |
+then |
1407 |
+ case `getsysinfo -f cpu_type` in |
1408 |
+ c1*) |
1409 |
+ echo c1-convex-bsd |
1410 |
+ exit 0 ;; |
1411 |
+ c2*) |
1412 |
+ if getsysinfo -f scalar_acc |
1413 |
+ then echo c32-convex-bsd |
1414 |
+ else echo c2-convex-bsd |
1415 |
+ fi |
1416 |
+ exit 0 ;; |
1417 |
+ c34*) |
1418 |
+ echo c34-convex-bsd |
1419 |
+ exit 0 ;; |
1420 |
+ c38*) |
1421 |
+ echo c38-convex-bsd |
1422 |
+ exit 0 ;; |
1423 |
+ c4*) |
1424 |
+ echo c4-convex-bsd |
1425 |
+ exit 0 ;; |
1426 |
+ esac |
1427 |
+fi |
1428 |
+ |
1429 |
+cat >&2 <<EOF |
1430 |
+$0: unable to guess system type |
1431 |
+ |
1432 |
+This script, last modified $timestamp, has failed to recognize |
1433 |
+the operating system you are using. It is advised that you |
1434 |
+download the most up to date version of the config scripts from |
1435 |
+ |
1436 |
+ ftp://ftp.gnu.org/pub/gnu/config/ |
1437 |
+ |
1438 |
+If the version you run ($0) is already up to date, please |
1439 |
+send the following data and any information you think might be |
1440 |
+pertinent to <config-patches@gnu.org> in order to provide the needed |
1441 |
+information to handle your system. |
1442 |
+ |
1443 |
+config.guess timestamp = $timestamp |
1444 |
+ |
1445 |
+uname -m = `(uname -m) 2>/dev/null || echo unknown` |
1446 |
+uname -r = `(uname -r) 2>/dev/null || echo unknown` |
1447 |
+uname -s = `(uname -s) 2>/dev/null || echo unknown` |
1448 |
+uname -v = `(uname -v) 2>/dev/null || echo unknown` |
1449 |
+ |
1450 |
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` |
1451 |
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null` |
1452 |
+ |
1453 |
+hostinfo = `(hostinfo) 2>/dev/null` |
1454 |
+/bin/universe = `(/bin/universe) 2>/dev/null` |
1455 |
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` |
1456 |
+/bin/arch = `(/bin/arch) 2>/dev/null` |
1457 |
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` |
1458 |
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` |
1459 |
+ |
1460 |
+UNAME_MACHINE = ${UNAME_MACHINE} |
1461 |
+UNAME_RELEASE = ${UNAME_RELEASE} |
1462 |
+UNAME_SYSTEM = ${UNAME_SYSTEM} |
1463 |
+UNAME_VERSION = ${UNAME_VERSION} |
1464 |
+EOF |
1465 |
+ |
1466 |
+exit 1 |
1467 |
+ |
1468 |
+# Local variables: |
1469 |
+# eval: (add-hook 'write-file-hooks 'time-stamp) |
1470 |
+# time-stamp-start: "timestamp='" |
1471 |
+# time-stamp-format: "%:y-%02m-%02d" |
1472 |
+# time-stamp-end: "'" |
1473 |
+# End: |
1474 |
diff -urN /var/empty/config.sub config/config.sub |
1475 |
--- /var/empty/config.sub Thu Jan 1 01:00:00 1970 |
1476 |
+++ config/config.sub Fri Dec 8 22:53:21 2006 |
1477 |
@@ -0,0 +1,1504 @@ |
1478 |
+#! /bin/sh |
1479 |
+# Configuration validation subroutine script. |
1480 |
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
1481 |
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. |
1482 |
+ |
1483 |
+timestamp='2003-07-04' |
1484 |
+ |
1485 |
+# This file is (in principle) common to ALL GNU software. |
1486 |
+# The presence of a machine in this file suggests that SOME GNU software |
1487 |
+# can handle that machine. It does not imply ALL GNU software can. |
1488 |
+# |
1489 |
+# This file is free software; you can redistribute it and/or modify |
1490 |
+# it under the terms of the GNU General Public License as published by |
1491 |
+# the Free Software Foundation; either version 2 of the License, or |
1492 |
+# (at your option) any later version. |
1493 |
+# |
1494 |
+# This program is distributed in the hope that it will be useful, |
1495 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1496 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1497 |
+# GNU General Public License for more details. |
1498 |
+# |
1499 |
+# You should have received a copy of the GNU General Public License |
1500 |
+# along with this program; if not, write to the Free Software |
1501 |
+# Foundation, Inc., 59 Temple Place - Suite 330, |
1502 |
+# Boston, MA 02111-1307, USA. |
1503 |
+ |
1504 |
+# As a special exception to the GNU General Public License, if you |
1505 |
+# distribute this file as part of a program that contains a |
1506 |
+# configuration script generated by Autoconf, you may include it under |
1507 |
+# the same distribution terms that you use for the rest of that program. |
1508 |
+ |
1509 |
+# Please send patches to <config-patches@gnu.org>. Submit a context |
1510 |
+# diff and a properly formatted ChangeLog entry. |
1511 |
+# |
1512 |
+# Configuration subroutine to validate and canonicalize a configuration type. |
1513 |
+# Supply the specified configuration type as an argument. |
1514 |
+# If it is invalid, we print an error message on stderr and exit with code 1. |
1515 |
+# Otherwise, we print the canonical config type on stdout and succeed. |
1516 |
+ |
1517 |
+# This file is supposed to be the same for all GNU packages |
1518 |
+# and recognize all the CPU types, system types and aliases |
1519 |
+# that are meaningful with *any* GNU software. |
1520 |
+# Each package is responsible for reporting which valid configurations |
1521 |
+# it does not support. The user should be able to distinguish |
1522 |
+# a failure to support a valid configuration from a meaningless |
1523 |
+# configuration. |
1524 |
+ |
1525 |
+# The goal of this file is to map all the various variations of a given |
1526 |
+# machine specification into a single specification in the form: |
1527 |
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM |
1528 |
+# or in some cases, the newer four-part form: |
1529 |
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
1530 |
+# It is wrong to echo any other type of specification. |
1531 |
+ |
1532 |
+me=`echo "$0" | sed -e 's,.*/,,'` |
1533 |
+ |
1534 |
+usage="\ |
1535 |
+Usage: $0 [OPTION] CPU-MFR-OPSYS |
1536 |
+ $0 [OPTION] ALIAS |
1537 |
+ |
1538 |
+Canonicalize a configuration name. |
1539 |
+ |
1540 |
+Operation modes: |
1541 |
+ -h, --help print this help, then exit |
1542 |
+ -t, --time-stamp print date of last modification, then exit |
1543 |
+ -v, --version print version number, then exit |
1544 |
+ |
1545 |
+Report bugs and patches to <config-patches@gnu.org>." |
1546 |
+ |
1547 |
+version="\ |
1548 |
+GNU config.sub ($timestamp) |
1549 |
+ |
1550 |
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 |
1551 |
+Free Software Foundation, Inc. |
1552 |
+ |
1553 |
+This is free software; see the source for copying conditions. There is NO |
1554 |
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
1555 |
+ |
1556 |
+help=" |
1557 |
+Try \`$me --help' for more information." |
1558 |
+ |
1559 |
+# Parse command line |
1560 |
+while test $# -gt 0 ; do |
1561 |
+ case $1 in |
1562 |
+ --time-stamp | --time* | -t ) |
1563 |
+ echo "$timestamp" ; exit 0 ;; |
1564 |
+ --version | -v ) |
1565 |
+ echo "$version" ; exit 0 ;; |
1566 |
+ --help | --h* | -h ) |
1567 |
+ echo "$usage"; exit 0 ;; |
1568 |
+ -- ) # Stop option processing |
1569 |
+ shift; break ;; |
1570 |
+ - ) # Use stdin as input. |
1571 |
+ break ;; |
1572 |
+ -* ) |
1573 |
+ echo "$me: invalid option $1$help" |
1574 |
+ exit 1 ;; |
1575 |
+ |
1576 |
+ *local*) |
1577 |
+ # First pass through any local machine types. |
1578 |
+ echo $1 |
1579 |
+ exit 0;; |
1580 |
+ |
1581 |
+ * ) |
1582 |
+ break ;; |
1583 |
+ esac |
1584 |
+done |
1585 |
+ |
1586 |
+case $# in |
1587 |
+ 0) echo "$me: missing argument$help" >&2 |
1588 |
+ exit 1;; |
1589 |
+ 1) ;; |
1590 |
+ *) echo "$me: too many arguments$help" >&2 |
1591 |
+ exit 1;; |
1592 |
+esac |
1593 |
+ |
1594 |
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). |
1595 |
+# Here we must recognize all the valid KERNEL-OS combinations. |
1596 |
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
1597 |
+case $maybe_os in |
1598 |
+ nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) |
1599 |
+ os=-$maybe_os |
1600 |
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` |
1601 |
+ ;; |
1602 |
+ *) |
1603 |
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'` |
1604 |
+ if [ $basic_machine != $1 ] |
1605 |
+ then os=`echo $1 | sed 's/.*-/-/'` |
1606 |
+ else os=; fi |
1607 |
+ ;; |
1608 |
+esac |
1609 |
+ |
1610 |
+### Let's recognize common machines as not being operating systems so |
1611 |
+### that things like config.sub decstation-3100 work. We also |
1612 |
+### recognize some manufacturers as not being operating systems, so we |
1613 |
+### can provide default operating systems below. |
1614 |
+case $os in |
1615 |
+ -sun*os*) |
1616 |
+ # Prevent following clause from handling this invalid input. |
1617 |
+ ;; |
1618 |
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ |
1619 |
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ |
1620 |
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ |
1621 |
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
1622 |
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ |
1623 |
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
1624 |
+ -apple | -axis) |
1625 |
+ os= |
1626 |
+ basic_machine=$1 |
1627 |
+ ;; |
1628 |
+ -sim | -cisco | -oki | -wec | -winbond) |
1629 |
+ os= |
1630 |
+ basic_machine=$1 |
1631 |
+ ;; |
1632 |
+ -scout) |
1633 |
+ ;; |
1634 |
+ -wrs) |
1635 |
+ os=-vxworks |
1636 |
+ basic_machine=$1 |
1637 |
+ ;; |
1638 |
+ -chorusos*) |
1639 |
+ os=-chorusos |
1640 |
+ basic_machine=$1 |
1641 |
+ ;; |
1642 |
+ -chorusrdb) |
1643 |
+ os=-chorusrdb |
1644 |
+ basic_machine=$1 |
1645 |
+ ;; |
1646 |
+ -hiux*) |
1647 |
+ os=-hiuxwe2 |
1648 |
+ ;; |
1649 |
+ -sco5) |
1650 |
+ os=-sco3.2v5 |
1651 |
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1652 |
+ ;; |
1653 |
+ -sco4) |
1654 |
+ os=-sco3.2v4 |
1655 |
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1656 |
+ ;; |
1657 |
+ -sco3.2.[4-9]*) |
1658 |
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` |
1659 |
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1660 |
+ ;; |
1661 |
+ -sco3.2v[4-9]*) |
1662 |
+ # Don't forget version if it is 3.2v4 or newer. |
1663 |
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1664 |
+ ;; |
1665 |
+ -sco*) |
1666 |
+ os=-sco3.2v2 |
1667 |
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1668 |
+ ;; |
1669 |
+ -udk*) |
1670 |
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1671 |
+ ;; |
1672 |
+ -isc) |
1673 |
+ os=-isc2.2 |
1674 |
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1675 |
+ ;; |
1676 |
+ -clix*) |
1677 |
+ basic_machine=clipper-intergraph |
1678 |
+ ;; |
1679 |
+ -isc*) |
1680 |
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
1681 |
+ ;; |
1682 |
+ -lynx*) |
1683 |
+ os=-lynxos |
1684 |
+ ;; |
1685 |
+ -ptx*) |
1686 |
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` |
1687 |
+ ;; |
1688 |
+ -windowsnt*) |
1689 |
+ os=`echo $os | sed -e 's/windowsnt/winnt/'` |
1690 |
+ ;; |
1691 |
+ -psos*) |
1692 |
+ os=-psos |
1693 |
+ ;; |
1694 |
+ -mint | -mint[0-9]*) |
1695 |
+ basic_machine=m68k-atari |
1696 |
+ os=-mint |
1697 |
+ ;; |
1698 |
+esac |
1699 |
+ |
1700 |
+# Decode aliases for certain CPU-COMPANY combinations. |
1701 |
+case $basic_machine in |
1702 |
+ # Recognize the basic CPU types without company name. |
1703 |
+ # Some are omitted here because they have special meanings below. |
1704 |
+ 1750a | 580 \ |
1705 |
+ | a29k \ |
1706 |
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ |
1707 |
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ |
1708 |
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ |
1709 |
+ | c4x | clipper \ |
1710 |
+ | d10v | d30v | dlx | dsp16xx \ |
1711 |
+ | fr30 | frv \ |
1712 |
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ |
1713 |
+ | i370 | i860 | i960 | ia64 \ |
1714 |
+ | ip2k \ |
1715 |
+ | m32r | m68000 | m68k | m88k | mcore \ |
1716 |
+ | mips | mipsbe | mipseb | mipsel | mipsle \ |
1717 |
+ | mips16 \ |
1718 |
+ | mips64 | mips64el \ |
1719 |
+ | mips64vr | mips64vrel \ |
1720 |
+ | mips64orion | mips64orionel \ |
1721 |
+ | mips64vr4100 | mips64vr4100el \ |
1722 |
+ | mips64vr4300 | mips64vr4300el \ |
1723 |
+ | mips64vr5000 | mips64vr5000el \ |
1724 |
+ | mipsisa32 | mipsisa32el \ |
1725 |
+ | mipsisa32r2 | mipsisa32r2el \ |
1726 |
+ | mipsisa64 | mipsisa64el \ |
1727 |
+ | mipsisa64sb1 | mipsisa64sb1el \ |
1728 |
+ | mipsisa64sr71k | mipsisa64sr71kel \ |
1729 |
+ | mipstx39 | mipstx39el \ |
1730 |
+ | mn10200 | mn10300 \ |
1731 |
+ | msp430 \ |
1732 |
+ | ns16k | ns32k \ |
1733 |
+ | openrisc | or32 \ |
1734 |
+ | pdp10 | pdp11 | pj | pjl \ |
1735 |
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ |
1736 |
+ | pyramid \ |
1737 |
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ |
1738 |
+ | sh64 | sh64le \ |
1739 |
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ |
1740 |
+ | strongarm \ |
1741 |
+ | tahoe | thumb | tic4x | tic80 | tron \ |
1742 |
+ | v850 | v850e \ |
1743 |
+ | we32k \ |
1744 |
+ | x86 | xscale | xstormy16 | xtensa \ |
1745 |
+ | z8k) |
1746 |
+ basic_machine=$basic_machine-unknown |
1747 |
+ ;; |
1748 |
+ m6811 | m68hc11 | m6812 | m68hc12) |
1749 |
+ # Motorola 68HC11/12. |
1750 |
+ basic_machine=$basic_machine-unknown |
1751 |
+ os=-none |
1752 |
+ ;; |
1753 |
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) |
1754 |
+ ;; |
1755 |
+ |
1756 |
+ # We use `pc' rather than `unknown' |
1757 |
+ # because (1) that's what they normally are, and |
1758 |
+ # (2) the word "unknown" tends to confuse beginning users. |
1759 |
+ i*86 | x86_64) |
1760 |
+ basic_machine=$basic_machine-pc |
1761 |
+ ;; |
1762 |
+ # Object if more than one company name word. |
1763 |
+ *-*-*) |
1764 |
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 |
1765 |
+ exit 1 |
1766 |
+ ;; |
1767 |
+ # Recognize the basic CPU types with company name. |
1768 |
+ 580-* \ |
1769 |
+ | a29k-* \ |
1770 |
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ |
1771 |
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ |
1772 |
+ | alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* \ |
1773 |
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ |
1774 |
+ | avr-* \ |
1775 |
+ | bs2000-* \ |
1776 |
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ |
1777 |
+ | clipper-* | cydra-* \ |
1778 |
+ | d10v-* | d30v-* | dlx-* \ |
1779 |
+ | elxsi-* \ |
1780 |
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ |
1781 |
+ | h8300-* | h8500-* \ |
1782 |
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ |
1783 |
+ | i*86-* | i860-* | i960-* | ia64-* \ |
1784 |
+ | ip2k-* \ |
1785 |
+ | m32r-* \ |
1786 |
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ |
1787 |
+ | m88110-* | m88k-* | mcore-* \ |
1788 |
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ |
1789 |
+ | mips16-* \ |
1790 |
+ | mips64-* | mips64el-* \ |
1791 |
+ | mips64vr-* | mips64vrel-* \ |
1792 |
+ | mips64orion-* | mips64orionel-* \ |
1793 |
+ | mips64vr4100-* | mips64vr4100el-* \ |
1794 |
+ | mips64vr4300-* | mips64vr4300el-* \ |
1795 |
+ | mips64vr5000-* | mips64vr5000el-* \ |
1796 |
+ | mipsisa32-* | mipsisa32el-* \ |
1797 |
+ | mipsisa32r2-* | mipsisa32r2el-* \ |
1798 |
+ | mipsisa64-* | mipsisa64el-* \ |
1799 |
+ | mipsisa64sb1-* | mipsisa64sb1el-* \ |
1800 |
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ |
1801 |
+ | mipstx39-* | mipstx39el-* \ |
1802 |
+ | msp430-* \ |
1803 |
+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ |
1804 |
+ | orion-* \ |
1805 |
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ |
1806 |
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ |
1807 |
+ | pyramid-* \ |
1808 |
+ | romp-* | rs6000-* \ |
1809 |
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ |
1810 |
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ |
1811 |
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ |
1812 |
+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ |
1813 |
+ | tahoe-* | thumb-* \ |
1814 |
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ |
1815 |
+ | tron-* \ |
1816 |
+ | v850-* | v850e-* | vax-* \ |
1817 |
+ | we32k-* \ |
1818 |
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ |
1819 |
+ | xtensa-* \ |
1820 |
+ | ymp-* \ |
1821 |
+ | z8k-*) |
1822 |
+ ;; |
1823 |
+ # Recognize the various machine names and aliases which stand |
1824 |
+ # for a CPU type and a company and sometimes even an OS. |
1825 |
+ 386bsd) |
1826 |
+ basic_machine=i386-unknown |
1827 |
+ os=-bsd |
1828 |
+ ;; |
1829 |
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
1830 |
+ basic_machine=m68000-att |
1831 |
+ ;; |
1832 |
+ 3b*) |
1833 |
+ basic_machine=we32k-att |
1834 |
+ ;; |
1835 |
+ a29khif) |
1836 |
+ basic_machine=a29k-amd |
1837 |
+ os=-udi |
1838 |
+ ;; |
1839 |
+ adobe68k) |
1840 |
+ basic_machine=m68010-adobe |
1841 |
+ os=-scout |
1842 |
+ ;; |
1843 |
+ alliant | fx80) |
1844 |
+ basic_machine=fx80-alliant |
1845 |
+ ;; |
1846 |
+ altos | altos3068) |
1847 |
+ basic_machine=m68k-altos |
1848 |
+ ;; |
1849 |
+ am29k) |
1850 |
+ basic_machine=a29k-none |
1851 |
+ os=-bsd |
1852 |
+ ;; |
1853 |
+ amd64) |
1854 |
+ basic_machine=x86_64-pc |
1855 |
+ ;; |
1856 |
+ amdahl) |
1857 |
+ basic_machine=580-amdahl |
1858 |
+ os=-sysv |
1859 |
+ ;; |
1860 |
+ amiga | amiga-*) |
1861 |
+ basic_machine=m68k-unknown |
1862 |
+ ;; |
1863 |
+ amigaos | amigados) |
1864 |
+ basic_machine=m68k-unknown |
1865 |
+ os=-amigaos |
1866 |
+ ;; |
1867 |
+ amigaunix | amix) |
1868 |
+ basic_machine=m68k-unknown |
1869 |
+ os=-sysv4 |
1870 |
+ ;; |
1871 |
+ apollo68) |
1872 |
+ basic_machine=m68k-apollo |
1873 |
+ os=-sysv |
1874 |
+ ;; |
1875 |
+ apollo68bsd) |
1876 |
+ basic_machine=m68k-apollo |
1877 |
+ os=-bsd |
1878 |
+ ;; |
1879 |
+ aux) |
1880 |
+ basic_machine=m68k-apple |
1881 |
+ os=-aux |
1882 |
+ ;; |
1883 |
+ balance) |
1884 |
+ basic_machine=ns32k-sequent |
1885 |
+ os=-dynix |
1886 |
+ ;; |
1887 |
+ c90) |
1888 |
+ basic_machine=c90-cray |
1889 |
+ os=-unicos |
1890 |
+ ;; |
1891 |
+ convex-c1) |
1892 |
+ basic_machine=c1-convex |
1893 |
+ os=-bsd |
1894 |
+ ;; |
1895 |
+ convex-c2) |
1896 |
+ basic_machine=c2-convex |
1897 |
+ os=-bsd |
1898 |
+ ;; |
1899 |
+ convex-c32) |
1900 |
+ basic_machine=c32-convex |
1901 |
+ os=-bsd |
1902 |
+ ;; |
1903 |
+ convex-c34) |
1904 |
+ basic_machine=c34-convex |
1905 |
+ os=-bsd |
1906 |
+ ;; |
1907 |
+ convex-c38) |
1908 |
+ basic_machine=c38-convex |
1909 |
+ os=-bsd |
1910 |
+ ;; |
1911 |
+ cray | j90) |
1912 |
+ basic_machine=j90-cray |
1913 |
+ os=-unicos |
1914 |
+ ;; |
1915 |
+ crds | unos) |
1916 |
+ basic_machine=m68k-crds |
1917 |
+ ;; |
1918 |
+ cris | cris-* | etrax*) |
1919 |
+ basic_machine=cris-axis |
1920 |
+ ;; |
1921 |
+ da30 | da30-*) |
1922 |
+ basic_machine=m68k-da30 |
1923 |
+ ;; |
1924 |
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) |
1925 |
+ basic_machine=mips-dec |
1926 |
+ ;; |
1927 |
+ decsystem10* | dec10*) |
1928 |
+ basic_machine=pdp10-dec |
1929 |
+ os=-tops10 |
1930 |
+ ;; |
1931 |
+ decsystem20* | dec20*) |
1932 |
+ basic_machine=pdp10-dec |
1933 |
+ os=-tops20 |
1934 |
+ ;; |
1935 |
+ delta | 3300 | motorola-3300 | motorola-delta \ |
1936 |
+ | 3300-motorola | delta-motorola) |
1937 |
+ basic_machine=m68k-motorola |
1938 |
+ ;; |
1939 |
+ delta88) |
1940 |
+ basic_machine=m88k-motorola |
1941 |
+ os=-sysv3 |
1942 |
+ ;; |
1943 |
+ dpx20 | dpx20-*) |
1944 |
+ basic_machine=rs6000-bull |
1945 |
+ os=-bosx |
1946 |
+ ;; |
1947 |
+ dpx2* | dpx2*-bull) |
1948 |
+ basic_machine=m68k-bull |
1949 |
+ os=-sysv3 |
1950 |
+ ;; |
1951 |
+ ebmon29k) |
1952 |
+ basic_machine=a29k-amd |
1953 |
+ os=-ebmon |
1954 |
+ ;; |
1955 |
+ elxsi) |
1956 |
+ basic_machine=elxsi-elxsi |
1957 |
+ os=-bsd |
1958 |
+ ;; |
1959 |
+ encore | umax | mmax) |
1960 |
+ basic_machine=ns32k-encore |
1961 |
+ ;; |
1962 |
+ es1800 | OSE68k | ose68k | ose | OSE) |
1963 |
+ basic_machine=m68k-ericsson |
1964 |
+ os=-ose |
1965 |
+ ;; |
1966 |
+ fx2800) |
1967 |
+ basic_machine=i860-alliant |
1968 |
+ ;; |
1969 |
+ genix) |
1970 |
+ basic_machine=ns32k-ns |
1971 |
+ ;; |
1972 |
+ gmicro) |
1973 |
+ basic_machine=tron-gmicro |
1974 |
+ os=-sysv |
1975 |
+ ;; |
1976 |
+ go32) |
1977 |
+ basic_machine=i386-pc |
1978 |
+ os=-go32 |
1979 |
+ ;; |
1980 |
+ h3050r* | hiux*) |
1981 |
+ basic_machine=hppa1.1-hitachi |
1982 |
+ os=-hiuxwe2 |
1983 |
+ ;; |
1984 |
+ h8300hms) |
1985 |
+ basic_machine=h8300-hitachi |
1986 |
+ os=-hms |
1987 |
+ ;; |
1988 |
+ h8300xray) |
1989 |
+ basic_machine=h8300-hitachi |
1990 |
+ os=-xray |
1991 |
+ ;; |
1992 |
+ h8500hms) |
1993 |
+ basic_machine=h8500-hitachi |
1994 |
+ os=-hms |
1995 |
+ ;; |
1996 |
+ harris) |
1997 |
+ basic_machine=m88k-harris |
1998 |
+ os=-sysv3 |
1999 |
+ ;; |
2000 |
+ hp300-*) |
2001 |
+ basic_machine=m68k-hp |
2002 |
+ ;; |
2003 |
+ hp300bsd) |
2004 |
+ basic_machine=m68k-hp |
2005 |
+ os=-bsd |
2006 |
+ ;; |
2007 |
+ hp300hpux) |
2008 |
+ basic_machine=m68k-hp |
2009 |
+ os=-hpux |
2010 |
+ ;; |
2011 |
+ hp3k9[0-9][0-9] | hp9[0-9][0-9]) |
2012 |
+ basic_machine=hppa1.0-hp |
2013 |
+ ;; |
2014 |
+ hp9k2[0-9][0-9] | hp9k31[0-9]) |
2015 |
+ basic_machine=m68000-hp |
2016 |
+ ;; |
2017 |
+ hp9k3[2-9][0-9]) |
2018 |
+ basic_machine=m68k-hp |
2019 |
+ ;; |
2020 |
+ hp9k6[0-9][0-9] | hp6[0-9][0-9]) |
2021 |
+ basic_machine=hppa1.0-hp |
2022 |
+ ;; |
2023 |
+ hp9k7[0-79][0-9] | hp7[0-79][0-9]) |
2024 |
+ basic_machine=hppa1.1-hp |
2025 |
+ ;; |
2026 |
+ hp9k78[0-9] | hp78[0-9]) |
2027 |
+ # FIXME: really hppa2.0-hp |
2028 |
+ basic_machine=hppa1.1-hp |
2029 |
+ ;; |
2030 |
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) |
2031 |
+ # FIXME: really hppa2.0-hp |
2032 |
+ basic_machine=hppa1.1-hp |
2033 |
+ ;; |
2034 |
+ hp9k8[0-9][13679] | hp8[0-9][13679]) |
2035 |
+ basic_machine=hppa1.1-hp |
2036 |
+ ;; |
2037 |
+ hp9k8[0-9][0-9] | hp8[0-9][0-9]) |
2038 |
+ basic_machine=hppa1.0-hp |
2039 |
+ ;; |
2040 |
+ hppa-next) |
2041 |
+ os=-nextstep3 |
2042 |
+ ;; |
2043 |
+ hppaosf) |
2044 |
+ basic_machine=hppa1.1-hp |
2045 |
+ os=-osf |
2046 |
+ ;; |
2047 |
+ hppro) |
2048 |
+ basic_machine=hppa1.1-hp |
2049 |
+ os=-proelf |
2050 |
+ ;; |
2051 |
+ i370-ibm* | ibm*) |
2052 |
+ basic_machine=i370-ibm |
2053 |
+ ;; |
2054 |
+# I'm not sure what "Sysv32" means. Should this be sysv3.2? |
2055 |
+ i*86v32) |
2056 |
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2057 |
+ os=-sysv32 |
2058 |
+ ;; |
2059 |
+ i*86v4*) |
2060 |
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2061 |
+ os=-sysv4 |
2062 |
+ ;; |
2063 |
+ i*86v) |
2064 |
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2065 |
+ os=-sysv |
2066 |
+ ;; |
2067 |
+ i*86sol2) |
2068 |
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2069 |
+ os=-solaris2 |
2070 |
+ ;; |
2071 |
+ i386mach) |
2072 |
+ basic_machine=i386-mach |
2073 |
+ os=-mach |
2074 |
+ ;; |
2075 |
+ i386-vsta | vsta) |
2076 |
+ basic_machine=i386-unknown |
2077 |
+ os=-vsta |
2078 |
+ ;; |
2079 |
+ iris | iris4d) |
2080 |
+ basic_machine=mips-sgi |
2081 |
+ case $os in |
2082 |
+ -irix*) |
2083 |
+ ;; |
2084 |
+ *) |
2085 |
+ os=-irix4 |
2086 |
+ ;; |
2087 |
+ esac |
2088 |
+ ;; |
2089 |
+ isi68 | isi) |
2090 |
+ basic_machine=m68k-isi |
2091 |
+ os=-sysv |
2092 |
+ ;; |
2093 |
+ m88k-omron*) |
2094 |
+ basic_machine=m88k-omron |
2095 |
+ ;; |
2096 |
+ magnum | m3230) |
2097 |
+ basic_machine=mips-mips |
2098 |
+ os=-sysv |
2099 |
+ ;; |
2100 |
+ merlin) |
2101 |
+ basic_machine=ns32k-utek |
2102 |
+ os=-sysv |
2103 |
+ ;; |
2104 |
+ mingw32) |
2105 |
+ basic_machine=i386-pc |
2106 |
+ os=-mingw32 |
2107 |
+ ;; |
2108 |
+ miniframe) |
2109 |
+ basic_machine=m68000-convergent |
2110 |
+ ;; |
2111 |
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) |
2112 |
+ basic_machine=m68k-atari |
2113 |
+ os=-mint |
2114 |
+ ;; |
2115 |
+ mips3*-*) |
2116 |
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` |
2117 |
+ ;; |
2118 |
+ mips3*) |
2119 |
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown |
2120 |
+ ;; |
2121 |
+ mmix*) |
2122 |
+ basic_machine=mmix-knuth |
2123 |
+ os=-mmixware |
2124 |
+ ;; |
2125 |
+ monitor) |
2126 |
+ basic_machine=m68k-rom68k |
2127 |
+ os=-coff |
2128 |
+ ;; |
2129 |
+ morphos) |
2130 |
+ basic_machine=powerpc-unknown |
2131 |
+ os=-morphos |
2132 |
+ ;; |
2133 |
+ msdos) |
2134 |
+ basic_machine=i386-pc |
2135 |
+ os=-msdos |
2136 |
+ ;; |
2137 |
+ mvs) |
2138 |
+ basic_machine=i370-ibm |
2139 |
+ os=-mvs |
2140 |
+ ;; |
2141 |
+ ncr3000) |
2142 |
+ basic_machine=i486-ncr |
2143 |
+ os=-sysv4 |
2144 |
+ ;; |
2145 |
+ netbsd386) |
2146 |
+ basic_machine=i386-unknown |
2147 |
+ os=-netbsd |
2148 |
+ ;; |
2149 |
+ netwinder) |
2150 |
+ basic_machine=armv4l-rebel |
2151 |
+ os=-linux |
2152 |
+ ;; |
2153 |
+ news | news700 | news800 | news900) |
2154 |
+ basic_machine=m68k-sony |
2155 |
+ os=-newsos |
2156 |
+ ;; |
2157 |
+ news1000) |
2158 |
+ basic_machine=m68030-sony |
2159 |
+ os=-newsos |
2160 |
+ ;; |
2161 |
+ news-3600 | risc-news) |
2162 |
+ basic_machine=mips-sony |
2163 |
+ os=-newsos |
2164 |
+ ;; |
2165 |
+ necv70) |
2166 |
+ basic_machine=v70-nec |
2167 |
+ os=-sysv |
2168 |
+ ;; |
2169 |
+ next | m*-next ) |
2170 |
+ basic_machine=m68k-next |
2171 |
+ case $os in |
2172 |
+ -nextstep* ) |
2173 |
+ ;; |
2174 |
+ -ns2*) |
2175 |
+ os=-nextstep2 |
2176 |
+ ;; |
2177 |
+ *) |
2178 |
+ os=-nextstep3 |
2179 |
+ ;; |
2180 |
+ esac |
2181 |
+ ;; |
2182 |
+ nh3000) |
2183 |
+ basic_machine=m68k-harris |
2184 |
+ os=-cxux |
2185 |
+ ;; |
2186 |
+ nh[45]000) |
2187 |
+ basic_machine=m88k-harris |
2188 |
+ os=-cxux |
2189 |
+ ;; |
2190 |
+ nindy960) |
2191 |
+ basic_machine=i960-intel |
2192 |
+ os=-nindy |
2193 |
+ ;; |
2194 |
+ mon960) |
2195 |
+ basic_machine=i960-intel |
2196 |
+ os=-mon960 |
2197 |
+ ;; |
2198 |
+ nonstopux) |
2199 |
+ basic_machine=mips-compaq |
2200 |
+ os=-nonstopux |
2201 |
+ ;; |
2202 |
+ np1) |
2203 |
+ basic_machine=np1-gould |
2204 |
+ ;; |
2205 |
+ nv1) |
2206 |
+ basic_machine=nv1-cray |
2207 |
+ os=-unicosmp |
2208 |
+ ;; |
2209 |
+ nsr-tandem) |
2210 |
+ basic_machine=nsr-tandem |
2211 |
+ ;; |
2212 |
+ op50n-* | op60c-*) |
2213 |
+ basic_machine=hppa1.1-oki |
2214 |
+ os=-proelf |
2215 |
+ ;; |
2216 |
+ or32 | or32-*) |
2217 |
+ basic_machine=or32-unknown |
2218 |
+ os=-coff |
2219 |
+ ;; |
2220 |
+ OSE68000 | ose68000) |
2221 |
+ basic_machine=m68000-ericsson |
2222 |
+ os=-ose |
2223 |
+ ;; |
2224 |
+ os68k) |
2225 |
+ basic_machine=m68k-none |
2226 |
+ os=-os68k |
2227 |
+ ;; |
2228 |
+ pa-hitachi) |
2229 |
+ basic_machine=hppa1.1-hitachi |
2230 |
+ os=-hiuxwe2 |
2231 |
+ ;; |
2232 |
+ paragon) |
2233 |
+ basic_machine=i860-intel |
2234 |
+ os=-osf |
2235 |
+ ;; |
2236 |
+ pbd) |
2237 |
+ basic_machine=sparc-tti |
2238 |
+ ;; |
2239 |
+ pbb) |
2240 |
+ basic_machine=m68k-tti |
2241 |
+ ;; |
2242 |
+ pc532 | pc532-*) |
2243 |
+ basic_machine=ns32k-pc532 |
2244 |
+ ;; |
2245 |
+ pentium | p5 | k5 | k6 | nexgen | viac3) |
2246 |
+ basic_machine=i586-pc |
2247 |
+ ;; |
2248 |
+ pentiumpro | p6 | 6x86 | athlon | athlon_*) |
2249 |
+ basic_machine=i686-pc |
2250 |
+ ;; |
2251 |
+ pentiumii | pentium2 | pentiumiii | pentium3) |
2252 |
+ basic_machine=i686-pc |
2253 |
+ ;; |
2254 |
+ pentium4) |
2255 |
+ basic_machine=i786-pc |
2256 |
+ ;; |
2257 |
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) |
2258 |
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` |
2259 |
+ ;; |
2260 |
+ pentiumpro-* | p6-* | 6x86-* | athlon-*) |
2261 |
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` |
2262 |
+ ;; |
2263 |
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) |
2264 |
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` |
2265 |
+ ;; |
2266 |
+ pentium4-*) |
2267 |
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` |
2268 |
+ ;; |
2269 |
+ pn) |
2270 |
+ basic_machine=pn-gould |
2271 |
+ ;; |
2272 |
+ power) basic_machine=power-ibm |
2273 |
+ ;; |
2274 |
+ ppc) basic_machine=powerpc-unknown |
2275 |
+ ;; |
2276 |
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` |
2277 |
+ ;; |
2278 |
+ ppcle | powerpclittle | ppc-le | powerpc-little) |
2279 |
+ basic_machine=powerpcle-unknown |
2280 |
+ ;; |
2281 |
+ ppcle-* | powerpclittle-*) |
2282 |
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` |
2283 |
+ ;; |
2284 |
+ ppc64) basic_machine=powerpc64-unknown |
2285 |
+ ;; |
2286 |
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` |
2287 |
+ ;; |
2288 |
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little) |
2289 |
+ basic_machine=powerpc64le-unknown |
2290 |
+ ;; |
2291 |
+ ppc64le-* | powerpc64little-*) |
2292 |
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` |
2293 |
+ ;; |
2294 |
+ ps2) |
2295 |
+ basic_machine=i386-ibm |
2296 |
+ ;; |
2297 |
+ pw32) |
2298 |
+ basic_machine=i586-unknown |
2299 |
+ os=-pw32 |
2300 |
+ ;; |
2301 |
+ rom68k) |
2302 |
+ basic_machine=m68k-rom68k |
2303 |
+ os=-coff |
2304 |
+ ;; |
2305 |
+ rm[46]00) |
2306 |
+ basic_machine=mips-siemens |
2307 |
+ ;; |
2308 |
+ rtpc | rtpc-*) |
2309 |
+ basic_machine=romp-ibm |
2310 |
+ ;; |
2311 |
+ s390 | s390-*) |
2312 |
+ basic_machine=s390-ibm |
2313 |
+ ;; |
2314 |
+ s390x | s390x-*) |
2315 |
+ basic_machine=s390x-ibm |
2316 |
+ ;; |
2317 |
+ sa29200) |
2318 |
+ basic_machine=a29k-amd |
2319 |
+ os=-udi |
2320 |
+ ;; |
2321 |
+ sb1) |
2322 |
+ basic_machine=mipsisa64sb1-unknown |
2323 |
+ ;; |
2324 |
+ sb1el) |
2325 |
+ basic_machine=mipsisa64sb1el-unknown |
2326 |
+ ;; |
2327 |
+ sei) |
2328 |
+ basic_machine=mips-sei |
2329 |
+ os=-seiux |
2330 |
+ ;; |
2331 |
+ sequent) |
2332 |
+ basic_machine=i386-sequent |
2333 |
+ ;; |
2334 |
+ sh) |
2335 |
+ basic_machine=sh-hitachi |
2336 |
+ os=-hms |
2337 |
+ ;; |
2338 |
+ sh64) |
2339 |
+ basic_machine=sh64-unknown |
2340 |
+ ;; |
2341 |
+ sparclite-wrs | simso-wrs) |
2342 |
+ basic_machine=sparclite-wrs |
2343 |
+ os=-vxworks |
2344 |
+ ;; |
2345 |
+ sps7) |
2346 |
+ basic_machine=m68k-bull |
2347 |
+ os=-sysv2 |
2348 |
+ ;; |
2349 |
+ spur) |
2350 |
+ basic_machine=spur-unknown |
2351 |
+ ;; |
2352 |
+ st2000) |
2353 |
+ basic_machine=m68k-tandem |
2354 |
+ ;; |
2355 |
+ stratus) |
2356 |
+ basic_machine=i860-stratus |
2357 |
+ os=-sysv4 |
2358 |
+ ;; |
2359 |
+ sun2) |
2360 |
+ basic_machine=m68000-sun |
2361 |
+ ;; |
2362 |
+ sun2os3) |
2363 |
+ basic_machine=m68000-sun |
2364 |
+ os=-sunos3 |
2365 |
+ ;; |
2366 |
+ sun2os4) |
2367 |
+ basic_machine=m68000-sun |
2368 |
+ os=-sunos4 |
2369 |
+ ;; |
2370 |
+ sun3os3) |
2371 |
+ basic_machine=m68k-sun |
2372 |
+ os=-sunos3 |
2373 |
+ ;; |
2374 |
+ sun3os4) |
2375 |
+ basic_machine=m68k-sun |
2376 |
+ os=-sunos4 |
2377 |
+ ;; |
2378 |
+ sun4os3) |
2379 |
+ basic_machine=sparc-sun |
2380 |
+ os=-sunos3 |
2381 |
+ ;; |
2382 |
+ sun4os4) |
2383 |
+ basic_machine=sparc-sun |
2384 |
+ os=-sunos4 |
2385 |
+ ;; |
2386 |
+ sun4sol2) |
2387 |
+ basic_machine=sparc-sun |
2388 |
+ os=-solaris2 |
2389 |
+ ;; |
2390 |
+ sun3 | sun3-*) |
2391 |
+ basic_machine=m68k-sun |
2392 |
+ ;; |
2393 |
+ sun4) |
2394 |
+ basic_machine=sparc-sun |
2395 |
+ ;; |
2396 |
+ sun386 | sun386i | roadrunner) |
2397 |
+ basic_machine=i386-sun |
2398 |
+ ;; |
2399 |
+ sv1) |
2400 |
+ basic_machine=sv1-cray |
2401 |
+ os=-unicos |
2402 |
+ ;; |
2403 |
+ symmetry) |
2404 |
+ basic_machine=i386-sequent |
2405 |
+ os=-dynix |
2406 |
+ ;; |
2407 |
+ t3e) |
2408 |
+ basic_machine=alphaev5-cray |
2409 |
+ os=-unicos |
2410 |
+ ;; |
2411 |
+ t90) |
2412 |
+ basic_machine=t90-cray |
2413 |
+ os=-unicos |
2414 |
+ ;; |
2415 |
+ tic54x | c54x*) |
2416 |
+ basic_machine=tic54x-unknown |
2417 |
+ os=-coff |
2418 |
+ ;; |
2419 |
+ tic55x | c55x*) |
2420 |
+ basic_machine=tic55x-unknown |
2421 |
+ os=-coff |
2422 |
+ ;; |
2423 |
+ tic6x | c6x*) |
2424 |
+ basic_machine=tic6x-unknown |
2425 |
+ os=-coff |
2426 |
+ ;; |
2427 |
+ tx39) |
2428 |
+ basic_machine=mipstx39-unknown |
2429 |
+ ;; |
2430 |
+ tx39el) |
2431 |
+ basic_machine=mipstx39el-unknown |
2432 |
+ ;; |
2433 |
+ toad1) |
2434 |
+ basic_machine=pdp10-xkl |
2435 |
+ os=-tops20 |
2436 |
+ ;; |
2437 |
+ tower | tower-32) |
2438 |
+ basic_machine=m68k-ncr |
2439 |
+ ;; |
2440 |
+ udi29k) |
2441 |
+ basic_machine=a29k-amd |
2442 |
+ os=-udi |
2443 |
+ ;; |
2444 |
+ ultra3) |
2445 |
+ basic_machine=a29k-nyu |
2446 |
+ os=-sym1 |
2447 |
+ ;; |
2448 |
+ v810 | necv810) |
2449 |
+ basic_machine=v810-nec |
2450 |
+ os=-none |
2451 |
+ ;; |
2452 |
+ vaxv) |
2453 |
+ basic_machine=vax-dec |
2454 |
+ os=-sysv |
2455 |
+ ;; |
2456 |
+ vms) |
2457 |
+ basic_machine=vax-dec |
2458 |
+ os=-vms |
2459 |
+ ;; |
2460 |
+ vpp*|vx|vx-*) |
2461 |
+ basic_machine=f301-fujitsu |
2462 |
+ ;; |
2463 |
+ vxworks960) |
2464 |
+ basic_machine=i960-wrs |
2465 |
+ os=-vxworks |
2466 |
+ ;; |
2467 |
+ vxworks68) |
2468 |
+ basic_machine=m68k-wrs |
2469 |
+ os=-vxworks |
2470 |
+ ;; |
2471 |
+ vxworks29k) |
2472 |
+ basic_machine=a29k-wrs |
2473 |
+ os=-vxworks |
2474 |
+ ;; |
2475 |
+ w65*) |
2476 |
+ basic_machine=w65-wdc |
2477 |
+ os=-none |
2478 |
+ ;; |
2479 |
+ w89k-*) |
2480 |
+ basic_machine=hppa1.1-winbond |
2481 |
+ os=-proelf |
2482 |
+ ;; |
2483 |
+ xps | xps100) |
2484 |
+ basic_machine=xps100-honeywell |
2485 |
+ ;; |
2486 |
+ ymp) |
2487 |
+ basic_machine=ymp-cray |
2488 |
+ os=-unicos |
2489 |
+ ;; |
2490 |
+ z8k-*-coff) |
2491 |
+ basic_machine=z8k-unknown |
2492 |
+ os=-sim |
2493 |
+ ;; |
2494 |
+ none) |
2495 |
+ basic_machine=none-none |
2496 |
+ os=-none |
2497 |
+ ;; |
2498 |
+ |
2499 |
+# Here we handle the default manufacturer of certain CPU types. It is in |
2500 |
+# some cases the only manufacturer, in others, it is the most popular. |
2501 |
+ w89k) |
2502 |
+ basic_machine=hppa1.1-winbond |
2503 |
+ ;; |
2504 |
+ op50n) |
2505 |
+ basic_machine=hppa1.1-oki |
2506 |
+ ;; |
2507 |
+ op60c) |
2508 |
+ basic_machine=hppa1.1-oki |
2509 |
+ ;; |
2510 |
+ romp) |
2511 |
+ basic_machine=romp-ibm |
2512 |
+ ;; |
2513 |
+ rs6000) |
2514 |
+ basic_machine=rs6000-ibm |
2515 |
+ ;; |
2516 |
+ vax) |
2517 |
+ basic_machine=vax-dec |
2518 |
+ ;; |
2519 |
+ pdp10) |
2520 |
+ # there are many clones, so DEC is not a safe bet |
2521 |
+ basic_machine=pdp10-unknown |
2522 |
+ ;; |
2523 |
+ pdp11) |
2524 |
+ basic_machine=pdp11-dec |
2525 |
+ ;; |
2526 |
+ we32k) |
2527 |
+ basic_machine=we32k-att |
2528 |
+ ;; |
2529 |
+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) |
2530 |
+ basic_machine=sh-unknown |
2531 |
+ ;; |
2532 |
+ sh64) |
2533 |
+ basic_machine=sh64-unknown |
2534 |
+ ;; |
2535 |
+ sparc | sparcv9 | sparcv9b) |
2536 |
+ basic_machine=sparc-sun |
2537 |
+ ;; |
2538 |
+ cydra) |
2539 |
+ basic_machine=cydra-cydrome |
2540 |
+ ;; |
2541 |
+ orion) |
2542 |
+ basic_machine=orion-highlevel |
2543 |
+ ;; |
2544 |
+ orion105) |
2545 |
+ basic_machine=clipper-highlevel |
2546 |
+ ;; |
2547 |
+ mac | mpw | mac-mpw) |
2548 |
+ basic_machine=m68k-apple |
2549 |
+ ;; |
2550 |
+ pmac | pmac-mpw) |
2551 |
+ basic_machine=powerpc-apple |
2552 |
+ ;; |
2553 |
+ *-unknown) |
2554 |
+ # Make sure to match an already-canonicalized machine name. |
2555 |
+ ;; |
2556 |
+ *) |
2557 |
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 |
2558 |
+ exit 1 |
2559 |
+ ;; |
2560 |
+esac |
2561 |
+ |
2562 |
+# Here we canonicalize certain aliases for manufacturers. |
2563 |
+case $basic_machine in |
2564 |
+ *-digital*) |
2565 |
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` |
2566 |
+ ;; |
2567 |
+ *-commodore*) |
2568 |
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` |
2569 |
+ ;; |
2570 |
+ *) |
2571 |
+ ;; |
2572 |
+esac |
2573 |
+ |
2574 |
+# Decode manufacturer-specific aliases for certain operating systems. |
2575 |
+ |
2576 |
+if [ x"$os" != x"" ] |
2577 |
+then |
2578 |
+case $os in |
2579 |
+ # First match some system type aliases |
2580 |
+ # that might get confused with valid system types. |
2581 |
+ # -solaris* is a basic system type, with this one exception. |
2582 |
+ -solaris1 | -solaris1.*) |
2583 |
+ os=`echo $os | sed -e 's|solaris1|sunos4|'` |
2584 |
+ ;; |
2585 |
+ -solaris) |
2586 |
+ os=-solaris2 |
2587 |
+ ;; |
2588 |
+ -svr4*) |
2589 |
+ os=-sysv4 |
2590 |
+ ;; |
2591 |
+ -unixware*) |
2592 |
+ os=-sysv4.2uw |
2593 |
+ ;; |
2594 |
+ -gnu/linux*) |
2595 |
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` |
2596 |
+ ;; |
2597 |
+ # First accept the basic system types. |
2598 |
+ # The portable systems comes first. |
2599 |
+ # Each alternative MUST END IN A *, to match a version number. |
2600 |
+ # -sysv* is not here because it comes later, after sysvr4. |
2601 |
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ |
2602 |
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ |
2603 |
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ |
2604 |
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ |
2605 |
+ | -aos* \ |
2606 |
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ |
2607 |
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ |
2608 |
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ |
2609 |
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ |
2610 |
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ |
2611 |
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ |
2612 |
+ | -chorusos* | -chorusrdb* \ |
2613 |
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
2614 |
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ |
2615 |
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ |
2616 |
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
2617 |
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ |
2618 |
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ |
2619 |
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ |
2620 |
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) |
2621 |
+ # Remember, each alternative MUST END IN *, to match a version number. |
2622 |
+ ;; |
2623 |
+ -qnx*) |
2624 |
+ case $basic_machine in |
2625 |
+ x86-* | i*86-*) |
2626 |
+ ;; |
2627 |
+ *) |
2628 |
+ os=-nto$os |
2629 |
+ ;; |
2630 |
+ esac |
2631 |
+ ;; |
2632 |
+ -nto-qnx*) |
2633 |
+ ;; |
2634 |
+ -nto*) |
2635 |
+ os=`echo $os | sed -e 's|nto|nto-qnx|'` |
2636 |
+ ;; |
2637 |
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ |
2638 |
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ |
2639 |
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) |
2640 |
+ ;; |
2641 |
+ -mac*) |
2642 |
+ os=`echo $os | sed -e 's|mac|macos|'` |
2643 |
+ ;; |
2644 |
+ -linux*) |
2645 |
+ os=`echo $os | sed -e 's|linux|linux-gnu|'` |
2646 |
+ ;; |
2647 |
+ -sunos5*) |
2648 |
+ os=`echo $os | sed -e 's|sunos5|solaris2|'` |
2649 |
+ ;; |
2650 |
+ -sunos6*) |
2651 |
+ os=`echo $os | sed -e 's|sunos6|solaris3|'` |
2652 |
+ ;; |
2653 |
+ -opened*) |
2654 |
+ os=-openedition |
2655 |
+ ;; |
2656 |
+ -wince*) |
2657 |
+ os=-wince |
2658 |
+ ;; |
2659 |
+ -osfrose*) |
2660 |
+ os=-osfrose |
2661 |
+ ;; |
2662 |
+ -osf*) |
2663 |
+ os=-osf |
2664 |
+ ;; |
2665 |
+ -utek*) |
2666 |
+ os=-bsd |
2667 |
+ ;; |
2668 |
+ -dynix*) |
2669 |
+ os=-bsd |
2670 |
+ ;; |
2671 |
+ -acis*) |
2672 |
+ os=-aos |
2673 |
+ ;; |
2674 |
+ -atheos*) |
2675 |
+ os=-atheos |
2676 |
+ ;; |
2677 |
+ -386bsd) |
2678 |
+ os=-bsd |
2679 |
+ ;; |
2680 |
+ -ctix* | -uts*) |
2681 |
+ os=-sysv |
2682 |
+ ;; |
2683 |
+ -nova*) |
2684 |
+ os=-rtmk-nova |
2685 |
+ ;; |
2686 |
+ -ns2 ) |
2687 |
+ os=-nextstep2 |
2688 |
+ ;; |
2689 |
+ -nsk*) |
2690 |
+ os=-nsk |
2691 |
+ ;; |
2692 |
+ # Preserve the version number of sinix5. |
2693 |
+ -sinix5.*) |
2694 |
+ os=`echo $os | sed -e 's|sinix|sysv|'` |
2695 |
+ ;; |
2696 |
+ -sinix*) |
2697 |
+ os=-sysv4 |
2698 |
+ ;; |
2699 |
+ -triton*) |
2700 |
+ os=-sysv3 |
2701 |
+ ;; |
2702 |
+ -oss*) |
2703 |
+ os=-sysv3 |
2704 |
+ ;; |
2705 |
+ -svr4) |
2706 |
+ os=-sysv4 |
2707 |
+ ;; |
2708 |
+ -svr3) |
2709 |
+ os=-sysv3 |
2710 |
+ ;; |
2711 |
+ -sysvr4) |
2712 |
+ os=-sysv4 |
2713 |
+ ;; |
2714 |
+ # This must come after -sysvr4. |
2715 |
+ -sysv*) |
2716 |
+ ;; |
2717 |
+ -ose*) |
2718 |
+ os=-ose |
2719 |
+ ;; |
2720 |
+ -es1800*) |
2721 |
+ os=-ose |
2722 |
+ ;; |
2723 |
+ -xenix) |
2724 |
+ os=-xenix |
2725 |
+ ;; |
2726 |
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
2727 |
+ os=-mint |
2728 |
+ ;; |
2729 |
+ -aros*) |
2730 |
+ os=-aros |
2731 |
+ ;; |
2732 |
+ -kaos*) |
2733 |
+ os=-kaos |
2734 |
+ ;; |
2735 |
+ -none) |
2736 |
+ ;; |
2737 |
+ *) |
2738 |
+ # Get rid of the `-' at the beginning of $os. |
2739 |
+ os=`echo $os | sed 's/[^-]*-//'` |
2740 |
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 |
2741 |
+ exit 1 |
2742 |
+ ;; |
2743 |
+esac |
2744 |
+else |
2745 |
+ |
2746 |
+# Here we handle the default operating systems that come with various machines. |
2747 |
+# The value should be what the vendor currently ships out the door with their |
2748 |
+# machine or put another way, the most popular os provided with the machine. |
2749 |
+ |
2750 |
+# Note that if you're going to try to match "-MANUFACTURER" here (say, |
2751 |
+# "-sun"), then you have to tell the case statement up towards the top |
2752 |
+# that MANUFACTURER isn't an operating system. Otherwise, code above |
2753 |
+# will signal an error saying that MANUFACTURER isn't an operating |
2754 |
+# system, and we'll never get to this point. |
2755 |
+ |
2756 |
+case $basic_machine in |
2757 |
+ *-acorn) |
2758 |
+ os=-riscix1.2 |
2759 |
+ ;; |
2760 |
+ arm*-rebel) |
2761 |
+ os=-linux |
2762 |
+ ;; |
2763 |
+ arm*-semi) |
2764 |
+ os=-aout |
2765 |
+ ;; |
2766 |
+ c4x-* | tic4x-*) |
2767 |
+ os=-coff |
2768 |
+ ;; |
2769 |
+ # This must come before the *-dec entry. |
2770 |
+ pdp10-*) |
2771 |
+ os=-tops20 |
2772 |
+ ;; |
2773 |
+ pdp11-*) |
2774 |
+ os=-none |
2775 |
+ ;; |
2776 |
+ *-dec | vax-*) |
2777 |
+ os=-ultrix4.2 |
2778 |
+ ;; |
2779 |
+ m68*-apollo) |
2780 |
+ os=-domain |
2781 |
+ ;; |
2782 |
+ i386-sun) |
2783 |
+ os=-sunos4.0.2 |
2784 |
+ ;; |
2785 |
+ m68000-sun) |
2786 |
+ os=-sunos3 |
2787 |
+ # This also exists in the configure program, but was not the |
2788 |
+ # default. |
2789 |
+ # os=-sunos4 |
2790 |
+ ;; |
2791 |
+ m68*-cisco) |
2792 |
+ os=-aout |
2793 |
+ ;; |
2794 |
+ mips*-cisco) |
2795 |
+ os=-elf |
2796 |
+ ;; |
2797 |
+ mips*-*) |
2798 |
+ os=-elf |
2799 |
+ ;; |
2800 |
+ or32-*) |
2801 |
+ os=-coff |
2802 |
+ ;; |
2803 |
+ *-tti) # must be before sparc entry or we get the wrong os. |
2804 |
+ os=-sysv3 |
2805 |
+ ;; |
2806 |
+ sparc-* | *-sun) |
2807 |
+ os=-sunos4.1.1 |
2808 |
+ ;; |
2809 |
+ *-be) |
2810 |
+ os=-beos |
2811 |
+ ;; |
2812 |
+ *-ibm) |
2813 |
+ os=-aix |
2814 |
+ ;; |
2815 |
+ *-wec) |
2816 |
+ os=-proelf |
2817 |
+ ;; |
2818 |
+ *-winbond) |
2819 |
+ os=-proelf |
2820 |
+ ;; |
2821 |
+ *-oki) |
2822 |
+ os=-proelf |
2823 |
+ ;; |
2824 |
+ *-hp) |
2825 |
+ os=-hpux |
2826 |
+ ;; |
2827 |
+ *-hitachi) |
2828 |
+ os=-hiux |
2829 |
+ ;; |
2830 |
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
2831 |
+ os=-sysv |
2832 |
+ ;; |
2833 |
+ *-cbm) |
2834 |
+ os=-amigaos |
2835 |
+ ;; |
2836 |
+ *-dg) |
2837 |
+ os=-dgux |
2838 |
+ ;; |
2839 |
+ *-dolphin) |
2840 |
+ os=-sysv3 |
2841 |
+ ;; |
2842 |
+ m68k-ccur) |
2843 |
+ os=-rtu |
2844 |
+ ;; |
2845 |
+ m88k-omron*) |
2846 |
+ os=-luna |
2847 |
+ ;; |
2848 |
+ *-next ) |
2849 |
+ os=-nextstep |
2850 |
+ ;; |
2851 |
+ *-sequent) |
2852 |
+ os=-ptx |
2853 |
+ ;; |
2854 |
+ *-crds) |
2855 |
+ os=-unos |
2856 |
+ ;; |
2857 |
+ *-ns) |
2858 |
+ os=-genix |
2859 |
+ ;; |
2860 |
+ i370-*) |
2861 |
+ os=-mvs |
2862 |
+ ;; |
2863 |
+ *-next) |
2864 |
+ os=-nextstep3 |
2865 |
+ ;; |
2866 |
+ *-gould) |
2867 |
+ os=-sysv |
2868 |
+ ;; |
2869 |
+ *-highlevel) |
2870 |
+ os=-bsd |
2871 |
+ ;; |
2872 |
+ *-encore) |
2873 |
+ os=-bsd |
2874 |
+ ;; |
2875 |
+ *-sgi) |
2876 |
+ os=-irix |
2877 |
+ ;; |
2878 |
+ *-siemens) |
2879 |
+ os=-sysv4 |
2880 |
+ ;; |
2881 |
+ *-masscomp) |
2882 |
+ os=-rtu |
2883 |
+ ;; |
2884 |
+ f30[01]-fujitsu | f700-fujitsu) |
2885 |
+ os=-uxpv |
2886 |
+ ;; |
2887 |
+ *-rom68k) |
2888 |
+ os=-coff |
2889 |
+ ;; |
2890 |
+ *-*bug) |
2891 |
+ os=-coff |
2892 |
+ ;; |
2893 |
+ *-apple) |
2894 |
+ os=-macos |
2895 |
+ ;; |
2896 |
+ *-atari*) |
2897 |
+ os=-mint |
2898 |
+ ;; |
2899 |
+ *) |
2900 |
+ os=-none |
2901 |
+ ;; |
2902 |
+esac |
2903 |
+fi |
2904 |
+ |
2905 |
+# Here we handle the case where we know the os, and the CPU type, but not the |
2906 |
+# manufacturer. We pick the logical manufacturer. |
2907 |
+vendor=unknown |
2908 |
+case $basic_machine in |
2909 |
+ *-unknown) |
2910 |
+ case $os in |
2911 |
+ -riscix*) |
2912 |
+ vendor=acorn |
2913 |
+ ;; |
2914 |
+ -sunos*) |
2915 |
+ vendor=sun |
2916 |
+ ;; |
2917 |
+ -aix*) |
2918 |
+ vendor=ibm |
2919 |
+ ;; |
2920 |
+ -beos*) |
2921 |
+ vendor=be |
2922 |
+ ;; |
2923 |
+ -hpux*) |
2924 |
+ vendor=hp |
2925 |
+ ;; |
2926 |
+ -mpeix*) |
2927 |
+ vendor=hp |
2928 |
+ ;; |
2929 |
+ -hiux*) |
2930 |
+ vendor=hitachi |
2931 |
+ ;; |
2932 |
+ -unos*) |
2933 |
+ vendor=crds |
2934 |
+ ;; |
2935 |
+ -dgux*) |
2936 |
+ vendor=dg |
2937 |
+ ;; |
2938 |
+ -luna*) |
2939 |
+ vendor=omron |
2940 |
+ ;; |
2941 |
+ -genix*) |
2942 |
+ vendor=ns |
2943 |
+ ;; |
2944 |
+ -mvs* | -opened*) |
2945 |
+ vendor=ibm |
2946 |
+ ;; |
2947 |
+ -ptx*) |
2948 |
+ vendor=sequent |
2949 |
+ ;; |
2950 |
+ -vxsim* | -vxworks* | -windiss*) |
2951 |
+ vendor=wrs |
2952 |
+ ;; |
2953 |
+ -aux*) |
2954 |
+ vendor=apple |
2955 |
+ ;; |
2956 |
+ -hms*) |
2957 |
+ vendor=hitachi |
2958 |
+ ;; |
2959 |
+ -mpw* | -macos*) |
2960 |
+ vendor=apple |
2961 |
+ ;; |
2962 |
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
2963 |
+ vendor=atari |
2964 |
+ ;; |
2965 |
+ -vos*) |
2966 |
+ vendor=stratus |
2967 |
+ ;; |
2968 |
+ esac |
2969 |
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` |
2970 |
+ ;; |
2971 |
+esac |
2972 |
+ |
2973 |
+echo $basic_machine$os |
2974 |
+exit 0 |
2975 |
+ |
2976 |
+# Local variables: |
2977 |
+# eval: (add-hook 'write-file-hooks 'time-stamp) |
2978 |
+# time-stamp-start: "timestamp='" |
2979 |
+# time-stamp-format: "%:y-%02m-%02d" |
2980 |
+# time-stamp-end: "'" |
2981 |
+# End: |
2982 |
diff -urN /var/empty/depcomp config/depcomp |
2983 |
--- /var/empty/depcomp Thu Jan 1 01:00:00 1970 |
2984 |
+++ config/depcomp Wed Nov 15 05:12:11 2006 |
2985 |
@@ -0,0 +1,530 @@ |
2986 |
+#! /bin/sh |
2987 |
+# depcomp - compile a program generating dependencies as side-effects |
2988 |
+ |
2989 |
+scriptversion=2005-07-09.11 |
2990 |
+ |
2991 |
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. |
2992 |
+ |
2993 |
+# This program is free software; you can redistribute it and/or modify |
2994 |
+# it under the terms of the GNU General Public License as published by |
2995 |
+# the Free Software Foundation; either version 2, or (at your option) |
2996 |
+# any later version. |
2997 |
+ |
2998 |
+# This program is distributed in the hope that it will be useful, |
2999 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3000 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3001 |
+# GNU General Public License for more details. |
3002 |
+ |
3003 |
+# You should have received a copy of the GNU General Public License |
3004 |
+# along with this program; if not, write to the Free Software |
3005 |
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
3006 |
+# 02110-1301, USA. |
3007 |
+ |
3008 |
+# As a special exception to the GNU General Public License, if you |
3009 |
+# distribute this file as part of a program that contains a |
3010 |
+# configuration script generated by Autoconf, you may include it under |
3011 |
+# the same distribution terms that you use for the rest of that program. |
3012 |
+ |
3013 |
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. |
3014 |
+ |
3015 |
+case $1 in |
3016 |
+ '') |
3017 |
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2 |
3018 |
+ exit 1; |
3019 |
+ ;; |
3020 |
+ -h | --h*) |
3021 |
+ cat <<\EOF |
3022 |
+Usage: depcomp [--help] [--version] PROGRAM [ARGS] |
3023 |
+ |
3024 |
+Run PROGRAMS ARGS to compile a file, generating dependencies |
3025 |
+as side-effects. |
3026 |
+ |
3027 |
+Environment variables: |
3028 |
+ depmode Dependency tracking mode. |
3029 |
+ source Source file read by `PROGRAMS ARGS'. |
3030 |
+ object Object file output by `PROGRAMS ARGS'. |
3031 |
+ DEPDIR directory where to store dependencies. |
3032 |
+ depfile Dependency file to output. |
3033 |
+ tmpdepfile Temporary file to use when outputing dependencies. |
3034 |
+ libtool Whether libtool is used (yes/no). |
3035 |
+ |
3036 |
+Report bugs to <bug-automake@gnu.org>. |
3037 |
+EOF |
3038 |
+ exit $? |
3039 |
+ ;; |
3040 |
+ -v | --v*) |
3041 |
+ echo "depcomp $scriptversion" |
3042 |
+ exit $? |
3043 |
+ ;; |
3044 |
+esac |
3045 |
+ |
3046 |
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then |
3047 |
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2 |
3048 |
+ exit 1 |
3049 |
+fi |
3050 |
+ |
3051 |
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. |
3052 |
+depfile=${depfile-`echo "$object" | |
3053 |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} |
3054 |
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} |
3055 |
+ |
3056 |
+rm -f "$tmpdepfile" |
3057 |
+ |
3058 |
+# Some modes work just like other modes, but use different flags. We |
3059 |
+# parameterize here, but still list the modes in the big case below, |
3060 |
+# to make depend.m4 easier to write. Note that we *cannot* use a case |
3061 |
+# here, because this file can only contain one case statement. |
3062 |
+if test "$depmode" = hp; then |
3063 |
+ # HP compiler uses -M and no extra arg. |
3064 |
+ gccflag=-M |
3065 |
+ depmode=gcc |
3066 |
+fi |
3067 |
+ |
3068 |
+if test "$depmode" = dashXmstdout; then |
3069 |
+ # This is just like dashmstdout with a different argument. |
3070 |
+ dashmflag=-xM |
3071 |
+ depmode=dashmstdout |
3072 |
+fi |
3073 |
+ |
3074 |
+case "$depmode" in |
3075 |
+gcc3) |
3076 |
+## gcc 3 implements dependency tracking that does exactly what |
3077 |
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like |
3078 |
+## it if -MD -MP comes after the -MF stuff. Hmm. |
3079 |
+ "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" |
3080 |
+ stat=$? |
3081 |
+ if test $stat -eq 0; then : |
3082 |
+ else |
3083 |
+ rm -f "$tmpdepfile" |
3084 |
+ exit $stat |
3085 |
+ fi |
3086 |
+ mv "$tmpdepfile" "$depfile" |
3087 |
+ ;; |
3088 |
+ |
3089 |
+gcc) |
3090 |
+## There are various ways to get dependency output from gcc. Here's |
3091 |
+## why we pick this rather obscure method: |
3092 |
+## - Don't want to use -MD because we'd like the dependencies to end |
3093 |
+## up in a subdir. Having to rename by hand is ugly. |
3094 |
+## (We might end up doing this anyway to support other compilers.) |
3095 |
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like |
3096 |
+## -MM, not -M (despite what the docs say). |
3097 |
+## - Using -M directly means running the compiler twice (even worse |
3098 |
+## than renaming). |
3099 |
+ if test -z "$gccflag"; then |
3100 |
+ gccflag=-MD, |
3101 |
+ fi |
3102 |
+ "$@" -Wp,"$gccflag$tmpdepfile" |
3103 |
+ stat=$? |
3104 |
+ if test $stat -eq 0; then : |
3105 |
+ else |
3106 |
+ rm -f "$tmpdepfile" |
3107 |
+ exit $stat |
3108 |
+ fi |
3109 |
+ rm -f "$depfile" |
3110 |
+ echo "$object : \\" > "$depfile" |
3111 |
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz |
3112 |
+## The second -e expression handles DOS-style file names with drive letters. |
3113 |
+ sed -e 's/^[^:]*: / /' \ |
3114 |
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" |
3115 |
+## This next piece of magic avoids the `deleted header file' problem. |
3116 |
+## The problem is that when a header file which appears in a .P file |
3117 |
+## is deleted, the dependency causes make to die (because there is |
3118 |
+## typically no way to rebuild the header). We avoid this by adding |
3119 |
+## dummy dependencies for each header file. Too bad gcc doesn't do |
3120 |
+## this for us directly. |
3121 |
+ tr ' ' ' |
3122 |
+' < "$tmpdepfile" | |
3123 |
+## Some versions of gcc put a space before the `:'. On the theory |
3124 |
+## that the space means something, we add a space to the output as |
3125 |
+## well. |
3126 |
+## Some versions of the HPUX 10.20 sed can't process this invocation |
3127 |
+## correctly. Breaking it into two sed invocations is a workaround. |
3128 |
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" |
3129 |
+ rm -f "$tmpdepfile" |
3130 |
+ ;; |
3131 |
+ |
3132 |
+hp) |
3133 |
+ # This case exists only to let depend.m4 do its work. It works by |
3134 |
+ # looking at the text of this script. This case will never be run, |
3135 |
+ # since it is checked for above. |
3136 |
+ exit 1 |
3137 |
+ ;; |
3138 |
+ |
3139 |
+sgi) |
3140 |
+ if test "$libtool" = yes; then |
3141 |
+ "$@" "-Wp,-MDupdate,$tmpdepfile" |
3142 |
+ else |
3143 |
+ "$@" -MDupdate "$tmpdepfile" |
3144 |
+ fi |
3145 |
+ stat=$? |
3146 |
+ if test $stat -eq 0; then : |
3147 |
+ else |
3148 |
+ rm -f "$tmpdepfile" |
3149 |
+ exit $stat |
3150 |
+ fi |
3151 |
+ rm -f "$depfile" |
3152 |
+ |
3153 |
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files |
3154 |
+ echo "$object : \\" > "$depfile" |
3155 |
+ |
3156 |
+ # Clip off the initial element (the dependent). Don't try to be |
3157 |
+ # clever and replace this with sed code, as IRIX sed won't handle |
3158 |
+ # lines with more than a fixed number of characters (4096 in |
3159 |
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; |
3160 |
+ # the IRIX cc adds comments like `#:fec' to the end of the |
3161 |
+ # dependency line. |
3162 |
+ tr ' ' ' |
3163 |
+' < "$tmpdepfile" \ |
3164 |
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ |
3165 |
+ tr ' |
3166 |
+' ' ' >> $depfile |
3167 |
+ echo >> $depfile |
3168 |
+ |
3169 |
+ # The second pass generates a dummy entry for each header file. |
3170 |
+ tr ' ' ' |
3171 |
+' < "$tmpdepfile" \ |
3172 |
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ |
3173 |
+ >> $depfile |
3174 |
+ else |
3175 |
+ # The sourcefile does not contain any dependencies, so just |
3176 |
+ # store a dummy comment line, to avoid errors with the Makefile |
3177 |
+ # "include basename.Plo" scheme. |
3178 |
+ echo "#dummy" > "$depfile" |
3179 |
+ fi |
3180 |
+ rm -f "$tmpdepfile" |
3181 |
+ ;; |
3182 |
+ |
3183 |
+aix) |
3184 |
+ # The C for AIX Compiler uses -M and outputs the dependencies |
3185 |
+ # in a .u file. In older versions, this file always lives in the |
3186 |
+ # current directory. Also, the AIX compiler puts `$object:' at the |
3187 |
+ # start of each line; $object doesn't have directory information. |
3188 |
+ # Version 6 uses the directory in both cases. |
3189 |
+ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` |
3190 |
+ tmpdepfile="$stripped.u" |
3191 |
+ if test "$libtool" = yes; then |
3192 |
+ "$@" -Wc,-M |
3193 |
+ else |
3194 |
+ "$@" -M |
3195 |
+ fi |
3196 |
+ stat=$? |
3197 |
+ |
3198 |
+ if test -f "$tmpdepfile"; then : |
3199 |
+ else |
3200 |
+ stripped=`echo "$stripped" | sed 's,^.*/,,'` |
3201 |
+ tmpdepfile="$stripped.u" |
3202 |
+ fi |
3203 |
+ |
3204 |
+ if test $stat -eq 0; then : |
3205 |
+ else |
3206 |
+ rm -f "$tmpdepfile" |
3207 |
+ exit $stat |
3208 |
+ fi |
3209 |
+ |
3210 |
+ if test -f "$tmpdepfile"; then |
3211 |
+ outname="$stripped.o" |
3212 |
+ # Each line is of the form `foo.o: dependent.h'. |
3213 |
+ # Do two passes, one to just change these to |
3214 |
+ # `$object: dependent.h' and one to simply `dependent.h:'. |
3215 |
+ sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" |
3216 |
+ sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" |
3217 |
+ else |
3218 |
+ # The sourcefile does not contain any dependencies, so just |
3219 |
+ # store a dummy comment line, to avoid errors with the Makefile |
3220 |
+ # "include basename.Plo" scheme. |
3221 |
+ echo "#dummy" > "$depfile" |
3222 |
+ fi |
3223 |
+ rm -f "$tmpdepfile" |
3224 |
+ ;; |
3225 |
+ |
3226 |
+icc) |
3227 |
+ # Intel's C compiler understands `-MD -MF file'. However on |
3228 |
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c |
3229 |
+ # ICC 7.0 will fill foo.d with something like |
3230 |
+ # foo.o: sub/foo.c |
3231 |
+ # foo.o: sub/foo.h |
3232 |
+ # which is wrong. We want: |
3233 |
+ # sub/foo.o: sub/foo.c |
3234 |
+ # sub/foo.o: sub/foo.h |
3235 |
+ # sub/foo.c: |
3236 |
+ # sub/foo.h: |
3237 |
+ # ICC 7.1 will output |
3238 |
+ # foo.o: sub/foo.c sub/foo.h |
3239 |
+ # and will wrap long lines using \ : |
3240 |
+ # foo.o: sub/foo.c ... \ |
3241 |
+ # sub/foo.h ... \ |
3242 |
+ # ... |
3243 |
+ |
3244 |
+ "$@" -MD -MF "$tmpdepfile" |
3245 |
+ stat=$? |
3246 |
+ if test $stat -eq 0; then : |
3247 |
+ else |
3248 |
+ rm -f "$tmpdepfile" |
3249 |
+ exit $stat |
3250 |
+ fi |
3251 |
+ rm -f "$depfile" |
3252 |
+ # Each line is of the form `foo.o: dependent.h', |
3253 |
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. |
3254 |
+ # Do two passes, one to just change these to |
3255 |
+ # `$object: dependent.h' and one to simply `dependent.h:'. |
3256 |
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" |
3257 |
+ # Some versions of the HPUX 10.20 sed can't process this invocation |
3258 |
+ # correctly. Breaking it into two sed invocations is a workaround. |
3259 |
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | |
3260 |
+ sed -e 's/$/ :/' >> "$depfile" |
3261 |
+ rm -f "$tmpdepfile" |
3262 |
+ ;; |
3263 |
+ |
3264 |
+tru64) |
3265 |
+ # The Tru64 compiler uses -MD to generate dependencies as a side |
3266 |
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. |
3267 |
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put |
3268 |
+ # dependencies in `foo.d' instead, so we check for that too. |
3269 |
+ # Subdirectories are respected. |
3270 |
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` |
3271 |
+ test "x$dir" = "x$object" && dir= |
3272 |
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` |
3273 |
+ |
3274 |
+ if test "$libtool" = yes; then |
3275 |
+ # With Tru64 cc, shared objects can also be used to make a |
3276 |
+ # static library. This mecanism is used in libtool 1.4 series to |
3277 |
+ # handle both shared and static libraries in a single compilation. |
3278 |
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. |
3279 |
+ # |
3280 |
+ # With libtool 1.5 this exception was removed, and libtool now |
3281 |
+ # generates 2 separate objects for the 2 libraries. These two |
3282 |
+ # compilations output dependencies in in $dir.libs/$base.o.d and |
3283 |
+ # in $dir$base.o.d. We have to check for both files, because |
3284 |
+ # one of the two compilations can be disabled. We should prefer |
3285 |
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is |
3286 |
+ # automatically cleaned when .libs/ is deleted, while ignoring |
3287 |
+ # the former would cause a distcleancheck panic. |
3288 |
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 |
3289 |
+ tmpdepfile2=$dir$base.o.d # libtool 1.5 |
3290 |
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 |
3291 |
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 |
3292 |
+ "$@" -Wc,-MD |
3293 |
+ else |
3294 |
+ tmpdepfile1=$dir$base.o.d |
3295 |
+ tmpdepfile2=$dir$base.d |
3296 |
+ tmpdepfile3=$dir$base.d |
3297 |
+ tmpdepfile4=$dir$base.d |
3298 |
+ "$@" -MD |
3299 |
+ fi |
3300 |
+ |
3301 |
+ stat=$? |
3302 |
+ if test $stat -eq 0; then : |
3303 |
+ else |
3304 |
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" |
3305 |
+ exit $stat |
3306 |
+ fi |
3307 |
+ |
3308 |
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" |
3309 |
+ do |
3310 |
+ test -f "$tmpdepfile" && break |
3311 |
+ done |
3312 |
+ if test -f "$tmpdepfile"; then |
3313 |
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" |
3314 |
+ # That's a tab and a space in the []. |
3315 |
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" |
3316 |
+ else |
3317 |
+ echo "#dummy" > "$depfile" |
3318 |
+ fi |
3319 |
+ rm -f "$tmpdepfile" |
3320 |
+ ;; |
3321 |
+ |
3322 |
+#nosideeffect) |
3323 |
+ # This comment above is used by automake to tell side-effect |
3324 |
+ # dependency tracking mechanisms from slower ones. |
3325 |
+ |
3326 |
+dashmstdout) |
3327 |
+ # Important note: in order to support this mode, a compiler *must* |
3328 |
+ # always write the preprocessed file to stdout, regardless of -o. |
3329 |
+ "$@" || exit $? |
3330 |
+ |
3331 |
+ # Remove the call to Libtool. |
3332 |
+ if test "$libtool" = yes; then |
3333 |
+ while test $1 != '--mode=compile'; do |
3334 |
+ shift |
3335 |
+ done |
3336 |
+ shift |
3337 |
+ fi |
3338 |
+ |
3339 |
+ # Remove `-o $object'. |
3340 |
+ IFS=" " |
3341 |
+ for arg |
3342 |
+ do |
3343 |
+ case $arg in |
3344 |
+ -o) |
3345 |
+ shift |
3346 |
+ ;; |
3347 |
+ $object) |
3348 |
+ shift |
3349 |
+ ;; |
3350 |
+ *) |
3351 |
+ set fnord "$@" "$arg" |
3352 |
+ shift # fnord |
3353 |
+ shift # $arg |
3354 |
+ ;; |
3355 |
+ esac |
3356 |
+ done |
3357 |
+ |
3358 |
+ test -z "$dashmflag" && dashmflag=-M |
3359 |
+ # Require at least two characters before searching for `:' |
3360 |
+ # in the target name. This is to cope with DOS-style filenames: |
3361 |
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. |
3362 |
+ "$@" $dashmflag | |
3363 |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" |
3364 |
+ rm -f "$depfile" |
3365 |
+ cat < "$tmpdepfile" > "$depfile" |
3366 |
+ tr ' ' ' |
3367 |
+' < "$tmpdepfile" | \ |
3368 |
+## Some versions of the HPUX 10.20 sed can't process this invocation |
3369 |
+## correctly. Breaking it into two sed invocations is a workaround. |
3370 |
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" |
3371 |
+ rm -f "$tmpdepfile" |
3372 |
+ ;; |
3373 |
+ |
3374 |
+dashXmstdout) |
3375 |
+ # This case only exists to satisfy depend.m4. It is never actually |
3376 |
+ # run, as this mode is specially recognized in the preamble. |
3377 |
+ exit 1 |
3378 |
+ ;; |
3379 |
+ |
3380 |
+makedepend) |
3381 |
+ "$@" || exit $? |
3382 |
+ # Remove any Libtool call |
3383 |
+ if test "$libtool" = yes; then |
3384 |
+ while test $1 != '--mode=compile'; do |
3385 |
+ shift |
3386 |
+ done |
3387 |
+ shift |
3388 |
+ fi |
3389 |
+ # X makedepend |
3390 |
+ shift |
3391 |
+ cleared=no |
3392 |
+ for arg in "$@"; do |
3393 |
+ case $cleared in |
3394 |
+ no) |
3395 |
+ set ""; shift |
3396 |
+ cleared=yes ;; |
3397 |
+ esac |
3398 |
+ case "$arg" in |
3399 |
+ -D*|-I*) |
3400 |
+ set fnord "$@" "$arg"; shift ;; |
3401 |
+ # Strip any option that makedepend may not understand. Remove |
3402 |
+ # the object too, otherwise makedepend will parse it as a source file. |
3403 |
+ -*|$object) |
3404 |
+ ;; |
3405 |
+ *) |
3406 |
+ set fnord "$@" "$arg"; shift ;; |
3407 |
+ esac |
3408 |
+ done |
3409 |
+ obj_suffix="`echo $object | sed 's/^.*\././'`" |
3410 |
+ touch "$tmpdepfile" |
3411 |
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" |
3412 |
+ rm -f "$depfile" |
3413 |
+ cat < "$tmpdepfile" > "$depfile" |
3414 |
+ sed '1,2d' "$tmpdepfile" | tr ' ' ' |
3415 |
+' | \ |
3416 |
+## Some versions of the HPUX 10.20 sed can't process this invocation |
3417 |
+## correctly. Breaking it into two sed invocations is a workaround. |
3418 |
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" |
3419 |
+ rm -f "$tmpdepfile" "$tmpdepfile".bak |
3420 |
+ ;; |
3421 |
+ |
3422 |
+cpp) |
3423 |
+ # Important note: in order to support this mode, a compiler *must* |
3424 |
+ # always write the preprocessed file to stdout. |
3425 |
+ "$@" || exit $? |
3426 |
+ |
3427 |
+ # Remove the call to Libtool. |
3428 |
+ if test "$libtool" = yes; then |
3429 |
+ while test $1 != '--mode=compile'; do |
3430 |
+ shift |
3431 |
+ done |
3432 |
+ shift |
3433 |
+ fi |
3434 |
+ |
3435 |
+ # Remove `-o $object'. |
3436 |
+ IFS=" " |
3437 |
+ for arg |
3438 |
+ do |
3439 |
+ case $arg in |
3440 |
+ -o) |
3441 |
+ shift |
3442 |
+ ;; |
3443 |
+ $object) |
3444 |
+ shift |
3445 |
+ ;; |
3446 |
+ *) |
3447 |
+ set fnord "$@" "$arg" |
3448 |
+ shift # fnord |
3449 |
+ shift # $arg |
3450 |
+ ;; |
3451 |
+ esac |
3452 |
+ done |
3453 |
+ |
3454 |
+ "$@" -E | |
3455 |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ |
3456 |
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | |
3457 |
+ sed '$ s: \\$::' > "$tmpdepfile" |
3458 |
+ rm -f "$depfile" |
3459 |
+ echo "$object : \\" > "$depfile" |
3460 |
+ cat < "$tmpdepfile" >> "$depfile" |
3461 |
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" |
3462 |
+ rm -f "$tmpdepfile" |
3463 |
+ ;; |
3464 |
+ |
3465 |
+msvisualcpp) |
3466 |
+ # Important note: in order to support this mode, a compiler *must* |
3467 |
+ # always write the preprocessed file to stdout, regardless of -o, |
3468 |
+ # because we must use -o when running libtool. |
3469 |
+ "$@" || exit $? |
3470 |
+ IFS=" " |
3471 |
+ for arg |
3472 |
+ do |
3473 |
+ case "$arg" in |
3474 |
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") |
3475 |
+ set fnord "$@" |
3476 |
+ shift |
3477 |
+ shift |
3478 |
+ ;; |
3479 |
+ *) |
3480 |
+ set fnord "$@" "$arg" |
3481 |
+ shift |
3482 |
+ shift |
3483 |
+ ;; |
3484 |
+ esac |
3485 |
+ done |
3486 |
+ "$@" -E | |
3487 |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" |
3488 |
+ rm -f "$depfile" |
3489 |
+ echo "$object : \\" > "$depfile" |
3490 |
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" |
3491 |
+ echo " " >> "$depfile" |
3492 |
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" |
3493 |
+ rm -f "$tmpdepfile" |
3494 |
+ ;; |
3495 |
+ |
3496 |
+none) |
3497 |
+ exec "$@" |
3498 |
+ ;; |
3499 |
+ |
3500 |
+*) |
3501 |
+ echo "Unknown depmode $depmode" 1>&2 |
3502 |
+ exit 1 |
3503 |
+ ;; |
3504 |
+esac |
3505 |
+ |
3506 |
+exit 0 |
3507 |
+ |
3508 |
+# Local Variables: |
3509 |
+# mode: shell-script |
3510 |
+# sh-indentation: 2 |
3511 |
+# eval: (add-hook 'write-file-hooks 'time-stamp) |
3512 |
+# time-stamp-start: "scriptversion=" |
3513 |
+# time-stamp-format: "%:y-%02m-%02d.%02H" |
3514 |
+# time-stamp-end: "$" |
3515 |
+# End: |
3516 |
diff -urN /var/empty/install-sh config/install-sh |
3517 |
--- /var/empty/install-sh Thu Jan 1 01:00:00 1970 |
3518 |
+++ config/install-sh Wed Nov 15 05:12:11 2006 |
3519 |
@@ -0,0 +1,323 @@ |
3520 |
+#!/bin/sh |
3521 |
+# install - install a program, script, or datafile |
3522 |
+ |
3523 |
+scriptversion=2005-05-14.22 |
3524 |
+ |
3525 |
+# This originates from X11R5 (mit/util/scripts/install.sh), which was |
3526 |
+# later released in X11R6 (xc/config/util/install.sh) with the |
3527 |
+# following copyright and license. |
3528 |
+# |
3529 |
+# Copyright (C) 1994 X Consortium |
3530 |
+# |
3531 |
+# Permission is hereby granted, free of charge, to any person obtaining a copy |
3532 |
+# of this software and associated documentation files (the "Software"), to |
3533 |
+# deal in the Software without restriction, including without limitation the |
3534 |
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
3535 |
+# sell copies of the Software, and to permit persons to whom the Software is |
3536 |
+# furnished to do so, subject to the following conditions: |
3537 |
+# |
3538 |
+# The above copyright notice and this permission notice shall be included in |
3539 |
+# all copies or substantial portions of the Software. |
3540 |
+# |
3541 |
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
3542 |
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
3543 |
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
3544 |
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN |
3545 |
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- |
3546 |
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
3547 |
+# |
3548 |
+# Except as contained in this notice, the name of the X Consortium shall not |
3549 |
+# be used in advertising or otherwise to promote the sale, use or other deal- |
3550 |
+# ings in this Software without prior written authorization from the X Consor- |
3551 |
+# tium. |
3552 |
+# |
3553 |
+# |
3554 |
+# FSF changes to this file are in the public domain. |
3555 |
+# |
3556 |
+# Calling this script install-sh is preferred over install.sh, to prevent |
3557 |
+# `make' implicit rules from creating a file called install from it |
3558 |
+# when there is no Makefile. |
3559 |
+# |
3560 |
+# This script is compatible with the BSD install script, but was written |
3561 |
+# from scratch. It can only install one file at a time, a restriction |
3562 |
+# shared with many OS's install programs. |
3563 |
+ |
3564 |
+# set DOITPROG to echo to test this script |
3565 |
+ |
3566 |
+# Don't use :- since 4.3BSD and earlier shells don't like it. |
3567 |
+doit="${DOITPROG-}" |
3568 |
+ |
3569 |
+# put in absolute paths if you don't have them in your path; or use env. vars. |
3570 |
+ |
3571 |
+mvprog="${MVPROG-mv}" |
3572 |
+cpprog="${CPPROG-cp}" |
3573 |
+chmodprog="${CHMODPROG-chmod}" |
3574 |
+chownprog="${CHOWNPROG-chown}" |
3575 |
+chgrpprog="${CHGRPPROG-chgrp}" |
3576 |
+stripprog="${STRIPPROG-strip}" |
3577 |
+rmprog="${RMPROG-rm}" |
3578 |
+mkdirprog="${MKDIRPROG-mkdir}" |
3579 |
+ |
3580 |
+chmodcmd="$chmodprog 0755" |
3581 |
+chowncmd= |
3582 |
+chgrpcmd= |
3583 |
+stripcmd= |
3584 |
+rmcmd="$rmprog -f" |
3585 |
+mvcmd="$mvprog" |
3586 |
+src= |
3587 |
+dst= |
3588 |
+dir_arg= |
3589 |
+dstarg= |
3590 |
+no_target_directory= |
3591 |
+ |
3592 |
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE |
3593 |
+ or: $0 [OPTION]... SRCFILES... DIRECTORY |
3594 |
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES... |
3595 |
+ or: $0 [OPTION]... -d DIRECTORIES... |
3596 |
+ |
3597 |
+In the 1st form, copy SRCFILE to DSTFILE. |
3598 |
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. |
3599 |
+In the 4th, create DIRECTORIES. |
3600 |
+ |
3601 |
+Options: |
3602 |
+-c (ignored) |
3603 |
+-d create directories instead of installing files. |
3604 |
+-g GROUP $chgrpprog installed files to GROUP. |
3605 |
+-m MODE $chmodprog installed files to MODE. |
3606 |
+-o USER $chownprog installed files to USER. |
3607 |
+-s $stripprog installed files. |
3608 |
+-t DIRECTORY install into DIRECTORY. |
3609 |
+-T report an error if DSTFILE is a directory. |
3610 |
+--help display this help and exit. |
3611 |
+--version display version info and exit. |
3612 |
+ |
3613 |
+Environment variables override the default commands: |
3614 |
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG |
3615 |
+" |
3616 |
+ |
3617 |
+while test -n "$1"; do |
3618 |
+ case $1 in |
3619 |
+ -c) shift |
3620 |
+ continue;; |
3621 |
+ |
3622 |
+ -d) dir_arg=true |
3623 |
+ shift |
3624 |
+ continue;; |
3625 |
+ |
3626 |
+ -g) chgrpcmd="$chgrpprog $2" |
3627 |
+ shift |
3628 |
+ shift |
3629 |
+ continue;; |
3630 |
+ |
3631 |
+ --help) echo "$usage"; exit $?;; |
3632 |
+ |
3633 |
+ -m) chmodcmd="$chmodprog $2" |
3634 |
+ shift |
3635 |
+ shift |
3636 |
+ continue;; |
3637 |
+ |
3638 |
+ -o) chowncmd="$chownprog $2" |
3639 |
+ shift |
3640 |
+ shift |
3641 |
+ continue;; |
3642 |
+ |
3643 |
+ -s) stripcmd=$stripprog |
3644 |
+ shift |
3645 |
+ continue;; |
3646 |
+ |
3647 |
+ -t) dstarg=$2 |
3648 |
+ shift |
3649 |
+ shift |
3650 |
+ continue;; |
3651 |
+ |
3652 |
+ -T) no_target_directory=true |
3653 |
+ shift |
3654 |
+ continue;; |
3655 |
+ |
3656 |
+ --version) echo "$0 $scriptversion"; exit $?;; |
3657 |
+ |
3658 |
+ *) # When -d is used, all remaining arguments are directories to create. |
3659 |
+ # When -t is used, the destination is already specified. |
3660 |
+ test -n "$dir_arg$dstarg" && break |
3661 |
+ # Otherwise, the last argument is the destination. Remove it from $@. |
3662 |
+ for arg |
3663 |
+ do |
3664 |
+ if test -n "$dstarg"; then |
3665 |
+ # $@ is not empty: it contains at least $arg. |
3666 |
+ set fnord "$@" "$dstarg" |
3667 |
+ shift # fnord |
3668 |
+ fi |
3669 |
+ shift # arg |
3670 |
+ dstarg=$arg |
3671 |
+ done |
3672 |
+ break;; |
3673 |
+ esac |
3674 |
+done |
3675 |
+ |
3676 |
+if test -z "$1"; then |
3677 |
+ if test -z "$dir_arg"; then |
3678 |
+ echo "$0: no input file specified." >&2 |
3679 |
+ exit 1 |
3680 |
+ fi |
3681 |
+ # It's OK to call `install-sh -d' without argument. |
3682 |
+ # This can happen when creating conditional directories. |
3683 |
+ exit 0 |
3684 |
+fi |
3685 |
+ |
3686 |
+for src |
3687 |
+do |
3688 |
+ # Protect names starting with `-'. |
3689 |
+ case $src in |
3690 |
+ -*) src=./$src ;; |
3691 |
+ esac |
3692 |
+ |
3693 |
+ if test -n "$dir_arg"; then |
3694 |
+ dst=$src |
3695 |
+ src= |
3696 |
+ |
3697 |
+ if test -d "$dst"; then |
3698 |
+ mkdircmd=: |
3699 |
+ chmodcmd= |
3700 |
+ else |
3701 |
+ mkdircmd=$mkdirprog |
3702 |
+ fi |
3703 |
+ else |
3704 |
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command |
3705 |
+ # might cause directories to be created, which would be especially bad |
3706 |
+ # if $src (and thus $dsttmp) contains '*'. |
3707 |
+ if test ! -f "$src" && test ! -d "$src"; then |
3708 |
+ echo "$0: $src does not exist." >&2 |
3709 |
+ exit 1 |
3710 |
+ fi |
3711 |
+ |
3712 |
+ if test -z "$dstarg"; then |
3713 |
+ echo "$0: no destination specified." >&2 |
3714 |
+ exit 1 |
3715 |
+ fi |
3716 |
+ |
3717 |
+ dst=$dstarg |
3718 |
+ # Protect names starting with `-'. |
3719 |
+ case $dst in |
3720 |
+ -*) dst=./$dst ;; |
3721 |
+ esac |
3722 |
+ |
3723 |
+ # If destination is a directory, append the input filename; won't work |
3724 |
+ # if double slashes aren't ignored. |
3725 |
+ if test -d "$dst"; then |
3726 |
+ if test -n "$no_target_directory"; then |
3727 |
+ echo "$0: $dstarg: Is a directory" >&2 |
3728 |
+ exit 1 |
3729 |
+ fi |
3730 |
+ dst=$dst/`basename "$src"` |
3731 |
+ fi |
3732 |
+ fi |
3733 |
+ |
3734 |
+ # This sed command emulates the dirname command. |
3735 |
+ dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` |
3736 |
+ |
3737 |
+ # Make sure that the destination directory exists. |
3738 |
+ |
3739 |
+ # Skip lots of stat calls in the usual case. |
3740 |
+ if test ! -d "$dstdir"; then |
3741 |
+ defaultIFS=' |
3742 |
+ ' |
3743 |
+ IFS="${IFS-$defaultIFS}" |
3744 |
+ |
3745 |
+ oIFS=$IFS |
3746 |
+ # Some sh's can't handle IFS=/ for some reason. |
3747 |
+ IFS='%' |
3748 |
+ set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` |
3749 |
+ shift |
3750 |
+ IFS=$oIFS |
3751 |
+ |
3752 |
+ pathcomp= |
3753 |
+ |
3754 |
+ while test $# -ne 0 ; do |
3755 |
+ pathcomp=$pathcomp$1 |
3756 |
+ shift |
3757 |
+ if test ! -d "$pathcomp"; then |
3758 |
+ $mkdirprog "$pathcomp" |
3759 |
+ # mkdir can fail with a `File exist' error in case several |
3760 |
+ # install-sh are creating the directory concurrently. This |
3761 |
+ # is OK. |
3762 |
+ test -d "$pathcomp" || exit |
3763 |
+ fi |
3764 |
+ pathcomp=$pathcomp/ |
3765 |
+ done |
3766 |
+ fi |
3767 |
+ |
3768 |
+ if test -n "$dir_arg"; then |
3769 |
+ $doit $mkdircmd "$dst" \ |
3770 |
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ |
3771 |
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ |
3772 |
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ |
3773 |
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } |
3774 |
+ |
3775 |
+ else |
3776 |
+ dstfile=`basename "$dst"` |
3777 |
+ |
3778 |
+ # Make a couple of temp file names in the proper directory. |
3779 |
+ dsttmp=$dstdir/_inst.$$_ |
3780 |
+ rmtmp=$dstdir/_rm.$$_ |
3781 |
+ |
3782 |
+ # Trap to clean up those temp files at exit. |
3783 |
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 |
3784 |
+ trap '(exit $?); exit' 1 2 13 15 |
3785 |
+ |
3786 |
+ # Copy the file name to the temp name. |
3787 |
+ $doit $cpprog "$src" "$dsttmp" && |
3788 |
+ |
3789 |
+ # and set any options; do chmod last to preserve setuid bits. |
3790 |
+ # |
3791 |
+ # If any of these fail, we abort the whole thing. If we want to |
3792 |
+ # ignore errors from any of these, just make sure not to ignore |
3793 |
+ # errors from the above "$doit $cpprog $src $dsttmp" command. |
3794 |
+ # |
3795 |
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ |
3796 |
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ |
3797 |
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ |
3798 |
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && |
3799 |
+ |
3800 |
+ # Now rename the file to the real destination. |
3801 |
+ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ |
3802 |
+ || { |
3803 |
+ # The rename failed, perhaps because mv can't rename something else |
3804 |
+ # to itself, or perhaps because mv is so ancient that it does not |
3805 |
+ # support -f. |
3806 |
+ |
3807 |
+ # Now remove or move aside any old file at destination location. |
3808 |
+ # We try this two ways since rm can't unlink itself on some |
3809 |
+ # systems and the destination file might be busy for other |
3810 |
+ # reasons. In this case, the final cleanup might fail but the new |
3811 |
+ # file should still install successfully. |
3812 |
+ { |
3813 |
+ if test -f "$dstdir/$dstfile"; then |
3814 |
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ |
3815 |
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ |
3816 |
+ || { |
3817 |
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 |
3818 |
+ (exit 1); exit 1 |
3819 |
+ } |
3820 |
+ else |
3821 |
+ : |
3822 |
+ fi |
3823 |
+ } && |
3824 |
+ |
3825 |
+ # Now rename the file to the real destination. |
3826 |
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" |
3827 |
+ } |
3828 |
+ } |
3829 |
+ fi || { (exit 1); exit 1; } |
3830 |
+done |
3831 |
+ |
3832 |
+# The final little trick to "correctly" pass the exit status to the exit trap. |
3833 |
+{ |
3834 |
+ (exit 0); exit 0 |
3835 |
+} |
3836 |
+ |
3837 |
+# Local variables: |
3838 |
+# eval: (add-hook 'write-file-hooks 'time-stamp) |
3839 |
+# time-stamp-start: "scriptversion=" |
3840 |
+# time-stamp-format: "%:y-%02m-%02d.%02H" |
3841 |
+# time-stamp-end: "$" |
3842 |
+# End: |
3843 |
diff -urN /var/empty/ltmain.sh config/ltmain.sh |
3844 |
--- /var/empty/ltmain.sh Thu Jan 1 01:00:00 1970 |
3845 |
+++ config/ltmain.sh Wed Nov 15 05:12:11 2006 |
3846 |
@@ -0,0 +1,6971 @@ |
3847 |
+# ltmain.sh - Provide generalized library-building support services. |
3848 |
+# NOTE: Changing this file will not affect anything until you rerun configure. |
3849 |
+# |
3850 |
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 |
3851 |
+# Free Software Foundation, Inc. |
3852 |
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
3853 |
+# |
3854 |
+# This program is free software; you can redistribute it and/or modify |
3855 |
+# it under the terms of the GNU General Public License as published by |
3856 |
+# the Free Software Foundation; either version 2 of the License, or |
3857 |
+# (at your option) any later version. |
3858 |
+# |
3859 |
+# This program is distributed in the hope that it will be useful, but |
3860 |
+# WITHOUT ANY WARRANTY; without even the implied warranty of |
3861 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3862 |
+# General Public License for more details. |
3863 |
+# |
3864 |
+# You should have received a copy of the GNU General Public License |
3865 |
+# along with this program; if not, write to the Free Software |
3866 |
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
3867 |
+# |
3868 |
+# As a special exception to the GNU General Public License, if you |
3869 |
+# distribute this file as part of a program that contains a |
3870 |
+# configuration script generated by Autoconf, you may include it under |
3871 |
+# the same distribution terms that you use for the rest of that program. |
3872 |
+ |
3873 |
+basename="s,^.*/,,g" |
3874 |
+ |
3875 |
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh |
3876 |
+# is ksh but when the shell is invoked as "sh" and the current value of |
3877 |
+# the _XPG environment variable is not equal to 1 (one), the special |
3878 |
+# positional parameter $0, within a function call, is the name of the |
3879 |
+# function. |
3880 |
+progpath="$0" |
3881 |
+ |
3882 |
+# define SED for historic ltconfig's generated by Libtool 1.3 |
3883 |
+test -z "$SED" && SED=sed |
3884 |
+ |
3885 |
+# The name of this program: |
3886 |
+progname=`echo "$progpath" | $SED $basename` |
3887 |
+modename="$progname" |
3888 |
+ |
3889 |
+# Global variables: |
3890 |
+EXIT_SUCCESS=0 |
3891 |
+EXIT_FAILURE=1 |
3892 |
+ |
3893 |
+PROGRAM=ltmain.sh |
3894 |
+PACKAGE=libtool |
3895 |
+VERSION=1.5.22 |
3896 |
+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" |
3897 |
+ |
3898 |
+# See if we are running on zsh, and set the options which allow our |
3899 |
+# commands through without removal of \ escapes. |
3900 |
+if test -n "${ZSH_VERSION+set}" ; then |
3901 |
+ setopt NO_GLOB_SUBST |
3902 |
+fi |
3903 |
+# Same for EGREP, and just to be sure, do LTCC as well |
3904 |
+if test "X$EGREP" = X ; then |
3905 |
+ EGREP=egrep |
3906 |
+fi |
3907 |
+if test "X$LTCC" = X ; then |
3908 |
+ LTCC=${CC-gcc} |
3909 |
+fi |
3910 |
+ |
3911 |
+# Check that we have a working $echo. |
3912 |
+if test "X$1" = X--no-reexec; then |
3913 |
+ # Discard the --no-reexec flag, and continue. |
3914 |
+ shift |
3915 |
+elif test "X$1" = X--fallback-echo; then |
3916 |
+ # Avoid inline document here, it may be left over |
3917 |
+ : |
3918 |
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then |
3919 |
+ # Yippee, $echo works! |
3920 |
+ : |
3921 |
+else |
3922 |
+ # Restart under the correct shell, and then maybe $echo will work. |
3923 |
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"} |
3924 |
+fi |
3925 |
+ |
3926 |
+if test "X$1" = X--fallback-echo; then |
3927 |
+ # used as fallback echo |
3928 |
+ shift |
3929 |
+ cat <<EOF |
3930 |
+$* |
3931 |
+EOF |
3932 |
+ exit $EXIT_SUCCESS |
3933 |
+fi |
3934 |
+ |
3935 |
+default_mode= |
3936 |
+help="Try \`$progname --help' for more information." |
3937 |
+magic="%%%MAGIC variable%%%" |
3938 |
+mkdir="mkdir" |
3939 |
+mv="mv -f" |
3940 |
+rm="rm -f" |
3941 |
+ |
3942 |
+# Sed substitution that helps us do robust quoting. It backslashifies |
3943 |
+# metacharacters that are still active within double-quoted strings. |
3944 |
+Xsed="${SED}"' -e 1s/^X//' |
3945 |
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' |
3946 |
+# test EBCDIC or ASCII |
3947 |
+case `echo X|tr X '\101'` in |
3948 |
+ A) # ASCII based system |
3949 |
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr |
3950 |
+ SP2NL='tr \040 \012' |
3951 |
+ NL2SP='tr \015\012 \040\040' |
3952 |
+ ;; |
3953 |
+ *) # EBCDIC based system |
3954 |
+ SP2NL='tr \100 \n' |
3955 |
+ NL2SP='tr \r\n \100\100' |
3956 |
+ ;; |
3957 |
+esac |
3958 |
+ |
3959 |
+# NLS nuisances. |
3960 |
+# Only set LANG and LC_ALL to C if already set. |
3961 |
+# These must not be set unconditionally because not all systems understand |
3962 |
+# e.g. LANG=C (notably SCO). |
3963 |
+# We save the old values to restore during execute mode. |
3964 |
+if test "${LC_ALL+set}" = set; then |
3965 |
+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL |
3966 |
+fi |
3967 |
+if test "${LANG+set}" = set; then |
3968 |
+ save_LANG="$LANG"; LANG=C; export LANG |
3969 |
+fi |
3970 |
+ |
3971 |
+# Make sure IFS has a sensible default |
3972 |
+lt_nl=' |
3973 |
+' |
3974 |
+IFS=" $lt_nl" |
3975 |
+ |
3976 |
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then |
3977 |
+ $echo "$modename: not configured to build any kind of library" 1>&2 |
3978 |
+ $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 |
3979 |
+ exit $EXIT_FAILURE |
3980 |
+fi |
3981 |
+ |
3982 |
+# Global variables. |
3983 |
+mode=$default_mode |
3984 |
+nonopt= |
3985 |
+prev= |
3986 |
+prevopt= |
3987 |
+run= |
3988 |
+show="$echo" |
3989 |
+show_help= |
3990 |
+execute_dlfiles= |
3991 |
+duplicate_deps=no |
3992 |
+preserve_args= |
3993 |
+lo2o="s/\\.lo\$/.${objext}/" |
3994 |
+o2lo="s/\\.${objext}\$/.lo/" |
3995 |
+ |
3996 |
+if test -z "$max_cmd_len"; then |
3997 |
+ i=0 |
3998 |
+ testring="ABCD" |
3999 |
+ new_result= |
4000 |
+ |
4001 |
+ # If test is not a shell built-in, we'll probably end up computing a |
4002 |
+ # maximum length that is only half of the actual maximum length, but |
4003 |
+ # we can't tell. |
4004 |
+ while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \ |
4005 |
+ = "XX$testring") >/dev/null 2>&1 && |
4006 |
+ new_result=`expr "X$testring" : ".*" 2>&1` && |
4007 |
+ max_cmd_len="$new_result" && |
4008 |
+ test "$i" != 17 # 1/2 MB should be enough |
4009 |
+ do |
4010 |
+ i=`expr $i + 1` |
4011 |
+ testring="$testring$testring" |
4012 |
+ done |
4013 |
+ testring= |
4014 |
+ # Add a significant safety factor because C++ compilers can tack on massive |
4015 |
+ # amounts of additional arguments before passing them to the linker. |
4016 |
+ # It appears as though 1/2 is a usable value. |
4017 |
+ max_cmd_len=`expr $max_cmd_len \/ 2` |
4018 |
+fi |
4019 |
+ |
4020 |
+##################################### |
4021 |
+# Shell function definitions: |
4022 |
+# This seems to be the best place for them |
4023 |
+ |
4024 |
+# func_mktempdir [string] |
4025 |
+# Make a temporary directory that won't clash with other running |
4026 |
+# libtool processes, and avoids race conditions if possible. If |
4027 |
+# given, STRING is the basename for that directory. |
4028 |
+func_mktempdir () |
4029 |
+{ |
4030 |
+ my_template="${TMPDIR-/tmp}/${1-$progname}" |
4031 |
+ |
4032 |
+ if test "$run" = ":"; then |
4033 |
+ # Return a directory name, but don't create it in dry-run mode |
4034 |
+ my_tmpdir="${my_template}-$$" |
4035 |
+ else |
4036 |
+ |
4037 |
+ # If mktemp works, use that first and foremost |
4038 |
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` |
4039 |
+ |
4040 |
+ if test ! -d "$my_tmpdir"; then |
4041 |
+ # Failing that, at least try and use $RANDOM to avoid a race |
4042 |
+ my_tmpdir="${my_template}-${RANDOM-0}$$" |
4043 |
+ |
4044 |
+ save_mktempdir_umask=`umask` |
4045 |
+ umask 0077 |
4046 |
+ $mkdir "$my_tmpdir" |
4047 |
+ umask $save_mktempdir_umask |
4048 |
+ fi |
4049 |
+ |
4050 |
+ # If we're not in dry-run mode, bomb out on failure |
4051 |
+ test -d "$my_tmpdir" || { |
4052 |
+ $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 |
4053 |
+ exit $EXIT_FAILURE |
4054 |
+ } |
4055 |
+ fi |
4056 |
+ |
4057 |
+ $echo "X$my_tmpdir" | $Xsed |
4058 |
+} |
4059 |
+ |
4060 |
+ |
4061 |
+# func_win32_libid arg |
4062 |
+# return the library type of file 'arg' |
4063 |
+# |
4064 |
+# Need a lot of goo to handle *both* DLLs and import libs |
4065 |
+# Has to be a shell function in order to 'eat' the argument |
4066 |
+# that is supplied when $file_magic_command is called. |
4067 |
+func_win32_libid () |
4068 |
+{ |
4069 |
+ win32_libid_type="unknown" |
4070 |
+ win32_fileres=`file -L $1 2>/dev/null` |
4071 |
+ case $win32_fileres in |
4072 |
+ *ar\ archive\ import\ library*) # definitely import |
4073 |
+ win32_libid_type="x86 archive import" |
4074 |
+ ;; |
4075 |
+ *ar\ archive*) # could be an import, or static |
4076 |
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ |
4077 |
+ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then |
4078 |
+ win32_nmres=`eval $NM -f posix -A $1 | \ |
4079 |
+ $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` |
4080 |
+ case $win32_nmres in |
4081 |
+ import*) win32_libid_type="x86 archive import";; |
4082 |
+ *) win32_libid_type="x86 archive static";; |
4083 |
+ esac |
4084 |
+ fi |
4085 |
+ ;; |
4086 |
+ *DLL*) |
4087 |
+ win32_libid_type="x86 DLL" |
4088 |
+ ;; |
4089 |
+ *executable*) # but shell scripts are "executable" too... |
4090 |
+ case $win32_fileres in |
4091 |
+ *MS\ Windows\ PE\ Intel*) |
4092 |
+ win32_libid_type="x86 DLL" |
4093 |
+ ;; |
4094 |
+ esac |
4095 |
+ ;; |
4096 |
+ esac |
4097 |
+ $echo $win32_libid_type |
4098 |
+} |
4099 |
+ |
4100 |
+ |
4101 |
+# func_infer_tag arg |
4102 |
+# Infer tagged configuration to use if any are available and |
4103 |
+# if one wasn't chosen via the "--tag" command line option. |
4104 |
+# Only attempt this if the compiler in the base compile |
4105 |
+# command doesn't match the default compiler. |
4106 |
+# arg is usually of the form 'gcc ...' |
4107 |
+func_infer_tag () |
4108 |
+{ |
4109 |
+ if test -n "$available_tags" && test -z "$tagname"; then |
4110 |
+ CC_quoted= |
4111 |
+ for arg in $CC; do |
4112 |
+ case $arg in |
4113 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
4114 |
+ arg="\"$arg\"" |
4115 |
+ ;; |
4116 |
+ esac |
4117 |
+ CC_quoted="$CC_quoted $arg" |
4118 |
+ done |
4119 |
+ case $@ in |
4120 |
+ # Blanks in the command may have been stripped by the calling shell, |
4121 |
+ # but not from the CC environment variable when configure was run. |
4122 |
+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; |
4123 |
+ # Blanks at the start of $base_compile will cause this to fail |
4124 |
+ # if we don't check for them as well. |
4125 |
+ *) |
4126 |
+ for z in $available_tags; do |
4127 |
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then |
4128 |
+ # Evaluate the configuration. |
4129 |
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" |
4130 |
+ CC_quoted= |
4131 |
+ for arg in $CC; do |
4132 |
+ # Double-quote args containing other shell metacharacters. |
4133 |
+ case $arg in |
4134 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
4135 |
+ arg="\"$arg\"" |
4136 |
+ ;; |
4137 |
+ esac |
4138 |
+ CC_quoted="$CC_quoted $arg" |
4139 |
+ done |
4140 |
+ # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc' |
4141 |
+ trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"` |
4142 |
+ # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc |
4143 |
+ extendcc=${host}-${CC} |
4144 |
+ # and sometimes libtool has CC=<OLDHOST>-gcc but user has CC=<NEWHOST>-gcc |
4145 |
+ # (Gentoo-specific hack because we always export $CHOST) |
4146 |
+ mungedcc=${CHOST-${host}}-${trimedcc} |
4147 |
+ case "$@ " in |
4148 |
+ "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\ |
4149 |
+ "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*) |
4150 |
+ tagname=CC |
4151 |
+ break ;; |
4152 |
+ "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\ |
4153 |
+ "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\ |
4154 |
+ "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\ |
4155 |
+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) |
4156 |
+ # The compiler in the base compile command matches |
4157 |
+ # the one in the tagged configuration. |
4158 |
+ # Assume this is the tagged configuration we want. |
4159 |
+ tagname=$z |
4160 |
+ break |
4161 |
+ ;; |
4162 |
+ esac |
4163 |
+ fi |
4164 |
+ done |
4165 |
+ # If $tagname still isn't set, then no tagged configuration |
4166 |
+ # was found and let the user know that the "--tag" command |
4167 |
+ # line option must be used. |
4168 |
+ if test -z "$tagname"; then |
4169 |
+ $echo "$modename: unable to infer tagged configuration" |
4170 |
+ $echo "$modename: specify a tag with \`--tag'" 1>&2 |
4171 |
+ exit $EXIT_FAILURE |
4172 |
+# else |
4173 |
+# $echo "$modename: using $tagname tagged configuration" |
4174 |
+ fi |
4175 |
+ ;; |
4176 |
+ esac |
4177 |
+ fi |
4178 |
+} |
4179 |
+ |
4180 |
+ |
4181 |
+# func_extract_an_archive dir oldlib |
4182 |
+func_extract_an_archive () |
4183 |
+{ |
4184 |
+ f_ex_an_ar_dir="$1"; shift |
4185 |
+ f_ex_an_ar_oldlib="$1" |
4186 |
+ |
4187 |
+ $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" |
4188 |
+ $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? |
4189 |
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then |
4190 |
+ : |
4191 |
+ else |
4192 |
+ $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 |
4193 |
+ exit $EXIT_FAILURE |
4194 |
+ fi |
4195 |
+} |
4196 |
+ |
4197 |
+# func_extract_archives gentop oldlib ... |
4198 |
+func_extract_archives () |
4199 |
+{ |
4200 |
+ my_gentop="$1"; shift |
4201 |
+ my_oldlibs=${1+"$@"} |
4202 |
+ my_oldobjs="" |
4203 |
+ my_xlib="" |
4204 |
+ my_xabs="" |
4205 |
+ my_xdir="" |
4206 |
+ my_status="" |
4207 |
+ |
4208 |
+ $show "${rm}r $my_gentop" |
4209 |
+ $run ${rm}r "$my_gentop" |
4210 |
+ $show "$mkdir $my_gentop" |
4211 |
+ $run $mkdir "$my_gentop" |
4212 |
+ my_status=$? |
4213 |
+ if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then |
4214 |
+ exit $my_status |
4215 |
+ fi |
4216 |
+ |
4217 |
+ for my_xlib in $my_oldlibs; do |
4218 |
+ # Extract the objects. |
4219 |
+ case $my_xlib in |
4220 |
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; |
4221 |
+ *) my_xabs=`pwd`"/$my_xlib" ;; |
4222 |
+ esac |
4223 |
+ my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` |
4224 |
+ my_xdir="$my_gentop/$my_xlib" |
4225 |
+ |
4226 |
+ $show "${rm}r $my_xdir" |
4227 |
+ $run ${rm}r "$my_xdir" |
4228 |
+ $show "$mkdir $my_xdir" |
4229 |
+ $run $mkdir "$my_xdir" |
4230 |
+ exit_status=$? |
4231 |
+ if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then |
4232 |
+ exit $exit_status |
4233 |
+ fi |
4234 |
+ case $host in |
4235 |
+ *-darwin*) |
4236 |
+ $show "Extracting $my_xabs" |
4237 |
+ # Do not bother doing anything if just a dry run |
4238 |
+ if test -z "$run"; then |
4239 |
+ darwin_orig_dir=`pwd` |
4240 |
+ cd $my_xdir || exit $? |
4241 |
+ darwin_archive=$my_xabs |
4242 |
+ darwin_curdir=`pwd` |
4243 |
+ darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` |
4244 |
+ darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` |
4245 |
+ if test -n "$darwin_arches"; then |
4246 |
+ darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` |
4247 |
+ darwin_arch= |
4248 |
+ $show "$darwin_base_archive has multiple architectures $darwin_arches" |
4249 |
+ for darwin_arch in $darwin_arches ; do |
4250 |
+ mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" |
4251 |
+ lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" |
4252 |
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" |
4253 |
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}" |
4254 |
+ cd "$darwin_curdir" |
4255 |
+ $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" |
4256 |
+ done # $darwin_arches |
4257 |
+ ## Okay now we have a bunch of thin objects, gotta fatten them up :) |
4258 |
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` |
4259 |
+ darwin_file= |
4260 |
+ darwin_files= |
4261 |
+ for darwin_file in $darwin_filelist; do |
4262 |
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` |
4263 |
+ lipo -create -output "$darwin_file" $darwin_files |
4264 |
+ done # $darwin_filelist |
4265 |
+ ${rm}r unfat-$$ |
4266 |
+ cd "$darwin_orig_dir" |
4267 |
+ else |
4268 |
+ cd "$darwin_orig_dir" |
4269 |
+ func_extract_an_archive "$my_xdir" "$my_xabs" |
4270 |
+ fi # $darwin_arches |
4271 |
+ fi # $run |
4272 |
+ ;; |
4273 |
+ *) |
4274 |
+ func_extract_an_archive "$my_xdir" "$my_xabs" |
4275 |
+ ;; |
4276 |
+ esac |
4277 |
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` |
4278 |
+ done |
4279 |
+ func_extract_archives_result="$my_oldobjs" |
4280 |
+} |
4281 |
+# End of Shell function definitions |
4282 |
+##################################### |
4283 |
+ |
4284 |
+# Darwin sucks |
4285 |
+eval std_shrext=\"$shrext_cmds\" |
4286 |
+ |
4287 |
+disable_libs=no |
4288 |
+ |
4289 |
+# Parse our command line options once, thoroughly. |
4290 |
+while test "$#" -gt 0 |
4291 |
+do |
4292 |
+ arg="$1" |
4293 |
+ shift |
4294 |
+ |
4295 |
+ case $arg in |
4296 |
+ -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; |
4297 |
+ *) optarg= ;; |
4298 |
+ esac |
4299 |
+ |
4300 |
+ # If the previous option needs an argument, assign it. |
4301 |
+ if test -n "$prev"; then |
4302 |
+ case $prev in |
4303 |
+ execute_dlfiles) |
4304 |
+ execute_dlfiles="$execute_dlfiles $arg" |
4305 |
+ ;; |
4306 |
+ tag) |
4307 |
+ tagname="$arg" |
4308 |
+ preserve_args="${preserve_args}=$arg" |
4309 |
+ |
4310 |
+ # Check whether tagname contains only valid characters |
4311 |
+ case $tagname in |
4312 |
+ *[!-_A-Za-z0-9,/]*) |
4313 |
+ $echo "$progname: invalid tag name: $tagname" 1>&2 |
4314 |
+ exit $EXIT_FAILURE |
4315 |
+ ;; |
4316 |
+ esac |
4317 |
+ |
4318 |
+ case $tagname in |
4319 |
+ CC) |
4320 |
+ # Don't test for the "default" C tag, as we know, it's there, but |
4321 |
+ # not specially marked. |
4322 |
+ ;; |
4323 |
+ *) |
4324 |
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then |
4325 |
+ taglist="$taglist $tagname" |
4326 |
+ # Evaluate the configuration. |
4327 |
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" |
4328 |
+ else |
4329 |
+ $echo "$progname: ignoring unknown tag $tagname" 1>&2 |
4330 |
+ fi |
4331 |
+ ;; |
4332 |
+ esac |
4333 |
+ ;; |
4334 |
+ *) |
4335 |
+ eval "$prev=\$arg" |
4336 |
+ ;; |
4337 |
+ esac |
4338 |
+ |
4339 |
+ prev= |
4340 |
+ prevopt= |
4341 |
+ continue |
4342 |
+ fi |
4343 |
+ |
4344 |
+ # Have we seen a non-optional argument yet? |
4345 |
+ case $arg in |
4346 |
+ --help) |
4347 |
+ show_help=yes |
4348 |
+ ;; |
4349 |
+ |
4350 |
+ --version) |
4351 |
+ $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" |
4352 |
+ $echo |
4353 |
+ $echo "Copyright (C) 2005 Free Software Foundation, Inc." |
4354 |
+ $echo "This is free software; see the source for copying conditions. There is NO" |
4355 |
+ $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
4356 |
+ exit $? |
4357 |
+ ;; |
4358 |
+ |
4359 |
+ --config) |
4360 |
+ ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath |
4361 |
+ # Now print the configurations for the tags. |
4362 |
+ for tagname in $taglist; do |
4363 |
+ ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" |
4364 |
+ done |
4365 |
+ exit $? |
4366 |
+ ;; |
4367 |
+ |
4368 |
+ --debug) |
4369 |
+ $echo "$progname: enabling shell trace mode" |
4370 |
+ set -x |
4371 |
+ preserve_args="$preserve_args $arg" |
4372 |
+ ;; |
4373 |
+ |
4374 |
+ --dry-run | -n) |
4375 |
+ run=: |
4376 |
+ ;; |
4377 |
+ |
4378 |
+ --features) |
4379 |
+ $echo "host: $host" |
4380 |
+ if test "$build_libtool_libs" = yes; then |
4381 |
+ $echo "enable shared libraries" |
4382 |
+ else |
4383 |
+ $echo "disable shared libraries" |
4384 |
+ fi |
4385 |
+ if test "$build_old_libs" = yes; then |
4386 |
+ $echo "enable static libraries" |
4387 |
+ else |
4388 |
+ $echo "disable static libraries" |
4389 |
+ fi |
4390 |
+ exit $? |
4391 |
+ ;; |
4392 |
+ |
4393 |
+ --finish) mode="finish" ;; |
4394 |
+ |
4395 |
+ --mode) prevopt="--mode" prev=mode ;; |
4396 |
+ --mode=*) mode="$optarg" ;; |
4397 |
+ |
4398 |
+ --preserve-dup-deps) duplicate_deps="yes" ;; |
4399 |
+ |
4400 |
+ --quiet | --silent) |
4401 |
+ show=: |
4402 |
+ preserve_args="$preserve_args $arg" |
4403 |
+ ;; |
4404 |
+ |
4405 |
+ --tag) |
4406 |
+ prevopt="--tag" |
4407 |
+ prev=tag |
4408 |
+ preserve_args="$preserve_args --tag" |
4409 |
+ ;; |
4410 |
+ --tag=*) |
4411 |
+ set tag "$optarg" ${1+"$@"} |
4412 |
+ shift |
4413 |
+ prev=tag |
4414 |
+ preserve_args="$preserve_args --tag" |
4415 |
+ ;; |
4416 |
+ |
4417 |
+ -dlopen) |
4418 |
+ prevopt="-dlopen" |
4419 |
+ prev=execute_dlfiles |
4420 |
+ ;; |
4421 |
+ |
4422 |
+ -*) |
4423 |
+ $echo "$modename: unrecognized option \`$arg'" 1>&2 |
4424 |
+ $echo "$help" 1>&2 |
4425 |
+ exit $EXIT_FAILURE |
4426 |
+ ;; |
4427 |
+ |
4428 |
+ *) |
4429 |
+ nonopt="$arg" |
4430 |
+ break |
4431 |
+ ;; |
4432 |
+ esac |
4433 |
+done |
4434 |
+ |
4435 |
+if test -n "$prevopt"; then |
4436 |
+ $echo "$modename: option \`$prevopt' requires an argument" 1>&2 |
4437 |
+ $echo "$help" 1>&2 |
4438 |
+ exit $EXIT_FAILURE |
4439 |
+fi |
4440 |
+ |
4441 |
+case $disable_libs in |
4442 |
+no) |
4443 |
+ ;; |
4444 |
+shared) |
4445 |
+ build_libtool_libs=no |
4446 |
+ build_old_libs=yes |
4447 |
+ ;; |
4448 |
+static) |
4449 |
+ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` |
4450 |
+ ;; |
4451 |
+esac |
4452 |
+ |
4453 |
+# If this variable is set in any of the actions, the command in it |
4454 |
+# will be execed at the end. This prevents here-documents from being |
4455 |
+# left over by shells. |
4456 |
+exec_cmd= |
4457 |
+ |
4458 |
+if test -z "$show_help"; then |
4459 |
+ |
4460 |
+ # Infer the operation mode. |
4461 |
+ if test -z "$mode"; then |
4462 |
+ $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 |
4463 |
+ $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 |
4464 |
+ case $nonopt in |
4465 |
+ *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) |
4466 |
+ mode=link |
4467 |
+ for arg |
4468 |
+ do |
4469 |
+ case $arg in |
4470 |
+ -c) |
4471 |
+ mode=compile |
4472 |
+ break |
4473 |
+ ;; |
4474 |
+ esac |
4475 |
+ done |
4476 |
+ ;; |
4477 |
+ *db | *dbx | *strace | *truss) |
4478 |
+ mode=execute |
4479 |
+ ;; |
4480 |
+ *install*|cp|mv) |
4481 |
+ mode=install |
4482 |
+ ;; |
4483 |
+ *rm) |
4484 |
+ mode=uninstall |
4485 |
+ ;; |
4486 |
+ *) |
4487 |
+ # If we have no mode, but dlfiles were specified, then do execute mode. |
4488 |
+ test -n "$execute_dlfiles" && mode=execute |
4489 |
+ |
4490 |
+ # Just use the default operation mode. |
4491 |
+ if test -z "$mode"; then |
4492 |
+ if test -n "$nonopt"; then |
4493 |
+ $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 |
4494 |
+ else |
4495 |
+ $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 |
4496 |
+ fi |
4497 |
+ fi |
4498 |
+ ;; |
4499 |
+ esac |
4500 |
+ fi |
4501 |
+ |
4502 |
+ # Only execute mode is allowed to have -dlopen flags. |
4503 |
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then |
4504 |
+ $echo "$modename: unrecognized option \`-dlopen'" 1>&2 |
4505 |
+ $echo "$help" 1>&2 |
4506 |
+ exit $EXIT_FAILURE |
4507 |
+ fi |
4508 |
+ |
4509 |
+ # Change the help message to a mode-specific one. |
4510 |
+ generic_help="$help" |
4511 |
+ help="Try \`$modename --help --mode=$mode' for more information." |
4512 |
+ |
4513 |
+ # These modes are in order of execution frequency so that they run quickly. |
4514 |
+ case $mode in |
4515 |
+ # libtool compile mode |
4516 |
+ compile) |
4517 |
+ modename="$modename: compile" |
4518 |
+ # Get the compilation command and the source file. |
4519 |
+ base_compile= |
4520 |
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile" |
4521 |
+ suppress_opt=yes |
4522 |
+ suppress_output= |
4523 |
+ arg_mode=normal |
4524 |
+ libobj= |
4525 |
+ later= |
4526 |
+ |
4527 |
+ for arg |
4528 |
+ do |
4529 |
+ case $arg_mode in |
4530 |
+ arg ) |
4531 |
+ # do not "continue". Instead, add this to base_compile |
4532 |
+ lastarg="$arg" |
4533 |
+ arg_mode=normal |
4534 |
+ ;; |
4535 |
+ |
4536 |
+ target ) |
4537 |
+ libobj="$arg" |
4538 |
+ arg_mode=normal |
4539 |
+ continue |
4540 |
+ ;; |
4541 |
+ |
4542 |
+ normal ) |
4543 |
+ # Accept any command-line options. |
4544 |
+ case $arg in |
4545 |
+ -o) |
4546 |
+ if test -n "$libobj" ; then |
4547 |
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2 |
4548 |
+ exit $EXIT_FAILURE |
4549 |
+ fi |
4550 |
+ arg_mode=target |
4551 |
+ continue |
4552 |
+ ;; |
4553 |
+ |
4554 |
+ -static | -prefer-pic | -prefer-non-pic) |
4555 |
+ later="$later $arg" |
4556 |
+ continue |
4557 |
+ ;; |
4558 |
+ |
4559 |
+ -no-suppress) |
4560 |
+ suppress_opt=no |
4561 |
+ continue |
4562 |
+ ;; |
4563 |
+ |
4564 |
+ -Xcompiler) |
4565 |
+ arg_mode=arg # the next one goes into the "base_compile" arg list |
4566 |
+ continue # The current "srcfile" will either be retained or |
4567 |
+ ;; # replaced later. I would guess that would be a bug. |
4568 |
+ |
4569 |
+ -Wc,*) |
4570 |
+ args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` |
4571 |
+ lastarg= |
4572 |
+ save_ifs="$IFS"; IFS=',' |
4573 |
+ for arg in $args; do |
4574 |
+ IFS="$save_ifs" |
4575 |
+ |
4576 |
+ # Double-quote args containing other shell metacharacters. |
4577 |
+ # Many Bourne shells cannot handle close brackets correctly |
4578 |
+ # in scan sets, so we specify it separately. |
4579 |
+ case $arg in |
4580 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
4581 |
+ arg="\"$arg\"" |
4582 |
+ ;; |
4583 |
+ esac |
4584 |
+ lastarg="$lastarg $arg" |
4585 |
+ done |
4586 |
+ IFS="$save_ifs" |
4587 |
+ lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` |
4588 |
+ |
4589 |
+ # Add the arguments to base_compile. |
4590 |
+ base_compile="$base_compile $lastarg" |
4591 |
+ continue |
4592 |
+ ;; |
4593 |
+ |
4594 |
+ * ) |
4595 |
+ # Accept the current argument as the source file. |
4596 |
+ # The previous "srcfile" becomes the current argument. |
4597 |
+ # |
4598 |
+ lastarg="$srcfile" |
4599 |
+ srcfile="$arg" |
4600 |
+ ;; |
4601 |
+ esac # case $arg |
4602 |
+ ;; |
4603 |
+ esac # case $arg_mode |
4604 |
+ |
4605 |
+ # Aesthetically quote the previous argument. |
4606 |
+ lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` |
4607 |
+ |
4608 |
+ case $lastarg in |
4609 |
+ # Double-quote args containing other shell metacharacters. |
4610 |
+ # Many Bourne shells cannot handle close brackets correctly |
4611 |
+ # in scan sets, and some SunOS ksh mistreat backslash-escaping |
4612 |
+ # in scan sets (worked around with variable expansion), |
4613 |
+ # and furthermore cannot handle '|' '&' '(' ')' in scan sets |
4614 |
+ # at all, so we specify them separately. |
4615 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
4616 |
+ lastarg="\"$lastarg\"" |
4617 |
+ ;; |
4618 |
+ esac |
4619 |
+ |
4620 |
+ base_compile="$base_compile $lastarg" |
4621 |
+ done # for arg |
4622 |
+ |
4623 |
+ case $arg_mode in |
4624 |
+ arg) |
4625 |
+ $echo "$modename: you must specify an argument for -Xcompile" |
4626 |
+ exit $EXIT_FAILURE |
4627 |
+ ;; |
4628 |
+ target) |
4629 |
+ $echo "$modename: you must specify a target with \`-o'" 1>&2 |
4630 |
+ exit $EXIT_FAILURE |
4631 |
+ ;; |
4632 |
+ *) |
4633 |
+ # Get the name of the library object. |
4634 |
+ [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` |
4635 |
+ ;; |
4636 |
+ esac |
4637 |
+ |
4638 |
+ # Recognize several different file suffixes. |
4639 |
+ # If the user specifies -o file.o, it is replaced with file.lo |
4640 |
+ xform='[cCFSifmso]' |
4641 |
+ case $libobj in |
4642 |
+ *.ada) xform=ada ;; |
4643 |
+ *.adb) xform=adb ;; |
4644 |
+ *.ads) xform=ads ;; |
4645 |
+ *.asm) xform=asm ;; |
4646 |
+ *.c++) xform=c++ ;; |
4647 |
+ *.cc) xform=cc ;; |
4648 |
+ *.ii) xform=ii ;; |
4649 |
+ *.class) xform=class ;; |
4650 |
+ *.cpp) xform=cpp ;; |
4651 |
+ *.cxx) xform=cxx ;; |
4652 |
+ *.f90) xform=f90 ;; |
4653 |
+ *.for) xform=for ;; |
4654 |
+ *.java) xform=java ;; |
4655 |
+ esac |
4656 |
+ |
4657 |
+ libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` |
4658 |
+ |
4659 |
+ case $libobj in |
4660 |
+ *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; |
4661 |
+ *) |
4662 |
+ $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 |
4663 |
+ exit $EXIT_FAILURE |
4664 |
+ ;; |
4665 |
+ esac |
4666 |
+ |
4667 |
+ func_infer_tag $base_compile |
4668 |
+ |
4669 |
+ for arg in $later; do |
4670 |
+ case $arg in |
4671 |
+ -static) |
4672 |
+ build_old_libs=yes |
4673 |
+ continue |
4674 |
+ ;; |
4675 |
+ |
4676 |
+ -prefer-pic) |
4677 |
+ pic_mode=yes |
4678 |
+ continue |
4679 |
+ ;; |
4680 |
+ |
4681 |
+ -prefer-non-pic) |
4682 |
+ pic_mode=no |
4683 |
+ continue |
4684 |
+ ;; |
4685 |
+ esac |
4686 |
+ done |
4687 |
+ |
4688 |
+ qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` |
4689 |
+ case $qlibobj in |
4690 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
4691 |
+ qlibobj="\"$qlibobj\"" ;; |
4692 |
+ esac |
4693 |
+ test "X$libobj" != "X$qlibobj" \ |
4694 |
+ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ |
4695 |
+ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." |
4696 |
+ objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` |
4697 |
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` |
4698 |
+ if test "X$xdir" = "X$obj"; then |
4699 |
+ xdir= |
4700 |
+ else |
4701 |
+ xdir=$xdir/ |
4702 |
+ fi |
4703 |
+ lobj=${xdir}$objdir/$objname |
4704 |
+ |
4705 |
+ if test -z "$base_compile"; then |
4706 |
+ $echo "$modename: you must specify a compilation command" 1>&2 |
4707 |
+ $echo "$help" 1>&2 |
4708 |
+ exit $EXIT_FAILURE |
4709 |
+ fi |
4710 |
+ |
4711 |
+ # Delete any leftover library objects. |
4712 |
+ if test "$build_old_libs" = yes; then |
4713 |
+ removelist="$obj $lobj $libobj ${libobj}T" |
4714 |
+ else |
4715 |
+ removelist="$lobj $libobj ${libobj}T" |
4716 |
+ fi |
4717 |
+ |
4718 |
+ $run $rm $removelist |
4719 |
+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 |
4720 |
+ |
4721 |
+ # On Cygwin there's no "real" PIC flag so we must build both object types |
4722 |
+ case $host_os in |
4723 |
+ cygwin* | mingw* | pw32* | os2*) |
4724 |
+ pic_mode=default |
4725 |
+ ;; |
4726 |
+ esac |
4727 |
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then |
4728 |
+ # non-PIC code in shared libraries is not supported |
4729 |
+ pic_mode=default |
4730 |
+ fi |
4731 |
+ |
4732 |
+ # Calculate the filename of the output object if compiler does |
4733 |
+ # not support -o with -c |
4734 |
+ if test "$compiler_c_o" = no; then |
4735 |
+ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} |
4736 |
+ lockfile="$output_obj.lock" |
4737 |
+ removelist="$removelist $output_obj $lockfile" |
4738 |
+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 |
4739 |
+ else |
4740 |
+ output_obj= |
4741 |
+ need_locks=no |
4742 |
+ lockfile= |
4743 |
+ fi |
4744 |
+ |
4745 |
+ # Lock this critical section if it is needed |
4746 |
+ # We use this script file to make the link, it avoids creating a new file |
4747 |
+ if test "$need_locks" = yes; then |
4748 |
+ until $run ln "$srcfile" "$lockfile" 2>/dev/null; do |
4749 |
+ $show "Waiting for $lockfile to be removed" |
4750 |
+ sleep 2 |
4751 |
+ done |
4752 |
+ elif test "$need_locks" = warn; then |
4753 |
+ if test -f "$lockfile"; then |
4754 |
+ $echo "\ |
4755 |
+*** ERROR, $lockfile exists and contains: |
4756 |
+`cat $lockfile 2>/dev/null` |
4757 |
+ |
4758 |
+This indicates that another process is trying to use the same |
4759 |
+temporary object file, and libtool could not work around it because |
4760 |
+your compiler does not support \`-c' and \`-o' together. If you |
4761 |
+repeat this compilation, it may succeed, by chance, but you had better |
4762 |
+avoid parallel builds (make -j) in this platform, or get a better |
4763 |
+compiler." |
4764 |
+ |
4765 |
+ $run $rm $removelist |
4766 |
+ exit $EXIT_FAILURE |
4767 |
+ fi |
4768 |
+ $echo "$srcfile" > "$lockfile" |
4769 |
+ fi |
4770 |
+ |
4771 |
+ if test -n "$fix_srcfile_path"; then |
4772 |
+ eval srcfile=\"$fix_srcfile_path\" |
4773 |
+ fi |
4774 |
+ qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` |
4775 |
+ case $qsrcfile in |
4776 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
4777 |
+ qsrcfile="\"$qsrcfile\"" ;; |
4778 |
+ esac |
4779 |
+ |
4780 |
+ $run $rm "$libobj" "${libobj}T" |
4781 |
+ |
4782 |
+ # Create a libtool object file (analogous to a ".la" file), |
4783 |
+ # but don't create it if we're doing a dry run. |
4784 |
+ test -z "$run" && cat > ${libobj}T <<EOF |
4785 |
+# $libobj - a libtool object file |
4786 |
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP |
4787 |
+# |
4788 |
+# Please DO NOT delete this file! |
4789 |
+# It is necessary for linking the library. |
4790 |
+ |
4791 |
+# Name of the PIC object. |
4792 |
+EOF |
4793 |
+ |
4794 |
+ # Only build a PIC object if we are building libtool libraries. |
4795 |
+ if test "$build_libtool_libs" = yes; then |
4796 |
+ # Without this assignment, base_compile gets emptied. |
4797 |
+ fbsd_hideous_sh_bug=$base_compile |
4798 |
+ |
4799 |
+ if test "$pic_mode" != no; then |
4800 |
+ command="$base_compile $qsrcfile $pic_flag" |
4801 |
+ else |
4802 |
+ # Don't build PIC code |
4803 |
+ command="$base_compile $qsrcfile" |
4804 |
+ fi |
4805 |
+ |
4806 |
+ if test ! -d "${xdir}$objdir"; then |
4807 |
+ $show "$mkdir ${xdir}$objdir" |
4808 |
+ $run $mkdir ${xdir}$objdir |
4809 |
+ exit_status=$? |
4810 |
+ if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then |
4811 |
+ exit $exit_status |
4812 |
+ fi |
4813 |
+ fi |
4814 |
+ |
4815 |
+ if test -z "$output_obj"; then |
4816 |
+ # Place PIC objects in $objdir |
4817 |
+ command="$command -o $lobj" |
4818 |
+ fi |
4819 |
+ |
4820 |
+ $run $rm "$lobj" "$output_obj" |
4821 |
+ |
4822 |
+ $show "$command" |
4823 |
+ if $run eval "$command"; then : |
4824 |
+ else |
4825 |
+ test -n "$output_obj" && $run $rm $removelist |
4826 |
+ exit $EXIT_FAILURE |
4827 |
+ fi |
4828 |
+ |
4829 |
+ if test "$need_locks" = warn && |
4830 |
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then |
4831 |
+ $echo "\ |
4832 |
+*** ERROR, $lockfile contains: |
4833 |
+`cat $lockfile 2>/dev/null` |
4834 |
+ |
4835 |
+but it should contain: |
4836 |
+$srcfile |
4837 |
+ |
4838 |
+This indicates that another process is trying to use the same |
4839 |
+temporary object file, and libtool could not work around it because |
4840 |
+your compiler does not support \`-c' and \`-o' together. If you |
4841 |
+repeat this compilation, it may succeed, by chance, but you had better |
4842 |
+avoid parallel builds (make -j) in this platform, or get a better |
4843 |
+compiler." |
4844 |
+ |
4845 |
+ $run $rm $removelist |
4846 |
+ exit $EXIT_FAILURE |
4847 |
+ fi |
4848 |
+ |
4849 |
+ # Just move the object if needed, then go on to compile the next one |
4850 |
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then |
4851 |
+ $show "$mv $output_obj $lobj" |
4852 |
+ if $run $mv $output_obj $lobj; then : |
4853 |
+ else |
4854 |
+ error=$? |
4855 |
+ $run $rm $removelist |
4856 |
+ exit $error |
4857 |
+ fi |
4858 |
+ fi |
4859 |
+ |
4860 |
+ # Append the name of the PIC object to the libtool object file. |
4861 |
+ test -z "$run" && cat >> ${libobj}T <<EOF |
4862 |
+pic_object='$objdir/$objname' |
4863 |
+ |
4864 |
+EOF |
4865 |
+ |
4866 |
+ # Allow error messages only from the first compilation. |
4867 |
+ if test "$suppress_opt" = yes; then |
4868 |
+ suppress_output=' >/dev/null 2>&1' |
4869 |
+ fi |
4870 |
+ else |
4871 |
+ # No PIC object so indicate it doesn't exist in the libtool |
4872 |
+ # object file. |
4873 |
+ test -z "$run" && cat >> ${libobj}T <<EOF |
4874 |
+pic_object=none |
4875 |
+ |
4876 |
+EOF |
4877 |
+ fi |
4878 |
+ |
4879 |
+ # Only build a position-dependent object if we build old libraries. |
4880 |
+ if test "$build_old_libs" = yes; then |
4881 |
+ if test "$pic_mode" != yes; then |
4882 |
+ # Don't build PIC code |
4883 |
+ command="$base_compile $qsrcfile" |
4884 |
+ else |
4885 |
+ command="$base_compile $qsrcfile $pic_flag" |
4886 |
+ fi |
4887 |
+ if test "$compiler_c_o" = yes; then |
4888 |
+ command="$command -o $obj" |
4889 |
+ fi |
4890 |
+ |
4891 |
+ # Suppress compiler output if we already did a PIC compilation. |
4892 |
+ command="$command$suppress_output" |
4893 |
+ $run $rm "$obj" "$output_obj" |
4894 |
+ $show "$command" |
4895 |
+ if $run eval "$command"; then : |
4896 |
+ else |
4897 |
+ $run $rm $removelist |
4898 |
+ exit $EXIT_FAILURE |
4899 |
+ fi |
4900 |
+ |
4901 |
+ if test "$need_locks" = warn && |
4902 |
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then |
4903 |
+ $echo "\ |
4904 |
+*** ERROR, $lockfile contains: |
4905 |
+`cat $lockfile 2>/dev/null` |
4906 |
+ |
4907 |
+but it should contain: |
4908 |
+$srcfile |
4909 |
+ |
4910 |
+This indicates that another process is trying to use the same |
4911 |
+temporary object file, and libtool could not work around it because |
4912 |
+your compiler does not support \`-c' and \`-o' together. If you |
4913 |
+repeat this compilation, it may succeed, by chance, but you had better |
4914 |
+avoid parallel builds (make -j) in this platform, or get a better |
4915 |
+compiler." |
4916 |
+ |
4917 |
+ $run $rm $removelist |
4918 |
+ exit $EXIT_FAILURE |
4919 |
+ fi |
4920 |
+ |
4921 |
+ # Just move the object if needed |
4922 |
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then |
4923 |
+ $show "$mv $output_obj $obj" |
4924 |
+ if $run $mv $output_obj $obj; then : |
4925 |
+ else |
4926 |
+ error=$? |
4927 |
+ $run $rm $removelist |
4928 |
+ exit $error |
4929 |
+ fi |
4930 |
+ fi |
4931 |
+ |
4932 |
+ # Append the name of the non-PIC object the libtool object file. |
4933 |
+ # Only append if the libtool object file exists. |
4934 |
+ test -z "$run" && cat >> ${libobj}T <<EOF |
4935 |
+# Name of the non-PIC object. |
4936 |
+non_pic_object='$objname' |
4937 |
+ |
4938 |
+EOF |
4939 |
+ else |
4940 |
+ # Append the name of the non-PIC object the libtool object file. |
4941 |
+ # Only append if the libtool object file exists. |
4942 |
+ test -z "$run" && cat >> ${libobj}T <<EOF |
4943 |
+# Name of the non-PIC object. |
4944 |
+non_pic_object=none |
4945 |
+ |
4946 |
+EOF |
4947 |
+ fi |
4948 |
+ |
4949 |
+ $run $mv "${libobj}T" "${libobj}" |
4950 |
+ |
4951 |
+ # Unlock the critical section if it was locked |
4952 |
+ if test "$need_locks" != no; then |
4953 |
+ $run $rm "$lockfile" |
4954 |
+ fi |
4955 |
+ |
4956 |
+ exit $EXIT_SUCCESS |
4957 |
+ ;; |
4958 |
+ |
4959 |
+ # libtool link mode |
4960 |
+ link | relink) |
4961 |
+ modename="$modename: link" |
4962 |
+ case $host in |
4963 |
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
4964 |
+ # It is impossible to link a dll without this setting, and |
4965 |
+ # we shouldn't force the makefile maintainer to figure out |
4966 |
+ # which system we are compiling for in order to pass an extra |
4967 |
+ # flag for every libtool invocation. |
4968 |
+ # allow_undefined=no |
4969 |
+ |
4970 |
+ # FIXME: Unfortunately, there are problems with the above when trying |
4971 |
+ # to make a dll which has undefined symbols, in which case not |
4972 |
+ # even a static library is built. For now, we need to specify |
4973 |
+ # -no-undefined on the libtool link line when we can be certain |
4974 |
+ # that all symbols are satisfied, otherwise we get a static library. |
4975 |
+ allow_undefined=yes |
4976 |
+ ;; |
4977 |
+ *) |
4978 |
+ allow_undefined=yes |
4979 |
+ ;; |
4980 |
+ esac |
4981 |
+ libtool_args="$nonopt" |
4982 |
+ base_compile="$nonopt $@" |
4983 |
+ compile_command="$nonopt" |
4984 |
+ finalize_command="$nonopt" |
4985 |
+ |
4986 |
+ compile_rpath= |
4987 |
+ finalize_rpath= |
4988 |
+ compile_shlibpath= |
4989 |
+ finalize_shlibpath= |
4990 |
+ convenience= |
4991 |
+ old_convenience= |
4992 |
+ deplibs= |
4993 |
+ old_deplibs= |
4994 |
+ compiler_flags= |
4995 |
+ linker_flags= |
4996 |
+ dllsearchpath= |
4997 |
+ lib_search_path=`pwd` |
4998 |
+ inst_prefix_dir= |
4999 |
+ |
5000 |
+ avoid_version=no |
5001 |
+ dlfiles= |
5002 |
+ dlprefiles= |
5003 |
+ dlself=no |
5004 |
+ export_dynamic=no |
5005 |
+ export_symbols= |
5006 |
+ export_symbols_regex= |
5007 |
+ generated= |
5008 |
+ libobjs= |
5009 |
+ ltlibs= |
5010 |
+ module=no |
5011 |
+ no_install=no |
5012 |
+ objs= |
5013 |
+ non_pic_objects= |
5014 |
+ notinst_path= # paths that contain not-installed libtool libraries |
5015 |
+ precious_files_regex= |
5016 |
+ prefer_static_libs=no |
5017 |
+ preload=no |
5018 |
+ prev= |
5019 |
+ prevarg= |
5020 |
+ release= |
5021 |
+ rpath= |
5022 |
+ xrpath= |
5023 |
+ perm_rpath= |
5024 |
+ temp_rpath= |
5025 |
+ thread_safe=no |
5026 |
+ vinfo= |
5027 |
+ vinfo_number=no |
5028 |
+ |
5029 |
+ func_infer_tag $base_compile |
5030 |
+ |
5031 |
+ # We need to know -static, to get the right output filenames. |
5032 |
+ for arg |
5033 |
+ do |
5034 |
+ case $arg in |
5035 |
+ -all-static | -static) |
5036 |
+ if test "X$arg" = "X-all-static"; then |
5037 |
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then |
5038 |
+ $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 |
5039 |
+ fi |
5040 |
+ if test -n "$link_static_flag"; then |
5041 |
+ dlopen_self=$dlopen_self_static |
5042 |
+ fi |
5043 |
+ prefer_static_libs=yes |
5044 |
+ else |
5045 |
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then |
5046 |
+ dlopen_self=$dlopen_self_static |
5047 |
+ fi |
5048 |
+ prefer_static_libs=built |
5049 |
+ fi |
5050 |
+ build_libtool_libs=no |
5051 |
+ build_old_libs=yes |
5052 |
+ break |
5053 |
+ ;; |
5054 |
+ esac |
5055 |
+ done |
5056 |
+ |
5057 |
+ # See if our shared archives depend on static archives. |
5058 |
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes |
5059 |
+ |
5060 |
+ # Go through the arguments, transforming them on the way. |
5061 |
+ while test "$#" -gt 0; do |
5062 |
+ arg="$1" |
5063 |
+ shift |
5064 |
+ case $arg in |
5065 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
5066 |
+ qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test |
5067 |
+ ;; |
5068 |
+ *) qarg=$arg ;; |
5069 |
+ esac |
5070 |
+ libtool_args="$libtool_args $qarg" |
5071 |
+ |
5072 |
+ # If the previous option needs an argument, assign it. |
5073 |
+ if test -n "$prev"; then |
5074 |
+ case $prev in |
5075 |
+ output) |
5076 |
+ compile_command="$compile_command @OUTPUT@" |
5077 |
+ finalize_command="$finalize_command @OUTPUT@" |
5078 |
+ ;; |
5079 |
+ esac |
5080 |
+ |
5081 |
+ case $prev in |
5082 |
+ dlfiles|dlprefiles) |
5083 |
+ if test "$preload" = no; then |
5084 |
+ # Add the symbol object into the linking commands. |
5085 |
+ compile_command="$compile_command @SYMFILE@" |
5086 |
+ finalize_command="$finalize_command @SYMFILE@" |
5087 |
+ preload=yes |
5088 |
+ fi |
5089 |
+ case $arg in |
5090 |
+ *.la | *.lo) ;; # We handle these cases below. |
5091 |
+ force) |
5092 |
+ if test "$dlself" = no; then |
5093 |
+ dlself=needless |
5094 |
+ export_dynamic=yes |
5095 |
+ fi |
5096 |
+ prev= |
5097 |
+ continue |
5098 |
+ ;; |
5099 |
+ self) |
5100 |
+ if test "$prev" = dlprefiles; then |
5101 |
+ dlself=yes |
5102 |
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then |
5103 |
+ dlself=yes |
5104 |
+ else |
5105 |
+ dlself=needless |
5106 |
+ export_dynamic=yes |
5107 |
+ fi |
5108 |
+ prev= |
5109 |
+ continue |
5110 |
+ ;; |
5111 |
+ *) |
5112 |
+ if test "$prev" = dlfiles; then |
5113 |
+ dlfiles="$dlfiles $arg" |
5114 |
+ else |
5115 |
+ dlprefiles="$dlprefiles $arg" |
5116 |
+ fi |
5117 |
+ prev= |
5118 |
+ continue |
5119 |
+ ;; |
5120 |
+ esac |
5121 |
+ ;; |
5122 |
+ expsyms) |
5123 |
+ export_symbols="$arg" |
5124 |
+ if test ! -f "$arg"; then |
5125 |
+ $echo "$modename: symbol file \`$arg' does not exist" |
5126 |
+ exit $EXIT_FAILURE |
5127 |
+ fi |
5128 |
+ prev= |
5129 |
+ continue |
5130 |
+ ;; |
5131 |
+ expsyms_regex) |
5132 |
+ export_symbols_regex="$arg" |
5133 |
+ prev= |
5134 |
+ continue |
5135 |
+ ;; |
5136 |
+ inst_prefix) |
5137 |
+ inst_prefix_dir="$arg" |
5138 |
+ prev= |
5139 |
+ continue |
5140 |
+ ;; |
5141 |
+ precious_regex) |
5142 |
+ precious_files_regex="$arg" |
5143 |
+ prev= |
5144 |
+ continue |
5145 |
+ ;; |
5146 |
+ release) |
5147 |
+ release="-$arg" |
5148 |
+ prev= |
5149 |
+ continue |
5150 |
+ ;; |
5151 |
+ objectlist) |
5152 |
+ if test -f "$arg"; then |
5153 |
+ save_arg=$arg |
5154 |
+ moreargs= |
5155 |
+ for fil in `cat $save_arg` |
5156 |
+ do |
5157 |
+# moreargs="$moreargs $fil" |
5158 |
+ arg=$fil |
5159 |
+ # A libtool-controlled object. |
5160 |
+ |
5161 |
+ # Check to see that this really is a libtool object. |
5162 |
+ if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
5163 |
+ pic_object= |
5164 |
+ non_pic_object= |
5165 |
+ |
5166 |
+ # Read the .lo file |
5167 |
+ # If there is no directory component, then add one. |
5168 |
+ case $arg in |
5169 |
+ */* | *\\*) . $arg ;; |
5170 |
+ *) . ./$arg ;; |
5171 |
+ esac |
5172 |
+ |
5173 |
+ if test -z "$pic_object" || \ |
5174 |
+ test -z "$non_pic_object" || |
5175 |
+ test "$pic_object" = none && \ |
5176 |
+ test "$non_pic_object" = none; then |
5177 |
+ $echo "$modename: cannot find name of object for \`$arg'" 1>&2 |
5178 |
+ exit $EXIT_FAILURE |
5179 |
+ fi |
5180 |
+ |
5181 |
+ # Extract subdirectory from the argument. |
5182 |
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` |
5183 |
+ if test "X$xdir" = "X$arg"; then |
5184 |
+ xdir= |
5185 |
+ else |
5186 |
+ xdir="$xdir/" |
5187 |
+ fi |
5188 |
+ |
5189 |
+ if test "$pic_object" != none; then |
5190 |
+ # Prepend the subdirectory the object is found in. |
5191 |
+ pic_object="$xdir$pic_object" |
5192 |
+ |
5193 |
+ if test "$prev" = dlfiles; then |
5194 |
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then |
5195 |
+ dlfiles="$dlfiles $pic_object" |
5196 |
+ prev= |
5197 |
+ continue |
5198 |
+ else |
5199 |
+ # If libtool objects are unsupported, then we need to preload. |
5200 |
+ prev=dlprefiles |
5201 |
+ fi |
5202 |
+ fi |
5203 |
+ |
5204 |
+ # CHECK ME: I think I busted this. -Ossama |
5205 |
+ if test "$prev" = dlprefiles; then |
5206 |
+ # Preload the old-style object. |
5207 |
+ dlprefiles="$dlprefiles $pic_object" |
5208 |
+ prev= |
5209 |
+ fi |
5210 |
+ |
5211 |
+ # A PIC object. |
5212 |
+ libobjs="$libobjs $pic_object" |
5213 |
+ arg="$pic_object" |
5214 |
+ fi |
5215 |
+ |
5216 |
+ # Non-PIC object. |
5217 |
+ if test "$non_pic_object" != none; then |
5218 |
+ # Prepend the subdirectory the object is found in. |
5219 |
+ non_pic_object="$xdir$non_pic_object" |
5220 |
+ |
5221 |
+ # A standard non-PIC object |
5222 |
+ non_pic_objects="$non_pic_objects $non_pic_object" |
5223 |
+ if test -z "$pic_object" || test "$pic_object" = none ; then |
5224 |
+ arg="$non_pic_object" |
5225 |
+ fi |
5226 |
+ else |
5227 |
+ # If the PIC object exists, use it instead. |
5228 |
+ # $xdir was prepended to $pic_object above. |
5229 |
+ non_pic_object="$pic_object" |
5230 |
+ non_pic_objects="$non_pic_objects $non_pic_object" |
5231 |
+ fi |
5232 |
+ else |
5233 |
+ # Only an error if not doing a dry-run. |
5234 |
+ if test -z "$run"; then |
5235 |
+ $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 |
5236 |
+ exit $EXIT_FAILURE |
5237 |
+ else |
5238 |
+ # Dry-run case. |
5239 |
+ |
5240 |
+ # Extract subdirectory from the argument. |
5241 |
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` |
5242 |
+ if test "X$xdir" = "X$arg"; then |
5243 |
+ xdir= |
5244 |
+ else |
5245 |
+ xdir="$xdir/" |
5246 |
+ fi |
5247 |
+ |
5248 |
+ pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` |
5249 |
+ non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` |
5250 |
+ libobjs="$libobjs $pic_object" |
5251 |
+ non_pic_objects="$non_pic_objects $non_pic_object" |
5252 |
+ fi |
5253 |
+ fi |
5254 |
+ done |
5255 |
+ else |
5256 |
+ $echo "$modename: link input file \`$save_arg' does not exist" |
5257 |
+ exit $EXIT_FAILURE |
5258 |
+ fi |
5259 |
+ arg=$save_arg |
5260 |
+ prev= |
5261 |
+ continue |
5262 |
+ ;; |
5263 |
+ rpath | xrpath) |
5264 |
+ # We need an absolute path. |
5265 |
+ case $arg in |
5266 |
+ [\\/]* | [A-Za-z]:[\\/]*) ;; |
5267 |
+ *) |
5268 |
+ $echo "$modename: only absolute run-paths are allowed" 1>&2 |
5269 |
+ exit $EXIT_FAILURE |
5270 |
+ ;; |
5271 |
+ esac |
5272 |
+ if test "$prev" = rpath; then |
5273 |
+ case "$rpath " in |
5274 |
+ *" $arg "*) ;; |
5275 |
+ *) rpath="$rpath $arg" ;; |
5276 |
+ esac |
5277 |
+ else |
5278 |
+ case "$xrpath " in |
5279 |
+ *" $arg "*) ;; |
5280 |
+ *) xrpath="$xrpath $arg" ;; |
5281 |
+ esac |
5282 |
+ fi |
5283 |
+ prev= |
5284 |
+ continue |
5285 |
+ ;; |
5286 |
+ xcompiler) |
5287 |
+ compiler_flags="$compiler_flags $qarg" |
5288 |
+ prev= |
5289 |
+ compile_command="$compile_command $qarg" |
5290 |
+ finalize_command="$finalize_command $qarg" |
5291 |
+ continue |
5292 |
+ ;; |
5293 |
+ xlinker) |
5294 |
+ linker_flags="$linker_flags $qarg" |
5295 |
+ compiler_flags="$compiler_flags $wl$qarg" |
5296 |
+ prev= |
5297 |
+ compile_command="$compile_command $wl$qarg" |
5298 |
+ finalize_command="$finalize_command $wl$qarg" |
5299 |
+ continue |
5300 |
+ ;; |
5301 |
+ xcclinker) |
5302 |
+ linker_flags="$linker_flags $qarg" |
5303 |
+ compiler_flags="$compiler_flags $qarg" |
5304 |
+ prev= |
5305 |
+ compile_command="$compile_command $qarg" |
5306 |
+ finalize_command="$finalize_command $qarg" |
5307 |
+ continue |
5308 |
+ ;; |
5309 |
+ shrext) |
5310 |
+ shrext_cmds="$arg" |
5311 |
+ prev= |
5312 |
+ continue |
5313 |
+ ;; |
5314 |
+ darwin_framework|darwin_framework_skip) |
5315 |
+ test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" |
5316 |
+ compile_command="$compile_command $arg" |
5317 |
+ finalize_command="$finalize_command $arg" |
5318 |
+ prev= |
5319 |
+ continue |
5320 |
+ ;; |
5321 |
+ *) |
5322 |
+ eval "$prev=\"\$arg\"" |
5323 |
+ prev= |
5324 |
+ continue |
5325 |
+ ;; |
5326 |
+ esac |
5327 |
+ fi # test -n "$prev" |
5328 |
+ |
5329 |
+ prevarg="$arg" |
5330 |
+ |
5331 |
+ case $arg in |
5332 |
+ -all-static) |
5333 |
+ if test -n "$link_static_flag"; then |
5334 |
+ compile_command="$compile_command $link_static_flag" |
5335 |
+ finalize_command="$finalize_command $link_static_flag" |
5336 |
+ fi |
5337 |
+ continue |
5338 |
+ ;; |
5339 |
+ |
5340 |
+ -allow-undefined) |
5341 |
+ # FIXME: remove this flag sometime in the future. |
5342 |
+ $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 |
5343 |
+ continue |
5344 |
+ ;; |
5345 |
+ |
5346 |
+ -avoid-version) |
5347 |
+ avoid_version=yes |
5348 |
+ continue |
5349 |
+ ;; |
5350 |
+ |
5351 |
+ -dlopen) |
5352 |
+ prev=dlfiles |
5353 |
+ continue |
5354 |
+ ;; |
5355 |
+ |
5356 |
+ -dlpreopen) |
5357 |
+ prev=dlprefiles |
5358 |
+ continue |
5359 |
+ ;; |
5360 |
+ |
5361 |
+ -export-dynamic) |
5362 |
+ export_dynamic=yes |
5363 |
+ continue |
5364 |
+ ;; |
5365 |
+ |
5366 |
+ -export-symbols | -export-symbols-regex) |
5367 |
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then |
5368 |
+ $echo "$modename: more than one -exported-symbols argument is not allowed" |
5369 |
+ exit $EXIT_FAILURE |
5370 |
+ fi |
5371 |
+ if test "X$arg" = "X-export-symbols"; then |
5372 |
+ prev=expsyms |
5373 |
+ else |
5374 |
+ prev=expsyms_regex |
5375 |
+ fi |
5376 |
+ continue |
5377 |
+ ;; |
5378 |
+ |
5379 |
+ -framework|-arch|-isysroot) |
5380 |
+ case " $CC " in |
5381 |
+ *" ${arg} ${1} "* | *" ${arg} ${1} "*) |
5382 |
+ prev=darwin_framework_skip ;; |
5383 |
+ *) compiler_flags="$compiler_flags $arg" |
5384 |
+ prev=darwin_framework ;; |
5385 |
+ esac |
5386 |
+ compile_command="$compile_command $arg" |
5387 |
+ finalize_command="$finalize_command $arg" |
5388 |
+ continue |
5389 |
+ ;; |
5390 |
+ |
5391 |
+ -inst-prefix-dir) |
5392 |
+ prev=inst_prefix |
5393 |
+ continue |
5394 |
+ ;; |
5395 |
+ |
5396 |
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* |
5397 |
+ # so, if we see these flags be careful not to treat them like -L |
5398 |
+ -L[A-Z][A-Z]*:*) |
5399 |
+ case $with_gcc/$host in |
5400 |
+ no/*-*-irix* | /*-*-irix*) |
5401 |
+ compile_command="$compile_command $arg" |
5402 |
+ finalize_command="$finalize_command $arg" |
5403 |
+ ;; |
5404 |
+ esac |
5405 |
+ continue |
5406 |
+ ;; |
5407 |
+ |
5408 |
+ -L*) |
5409 |
+ dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` |
5410 |
+ # We need an absolute path. |
5411 |
+ case $dir in |
5412 |
+ [\\/]* | [A-Za-z]:[\\/]*) ;; |
5413 |
+ *) |
5414 |
+ absdir=`cd "$dir" && pwd` |
5415 |
+ if test -z "$absdir"; then |
5416 |
+ $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 |
5417 |
+ absdir="$dir" |
5418 |
+ notinst_path="$notinst_path $dir" |
5419 |
+ fi |
5420 |
+ dir="$absdir" |
5421 |
+ ;; |
5422 |
+ esac |
5423 |
+ case "$deplibs " in |
5424 |
+ *" -L$dir "*) ;; |
5425 |
+ *) |
5426 |
+ deplibs="$deplibs -L$dir" |
5427 |
+ lib_search_path="$lib_search_path $dir" |
5428 |
+ ;; |
5429 |
+ esac |
5430 |
+ case $host in |
5431 |
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
5432 |
+ testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` |
5433 |
+ case :$dllsearchpath: in |
5434 |
+ *":$dir:"*) ;; |
5435 |
+ *) dllsearchpath="$dllsearchpath:$dir";; |
5436 |
+ esac |
5437 |
+ case :$dllsearchpath: in |
5438 |
+ *":$testbindir:"*) ;; |
5439 |
+ *) dllsearchpath="$dllsearchpath:$testbindir";; |
5440 |
+ esac |
5441 |
+ ;; |
5442 |
+ esac |
5443 |
+ continue |
5444 |
+ ;; |
5445 |
+ |
5446 |
+ -l*) |
5447 |
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then |
5448 |
+ case $host in |
5449 |
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) |
5450 |
+ # These systems don't actually have a C or math library (as such) |
5451 |
+ continue |
5452 |
+ ;; |
5453 |
+ *-*-os2*) |
5454 |
+ # These systems don't actually have a C library (as such) |
5455 |
+ test "X$arg" = "X-lc" && continue |
5456 |
+ ;; |
5457 |
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) |
5458 |
+ # Do not include libc due to us having libc/libc_r. |
5459 |
+ test "X$arg" = "X-lc" && continue |
5460 |
+ ;; |
5461 |
+ *-*-rhapsody* | *-*-darwin1.[012]) |
5462 |
+ # Rhapsody C and math libraries are in the System framework |
5463 |
+ deplibs="$deplibs -framework System" |
5464 |
+ continue |
5465 |
+ ;; |
5466 |
+ *-*-sco3.2v5* | *-*-sco5v6*) |
5467 |
+ # Causes problems with __ctype |
5468 |
+ test "X$arg" = "X-lc" && continue |
5469 |
+ ;; |
5470 |
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) |
5471 |
+ # Compiler inserts libc in the correct place for threads to work |
5472 |
+ test "X$arg" = "X-lc" && continue |
5473 |
+ ;; |
5474 |
+ esac |
5475 |
+ elif test "X$arg" = "X-lc_r"; then |
5476 |
+ case $host in |
5477 |
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) |
5478 |
+ # Do not include libc_r directly, use -pthread flag. |
5479 |
+ continue |
5480 |
+ ;; |
5481 |
+ esac |
5482 |
+ fi |
5483 |
+ deplibs="$deplibs $arg" |
5484 |
+ continue |
5485 |
+ ;; |
5486 |
+ |
5487 |
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++ |
5488 |
+ # classes, name mangling, and exception handling. |
5489 |
+ -model) |
5490 |
+ compile_command="$compile_command $arg" |
5491 |
+ compiler_flags="$compiler_flags $arg" |
5492 |
+ finalize_command="$finalize_command $arg" |
5493 |
+ prev=xcompiler |
5494 |
+ continue |
5495 |
+ ;; |
5496 |
+ |
5497 |
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) |
5498 |
+ compiler_flags="$compiler_flags $arg" |
5499 |
+ compile_command="$compile_command $arg" |
5500 |
+ finalize_command="$finalize_command $arg" |
5501 |
+ continue |
5502 |
+ ;; |
5503 |
+ |
5504 |
+ -module) |
5505 |
+ module=yes |
5506 |
+ continue |
5507 |
+ ;; |
5508 |
+ |
5509 |
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler |
5510 |
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler |
5511 |
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler |
5512 |
+ # +DA*, +DD* enable 64-bit mode on the HP compiler |
5513 |
+ # -q* pass through compiler args for the IBM compiler |
5514 |
+ # -m* pass through architecture-specific compiler args for GCC |
5515 |
+ # -m*, -t[45]*, -txscale* pass through architecture-specific |
5516 |
+ # compiler args for GCC |
5517 |
+ # -pg pass through profiling flag for GCC |
5518 |
+ # @file GCC response files |
5519 |
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ |
5520 |
+ -t[45]*|-txscale*|@*) |
5521 |
+ |
5522 |
+ # Unknown arguments in both finalize_command and compile_command need |
5523 |
+ # to be aesthetically quoted because they are evaled later. |
5524 |
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
5525 |
+ case $arg in |
5526 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
5527 |
+ arg="\"$arg\"" |
5528 |
+ ;; |
5529 |
+ esac |
5530 |
+ compile_command="$compile_command $arg" |
5531 |
+ finalize_command="$finalize_command $arg" |
5532 |
+ compiler_flags="$compiler_flags $arg" |
5533 |
+ continue |
5534 |
+ ;; |
5535 |
+ |
5536 |
+ -shrext) |
5537 |
+ prev=shrext |
5538 |
+ continue |
5539 |
+ ;; |
5540 |
+ |
5541 |
+ -no-fast-install) |
5542 |
+ fast_install=no |
5543 |
+ continue |
5544 |
+ ;; |
5545 |
+ |
5546 |
+ -no-install) |
5547 |
+ case $host in |
5548 |
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
5549 |
+ # The PATH hackery in wrapper scripts is required on Windows |
5550 |
+ # in order for the loader to find any dlls it needs. |
5551 |
+ $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 |
5552 |
+ $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 |
5553 |
+ fast_install=no |
5554 |
+ ;; |
5555 |
+ *) no_install=yes ;; |
5556 |
+ esac |
5557 |
+ continue |
5558 |
+ ;; |
5559 |
+ |
5560 |
+ -no-undefined) |
5561 |
+ allow_undefined=no |
5562 |
+ continue |
5563 |
+ ;; |
5564 |
+ |
5565 |
+ -objectlist) |
5566 |
+ prev=objectlist |
5567 |
+ continue |
5568 |
+ ;; |
5569 |
+ |
5570 |
+ -o) prev=output ;; |
5571 |
+ |
5572 |
+ -precious-files-regex) |
5573 |
+ prev=precious_regex |
5574 |
+ continue |
5575 |
+ ;; |
5576 |
+ |
5577 |
+ -release) |
5578 |
+ prev=release |
5579 |
+ continue |
5580 |
+ ;; |
5581 |
+ |
5582 |
+ -rpath) |
5583 |
+ prev=rpath |
5584 |
+ continue |
5585 |
+ ;; |
5586 |
+ |
5587 |
+ -R) |
5588 |
+ prev=xrpath |
5589 |
+ continue |
5590 |
+ ;; |
5591 |
+ |
5592 |
+ -R*) |
5593 |
+ dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` |
5594 |
+ # We need an absolute path. |
5595 |
+ case $dir in |
5596 |
+ [\\/]* | [A-Za-z]:[\\/]*) ;; |
5597 |
+ *) |
5598 |
+ $echo "$modename: only absolute run-paths are allowed" 1>&2 |
5599 |
+ exit $EXIT_FAILURE |
5600 |
+ ;; |
5601 |
+ esac |
5602 |
+ case "$xrpath " in |
5603 |
+ *" $dir "*) ;; |
5604 |
+ *) xrpath="$xrpath $dir" ;; |
5605 |
+ esac |
5606 |
+ continue |
5607 |
+ ;; |
5608 |
+ |
5609 |
+ -static) |
5610 |
+ # The effects of -static are defined in a previous loop. |
5611 |
+ # We used to do the same as -all-static on platforms that |
5612 |
+ # didn't have a PIC flag, but the assumption that the effects |
5613 |
+ # would be equivalent was wrong. It would break on at least |
5614 |
+ # Digital Unix and AIX. |
5615 |
+ continue |
5616 |
+ ;; |
5617 |
+ |
5618 |
+ -thread-safe) |
5619 |
+ thread_safe=yes |
5620 |
+ continue |
5621 |
+ ;; |
5622 |
+ |
5623 |
+ -version-info) |
5624 |
+ prev=vinfo |
5625 |
+ continue |
5626 |
+ ;; |
5627 |
+ -version-number) |
5628 |
+ prev=vinfo |
5629 |
+ vinfo_number=yes |
5630 |
+ continue |
5631 |
+ ;; |
5632 |
+ |
5633 |
+ -Wc,*) |
5634 |
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` |
5635 |
+ arg= |
5636 |
+ save_ifs="$IFS"; IFS=',' |
5637 |
+ for flag in $args; do |
5638 |
+ IFS="$save_ifs" |
5639 |
+ case $flag in |
5640 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
5641 |
+ flag="\"$flag\"" |
5642 |
+ ;; |
5643 |
+ esac |
5644 |
+ arg="$arg $wl$flag" |
5645 |
+ compiler_flags="$compiler_flags $flag" |
5646 |
+ done |
5647 |
+ IFS="$save_ifs" |
5648 |
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"` |
5649 |
+ ;; |
5650 |
+ |
5651 |
+ -Wl,*) |
5652 |
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` |
5653 |
+ arg= |
5654 |
+ save_ifs="$IFS"; IFS=',' |
5655 |
+ for flag in $args; do |
5656 |
+ IFS="$save_ifs" |
5657 |
+ case $flag in |
5658 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
5659 |
+ flag="\"$flag\"" |
5660 |
+ ;; |
5661 |
+ esac |
5662 |
+ arg="$arg $wl$flag" |
5663 |
+ compiler_flags="$compiler_flags $wl$flag" |
5664 |
+ linker_flags="$linker_flags $flag" |
5665 |
+ done |
5666 |
+ IFS="$save_ifs" |
5667 |
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"` |
5668 |
+ ;; |
5669 |
+ |
5670 |
+ -Xcompiler) |
5671 |
+ prev=xcompiler |
5672 |
+ continue |
5673 |
+ ;; |
5674 |
+ |
5675 |
+ -Xlinker) |
5676 |
+ prev=xlinker |
5677 |
+ continue |
5678 |
+ ;; |
5679 |
+ |
5680 |
+ -XCClinker) |
5681 |
+ prev=xcclinker |
5682 |
+ continue |
5683 |
+ ;; |
5684 |
+ |
5685 |
+ # Some other compiler flag. |
5686 |
+ -* | +*) |
5687 |
+ # Unknown arguments in both finalize_command and compile_command need |
5688 |
+ # to be aesthetically quoted because they are evaled later. |
5689 |
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
5690 |
+ case $arg in |
5691 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
5692 |
+ arg="\"$arg\"" |
5693 |
+ ;; |
5694 |
+ esac |
5695 |
+ ;; |
5696 |
+ |
5697 |
+ *.$objext) |
5698 |
+ # A standard object. |
5699 |
+ objs="$objs $arg" |
5700 |
+ ;; |
5701 |
+ |
5702 |
+ *.lo) |
5703 |
+ # A libtool-controlled object. |
5704 |
+ |
5705 |
+ # Check to see that this really is a libtool object. |
5706 |
+ if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
5707 |
+ pic_object= |
5708 |
+ non_pic_object= |
5709 |
+ |
5710 |
+ # Read the .lo file |
5711 |
+ # If there is no directory component, then add one. |
5712 |
+ case $arg in |
5713 |
+ */* | *\\*) . $arg ;; |
5714 |
+ *) . ./$arg ;; |
5715 |
+ esac |
5716 |
+ |
5717 |
+ if test -z "$pic_object" || \ |
5718 |
+ test -z "$non_pic_object" || |
5719 |
+ test "$pic_object" = none && \ |
5720 |
+ test "$non_pic_object" = none; then |
5721 |
+ $echo "$modename: cannot find name of object for \`$arg'" 1>&2 |
5722 |
+ exit $EXIT_FAILURE |
5723 |
+ fi |
5724 |
+ |
5725 |
+ # Extract subdirectory from the argument. |
5726 |
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` |
5727 |
+ if test "X$xdir" = "X$arg"; then |
5728 |
+ xdir= |
5729 |
+ else |
5730 |
+ xdir="$xdir/" |
5731 |
+ fi |
5732 |
+ |
5733 |
+ if test "$pic_object" != none; then |
5734 |
+ # Prepend the subdirectory the object is found in. |
5735 |
+ pic_object="$xdir$pic_object" |
5736 |
+ |
5737 |
+ if test "$prev" = dlfiles; then |
5738 |
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then |
5739 |
+ dlfiles="$dlfiles $pic_object" |
5740 |
+ prev= |
5741 |
+ continue |
5742 |
+ else |
5743 |
+ # If libtool objects are unsupported, then we need to preload. |
5744 |
+ prev=dlprefiles |
5745 |
+ fi |
5746 |
+ fi |
5747 |
+ |
5748 |
+ # CHECK ME: I think I busted this. -Ossama |
5749 |
+ if test "$prev" = dlprefiles; then |
5750 |
+ # Preload the old-style object. |
5751 |
+ dlprefiles="$dlprefiles $pic_object" |
5752 |
+ prev= |
5753 |
+ fi |
5754 |
+ |
5755 |
+ # A PIC object. |
5756 |
+ libobjs="$libobjs $pic_object" |
5757 |
+ arg="$pic_object" |
5758 |
+ fi |
5759 |
+ |
5760 |
+ # Non-PIC object. |
5761 |
+ if test "$non_pic_object" != none; then |
5762 |
+ # Prepend the subdirectory the object is found in. |
5763 |
+ non_pic_object="$xdir$non_pic_object" |
5764 |
+ |
5765 |
+ # A standard non-PIC object |
5766 |
+ non_pic_objects="$non_pic_objects $non_pic_object" |
5767 |
+ if test -z "$pic_object" || test "$pic_object" = none ; then |
5768 |
+ arg="$non_pic_object" |
5769 |
+ fi |
5770 |
+ else |
5771 |
+ # If the PIC object exists, use it instead. |
5772 |
+ # $xdir was prepended to $pic_object above. |
5773 |
+ non_pic_object="$pic_object" |
5774 |
+ non_pic_objects="$non_pic_objects $non_pic_object" |
5775 |
+ fi |
5776 |
+ else |
5777 |
+ # Only an error if not doing a dry-run. |
5778 |
+ if test -z "$run"; then |
5779 |
+ $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 |
5780 |
+ exit $EXIT_FAILURE |
5781 |
+ else |
5782 |
+ # Dry-run case. |
5783 |
+ |
5784 |
+ # Extract subdirectory from the argument. |
5785 |
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` |
5786 |
+ if test "X$xdir" = "X$arg"; then |
5787 |
+ xdir= |
5788 |
+ else |
5789 |
+ xdir="$xdir/" |
5790 |
+ fi |
5791 |
+ |
5792 |
+ pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` |
5793 |
+ non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` |
5794 |
+ libobjs="$libobjs $pic_object" |
5795 |
+ non_pic_objects="$non_pic_objects $non_pic_object" |
5796 |
+ fi |
5797 |
+ fi |
5798 |
+ ;; |
5799 |
+ |
5800 |
+ *.$libext) |
5801 |
+ # An archive. |
5802 |
+ deplibs="$deplibs $arg" |
5803 |
+ old_deplibs="$old_deplibs $arg" |
5804 |
+ continue |
5805 |
+ ;; |
5806 |
+ |
5807 |
+ *.la) |
5808 |
+ # A libtool-controlled library. |
5809 |
+ |
5810 |
+ if test "$prev" = dlfiles; then |
5811 |
+ # This library was specified with -dlopen. |
5812 |
+ dlfiles="$dlfiles $arg" |
5813 |
+ prev= |
5814 |
+ elif test "$prev" = dlprefiles; then |
5815 |
+ # The library was specified with -dlpreopen. |
5816 |
+ dlprefiles="$dlprefiles $arg" |
5817 |
+ prev= |
5818 |
+ else |
5819 |
+ deplibs="$deplibs $arg" |
5820 |
+ fi |
5821 |
+ continue |
5822 |
+ ;; |
5823 |
+ |
5824 |
+ # Some other compiler argument. |
5825 |
+ *) |
5826 |
+ # Unknown arguments in both finalize_command and compile_command need |
5827 |
+ # to be aesthetically quoted because they are evaled later. |
5828 |
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
5829 |
+ case $arg in |
5830 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
5831 |
+ arg="\"$arg\"" |
5832 |
+ ;; |
5833 |
+ esac |
5834 |
+ ;; |
5835 |
+ esac # arg |
5836 |
+ |
5837 |
+ # Now actually substitute the argument into the commands. |
5838 |
+ if test -n "$arg"; then |
5839 |
+ compile_command="$compile_command $arg" |
5840 |
+ finalize_command="$finalize_command $arg" |
5841 |
+ fi |
5842 |
+ done # argument parsing loop |
5843 |
+ |
5844 |
+ if test -n "$prev"; then |
5845 |
+ $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 |
5846 |
+ $echo "$help" 1>&2 |
5847 |
+ exit $EXIT_FAILURE |
5848 |
+ fi |
5849 |
+ |
5850 |
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then |
5851 |
+ eval arg=\"$export_dynamic_flag_spec\" |
5852 |
+ compile_command="$compile_command $arg" |
5853 |
+ finalize_command="$finalize_command $arg" |
5854 |
+ fi |
5855 |
+ |
5856 |
+ oldlibs= |
5857 |
+ # calculate the name of the file, without its directory |
5858 |
+ outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` |
5859 |
+ libobjs_save="$libobjs" |
5860 |
+ |
5861 |
+ if test -n "$shlibpath_var"; then |
5862 |
+ # get the directories listed in $shlibpath_var |
5863 |
+ eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` |
5864 |
+ else |
5865 |
+ shlib_search_path= |
5866 |
+ fi |
5867 |
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\" |
5868 |
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" |
5869 |
+ |
5870 |
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` |
5871 |
+ if test "X$output_objdir" = "X$output"; then |
5872 |
+ output_objdir="$objdir" |
5873 |
+ else |
5874 |
+ output_objdir="$output_objdir/$objdir" |
5875 |
+ fi |
5876 |
+ # Create the object directory. |
5877 |
+ if test ! -d "$output_objdir"; then |
5878 |
+ $show "$mkdir $output_objdir" |
5879 |
+ $run $mkdir $output_objdir |
5880 |
+ exit_status=$? |
5881 |
+ if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then |
5882 |
+ exit $exit_status |
5883 |
+ fi |
5884 |
+ fi |
5885 |
+ |
5886 |
+ # Determine the type of output |
5887 |
+ case $output in |
5888 |
+ "") |
5889 |
+ $echo "$modename: you must specify an output file" 1>&2 |
5890 |
+ $echo "$help" 1>&2 |
5891 |
+ exit $EXIT_FAILURE |
5892 |
+ ;; |
5893 |
+ *.$libext) linkmode=oldlib ;; |
5894 |
+ *.lo | *.$objext) linkmode=obj ;; |
5895 |
+ *.la) linkmode=lib ;; |
5896 |
+ *) linkmode=prog ;; # Anything else should be a program. |
5897 |
+ esac |
5898 |
+ |
5899 |
+ case $host in |
5900 |
+ *cygwin* | *mingw* | *pw32*) |
5901 |
+ # don't eliminate duplications in $postdeps and $predeps |
5902 |
+ duplicate_compiler_generated_deps=yes |
5903 |
+ ;; |
5904 |
+ *) |
5905 |
+ duplicate_compiler_generated_deps=$duplicate_deps |
5906 |
+ ;; |
5907 |
+ esac |
5908 |
+ specialdeplibs= |
5909 |
+ |
5910 |
+ libs= |
5911 |
+ # Find all interdependent deplibs by searching for libraries |
5912 |
+ # that are linked more than once (e.g. -la -lb -la) |
5913 |
+ for deplib in $deplibs; do |
5914 |
+ if test "X$duplicate_deps" = "Xyes" ; then |
5915 |
+ case "$libs " in |
5916 |
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
5917 |
+ esac |
5918 |
+ fi |
5919 |
+ libs="$libs $deplib" |
5920 |
+ done |
5921 |
+ |
5922 |
+ if test "$linkmode" = lib; then |
5923 |
+ libs="$predeps $libs $compiler_lib_search_path $postdeps" |
5924 |
+ |
5925 |
+ # Compute libraries that are listed more than once in $predeps |
5926 |
+ # $postdeps and mark them as special (i.e., whose duplicates are |
5927 |
+ # not to be eliminated). |
5928 |
+ pre_post_deps= |
5929 |
+ if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then |
5930 |
+ for pre_post_dep in $predeps $postdeps; do |
5931 |
+ case "$pre_post_deps " in |
5932 |
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; |
5933 |
+ esac |
5934 |
+ pre_post_deps="$pre_post_deps $pre_post_dep" |
5935 |
+ done |
5936 |
+ fi |
5937 |
+ pre_post_deps= |
5938 |
+ fi |
5939 |
+ |
5940 |
+ deplibs= |
5941 |
+ newdependency_libs= |
5942 |
+ newlib_search_path= |
5943 |
+ need_relink=no # whether we're linking any uninstalled libtool libraries |
5944 |
+ notinst_deplibs= # not-installed libtool libraries |
5945 |
+ case $linkmode in |
5946 |
+ lib) |
5947 |
+ passes="conv link" |
5948 |
+ for file in $dlfiles $dlprefiles; do |
5949 |
+ case $file in |
5950 |
+ *.la) ;; |
5951 |
+ *) |
5952 |
+ $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 |
5953 |
+ exit $EXIT_FAILURE |
5954 |
+ ;; |
5955 |
+ esac |
5956 |
+ done |
5957 |
+ ;; |
5958 |
+ prog) |
5959 |
+ compile_deplibs= |
5960 |
+ finalize_deplibs= |
5961 |
+ alldeplibs=no |
5962 |
+ newdlfiles= |
5963 |
+ newdlprefiles= |
5964 |
+ passes="conv scan dlopen dlpreopen link" |
5965 |
+ ;; |
5966 |
+ *) passes="conv" |
5967 |
+ ;; |
5968 |
+ esac |
5969 |
+ for pass in $passes; do |
5970 |
+ if test "$linkmode,$pass" = "lib,link" || |
5971 |
+ test "$linkmode,$pass" = "prog,scan"; then |
5972 |
+ libs="$deplibs" |
5973 |
+ deplibs= |
5974 |
+ fi |
5975 |
+ if test "$linkmode" = prog; then |
5976 |
+ case $pass in |
5977 |
+ dlopen) libs="$dlfiles" ;; |
5978 |
+ dlpreopen) libs="$dlprefiles" ;; |
5979 |
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; |
5980 |
+ esac |
5981 |
+ fi |
5982 |
+ if test "$pass" = dlopen; then |
5983 |
+ # Collect dlpreopened libraries |
5984 |
+ save_deplibs="$deplibs" |
5985 |
+ deplibs= |
5986 |
+ fi |
5987 |
+ for deplib in $libs; do |
5988 |
+ lib= |
5989 |
+ found=no |
5990 |
+ case $deplib in |
5991 |
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) |
5992 |
+ if test "$linkmode,$pass" = "prog,link"; then |
5993 |
+ compile_deplibs="$deplib $compile_deplibs" |
5994 |
+ finalize_deplibs="$deplib $finalize_deplibs" |
5995 |
+ else |
5996 |
+ compiler_flags="$compiler_flags $deplib" |
5997 |
+ fi |
5998 |
+ continue |
5999 |
+ ;; |
6000 |
+ -l*) |
6001 |
+ if test "$linkmode" != lib && test "$linkmode" != prog; then |
6002 |
+ $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 |
6003 |
+ continue |
6004 |
+ fi |
6005 |
+ name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` |
6006 |
+ for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do |
6007 |
+ for search_ext in .la $std_shrext .so .a; do |
6008 |
+ # Search the libtool library |
6009 |
+ lib="$searchdir/lib${name}${search_ext}" |
6010 |
+ if test -f "$lib"; then |
6011 |
+ if test "$search_ext" = ".la"; then |
6012 |
+ found=yes |
6013 |
+ else |
6014 |
+ found=no |
6015 |
+ fi |
6016 |
+ break 2 |
6017 |
+ fi |
6018 |
+ done |
6019 |
+ done |
6020 |
+ if test "$found" != yes; then |
6021 |
+ # deplib doesn't seem to be a libtool library |
6022 |
+ if test "$linkmode,$pass" = "prog,link"; then |
6023 |
+ compile_deplibs="$deplib $compile_deplibs" |
6024 |
+ finalize_deplibs="$deplib $finalize_deplibs" |
6025 |
+ else |
6026 |
+ deplibs="$deplib $deplibs" |
6027 |
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" |
6028 |
+ fi |
6029 |
+ continue |
6030 |
+ else # deplib is a libtool library |
6031 |
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, |
6032 |
+ # We need to do some special things here, and not later. |
6033 |
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
6034 |
+ case " $predeps $postdeps " in |
6035 |
+ *" $deplib "*) |
6036 |
+ if (${SED} -e '2q' $lib | |
6037 |
+ grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
6038 |
+ library_names= |
6039 |
+ old_library= |
6040 |
+ case $lib in |
6041 |
+ */* | *\\*) . $lib ;; |
6042 |
+ *) . ./$lib ;; |
6043 |
+ esac |
6044 |
+ for l in $old_library $library_names; do |
6045 |
+ ll="$l" |
6046 |
+ done |
6047 |
+ if test "X$ll" = "X$old_library" ; then # only static version available |
6048 |
+ found=no |
6049 |
+ ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` |
6050 |
+ test "X$ladir" = "X$lib" && ladir="." |
6051 |
+ lib=$ladir/$old_library |
6052 |
+ if test "$linkmode,$pass" = "prog,link"; then |
6053 |
+ compile_deplibs="$deplib $compile_deplibs" |
6054 |
+ finalize_deplibs="$deplib $finalize_deplibs" |
6055 |
+ else |
6056 |
+ deplibs="$deplib $deplibs" |
6057 |
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" |
6058 |
+ fi |
6059 |
+ continue |
6060 |
+ fi |
6061 |
+ fi |
6062 |
+ ;; |
6063 |
+ *) ;; |
6064 |
+ esac |
6065 |
+ fi |
6066 |
+ fi |
6067 |
+ ;; # -l |
6068 |
+ -L*) |
6069 |
+ case $linkmode in |
6070 |
+ lib) |
6071 |
+ deplibs="$deplib $deplibs" |
6072 |
+ test "$pass" = conv && continue |
6073 |
+ newdependency_libs="$deplib $newdependency_libs" |
6074 |
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` |
6075 |
+ ;; |
6076 |
+ prog) |
6077 |
+ if test "$pass" = conv; then |
6078 |
+ deplibs="$deplib $deplibs" |
6079 |
+ continue |
6080 |
+ fi |
6081 |
+ if test "$pass" = scan; then |
6082 |
+ deplibs="$deplib $deplibs" |
6083 |
+ else |
6084 |
+ compile_deplibs="$deplib $compile_deplibs" |
6085 |
+ finalize_deplibs="$deplib $finalize_deplibs" |
6086 |
+ fi |
6087 |
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` |
6088 |
+ ;; |
6089 |
+ *) |
6090 |
+ $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 |
6091 |
+ ;; |
6092 |
+ esac # linkmode |
6093 |
+ continue |
6094 |
+ ;; # -L |
6095 |
+ -R*) |
6096 |
+ if test "$pass" = link; then |
6097 |
+ dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` |
6098 |
+ # Make sure the xrpath contains only unique directories. |
6099 |
+ case "$xrpath " in |
6100 |
+ *" $dir "*) ;; |
6101 |
+ *) xrpath="$xrpath $dir" ;; |
6102 |
+ esac |
6103 |
+ fi |
6104 |
+ deplibs="$deplib $deplibs" |
6105 |
+ continue |
6106 |
+ ;; |
6107 |
+ *.la) lib="$deplib" ;; |
6108 |
+ *.$libext) |
6109 |
+ if test "$pass" = conv; then |
6110 |
+ deplibs="$deplib $deplibs" |
6111 |
+ continue |
6112 |
+ fi |
6113 |
+ case $linkmode in |
6114 |
+ lib) |
6115 |
+ valid_a_lib=no |
6116 |
+ case $deplibs_check_method in |
6117 |
+ match_pattern*) |
6118 |
+ set dummy $deplibs_check_method |
6119 |
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` |
6120 |
+ if eval $echo \"$deplib\" 2>/dev/null \ |
6121 |
+ | $SED 10q \ |
6122 |
+ | $EGREP "$match_pattern_regex" > /dev/null; then |
6123 |
+ valid_a_lib=yes |
6124 |
+ fi |
6125 |
+ ;; |
6126 |
+ pass_all) |
6127 |
+ valid_a_lib=yes |
6128 |
+ ;; |
6129 |
+ esac |
6130 |
+ if test "$valid_a_lib" != yes; then |
6131 |
+ $echo |
6132 |
+ $echo "*** Warning: Trying to link with static lib archive $deplib." |
6133 |
+ $echo "*** I have the capability to make that library automatically link in when" |
6134 |
+ $echo "*** you link to this library. But I can only do this if you have a" |
6135 |
+ $echo "*** shared version of the library, which you do not appear to have" |
6136 |
+ $echo "*** because the file extensions .$libext of this argument makes me believe" |
6137 |
+ $echo "*** that it is just a static archive that I should not used here." |
6138 |
+ else |
6139 |
+ $echo |
6140 |
+ $echo "*** Warning: Linking the shared library $output against the" |
6141 |
+ $echo "*** static library $deplib is not portable!" |
6142 |
+ deplibs="$deplib $deplibs" |
6143 |
+ fi |
6144 |
+ continue |
6145 |
+ ;; |
6146 |
+ prog) |
6147 |
+ if test "$pass" != link; then |
6148 |
+ deplibs="$deplib $deplibs" |
6149 |
+ else |
6150 |
+ compile_deplibs="$deplib $compile_deplibs" |
6151 |
+ finalize_deplibs="$deplib $finalize_deplibs" |
6152 |
+ fi |
6153 |
+ continue |
6154 |
+ ;; |
6155 |
+ esac # linkmode |
6156 |
+ ;; # *.$libext |
6157 |
+ *.lo | *.$objext) |
6158 |
+ if test "$pass" = conv; then |
6159 |
+ deplibs="$deplib $deplibs" |
6160 |
+ elif test "$linkmode" = prog; then |
6161 |
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then |
6162 |
+ # If there is no dlopen support or we're linking statically, |
6163 |
+ # we need to preload. |
6164 |
+ newdlprefiles="$newdlprefiles $deplib" |
6165 |
+ compile_deplibs="$deplib $compile_deplibs" |
6166 |
+ finalize_deplibs="$deplib $finalize_deplibs" |
6167 |
+ else |
6168 |
+ newdlfiles="$newdlfiles $deplib" |
6169 |
+ fi |
6170 |
+ fi |
6171 |
+ continue |
6172 |
+ ;; |
6173 |
+ %DEPLIBS%) |
6174 |
+ alldeplibs=yes |
6175 |
+ continue |
6176 |
+ ;; |
6177 |
+ esac # case $deplib |
6178 |
+ if test "$found" = yes || test -f "$lib"; then : |
6179 |
+ else |
6180 |
+ $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 |
6181 |
+ exit $EXIT_FAILURE |
6182 |
+ fi |
6183 |
+ |
6184 |
+ # Check to see that this really is a libtool archive. |
6185 |
+ if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
6186 |
+ else |
6187 |
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
6188 |
+ exit $EXIT_FAILURE |
6189 |
+ fi |
6190 |
+ |
6191 |
+ ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` |
6192 |
+ test "X$ladir" = "X$lib" && ladir="." |
6193 |
+ |
6194 |
+ dlname= |
6195 |
+ dlopen= |
6196 |
+ dlpreopen= |
6197 |
+ libdir= |
6198 |
+ library_names= |
6199 |
+ old_library= |
6200 |
+ # If the library was installed with an old release of libtool, |
6201 |
+ # it will not redefine variables installed, or shouldnotlink |
6202 |
+ installed=yes |
6203 |
+ shouldnotlink=no |
6204 |
+ avoidtemprpath= |
6205 |
+ |
6206 |
+ |
6207 |
+ # Read the .la file |
6208 |
+ case $lib in |
6209 |
+ */* | *\\*) . $lib ;; |
6210 |
+ *) . ./$lib ;; |
6211 |
+ esac |
6212 |
+ |
6213 |
+ if test "$linkmode,$pass" = "lib,link" || |
6214 |
+ test "$linkmode,$pass" = "prog,scan" || |
6215 |
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then |
6216 |
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen" |
6217 |
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" |
6218 |
+ fi |
6219 |
+ |
6220 |
+ if test "$pass" = conv; then |
6221 |
+ # Only check for convenience libraries |
6222 |
+ deplibs="$lib $deplibs" |
6223 |
+ if test -z "$libdir"; then |
6224 |
+ if test -z "$old_library"; then |
6225 |
+ $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 |
6226 |
+ exit $EXIT_FAILURE |
6227 |
+ fi |
6228 |
+ # It is a libtool convenience library, so add in its objects. |
6229 |
+ convenience="$convenience $ladir/$objdir/$old_library" |
6230 |
+ old_convenience="$old_convenience $ladir/$objdir/$old_library" |
6231 |
+ tmp_libs= |
6232 |
+ for deplib in $dependency_libs; do |
6233 |
+ deplibs="$deplib $deplibs" |
6234 |
+ if test "X$duplicate_deps" = "Xyes" ; then |
6235 |
+ case "$tmp_libs " in |
6236 |
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
6237 |
+ esac |
6238 |
+ fi |
6239 |
+ tmp_libs="$tmp_libs $deplib" |
6240 |
+ done |
6241 |
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then |
6242 |
+ $echo "$modename: \`$lib' is not a convenience library" 1>&2 |
6243 |
+ exit $EXIT_FAILURE |
6244 |
+ fi |
6245 |
+ continue |
6246 |
+ fi # $pass = conv |
6247 |
+ |
6248 |
+ |
6249 |
+ # Get the name of the library we link against. |
6250 |
+ linklib= |
6251 |
+ for l in $old_library $library_names; do |
6252 |
+ linklib="$l" |
6253 |
+ done |
6254 |
+ if test -z "$linklib"; then |
6255 |
+ $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 |
6256 |
+ exit $EXIT_FAILURE |
6257 |
+ fi |
6258 |
+ |
6259 |
+ # This library was specified with -dlopen. |
6260 |
+ if test "$pass" = dlopen; then |
6261 |
+ if test -z "$libdir"; then |
6262 |
+ $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 |
6263 |
+ exit $EXIT_FAILURE |
6264 |
+ fi |
6265 |
+ if test -z "$dlname" || |
6266 |
+ test "$dlopen_support" != yes || |
6267 |
+ test "$build_libtool_libs" = no; then |
6268 |
+ # If there is no dlname, no dlopen support or we're linking |
6269 |
+ # statically, we need to preload. We also need to preload any |
6270 |
+ # dependent libraries so libltdl's deplib preloader doesn't |
6271 |
+ # bomb out in the load deplibs phase. |
6272 |
+ dlprefiles="$dlprefiles $lib $dependency_libs" |
6273 |
+ else |
6274 |
+ newdlfiles="$newdlfiles $lib" |
6275 |
+ fi |
6276 |
+ continue |
6277 |
+ fi # $pass = dlopen |
6278 |
+ |
6279 |
+ # We need an absolute path. |
6280 |
+ case $ladir in |
6281 |
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; |
6282 |
+ *) |
6283 |
+ abs_ladir=`cd "$ladir" && pwd` |
6284 |
+ if test -z "$abs_ladir"; then |
6285 |
+ $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 |
6286 |
+ $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 |
6287 |
+ abs_ladir="$ladir" |
6288 |
+ fi |
6289 |
+ ;; |
6290 |
+ esac |
6291 |
+ laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` |
6292 |
+ |
6293 |
+ # Find the relevant object directory and library name. |
6294 |
+ if test "X$installed" = Xyes; then |
6295 |
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then |
6296 |
+ $echo "$modename: warning: library \`$lib' was moved." 1>&2 |
6297 |
+ dir="$ladir" |
6298 |
+ absdir="$abs_ladir" |
6299 |
+ libdir="$abs_ladir" |
6300 |
+ else |
6301 |
+ dir="$libdir" |
6302 |
+ absdir="$libdir" |
6303 |
+ fi |
6304 |
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes |
6305 |
+ else |
6306 |
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then |
6307 |
+ dir="$ladir" |
6308 |
+ absdir="$abs_ladir" |
6309 |
+ # Remove this search path later |
6310 |
+ notinst_path="$notinst_path $abs_ladir" |
6311 |
+ else |
6312 |
+ dir="$ladir/$objdir" |
6313 |
+ absdir="$abs_ladir/$objdir" |
6314 |
+ # Remove this search path later |
6315 |
+ notinst_path="$notinst_path $abs_ladir" |
6316 |
+ fi |
6317 |
+ fi # $installed = yes |
6318 |
+ name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` |
6319 |
+ |
6320 |
+ # This library was specified with -dlpreopen. |
6321 |
+ if test "$pass" = dlpreopen; then |
6322 |
+ if test -z "$libdir"; then |
6323 |
+ $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 |
6324 |
+ exit $EXIT_FAILURE |
6325 |
+ fi |
6326 |
+ # Prefer using a static library (so that no silly _DYNAMIC symbols |
6327 |
+ # are required to link). |
6328 |
+ if test -n "$old_library"; then |
6329 |
+ newdlprefiles="$newdlprefiles $dir/$old_library" |
6330 |
+ # Otherwise, use the dlname, so that lt_dlopen finds it. |
6331 |
+ elif test -n "$dlname"; then |
6332 |
+ newdlprefiles="$newdlprefiles $dir/$dlname" |
6333 |
+ else |
6334 |
+ newdlprefiles="$newdlprefiles $dir/$linklib" |
6335 |
+ fi |
6336 |
+ fi # $pass = dlpreopen |
6337 |
+ |
6338 |
+ if test -z "$libdir"; then |
6339 |
+ # Link the convenience library |
6340 |
+ if test "$linkmode" = lib; then |
6341 |
+ deplibs="$dir/$old_library $deplibs" |
6342 |
+ elif test "$linkmode,$pass" = "prog,link"; then |
6343 |
+ compile_deplibs="$dir/$old_library $compile_deplibs" |
6344 |
+ finalize_deplibs="$dir/$old_library $finalize_deplibs" |
6345 |
+ else |
6346 |
+ deplibs="$lib $deplibs" # used for prog,scan pass |
6347 |
+ fi |
6348 |
+ continue |
6349 |
+ fi |
6350 |
+ |
6351 |
+ |
6352 |
+ if test "$linkmode" = prog && test "$pass" != link; then |
6353 |
+ newlib_search_path="$newlib_search_path $ladir" |
6354 |
+ deplibs="$lib $deplibs" |
6355 |
+ |
6356 |
+ linkalldeplibs=no |
6357 |
+ if test "$link_all_deplibs" != no || test -z "$library_names" || |
6358 |
+ test "$build_libtool_libs" = no; then |
6359 |
+ linkalldeplibs=yes |
6360 |
+ fi |
6361 |
+ |
6362 |
+ tmp_libs= |
6363 |
+ for deplib in $dependency_libs; do |
6364 |
+ case $deplib in |
6365 |
+ -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test |
6366 |
+ esac |
6367 |
+ # Need to link against all dependency_libs? |
6368 |
+ if test "$linkalldeplibs" = yes; then |
6369 |
+ deplibs="$deplib $deplibs" |
6370 |
+ else |
6371 |
+ # Need to hardcode shared library paths |
6372 |
+ # or/and link against static libraries |
6373 |
+ newdependency_libs="$deplib $newdependency_libs" |
6374 |
+ fi |
6375 |
+ if test "X$duplicate_deps" = "Xyes" ; then |
6376 |
+ case "$tmp_libs " in |
6377 |
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
6378 |
+ esac |
6379 |
+ fi |
6380 |
+ tmp_libs="$tmp_libs $deplib" |
6381 |
+ done # for deplib |
6382 |
+ continue |
6383 |
+ fi # $linkmode = prog... |
6384 |
+ |
6385 |
+ if test "$linkmode,$pass" = "prog,link"; then |
6386 |
+ if test -n "$library_names" && |
6387 |
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then |
6388 |
+ # We need to hardcode the library path |
6389 |
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then |
6390 |
+ # Make sure the rpath contains only unique directories. |
6391 |
+ case "$temp_rpath " in |
6392 |
+ *" $dir "*) ;; |
6393 |
+ *" $absdir "*) ;; |
6394 |
+ *) temp_rpath="$temp_rpath $absdir" ;; |
6395 |
+ esac |
6396 |
+ fi |
6397 |
+ |
6398 |
+ # Hardcode the library path. |
6399 |
+ # Skip directories that are in the system default run-time |
6400 |
+ # search path. |
6401 |
+ case " $sys_lib_dlsearch_path " in |
6402 |
+ *" $absdir "*) ;; |
6403 |
+ *) |
6404 |
+ case "$compile_rpath " in |
6405 |
+ *" $absdir "*) ;; |
6406 |
+ *) compile_rpath="$compile_rpath $absdir" |
6407 |
+ esac |
6408 |
+ ;; |
6409 |
+ esac |
6410 |
+ case " $sys_lib_dlsearch_path " in |
6411 |
+ *" $libdir "*) ;; |
6412 |
+ *) |
6413 |
+ case "$finalize_rpath " in |
6414 |
+ *" $libdir "*) ;; |
6415 |
+ *) finalize_rpath="$finalize_rpath $libdir" |
6416 |
+ esac |
6417 |
+ ;; |
6418 |
+ esac |
6419 |
+ fi # $linkmode,$pass = prog,link... |
6420 |
+ |
6421 |
+ if test "$alldeplibs" = yes && |
6422 |
+ { test "$deplibs_check_method" = pass_all || |
6423 |
+ { test "$build_libtool_libs" = yes && |
6424 |
+ test -n "$library_names"; }; }; then |
6425 |
+ # We only need to search for static libraries |
6426 |
+ continue |
6427 |
+ fi |
6428 |
+ fi |
6429 |
+ |
6430 |
+ link_static=no # Whether the deplib will be linked statically |
6431 |
+ use_static_libs=$prefer_static_libs |
6432 |
+ if test "$use_static_libs" = built && test "$installed" = yes ; then |
6433 |
+ use_static_libs=no |
6434 |
+ fi |
6435 |
+ if test -n "$library_names" && |
6436 |
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then |
6437 |
+ if test "$installed" = no; then |
6438 |
+ notinst_deplibs="$notinst_deplibs $lib" |
6439 |
+ need_relink=yes |
6440 |
+ fi |
6441 |
+ # This is a shared library |
6442 |
+ |
6443 |
+ # Warn about portability, can't link against -module's on |
6444 |
+ # some systems (darwin) |
6445 |
+ if test "$shouldnotlink" = yes && test "$pass" = link ; then |
6446 |
+ $echo |
6447 |
+ if test "$linkmode" = prog; then |
6448 |
+ $echo "*** Warning: Linking the executable $output against the loadable module" |
6449 |
+ else |
6450 |
+ $echo "*** Warning: Linking the shared library $output against the loadable module" |
6451 |
+ fi |
6452 |
+ $echo "*** $linklib is not portable!" |
6453 |
+ fi |
6454 |
+ if test "$linkmode" = lib && |
6455 |
+ test "$hardcode_into_libs" = yes; then |
6456 |
+ # Hardcode the library path. |
6457 |
+ # Skip directories that are in the system default run-time |
6458 |
+ # search path. |
6459 |
+ case " $sys_lib_dlsearch_path " in |
6460 |
+ *" $absdir "*) ;; |
6461 |
+ *) |
6462 |
+ case "$compile_rpath " in |
6463 |
+ *" $absdir "*) ;; |
6464 |
+ *) compile_rpath="$compile_rpath $absdir" |
6465 |
+ esac |
6466 |
+ ;; |
6467 |
+ esac |
6468 |
+ case " $sys_lib_dlsearch_path " in |
6469 |
+ *" $libdir "*) ;; |
6470 |
+ *) |
6471 |
+ case "$finalize_rpath " in |
6472 |
+ *" $libdir "*) ;; |
6473 |
+ *) finalize_rpath="$finalize_rpath $libdir" |
6474 |
+ esac |
6475 |
+ ;; |
6476 |
+ esac |
6477 |
+ fi |
6478 |
+ |
6479 |
+ if test -n "$old_archive_from_expsyms_cmds"; then |
6480 |
+ # figure out the soname |
6481 |
+ set dummy $library_names |
6482 |
+ realname="$2" |
6483 |
+ shift; shift |
6484 |
+ libname=`eval \\$echo \"$libname_spec\"` |
6485 |
+ # use dlname if we got it. it's perfectly good, no? |
6486 |
+ if test -n "$dlname"; then |
6487 |
+ soname="$dlname" |
6488 |
+ elif test -n "$soname_spec"; then |
6489 |
+ # bleh windows |
6490 |
+ case $host in |
6491 |
+ *cygwin* | mingw*) |
6492 |
+ major=`expr $current - $age` |
6493 |
+ versuffix="-$major" |
6494 |
+ ;; |
6495 |
+ esac |
6496 |
+ eval soname=\"$soname_spec\" |
6497 |
+ else |
6498 |
+ soname="$realname" |
6499 |
+ fi |
6500 |
+ |
6501 |
+ # Make a new name for the extract_expsyms_cmds to use |
6502 |
+ soroot="$soname" |
6503 |
+ soname=`$echo $soroot | ${SED} -e 's/^.*\///'` |
6504 |
+ newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" |
6505 |
+ |
6506 |
+ # If the library has no export list, then create one now |
6507 |
+ if test -f "$output_objdir/$soname-def"; then : |
6508 |
+ else |
6509 |
+ $show "extracting exported symbol list from \`$soname'" |
6510 |
+ save_ifs="$IFS"; IFS='~' |
6511 |
+ cmds=$extract_expsyms_cmds |
6512 |
+ for cmd in $cmds; do |
6513 |
+ IFS="$save_ifs" |
6514 |
+ eval cmd=\"$cmd\" |
6515 |
+ $show "$cmd" |
6516 |
+ $run eval "$cmd" || exit $? |
6517 |
+ done |
6518 |
+ IFS="$save_ifs" |
6519 |
+ fi |
6520 |
+ |
6521 |
+ # Create $newlib |
6522 |
+ if test -f "$output_objdir/$newlib"; then :; else |
6523 |
+ $show "generating import library for \`$soname'" |
6524 |
+ save_ifs="$IFS"; IFS='~' |
6525 |
+ cmds=$old_archive_from_expsyms_cmds |
6526 |
+ for cmd in $cmds; do |
6527 |
+ IFS="$save_ifs" |
6528 |
+ eval cmd=\"$cmd\" |
6529 |
+ $show "$cmd" |
6530 |
+ $run eval "$cmd" || exit $? |
6531 |
+ done |
6532 |
+ IFS="$save_ifs" |
6533 |
+ fi |
6534 |
+ # make sure the library variables are pointing to the new library |
6535 |
+ dir=$output_objdir |
6536 |
+ linklib=$newlib |
6537 |
+ fi # test -n "$old_archive_from_expsyms_cmds" |
6538 |
+ |
6539 |
+ if test "$linkmode" = prog || test "$mode" != relink; then |
6540 |
+ add_shlibpath= |
6541 |
+ add_dir= |
6542 |
+ add= |
6543 |
+ lib_linked=yes |
6544 |
+ case $hardcode_action in |
6545 |
+ immediate | unsupported) |
6546 |
+ if test "$hardcode_direct" = no; then |
6547 |
+ add="$dir/$linklib" |
6548 |
+ case $host in |
6549 |
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; |
6550 |
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;; |
6551 |
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ |
6552 |
+ *-*-unixware7*) add_dir="-L$dir" ;; |
6553 |
+ *-*-darwin* ) |
6554 |
+ # if the lib is a module then we can not link against |
6555 |
+ # it, someone is ignoring the new warnings I added |
6556 |
+ if /usr/bin/file -L $add 2> /dev/null | |
6557 |
+ $EGREP ": [^:]* bundle" >/dev/null ; then |
6558 |
+ $echo "** Warning, lib $linklib is a module, not a shared library" |
6559 |
+ if test -z "$old_library" ; then |
6560 |
+ $echo |
6561 |
+ $echo "** And there doesn't seem to be a static archive available" |
6562 |
+ $echo "** The link will probably fail, sorry" |
6563 |
+ else |
6564 |
+ add="$dir/$old_library" |
6565 |
+ fi |
6566 |
+ fi |
6567 |
+ esac |
6568 |
+ elif test "$hardcode_minus_L" = no; then |
6569 |
+ case $host in |
6570 |
+ *-*-sunos*) add_shlibpath="$dir" ;; |
6571 |
+ esac |
6572 |
+ add_dir="-L$dir" |
6573 |
+ add="-l$name" |
6574 |
+ elif test "$hardcode_shlibpath_var" = no; then |
6575 |
+ add_shlibpath="$dir" |
6576 |
+ add="-l$name" |
6577 |
+ else |
6578 |
+ lib_linked=no |
6579 |
+ fi |
6580 |
+ ;; |
6581 |
+ relink) |
6582 |
+ if test "$hardcode_direct" = yes; then |
6583 |
+ add="$dir/$linklib" |
6584 |
+ elif test "$hardcode_minus_L" = yes; then |
6585 |
+ add_dir="-L$dir" |
6586 |
+ # Try looking first in the location we're being installed to. |
6587 |
+ if test -n "$inst_prefix_dir"; then |
6588 |
+ case $libdir in |
6589 |
+ [\\/]*) |
6590 |
+ add_dir="$add_dir -L$inst_prefix_dir$libdir" |
6591 |
+ ;; |
6592 |
+ esac |
6593 |
+ fi |
6594 |
+ add="-l$name" |
6595 |
+ elif test "$hardcode_shlibpath_var" = yes; then |
6596 |
+ add_shlibpath="$dir" |
6597 |
+ add="-l$name" |
6598 |
+ else |
6599 |
+ lib_linked=no |
6600 |
+ fi |
6601 |
+ ;; |
6602 |
+ *) lib_linked=no ;; |
6603 |
+ esac |
6604 |
+ |
6605 |
+ if test "$lib_linked" != yes; then |
6606 |
+ $echo "$modename: configuration error: unsupported hardcode properties" |
6607 |
+ exit $EXIT_FAILURE |
6608 |
+ fi |
6609 |
+ |
6610 |
+ if test -n "$add_shlibpath"; then |
6611 |
+ case :$compile_shlibpath: in |
6612 |
+ *":$add_shlibpath:"*) ;; |
6613 |
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; |
6614 |
+ esac |
6615 |
+ fi |
6616 |
+ if test "$linkmode" = prog; then |
6617 |
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" |
6618 |
+ test -n "$add" && compile_deplibs="$add $compile_deplibs" |
6619 |
+ else |
6620 |
+ test -n "$add_dir" && deplibs="$add_dir $deplibs" |
6621 |
+ test -n "$add" && deplibs="$add $deplibs" |
6622 |
+ if test "$hardcode_direct" != yes && \ |
6623 |
+ test "$hardcode_minus_L" != yes && \ |
6624 |
+ test "$hardcode_shlibpath_var" = yes; then |
6625 |
+ case :$finalize_shlibpath: in |
6626 |
+ *":$libdir:"*) ;; |
6627 |
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; |
6628 |
+ esac |
6629 |
+ fi |
6630 |
+ fi |
6631 |
+ fi |
6632 |
+ |
6633 |
+ if test "$linkmode" = prog || test "$mode" = relink; then |
6634 |
+ add_shlibpath= |
6635 |
+ add_dir= |
6636 |
+ add= |
6637 |
+ # Finalize command for both is simple: just hardcode it. |
6638 |
+ if test "$hardcode_direct" = yes; then |
6639 |
+ add="$libdir/$linklib" |
6640 |
+ elif test "$hardcode_minus_L" = yes; then |
6641 |
+ add_dir="-L$libdir" |
6642 |
+ add="-l$name" |
6643 |
+ elif test "$hardcode_shlibpath_var" = yes; then |
6644 |
+ case :$finalize_shlibpath: in |
6645 |
+ *":$libdir:"*) ;; |
6646 |
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; |
6647 |
+ esac |
6648 |
+ add="-l$name" |
6649 |
+ elif test "$hardcode_automatic" = yes; then |
6650 |
+ if test -n "$inst_prefix_dir" && |
6651 |
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then |
6652 |
+ add="$inst_prefix_dir$libdir/$linklib" |
6653 |
+ else |
6654 |
+ add="$libdir/$linklib" |
6655 |
+ fi |
6656 |
+ else |
6657 |
+ # We cannot seem to hardcode it, guess we'll fake it. |
6658 |
+ add_dir="-L$libdir" |
6659 |
+ # Try looking first in the location we're being installed to. |
6660 |
+ if test -n "$inst_prefix_dir"; then |
6661 |
+ case $libdir in |
6662 |
+ [\\/]*) |
6663 |
+ add_dir="$add_dir -L$inst_prefix_dir$libdir" |
6664 |
+ ;; |
6665 |
+ esac |
6666 |
+ fi |
6667 |
+ add="-l$name" |
6668 |
+ fi |
6669 |
+ |
6670 |
+ if test "$linkmode" = prog; then |
6671 |
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" |
6672 |
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs" |
6673 |
+ else |
6674 |
+ test -n "$add_dir" && deplibs="$add_dir $deplibs" |
6675 |
+ test -n "$add" && deplibs="$add $deplibs" |
6676 |
+ fi |
6677 |
+ fi |
6678 |
+ elif test "$linkmode" = prog; then |
6679 |
+ # Here we assume that one of hardcode_direct or hardcode_minus_L |
6680 |
+ # is not unsupported. This is valid on all known static and |
6681 |
+ # shared platforms. |
6682 |
+ if test "$hardcode_direct" != unsupported; then |
6683 |
+ test -n "$old_library" && linklib="$old_library" |
6684 |
+ compile_deplibs="$dir/$linklib $compile_deplibs" |
6685 |
+ finalize_deplibs="$dir/$linklib $finalize_deplibs" |
6686 |
+ else |
6687 |
+ compile_deplibs="-l$name -L$dir $compile_deplibs" |
6688 |
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs" |
6689 |
+ fi |
6690 |
+ elif test "$build_libtool_libs" = yes; then |
6691 |
+ # Not a shared library |
6692 |
+ if test "$deplibs_check_method" != pass_all; then |
6693 |
+ # We're trying link a shared library against a static one |
6694 |
+ # but the system doesn't support it. |
6695 |
+ |
6696 |
+ # Just print a warning and add the library to dependency_libs so |
6697 |
+ # that the program can be linked against the static library. |
6698 |
+ $echo |
6699 |
+ $echo "*** Warning: This system can not link to static lib archive $lib." |
6700 |
+ $echo "*** I have the capability to make that library automatically link in when" |
6701 |
+ $echo "*** you link to this library. But I can only do this if you have a" |
6702 |
+ $echo "*** shared version of the library, which you do not appear to have." |
6703 |
+ if test "$module" = yes; then |
6704 |
+ $echo "*** But as you try to build a module library, libtool will still create " |
6705 |
+ $echo "*** a static module, that should work as long as the dlopening application" |
6706 |
+ $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." |
6707 |
+ if test -z "$global_symbol_pipe"; then |
6708 |
+ $echo |
6709 |
+ $echo "*** However, this would only work if libtool was able to extract symbol" |
6710 |
+ $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" |
6711 |
+ $echo "*** not find such a program. So, this module is probably useless." |
6712 |
+ $echo "*** \`nm' from GNU binutils and a full rebuild may help." |
6713 |
+ fi |
6714 |
+ if test "$build_old_libs" = no; then |
6715 |
+ build_libtool_libs=module |
6716 |
+ build_old_libs=yes |
6717 |
+ else |
6718 |
+ build_libtool_libs=no |
6719 |
+ fi |
6720 |
+ fi |
6721 |
+ else |
6722 |
+ deplibs="$dir/$old_library $deplibs" |
6723 |
+ link_static=yes |
6724 |
+ fi |
6725 |
+ fi # link shared/static library? |
6726 |
+ |
6727 |
+ if test "$linkmode" = lib; then |
6728 |
+ if test -n "$dependency_libs" && |
6729 |
+ { test "$hardcode_into_libs" != yes || |
6730 |
+ test "$build_old_libs" = yes || |
6731 |
+ test "$link_static" = yes; }; then |
6732 |
+ # Extract -R from dependency_libs |
6733 |
+ temp_deplibs= |
6734 |
+ for libdir in $dependency_libs; do |
6735 |
+ case $libdir in |
6736 |
+ -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` |
6737 |
+ case " $xrpath " in |
6738 |
+ *" $temp_xrpath "*) ;; |
6739 |
+ *) xrpath="$xrpath $temp_xrpath";; |
6740 |
+ esac;; |
6741 |
+ *) temp_deplibs="$temp_deplibs $libdir";; |
6742 |
+ esac |
6743 |
+ done |
6744 |
+ dependency_libs="$temp_deplibs" |
6745 |
+ fi |
6746 |
+ |
6747 |
+ newlib_search_path="$newlib_search_path $absdir" |
6748 |
+ # Link against this library |
6749 |
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" |
6750 |
+ # ... and its dependency_libs |
6751 |
+ tmp_libs= |
6752 |
+ for deplib in $dependency_libs; do |
6753 |
+ newdependency_libs="$deplib $newdependency_libs" |
6754 |
+ if test "X$duplicate_deps" = "Xyes" ; then |
6755 |
+ case "$tmp_libs " in |
6756 |
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
6757 |
+ esac |
6758 |
+ fi |
6759 |
+ tmp_libs="$tmp_libs $deplib" |
6760 |
+ done |
6761 |
+ |
6762 |
+ if test "$link_all_deplibs" != no; then |
6763 |
+ # Add the search paths of all dependency libraries |
6764 |
+ for deplib in $dependency_libs; do |
6765 |
+ case $deplib in |
6766 |
+ -L*) path="$deplib" ;; |
6767 |
+ *.la) |
6768 |
+ dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` |
6769 |
+ test "X$dir" = "X$deplib" && dir="." |
6770 |
+ # We need an absolute path. |
6771 |
+ case $dir in |
6772 |
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; |
6773 |
+ *) |
6774 |
+ absdir=`cd "$dir" && pwd` |
6775 |
+ if test -z "$absdir"; then |
6776 |
+ $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 |
6777 |
+ absdir="$dir" |
6778 |
+ fi |
6779 |
+ ;; |
6780 |
+ esac |
6781 |
+ if grep "^installed=no" $deplib > /dev/null; then |
6782 |
+ path="$absdir/$objdir" |
6783 |
+ else |
6784 |
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` |
6785 |
+ if test -z "$libdir"; then |
6786 |
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 |
6787 |
+ exit $EXIT_FAILURE |
6788 |
+ fi |
6789 |
+ if test "$absdir" != "$libdir"; then |
6790 |
+ $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 |
6791 |
+ fi |
6792 |
+ path="$absdir" |
6793 |
+ fi |
6794 |
+ depdepl= |
6795 |
+ case $host in |
6796 |
+ *-*-darwin*) |
6797 |
+ # we do not want to link against static libs, |
6798 |
+ # but need to link against shared |
6799 |
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` |
6800 |
+ if test -n "$deplibrary_names" ; then |
6801 |
+ for tmp in $deplibrary_names ; do |
6802 |
+ depdepl=$tmp |
6803 |
+ done |
6804 |
+ if test -f "$path/$depdepl" ; then |
6805 |
+ depdepl="$path/$depdepl" |
6806 |
+ fi |
6807 |
+ # do not add paths which are already there |
6808 |
+ case " $newlib_search_path " in |
6809 |
+ *" $path "*) ;; |
6810 |
+ *) newlib_search_path="$newlib_search_path $path";; |
6811 |
+ esac |
6812 |
+ fi |
6813 |
+ path="" |
6814 |
+ ;; |
6815 |
+ *) |
6816 |
+ path="-L$path" |
6817 |
+ ;; |
6818 |
+ esac |
6819 |
+ ;; |
6820 |
+ -l*) |
6821 |
+ case $host in |
6822 |
+ *-*-darwin*) |
6823 |
+ # Again, we only want to link against shared libraries |
6824 |
+ eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` |
6825 |
+ for tmp in $newlib_search_path ; do |
6826 |
+ if test -f "$tmp/lib$tmp_libs.dylib" ; then |
6827 |
+ eval depdepl="$tmp/lib$tmp_libs.dylib" |
6828 |
+ break |
6829 |
+ fi |
6830 |
+ done |
6831 |
+ path="" |
6832 |
+ ;; |
6833 |
+ *) continue ;; |
6834 |
+ esac |
6835 |
+ ;; |
6836 |
+ *) continue ;; |
6837 |
+ esac |
6838 |
+ case " $deplibs " in |
6839 |
+ *" $path "*) ;; |
6840 |
+ *) deplibs="$path $deplibs" ;; |
6841 |
+ esac |
6842 |
+ case " $deplibs " in |
6843 |
+ *" $depdepl "*) ;; |
6844 |
+ *) deplibs="$depdepl $deplibs" ;; |
6845 |
+ esac |
6846 |
+ done |
6847 |
+ fi # link_all_deplibs != no |
6848 |
+ fi # linkmode = lib |
6849 |
+ done # for deplib in $libs |
6850 |
+ dependency_libs="$newdependency_libs" |
6851 |
+ if test "$pass" = dlpreopen; then |
6852 |
+ # Link the dlpreopened libraries before other libraries |
6853 |
+ for deplib in $save_deplibs; do |
6854 |
+ deplibs="$deplib $deplibs" |
6855 |
+ done |
6856 |
+ fi |
6857 |
+ if test "$pass" != dlopen; then |
6858 |
+ if test "$pass" != conv; then |
6859 |
+ # Make sure lib_search_path contains only unique directories. |
6860 |
+ lib_search_path= |
6861 |
+ for dir in $newlib_search_path; do |
6862 |
+ case "$lib_search_path " in |
6863 |
+ *" $dir "*) ;; |
6864 |
+ *) lib_search_path="$lib_search_path $dir" ;; |
6865 |
+ esac |
6866 |
+ done |
6867 |
+ newlib_search_path= |
6868 |
+ fi |
6869 |
+ |
6870 |
+ if test "$linkmode,$pass" != "prog,link"; then |
6871 |
+ vars="deplibs" |
6872 |
+ else |
6873 |
+ vars="compile_deplibs finalize_deplibs" |
6874 |
+ fi |
6875 |
+ for var in $vars dependency_libs; do |
6876 |
+ # Add libraries to $var in reverse order |
6877 |
+ eval tmp_libs=\"\$$var\" |
6878 |
+ new_libs= |
6879 |
+ for deplib in $tmp_libs; do |
6880 |
+ # FIXME: Pedantically, this is the right thing to do, so |
6881 |
+ # that some nasty dependency loop isn't accidentally |
6882 |
+ # broken: |
6883 |
+ #new_libs="$deplib $new_libs" |
6884 |
+ # Pragmatically, this seems to cause very few problems in |
6885 |
+ # practice: |
6886 |
+ case $deplib in |
6887 |
+ -L*) new_libs="$deplib $new_libs" ;; |
6888 |
+ -R*) ;; |
6889 |
+ *) |
6890 |
+ # And here is the reason: when a library appears more |
6891 |
+ # than once as an explicit dependence of a library, or |
6892 |
+ # is implicitly linked in more than once by the |
6893 |
+ # compiler, it is considered special, and multiple |
6894 |
+ # occurrences thereof are not removed. Compare this |
6895 |
+ # with having the same library being listed as a |
6896 |
+ # dependency of multiple other libraries: in this case, |
6897 |
+ # we know (pedantically, we assume) the library does not |
6898 |
+ # need to be listed more than once, so we keep only the |
6899 |
+ # last copy. This is not always right, but it is rare |
6900 |
+ # enough that we require users that really mean to play |
6901 |
+ # such unportable linking tricks to link the library |
6902 |
+ # using -Wl,-lname, so that libtool does not consider it |
6903 |
+ # for duplicate removal. |
6904 |
+ case " $specialdeplibs " in |
6905 |
+ *" $deplib "*) new_libs="$deplib $new_libs" ;; |
6906 |
+ *) |
6907 |
+ case " $new_libs " in |
6908 |
+ *" $deplib "*) ;; |
6909 |
+ *) new_libs="$deplib $new_libs" ;; |
6910 |
+ esac |
6911 |
+ ;; |
6912 |
+ esac |
6913 |
+ ;; |
6914 |
+ esac |
6915 |
+ done |
6916 |
+ tmp_libs= |
6917 |
+ for deplib in $new_libs; do |
6918 |
+ case $deplib in |
6919 |
+ -L*) |
6920 |
+ case " $tmp_libs " in |
6921 |
+ *" $deplib "*) ;; |
6922 |
+ *) tmp_libs="$tmp_libs $deplib" ;; |
6923 |
+ esac |
6924 |
+ ;; |
6925 |
+ *) tmp_libs="$tmp_libs $deplib" ;; |
6926 |
+ esac |
6927 |
+ done |
6928 |
+ eval $var=\"$tmp_libs\" |
6929 |
+ done # for var |
6930 |
+ fi |
6931 |
+ # Last step: remove runtime libs from dependency_libs |
6932 |
+ # (they stay in deplibs) |
6933 |
+ tmp_libs= |
6934 |
+ for i in $dependency_libs ; do |
6935 |
+ case " $predeps $postdeps $compiler_lib_search_path " in |
6936 |
+ *" $i "*) |
6937 |
+ i="" |
6938 |
+ ;; |
6939 |
+ esac |
6940 |
+ if test -n "$i" ; then |
6941 |
+ tmp_libs="$tmp_libs $i" |
6942 |
+ fi |
6943 |
+ done |
6944 |
+ dependency_libs=$tmp_libs |
6945 |
+ done # for pass |
6946 |
+ if test "$linkmode" = prog; then |
6947 |
+ dlfiles="$newdlfiles" |
6948 |
+ dlprefiles="$newdlprefiles" |
6949 |
+ fi |
6950 |
+ |
6951 |
+ case $linkmode in |
6952 |
+ oldlib) |
6953 |
+ if test -n "$deplibs"; then |
6954 |
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 |
6955 |
+ fi |
6956 |
+ |
6957 |
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then |
6958 |
+ $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 |
6959 |
+ fi |
6960 |
+ |
6961 |
+ if test -n "$rpath"; then |
6962 |
+ $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 |
6963 |
+ fi |
6964 |
+ |
6965 |
+ if test -n "$xrpath"; then |
6966 |
+ $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 |
6967 |
+ fi |
6968 |
+ |
6969 |
+ if test -n "$vinfo"; then |
6970 |
+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 |
6971 |
+ fi |
6972 |
+ |
6973 |
+ if test -n "$release"; then |
6974 |
+ $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 |
6975 |
+ fi |
6976 |
+ |
6977 |
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then |
6978 |
+ $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 |
6979 |
+ fi |
6980 |
+ |
6981 |
+ # Now set the variables for building old libraries. |
6982 |
+ build_libtool_libs=no |
6983 |
+ oldlibs="$output" |
6984 |
+ objs="$objs$old_deplibs" |
6985 |
+ ;; |
6986 |
+ |
6987 |
+ lib) |
6988 |
+ # Make sure we only generate libraries of the form `libNAME.la'. |
6989 |
+ case $outputname in |
6990 |
+ lib*) |
6991 |
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` |
6992 |
+ eval shared_ext=\"$shrext_cmds\" |
6993 |
+ eval libname=\"$libname_spec\" |
6994 |
+ ;; |
6995 |
+ *) |
6996 |
+ if test "$module" = no; then |
6997 |
+ $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 |
6998 |
+ $echo "$help" 1>&2 |
6999 |
+ exit $EXIT_FAILURE |
7000 |
+ fi |
7001 |
+ if test "$need_lib_prefix" != no; then |
7002 |
+ # Add the "lib" prefix for modules if required |
7003 |
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` |
7004 |
+ eval shared_ext=\"$shrext_cmds\" |
7005 |
+ eval libname=\"$libname_spec\" |
7006 |
+ else |
7007 |
+ libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` |
7008 |
+ fi |
7009 |
+ ;; |
7010 |
+ esac |
7011 |
+ |
7012 |
+ if test -n "$objs"; then |
7013 |
+ if test "$deplibs_check_method" != pass_all; then |
7014 |
+ $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 |
7015 |
+ exit $EXIT_FAILURE |
7016 |
+ else |
7017 |
+ $echo |
7018 |
+ $echo "*** Warning: Linking the shared library $output against the non-libtool" |
7019 |
+ $echo "*** objects $objs is not portable!" |
7020 |
+ libobjs="$libobjs $objs" |
7021 |
+ fi |
7022 |
+ fi |
7023 |
+ |
7024 |
+ if test "$dlself" != no; then |
7025 |
+ $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 |
7026 |
+ fi |
7027 |
+ |
7028 |
+ set dummy $rpath |
7029 |
+ if test "$#" -gt 2; then |
7030 |
+ $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 |
7031 |
+ fi |
7032 |
+ install_libdir="$2" |
7033 |
+ |
7034 |
+ oldlibs= |
7035 |
+ if test -z "$rpath"; then |
7036 |
+ if test "$build_libtool_libs" = yes; then |
7037 |
+ # Building a libtool convenience library. |
7038 |
+ # Some compilers have problems with a `.al' extension so |
7039 |
+ # convenience libraries should have the same extension an |
7040 |
+ # archive normally would. |
7041 |
+ oldlibs="$output_objdir/$libname.$libext $oldlibs" |
7042 |
+ build_libtool_libs=convenience |
7043 |
+ build_old_libs=yes |
7044 |
+ fi |
7045 |
+ |
7046 |
+ if test -n "$vinfo"; then |
7047 |
+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 |
7048 |
+ fi |
7049 |
+ |
7050 |
+ if test -n "$release"; then |
7051 |
+ $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 |
7052 |
+ fi |
7053 |
+ else |
7054 |
+ |
7055 |
+ # Parse the version information argument. |
7056 |
+ save_ifs="$IFS"; IFS=':' |
7057 |
+ set dummy $vinfo 0 0 0 |
7058 |
+ IFS="$save_ifs" |
7059 |
+ |
7060 |
+ if test -n "$8"; then |
7061 |
+ $echo "$modename: too many parameters to \`-version-info'" 1>&2 |
7062 |
+ $echo "$help" 1>&2 |
7063 |
+ exit $EXIT_FAILURE |
7064 |
+ fi |
7065 |
+ |
7066 |
+ # convert absolute version numbers to libtool ages |
7067 |
+ # this retains compatibility with .la files and attempts |
7068 |
+ # to make the code below a bit more comprehensible |
7069 |
+ |
7070 |
+ case $vinfo_number in |
7071 |
+ yes) |
7072 |
+ number_major="$2" |
7073 |
+ number_minor="$3" |
7074 |
+ number_revision="$4" |
7075 |
+ # |
7076 |
+ # There are really only two kinds -- those that |
7077 |
+ # use the current revision as the major version |
7078 |
+ # and those that subtract age and use age as |
7079 |
+ # a minor version. But, then there is irix |
7080 |
+ # which has an extra 1 added just for fun |
7081 |
+ # |
7082 |
+ case $version_type in |
7083 |
+ darwin|linux|osf|windows) |
7084 |
+ current=`expr $number_major + $number_minor` |
7085 |
+ age="$number_minor" |
7086 |
+ revision="$number_revision" |
7087 |
+ ;; |
7088 |
+ freebsd-aout|freebsd-elf|sunos) |
7089 |
+ current="$number_major" |
7090 |
+ revision="$number_minor" |
7091 |
+ age="0" |
7092 |
+ ;; |
7093 |
+ irix|nonstopux) |
7094 |
+ current=`expr $number_major + $number_minor - 1` |
7095 |
+ age="$number_minor" |
7096 |
+ revision="$number_minor" |
7097 |
+ ;; |
7098 |
+ esac |
7099 |
+ ;; |
7100 |
+ no) |
7101 |
+ current="$2" |
7102 |
+ revision="$3" |
7103 |
+ age="$4" |
7104 |
+ ;; |
7105 |
+ esac |
7106 |
+ |
7107 |
+ # Check that each of the things are valid numbers. |
7108 |
+ case $current in |
7109 |
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; |
7110 |
+ *) |
7111 |
+ $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 |
7112 |
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
7113 |
+ exit $EXIT_FAILURE |
7114 |
+ ;; |
7115 |
+ esac |
7116 |
+ |
7117 |
+ case $revision in |
7118 |
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; |
7119 |
+ *) |
7120 |
+ $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 |
7121 |
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
7122 |
+ exit $EXIT_FAILURE |
7123 |
+ ;; |
7124 |
+ esac |
7125 |
+ |
7126 |
+ case $age in |
7127 |
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; |
7128 |
+ *) |
7129 |
+ $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 |
7130 |
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
7131 |
+ exit $EXIT_FAILURE |
7132 |
+ ;; |
7133 |
+ esac |
7134 |
+ |
7135 |
+ if test "$age" -gt "$current"; then |
7136 |
+ $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 |
7137 |
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
7138 |
+ exit $EXIT_FAILURE |
7139 |
+ fi |
7140 |
+ |
7141 |
+ # Calculate the version variables. |
7142 |
+ major= |
7143 |
+ versuffix= |
7144 |
+ verstring= |
7145 |
+ case $version_type in |
7146 |
+ none) ;; |
7147 |
+ |
7148 |
+ darwin) |
7149 |
+ # Like Linux, but with the current version available in |
7150 |
+ # verstring for coding it into the library header |
7151 |
+ major=.`expr $current - $age` |
7152 |
+ versuffix="$major.$age.$revision" |
7153 |
+ # Darwin ld doesn't like 0 for these options... |
7154 |
+ minor_current=`expr $current + 1` |
7155 |
+ verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" |
7156 |
+ ;; |
7157 |
+ |
7158 |
+ freebsd-aout) |
7159 |
+ major=".$current" |
7160 |
+ versuffix=".$current.$revision"; |
7161 |
+ ;; |
7162 |
+ |
7163 |
+ freebsd-elf) |
7164 |
+ major=".$current" |
7165 |
+ versuffix=".$current"; |
7166 |
+ ;; |
7167 |
+ |
7168 |
+ irix | nonstopux) |
7169 |
+ major=`expr $current - $age + 1` |
7170 |
+ |
7171 |
+ case $version_type in |
7172 |
+ nonstopux) verstring_prefix=nonstopux ;; |
7173 |
+ *) verstring_prefix=sgi ;; |
7174 |
+ esac |
7175 |
+ verstring="$verstring_prefix$major.$revision" |
7176 |
+ |
7177 |
+ # Add in all the interfaces that we are compatible with. |
7178 |
+ loop=$revision |
7179 |
+ while test "$loop" -ne 0; do |
7180 |
+ iface=`expr $revision - $loop` |
7181 |
+ loop=`expr $loop - 1` |
7182 |
+ verstring="$verstring_prefix$major.$iface:$verstring" |
7183 |
+ done |
7184 |
+ |
7185 |
+ # Before this point, $major must not contain `.'. |
7186 |
+ major=.$major |
7187 |
+ versuffix="$major.$revision" |
7188 |
+ ;; |
7189 |
+ |
7190 |
+ linux) |
7191 |
+ major=.`expr $current - $age` |
7192 |
+ versuffix="$major.$age.$revision" |
7193 |
+ ;; |
7194 |
+ |
7195 |
+ osf) |
7196 |
+ major=.`expr $current - $age` |
7197 |
+ versuffix=".$current.$age.$revision" |
7198 |
+ verstring="$current.$age.$revision" |
7199 |
+ |
7200 |
+ # Add in all the interfaces that we are compatible with. |
7201 |
+ loop=$age |
7202 |
+ while test "$loop" -ne 0; do |
7203 |
+ iface=`expr $current - $loop` |
7204 |
+ loop=`expr $loop - 1` |
7205 |
+ verstring="$verstring:${iface}.0" |
7206 |
+ done |
7207 |
+ |
7208 |
+ # Make executables depend on our current version. |
7209 |
+ verstring="$verstring:${current}.0" |
7210 |
+ ;; |
7211 |
+ |
7212 |
+ sunos) |
7213 |
+ major=".$current" |
7214 |
+ versuffix=".$current.$revision" |
7215 |
+ ;; |
7216 |
+ |
7217 |
+ windows) |
7218 |
+ # Use '-' rather than '.', since we only want one |
7219 |
+ # extension on DOS 8.3 filesystems. |
7220 |
+ major=`expr $current - $age` |
7221 |
+ versuffix="-$major" |
7222 |
+ ;; |
7223 |
+ |
7224 |
+ *) |
7225 |
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2 |
7226 |
+ $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 |
7227 |
+ exit $EXIT_FAILURE |
7228 |
+ ;; |
7229 |
+ esac |
7230 |
+ |
7231 |
+ # Clear the version info if we defaulted, and they specified a release. |
7232 |
+ if test -z "$vinfo" && test -n "$release"; then |
7233 |
+ major= |
7234 |
+ case $version_type in |
7235 |
+ darwin) |
7236 |
+ # we can't check for "0.0" in archive_cmds due to quoting |
7237 |
+ # problems, so we reset it completely |
7238 |
+ verstring= |
7239 |
+ ;; |
7240 |
+ *) |
7241 |
+ verstring="0.0" |
7242 |
+ ;; |
7243 |
+ esac |
7244 |
+ if test "$need_version" = no; then |
7245 |
+ versuffix= |
7246 |
+ else |
7247 |
+ versuffix=".0.0" |
7248 |
+ fi |
7249 |
+ fi |
7250 |
+ |
7251 |
+ # Remove version info from name if versioning should be avoided |
7252 |
+ if test "$avoid_version" = yes && test "$need_version" = no; then |
7253 |
+ major= |
7254 |
+ versuffix= |
7255 |
+ verstring="" |
7256 |
+ fi |
7257 |
+ |
7258 |
+ # Check to see if the archive will have undefined symbols. |
7259 |
+ if test "$allow_undefined" = yes; then |
7260 |
+ if test "$allow_undefined_flag" = unsupported; then |
7261 |
+ $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 |
7262 |
+ build_libtool_libs=no |
7263 |
+ build_old_libs=yes |
7264 |
+ fi |
7265 |
+ else |
7266 |
+ # Don't allow undefined symbols. |
7267 |
+ allow_undefined_flag="$no_undefined_flag" |
7268 |
+ fi |
7269 |
+ fi |
7270 |
+ |
7271 |
+ if test "$mode" != relink; then |
7272 |
+ # Remove our outputs, but don't remove object files since they |
7273 |
+ # may have been created when compiling PIC objects. |
7274 |
+ removelist= |
7275 |
+ tempremovelist=`$echo "$output_objdir/*"` |
7276 |
+ for p in $tempremovelist; do |
7277 |
+ case $p in |
7278 |
+ *.$objext) |
7279 |
+ ;; |
7280 |
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) |
7281 |
+ if test "X$precious_files_regex" != "X"; then |
7282 |
+ if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 |
7283 |
+ then |
7284 |
+ continue |
7285 |
+ fi |
7286 |
+ fi |
7287 |
+ removelist="$removelist $p" |
7288 |
+ ;; |
7289 |
+ *) ;; |
7290 |
+ esac |
7291 |
+ done |
7292 |
+ if test -n "$removelist"; then |
7293 |
+ $show "${rm}r $removelist" |
7294 |
+ $run ${rm}r $removelist |
7295 |
+ fi |
7296 |
+ fi |
7297 |
+ |
7298 |
+ # Now set the variables for building old libraries. |
7299 |
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then |
7300 |
+ oldlibs="$oldlibs $output_objdir/$libname.$libext" |
7301 |
+ |
7302 |
+ # Transform .lo files to .o files. |
7303 |
+ oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` |
7304 |
+ fi |
7305 |
+ |
7306 |
+ # Eliminate all temporary directories. |
7307 |
+ for path in $notinst_path; do |
7308 |
+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` |
7309 |
+ deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` |
7310 |
+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` |
7311 |
+ done |
7312 |
+ |
7313 |
+ if test -n "$xrpath"; then |
7314 |
+ # If the user specified any rpath flags, then add them. |
7315 |
+ temp_xrpath= |
7316 |
+ for libdir in $xrpath; do |
7317 |
+ temp_xrpath="$temp_xrpath -R$libdir" |
7318 |
+ case "$finalize_rpath " in |
7319 |
+ *" $libdir "*) ;; |
7320 |
+ *) finalize_rpath="$finalize_rpath $libdir" ;; |
7321 |
+ esac |
7322 |
+ done |
7323 |
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then |
7324 |
+ dependency_libs="$temp_xrpath $dependency_libs" |
7325 |
+ fi |
7326 |
+ fi |
7327 |
+ |
7328 |
+ # Make sure dlfiles contains only unique files that won't be dlpreopened |
7329 |
+ old_dlfiles="$dlfiles" |
7330 |
+ dlfiles= |
7331 |
+ for lib in $old_dlfiles; do |
7332 |
+ case " $dlprefiles $dlfiles " in |
7333 |
+ *" $lib "*) ;; |
7334 |
+ *) dlfiles="$dlfiles $lib" ;; |
7335 |
+ esac |
7336 |
+ done |
7337 |
+ |
7338 |
+ # Make sure dlprefiles contains only unique files |
7339 |
+ old_dlprefiles="$dlprefiles" |
7340 |
+ dlprefiles= |
7341 |
+ for lib in $old_dlprefiles; do |
7342 |
+ case "$dlprefiles " in |
7343 |
+ *" $lib "*) ;; |
7344 |
+ *) dlprefiles="$dlprefiles $lib" ;; |
7345 |
+ esac |
7346 |
+ done |
7347 |
+ |
7348 |
+ if test "$build_libtool_libs" = yes; then |
7349 |
+ if test -n "$rpath"; then |
7350 |
+ case $host in |
7351 |
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) |
7352 |
+ # these systems don't actually have a c library (as such)! |
7353 |
+ ;; |
7354 |
+ *-*-rhapsody* | *-*-darwin1.[012]) |
7355 |
+ # Rhapsody C library is in the System framework |
7356 |
+ deplibs="$deplibs -framework System" |
7357 |
+ ;; |
7358 |
+ *-*-netbsd*) |
7359 |
+ # Don't link with libc until the a.out ld.so is fixed. |
7360 |
+ ;; |
7361 |
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) |
7362 |
+ # Do not include libc due to us having libc/libc_r. |
7363 |
+ ;; |
7364 |
+ *-*-sco3.2v5* | *-*-sco5v6*) |
7365 |
+ # Causes problems with __ctype |
7366 |
+ ;; |
7367 |
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) |
7368 |
+ # Compiler inserts libc in the correct place for threads to work |
7369 |
+ ;; |
7370 |
+ *) |
7371 |
+ # Add libc to deplibs on all other systems if necessary. |
7372 |
+ if test "$build_libtool_need_lc" = "yes"; then |
7373 |
+ deplibs="$deplibs -lc" |
7374 |
+ fi |
7375 |
+ ;; |
7376 |
+ esac |
7377 |
+ fi |
7378 |
+ |
7379 |
+ # Transform deplibs into only deplibs that can be linked in shared. |
7380 |
+ name_save=$name |
7381 |
+ libname_save=$libname |
7382 |
+ release_save=$release |
7383 |
+ versuffix_save=$versuffix |
7384 |
+ major_save=$major |
7385 |
+ # I'm not sure if I'm treating the release correctly. I think |
7386 |
+ # release should show up in the -l (ie -lgmp5) so we don't want to |
7387 |
+ # add it in twice. Is that correct? |
7388 |
+ release="" |
7389 |
+ versuffix="" |
7390 |
+ major="" |
7391 |
+ newdeplibs= |
7392 |
+ droppeddeps=no |
7393 |
+ case $deplibs_check_method in |
7394 |
+ pass_all) |
7395 |
+ # Don't check for shared/static. Everything works. |
7396 |
+ # This might be a little naive. We might want to check |
7397 |
+ # whether the library exists or not. But this is on |
7398 |
+ # osf3 & osf4 and I'm not really sure... Just |
7399 |
+ # implementing what was already the behavior. |
7400 |
+ newdeplibs=$deplibs |
7401 |
+ ;; |
7402 |
+ test_compile) |
7403 |
+ # This code stresses the "libraries are programs" paradigm to its |
7404 |
+ # limits. Maybe even breaks it. We compile a program, linking it |
7405 |
+ # against the deplibs as a proxy for the library. Then we can check |
7406 |
+ # whether they linked in statically or dynamically with ldd. |
7407 |
+ $rm conftest.c |
7408 |
+ cat > conftest.c <<EOF |
7409 |
+ int main() { return 0; } |
7410 |
+EOF |
7411 |
+ $rm conftest |
7412 |
+ $LTCC $LTCFLAGS -o conftest conftest.c $deplibs |
7413 |
+ if test "$?" -eq 0 ; then |
7414 |
+ ldd_output=`ldd conftest` |
7415 |
+ for i in $deplibs; do |
7416 |
+ name=`expr $i : '-l\(.*\)'` |
7417 |
+ # If $name is empty we are operating on a -L argument. |
7418 |
+ if test "$name" != "" && test "$name" -ne "0"; then |
7419 |
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
7420 |
+ case " $predeps $postdeps " in |
7421 |
+ *" $i "*) |
7422 |
+ newdeplibs="$newdeplibs $i" |
7423 |
+ i="" |
7424 |
+ ;; |
7425 |
+ esac |
7426 |
+ fi |
7427 |
+ if test -n "$i" ; then |
7428 |
+ libname=`eval \\$echo \"$libname_spec\"` |
7429 |
+ deplib_matches=`eval \\$echo \"$library_names_spec\"` |
7430 |
+ set dummy $deplib_matches |
7431 |
+ deplib_match=$2 |
7432 |
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then |
7433 |
+ newdeplibs="$newdeplibs $i" |
7434 |
+ else |
7435 |
+ droppeddeps=yes |
7436 |
+ $echo |
7437 |
+ $echo "*** Warning: dynamic linker does not accept needed library $i." |
7438 |
+ $echo "*** I have the capability to make that library automatically link in when" |
7439 |
+ $echo "*** you link to this library. But I can only do this if you have a" |
7440 |
+ $echo "*** shared version of the library, which I believe you do not have" |
7441 |
+ $echo "*** because a test_compile did reveal that the linker did not use it for" |
7442 |
+ $echo "*** its dynamic dependency list that programs get resolved with at runtime." |
7443 |
+ fi |
7444 |
+ fi |
7445 |
+ else |
7446 |
+ newdeplibs="$newdeplibs $i" |
7447 |
+ fi |
7448 |
+ done |
7449 |
+ else |
7450 |
+ # Error occurred in the first compile. Let's try to salvage |
7451 |
+ # the situation: Compile a separate program for each library. |
7452 |
+ for i in $deplibs; do |
7453 |
+ name=`expr $i : '-l\(.*\)'` |
7454 |
+ # If $name is empty we are operating on a -L argument. |
7455 |
+ if test "$name" != "" && test "$name" != "0"; then |
7456 |
+ $rm conftest |
7457 |
+ $LTCC $LTCFLAGS -o conftest conftest.c $i |
7458 |
+ # Did it work? |
7459 |
+ if test "$?" -eq 0 ; then |
7460 |
+ ldd_output=`ldd conftest` |
7461 |
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
7462 |
+ case " $predeps $postdeps " in |
7463 |
+ *" $i "*) |
7464 |
+ newdeplibs="$newdeplibs $i" |
7465 |
+ i="" |
7466 |
+ ;; |
7467 |
+ esac |
7468 |
+ fi |
7469 |
+ if test -n "$i" ; then |
7470 |
+ libname=`eval \\$echo \"$libname_spec\"` |
7471 |
+ deplib_matches=`eval \\$echo \"$library_names_spec\"` |
7472 |
+ set dummy $deplib_matches |
7473 |
+ deplib_match=$2 |
7474 |
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then |
7475 |
+ newdeplibs="$newdeplibs $i" |
7476 |
+ else |
7477 |
+ droppeddeps=yes |
7478 |
+ $echo |
7479 |
+ $echo "*** Warning: dynamic linker does not accept needed library $i." |
7480 |
+ $echo "*** I have the capability to make that library automatically link in when" |
7481 |
+ $echo "*** you link to this library. But I can only do this if you have a" |
7482 |
+ $echo "*** shared version of the library, which you do not appear to have" |
7483 |
+ $echo "*** because a test_compile did reveal that the linker did not use this one" |
7484 |
+ $echo "*** as a dynamic dependency that programs can get resolved with at runtime." |
7485 |
+ fi |
7486 |
+ fi |
7487 |
+ else |
7488 |
+ droppeddeps=yes |
7489 |
+ $echo |
7490 |
+ $echo "*** Warning! Library $i is needed by this library but I was not able to" |
7491 |
+ $echo "*** make it link in! You will probably need to install it or some" |
7492 |
+ $echo "*** library that it depends on before this library will be fully" |
7493 |
+ $echo "*** functional. Installing it before continuing would be even better." |
7494 |
+ fi |
7495 |
+ else |
7496 |
+ newdeplibs="$newdeplibs $i" |
7497 |
+ fi |
7498 |
+ done |
7499 |
+ fi |
7500 |
+ ;; |
7501 |
+ file_magic*) |
7502 |
+ set dummy $deplibs_check_method |
7503 |
+ file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` |
7504 |
+ for a_deplib in $deplibs; do |
7505 |
+ name=`expr $a_deplib : '-l\(.*\)'` |
7506 |
+ # If $name is empty we are operating on a -L argument. |
7507 |
+ if test "$name" != "" && test "$name" != "0"; then |
7508 |
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
7509 |
+ case " $predeps $postdeps " in |
7510 |
+ *" $a_deplib "*) |
7511 |
+ newdeplibs="$newdeplibs $a_deplib" |
7512 |
+ a_deplib="" |
7513 |
+ ;; |
7514 |
+ esac |
7515 |
+ fi |
7516 |
+ if test -n "$a_deplib" ; then |
7517 |
+ libname=`eval \\$echo \"$libname_spec\"` |
7518 |
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
7519 |
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
7520 |
+ for potent_lib in $potential_libs; do |
7521 |
+ # Follow soft links. |
7522 |
+ if ls -lLd "$potent_lib" 2>/dev/null \ |
7523 |
+ | grep " -> " >/dev/null; then |
7524 |
+ continue |
7525 |
+ fi |
7526 |
+ # The statement above tries to avoid entering an |
7527 |
+ # endless loop below, in case of cyclic links. |
7528 |
+ # We might still enter an endless loop, since a link |
7529 |
+ # loop can be closed while we follow links, |
7530 |
+ # but so what? |
7531 |
+ potlib="$potent_lib" |
7532 |
+ while test -h "$potlib" 2>/dev/null; do |
7533 |
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` |
7534 |
+ case $potliblink in |
7535 |
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; |
7536 |
+ *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; |
7537 |
+ esac |
7538 |
+ done |
7539 |
+ # It is ok to link against an archive when |
7540 |
+ # building a shared library. |
7541 |
+ if $AR -t $potlib > /dev/null 2>&1; then |
7542 |
+ newdeplibs="$newdeplibs $a_deplib" |
7543 |
+ a_deplib="" |
7544 |
+ break 2 |
7545 |
+ fi |
7546 |
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ |
7547 |
+ | ${SED} 10q \ |
7548 |
+ | $EGREP "$file_magic_regex" > /dev/null; then |
7549 |
+ newdeplibs="$newdeplibs $a_deplib" |
7550 |
+ a_deplib="" |
7551 |
+ break 2 |
7552 |
+ fi |
7553 |
+ done |
7554 |
+ done |
7555 |
+ fi |
7556 |
+ if test -n "$a_deplib" ; then |
7557 |
+ droppeddeps=yes |
7558 |
+ $echo |
7559 |
+ $echo "*** Warning: linker path does not have real file for library $a_deplib." |
7560 |
+ $echo "*** I have the capability to make that library automatically link in when" |
7561 |
+ $echo "*** you link to this library. But I can only do this if you have a" |
7562 |
+ $echo "*** shared version of the library, which you do not appear to have" |
7563 |
+ $echo "*** because I did check the linker path looking for a file starting" |
7564 |
+ if test -z "$potlib" ; then |
7565 |
+ $echo "*** with $libname but no candidates were found. (...for file magic test)" |
7566 |
+ else |
7567 |
+ $echo "*** with $libname and none of the candidates passed a file format test" |
7568 |
+ $echo "*** using a file magic. Last file checked: $potlib" |
7569 |
+ fi |
7570 |
+ fi |
7571 |
+ else |
7572 |
+ # Add a -L argument. |
7573 |
+ newdeplibs="$newdeplibs $a_deplib" |
7574 |
+ fi |
7575 |
+ done # Gone through all deplibs. |
7576 |
+ ;; |
7577 |
+ match_pattern*) |
7578 |
+ set dummy $deplibs_check_method |
7579 |
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` |
7580 |
+ for a_deplib in $deplibs; do |
7581 |
+ name=`expr $a_deplib : '-l\(.*\)'` |
7582 |
+ # If $name is empty we are operating on a -L argument. |
7583 |
+ if test -n "$name" && test "$name" != "0"; then |
7584 |
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
7585 |
+ case " $predeps $postdeps " in |
7586 |
+ *" $a_deplib "*) |
7587 |
+ newdeplibs="$newdeplibs $a_deplib" |
7588 |
+ a_deplib="" |
7589 |
+ ;; |
7590 |
+ esac |
7591 |
+ fi |
7592 |
+ if test -n "$a_deplib" ; then |
7593 |
+ libname=`eval \\$echo \"$libname_spec\"` |
7594 |
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
7595 |
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
7596 |
+ for potent_lib in $potential_libs; do |
7597 |
+ potlib="$potent_lib" # see symlink-check above in file_magic test |
7598 |
+ if eval $echo \"$potent_lib\" 2>/dev/null \ |
7599 |
+ | ${SED} 10q \ |
7600 |
+ | $EGREP "$match_pattern_regex" > /dev/null; then |
7601 |
+ newdeplibs="$newdeplibs $a_deplib" |
7602 |
+ a_deplib="" |
7603 |
+ break 2 |
7604 |
+ fi |
7605 |
+ done |
7606 |
+ done |
7607 |
+ fi |
7608 |
+ if test -n "$a_deplib" ; then |
7609 |
+ droppeddeps=yes |
7610 |
+ $echo |
7611 |
+ $echo "*** Warning: linker path does not have real file for library $a_deplib." |
7612 |
+ $echo "*** I have the capability to make that library automatically link in when" |
7613 |
+ $echo "*** you link to this library. But I can only do this if you have a" |
7614 |
+ $echo "*** shared version of the library, which you do not appear to have" |
7615 |
+ $echo "*** because I did check the linker path looking for a file starting" |
7616 |
+ if test -z "$potlib" ; then |
7617 |
+ $echo "*** with $libname but no candidates were found. (...for regex pattern test)" |
7618 |
+ else |
7619 |
+ $echo "*** with $libname and none of the candidates passed a file format test" |
7620 |
+ $echo "*** using a regex pattern. Last file checked: $potlib" |
7621 |
+ fi |
7622 |
+ fi |
7623 |
+ else |
7624 |
+ # Add a -L argument. |
7625 |
+ newdeplibs="$newdeplibs $a_deplib" |
7626 |
+ fi |
7627 |
+ done # Gone through all deplibs. |
7628 |
+ ;; |
7629 |
+ none | unknown | *) |
7630 |
+ newdeplibs="" |
7631 |
+ tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ |
7632 |
+ -e 's/ -[LR][^ ]*//g'` |
7633 |
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
7634 |
+ for i in $predeps $postdeps ; do |
7635 |
+ # can't use Xsed below, because $i might contain '/' |
7636 |
+ tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` |
7637 |
+ done |
7638 |
+ fi |
7639 |
+ if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ |
7640 |
+ | grep . >/dev/null; then |
7641 |
+ $echo |
7642 |
+ if test "X$deplibs_check_method" = "Xnone"; then |
7643 |
+ $echo "*** Warning: inter-library dependencies are not supported in this platform." |
7644 |
+ else |
7645 |
+ $echo "*** Warning: inter-library dependencies are not known to be supported." |
7646 |
+ fi |
7647 |
+ $echo "*** All declared inter-library dependencies are being dropped." |
7648 |
+ droppeddeps=yes |
7649 |
+ fi |
7650 |
+ ;; |
7651 |
+ esac |
7652 |
+ versuffix=$versuffix_save |
7653 |
+ major=$major_save |
7654 |
+ release=$release_save |
7655 |
+ libname=$libname_save |
7656 |
+ name=$name_save |
7657 |
+ |
7658 |
+ case $host in |
7659 |
+ *-*-rhapsody* | *-*-darwin1.[012]) |
7660 |
+ # On Rhapsody replace the C library is the System framework |
7661 |
+ newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` |
7662 |
+ ;; |
7663 |
+ esac |
7664 |
+ |
7665 |
+ if test "$droppeddeps" = yes; then |
7666 |
+ if test "$module" = yes; then |
7667 |
+ $echo |
7668 |
+ $echo "*** Warning: libtool could not satisfy all declared inter-library" |
7669 |
+ $echo "*** dependencies of module $libname. Therefore, libtool will create" |
7670 |
+ $echo "*** a static module, that should work as long as the dlopening" |
7671 |
+ $echo "*** application is linked with the -dlopen flag." |
7672 |
+ if test -z "$global_symbol_pipe"; then |
7673 |
+ $echo |
7674 |
+ $echo "*** However, this would only work if libtool was able to extract symbol" |
7675 |
+ $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" |
7676 |
+ $echo "*** not find such a program. So, this module is probably useless." |
7677 |
+ $echo "*** \`nm' from GNU binutils and a full rebuild may help." |
7678 |
+ fi |
7679 |
+ if test "$build_old_libs" = no; then |
7680 |
+ oldlibs="$output_objdir/$libname.$libext" |
7681 |
+ build_libtool_libs=module |
7682 |
+ build_old_libs=yes |
7683 |
+ else |
7684 |
+ build_libtool_libs=no |
7685 |
+ fi |
7686 |
+ else |
7687 |
+ $echo "*** The inter-library dependencies that have been dropped here will be" |
7688 |
+ $echo "*** automatically added whenever a program is linked with this library" |
7689 |
+ $echo "*** or is declared to -dlopen it." |
7690 |
+ |
7691 |
+ if test "$allow_undefined" = no; then |
7692 |
+ $echo |
7693 |
+ $echo "*** Since this library must not contain undefined symbols," |
7694 |
+ $echo "*** because either the platform does not support them or" |
7695 |
+ $echo "*** it was explicitly requested with -no-undefined," |
7696 |
+ $echo "*** libtool will only create a static version of it." |
7697 |
+ if test "$build_old_libs" = no; then |
7698 |
+ oldlibs="$output_objdir/$libname.$libext" |
7699 |
+ build_libtool_libs=module |
7700 |
+ build_old_libs=yes |
7701 |
+ else |
7702 |
+ build_libtool_libs=no |
7703 |
+ fi |
7704 |
+ fi |
7705 |
+ fi |
7706 |
+ fi |
7707 |
+ # Done checking deplibs! |
7708 |
+ deplibs=$newdeplibs |
7709 |
+ fi |
7710 |
+ |
7711 |
+ |
7712 |
+ # move library search paths that coincide with paths to not yet |
7713 |
+ # installed libraries to the beginning of the library search list |
7714 |
+ new_libs= |
7715 |
+ for path in $notinst_path; do |
7716 |
+ case " $new_libs " in |
7717 |
+ *" -L$path/$objdir "*) ;; |
7718 |
+ *) |
7719 |
+ case " $deplibs " in |
7720 |
+ *" -L$path/$objdir "*) |
7721 |
+ new_libs="$new_libs -L$path/$objdir" ;; |
7722 |
+ esac |
7723 |
+ ;; |
7724 |
+ esac |
7725 |
+ done |
7726 |
+ for deplib in $deplibs; do |
7727 |
+ case $deplib in |
7728 |
+ -L*) |
7729 |
+ case " $new_libs " in |
7730 |
+ *" $deplib "*) ;; |
7731 |
+ *) new_libs="$new_libs $deplib" ;; |
7732 |
+ esac |
7733 |
+ ;; |
7734 |
+ *) new_libs="$new_libs $deplib" ;; |
7735 |
+ esac |
7736 |
+ done |
7737 |
+ deplibs="$new_libs" |
7738 |
+ |
7739 |
+ |
7740 |
+ # All the library-specific variables (install_libdir is set above). |
7741 |
+ library_names= |
7742 |
+ old_library= |
7743 |
+ dlname= |
7744 |
+ |
7745 |
+ # Test again, we may have decided not to build it any more |
7746 |
+ if test "$build_libtool_libs" = yes; then |
7747 |
+ if test "$hardcode_into_libs" = yes; then |
7748 |
+ # Hardcode the library paths |
7749 |
+ hardcode_libdirs= |
7750 |
+ dep_rpath= |
7751 |
+ rpath="$finalize_rpath" |
7752 |
+ test "$mode" != relink && rpath="$compile_rpath$rpath" |
7753 |
+ for libdir in $rpath; do |
7754 |
+ if test -n "$hardcode_libdir_flag_spec"; then |
7755 |
+ if test -n "$hardcode_libdir_separator"; then |
7756 |
+ if test -z "$hardcode_libdirs"; then |
7757 |
+ hardcode_libdirs="$libdir" |
7758 |
+ else |
7759 |
+ # Just accumulate the unique libdirs. |
7760 |
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in |
7761 |
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
7762 |
+ ;; |
7763 |
+ *) |
7764 |
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" |
7765 |
+ ;; |
7766 |
+ esac |
7767 |
+ fi |
7768 |
+ else |
7769 |
+ eval flag=\"$hardcode_libdir_flag_spec\" |
7770 |
+ dep_rpath="$dep_rpath $flag" |
7771 |
+ fi |
7772 |
+ elif test -n "$runpath_var"; then |
7773 |
+ case "$perm_rpath " in |
7774 |
+ *" $libdir "*) ;; |
7775 |
+ *) perm_rpath="$perm_rpath $libdir" ;; |
7776 |
+ esac |
7777 |
+ fi |
7778 |
+ done |
7779 |
+ # Substitute the hardcoded libdirs into the rpath. |
7780 |
+ if test -n "$hardcode_libdir_separator" && |
7781 |
+ test -n "$hardcode_libdirs"; then |
7782 |
+ libdir="$hardcode_libdirs" |
7783 |
+ if test -n "$hardcode_libdir_flag_spec_ld"; then |
7784 |
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" |
7785 |
+ else |
7786 |
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\" |
7787 |
+ fi |
7788 |
+ fi |
7789 |
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then |
7790 |
+ # We should set the runpath_var. |
7791 |
+ rpath= |
7792 |
+ for dir in $perm_rpath; do |
7793 |
+ rpath="$rpath$dir:" |
7794 |
+ done |
7795 |
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" |
7796 |
+ fi |
7797 |
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" |
7798 |
+ fi |
7799 |
+ |
7800 |
+ shlibpath="$finalize_shlibpath" |
7801 |
+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" |
7802 |
+ if test -n "$shlibpath"; then |
7803 |
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" |
7804 |
+ fi |
7805 |
+ |
7806 |
+ # Get the real and link names of the library. |
7807 |
+ eval shared_ext=\"$shrext_cmds\" |
7808 |
+ eval library_names=\"$library_names_spec\" |
7809 |
+ set dummy $library_names |
7810 |
+ realname="$2" |
7811 |
+ shift; shift |
7812 |
+ |
7813 |
+ if test -n "$soname_spec"; then |
7814 |
+ eval soname=\"$soname_spec\" |
7815 |
+ else |
7816 |
+ soname="$realname" |
7817 |
+ fi |
7818 |
+ if test -z "$dlname"; then |
7819 |
+ dlname=$soname |
7820 |
+ fi |
7821 |
+ |
7822 |
+ lib="$output_objdir/$realname" |
7823 |
+ linknames= |
7824 |
+ for link |
7825 |
+ do |
7826 |
+ linknames="$linknames $link" |
7827 |
+ done |
7828 |
+ |
7829 |
+ # Use standard objects if they are pic |
7830 |
+ test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` |
7831 |
+ |
7832 |
+ # Prepare the list of exported symbols |
7833 |
+ if test -z "$export_symbols"; then |
7834 |
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then |
7835 |
+ $show "generating symbol list for \`$libname.la'" |
7836 |
+ export_symbols="$output_objdir/$libname.exp" |
7837 |
+ $run $rm $export_symbols |
7838 |
+ cmds=$export_symbols_cmds |
7839 |
+ save_ifs="$IFS"; IFS='~' |
7840 |
+ for cmd in $cmds; do |
7841 |
+ IFS="$save_ifs" |
7842 |
+ eval cmd=\"$cmd\" |
7843 |
+ if len=`expr "X$cmd" : ".*"` && |
7844 |
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then |
7845 |
+ $show "$cmd" |
7846 |
+ $run eval "$cmd" || exit $? |
7847 |
+ skipped_export=false |
7848 |
+ else |
7849 |
+ # The command line is too long to execute in one step. |
7850 |
+ $show "using reloadable object file for export list..." |
7851 |
+ skipped_export=: |
7852 |
+ # Break out early, otherwise skipped_export may be |
7853 |
+ # set to false by a later but shorter cmd. |
7854 |
+ break |
7855 |
+ fi |
7856 |
+ done |
7857 |
+ IFS="$save_ifs" |
7858 |
+ if test -n "$export_symbols_regex"; then |
7859 |
+ $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" |
7860 |
+ $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' |
7861 |
+ $show "$mv \"${export_symbols}T\" \"$export_symbols\"" |
7862 |
+ $run eval '$mv "${export_symbols}T" "$export_symbols"' |
7863 |
+ fi |
7864 |
+ fi |
7865 |
+ fi |
7866 |
+ |
7867 |
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then |
7868 |
+ $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' |
7869 |
+ fi |
7870 |
+ |
7871 |
+ tmp_deplibs= |
7872 |
+ for test_deplib in $deplibs; do |
7873 |
+ case " $convenience " in |
7874 |
+ *" $test_deplib "*) ;; |
7875 |
+ *) |
7876 |
+ tmp_deplibs="$tmp_deplibs $test_deplib" |
7877 |
+ ;; |
7878 |
+ esac |
7879 |
+ done |
7880 |
+ deplibs="$tmp_deplibs" |
7881 |
+ |
7882 |
+ if test -n "$convenience"; then |
7883 |
+ if test -n "$whole_archive_flag_spec"; then |
7884 |
+ save_libobjs=$libobjs |
7885 |
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" |
7886 |
+ else |
7887 |
+ gentop="$output_objdir/${outputname}x" |
7888 |
+ generated="$generated $gentop" |
7889 |
+ |
7890 |
+ func_extract_archives $gentop $convenience |
7891 |
+ libobjs="$libobjs $func_extract_archives_result" |
7892 |
+ fi |
7893 |
+ fi |
7894 |
+ |
7895 |
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then |
7896 |
+ eval flag=\"$thread_safe_flag_spec\" |
7897 |
+ linker_flags="$linker_flags $flag" |
7898 |
+ fi |
7899 |
+ |
7900 |
+ # Make a backup of the uninstalled library when relinking |
7901 |
+ if test "$mode" = relink; then |
7902 |
+ $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? |
7903 |
+ fi |
7904 |
+ |
7905 |
+ # Do each of the archive commands. |
7906 |
+ if test "$module" = yes && test -n "$module_cmds" ; then |
7907 |
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then |
7908 |
+ eval test_cmds=\"$module_expsym_cmds\" |
7909 |
+ cmds=$module_expsym_cmds |
7910 |
+ else |
7911 |
+ eval test_cmds=\"$module_cmds\" |
7912 |
+ cmds=$module_cmds |
7913 |
+ fi |
7914 |
+ else |
7915 |
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then |
7916 |
+ eval test_cmds=\"$archive_expsym_cmds\" |
7917 |
+ cmds=$archive_expsym_cmds |
7918 |
+ else |
7919 |
+ eval test_cmds=\"$archive_cmds\" |
7920 |
+ cmds=$archive_cmds |
7921 |
+ fi |
7922 |
+ fi |
7923 |
+ |
7924 |
+ if test "X$skipped_export" != "X:" && |
7925 |
+ len=`expr "X$test_cmds" : ".*" 2>/dev/null` && |
7926 |
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then |
7927 |
+ : |
7928 |
+ else |
7929 |
+ # The command line is too long to link in one step, link piecewise. |
7930 |
+ $echo "creating reloadable object files..." |
7931 |
+ |
7932 |
+ # Save the value of $output and $libobjs because we want to |
7933 |
+ # use them later. If we have whole_archive_flag_spec, we |
7934 |
+ # want to use save_libobjs as it was before |
7935 |
+ # whole_archive_flag_spec was expanded, because we can't |
7936 |
+ # assume the linker understands whole_archive_flag_spec. |
7937 |
+ # This may have to be revisited, in case too many |
7938 |
+ # convenience libraries get linked in and end up exceeding |
7939 |
+ # the spec. |
7940 |
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then |
7941 |
+ save_libobjs=$libobjs |
7942 |
+ fi |
7943 |
+ save_output=$output |
7944 |
+ output_la=`$echo "X$output" | $Xsed -e "$basename"` |
7945 |
+ |
7946 |
+ # Clear the reloadable object creation command queue and |
7947 |
+ # initialize k to one. |
7948 |
+ test_cmds= |
7949 |
+ concat_cmds= |
7950 |
+ objlist= |
7951 |
+ delfiles= |
7952 |
+ last_robj= |
7953 |
+ k=1 |
7954 |
+ output=$output_objdir/$output_la-${k}.$objext |
7955 |
+ # Loop over the list of objects to be linked. |
7956 |
+ for obj in $save_libobjs |
7957 |
+ do |
7958 |
+ eval test_cmds=\"$reload_cmds $objlist $last_robj\" |
7959 |
+ if test "X$objlist" = X || |
7960 |
+ { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && |
7961 |
+ test "$len" -le "$max_cmd_len"; }; then |
7962 |
+ objlist="$objlist $obj" |
7963 |
+ else |
7964 |
+ # The command $test_cmds is almost too long, add a |
7965 |
+ # command to the queue. |
7966 |
+ if test "$k" -eq 1 ; then |
7967 |
+ # The first file doesn't have a previous command to add. |
7968 |
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\" |
7969 |
+ else |
7970 |
+ # All subsequent reloadable object files will link in |
7971 |
+ # the last one created. |
7972 |
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" |
7973 |
+ fi |
7974 |
+ last_robj=$output_objdir/$output_la-${k}.$objext |
7975 |
+ k=`expr $k + 1` |
7976 |
+ output=$output_objdir/$output_la-${k}.$objext |
7977 |
+ objlist=$obj |
7978 |
+ len=1 |
7979 |
+ fi |
7980 |
+ done |
7981 |
+ # Handle the remaining objects by creating one last |
7982 |
+ # reloadable object file. All subsequent reloadable object |
7983 |
+ # files will link in the last one created. |
7984 |
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~ |
7985 |
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" |
7986 |
+ |
7987 |
+ if ${skipped_export-false}; then |
7988 |
+ $show "generating symbol list for \`$libname.la'" |
7989 |
+ export_symbols="$output_objdir/$libname.exp" |
7990 |
+ $run $rm $export_symbols |
7991 |
+ libobjs=$output |
7992 |
+ # Append the command to create the export file. |
7993 |
+ eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" |
7994 |
+ fi |
7995 |
+ |
7996 |
+ # Set up a command to remove the reloadable object files |
7997 |
+ # after they are used. |
7998 |
+ i=0 |
7999 |
+ while test "$i" -lt "$k" |
8000 |
+ do |
8001 |
+ i=`expr $i + 1` |
8002 |
+ delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" |
8003 |
+ done |
8004 |
+ |
8005 |
+ $echo "creating a temporary reloadable object file: $output" |
8006 |
+ |
8007 |
+ # Loop through the commands generated above and execute them. |
8008 |
+ save_ifs="$IFS"; IFS='~' |
8009 |
+ for cmd in $concat_cmds; do |
8010 |
+ IFS="$save_ifs" |
8011 |
+ $show "$cmd" |
8012 |
+ $run eval "$cmd" || exit $? |
8013 |
+ done |
8014 |
+ IFS="$save_ifs" |
8015 |
+ |
8016 |
+ libobjs=$output |
8017 |
+ # Restore the value of output. |
8018 |
+ output=$save_output |
8019 |
+ |
8020 |
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then |
8021 |
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" |
8022 |
+ fi |
8023 |
+ # Expand the library linking commands again to reset the |
8024 |
+ # value of $libobjs for piecewise linking. |
8025 |
+ |
8026 |
+ # Do each of the archive commands. |
8027 |
+ if test "$module" = yes && test -n "$module_cmds" ; then |
8028 |
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then |
8029 |
+ cmds=$module_expsym_cmds |
8030 |
+ else |
8031 |
+ cmds=$module_cmds |
8032 |
+ fi |
8033 |
+ else |
8034 |
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then |
8035 |
+ cmds=$archive_expsym_cmds |
8036 |
+ else |
8037 |
+ cmds=$archive_cmds |
8038 |
+ fi |
8039 |
+ fi |
8040 |
+ |
8041 |
+ # Append the command to remove the reloadable object files |
8042 |
+ # to the just-reset $cmds. |
8043 |
+ eval cmds=\"\$cmds~\$rm $delfiles\" |
8044 |
+ fi |
8045 |
+ save_ifs="$IFS"; IFS='~' |
8046 |
+ for cmd in $cmds; do |
8047 |
+ IFS="$save_ifs" |
8048 |
+ eval cmd=\"$cmd\" |
8049 |
+ $show "$cmd" |
8050 |
+ $run eval "$cmd" || { |
8051 |
+ lt_exit=$? |
8052 |
+ |
8053 |
+ # Restore the uninstalled library and exit |
8054 |
+ if test "$mode" = relink; then |
8055 |
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' |
8056 |
+ fi |
8057 |
+ |
8058 |
+ exit $lt_exit |
8059 |
+ } |
8060 |
+ done |
8061 |
+ IFS="$save_ifs" |
8062 |
+ |
8063 |
+ # Restore the uninstalled library and exit |
8064 |
+ if test "$mode" = relink; then |
8065 |
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? |
8066 |
+ |
8067 |
+ if test -n "$convenience"; then |
8068 |
+ if test -z "$whole_archive_flag_spec"; then |
8069 |
+ $show "${rm}r $gentop" |
8070 |
+ $run ${rm}r "$gentop" |
8071 |
+ fi |
8072 |
+ fi |
8073 |
+ |
8074 |
+ exit $EXIT_SUCCESS |
8075 |
+ fi |
8076 |
+ |
8077 |
+ # Create links to the real library. |
8078 |
+ for linkname in $linknames; do |
8079 |
+ if test "$realname" != "$linkname"; then |
8080 |
+ $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" |
8081 |
+ $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? |
8082 |
+ fi |
8083 |
+ done |
8084 |
+ |
8085 |
+ # If -module or -export-dynamic was specified, set the dlname. |
8086 |
+ if test "$module" = yes || test "$export_dynamic" = yes; then |
8087 |
+ # On all known operating systems, these are identical. |
8088 |
+ dlname="$soname" |
8089 |
+ fi |
8090 |
+ fi |
8091 |
+ ;; |
8092 |
+ |
8093 |
+ obj) |
8094 |
+ if test -n "$deplibs"; then |
8095 |
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 |
8096 |
+ fi |
8097 |
+ |
8098 |
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then |
8099 |
+ $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 |
8100 |
+ fi |
8101 |
+ |
8102 |
+ if test -n "$rpath"; then |
8103 |
+ $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 |
8104 |
+ fi |
8105 |
+ |
8106 |
+ if test -n "$xrpath"; then |
8107 |
+ $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 |
8108 |
+ fi |
8109 |
+ |
8110 |
+ if test -n "$vinfo"; then |
8111 |
+ $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 |
8112 |
+ fi |
8113 |
+ |
8114 |
+ if test -n "$release"; then |
8115 |
+ $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 |
8116 |
+ fi |
8117 |
+ |
8118 |
+ case $output in |
8119 |
+ *.lo) |
8120 |
+ if test -n "$objs$old_deplibs"; then |
8121 |
+ $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 |
8122 |
+ exit $EXIT_FAILURE |
8123 |
+ fi |
8124 |
+ libobj="$output" |
8125 |
+ obj=`$echo "X$output" | $Xsed -e "$lo2o"` |
8126 |
+ ;; |
8127 |
+ *) |
8128 |
+ libobj= |
8129 |
+ obj="$output" |
8130 |
+ ;; |
8131 |
+ esac |
8132 |
+ |
8133 |
+ # Delete the old objects. |
8134 |
+ $run $rm $obj $libobj |
8135 |
+ |
8136 |
+ # Objects from convenience libraries. This assumes |
8137 |
+ # single-version convenience libraries. Whenever we create |
8138 |
+ # different ones for PIC/non-PIC, this we'll have to duplicate |
8139 |
+ # the extraction. |
8140 |
+ reload_conv_objs= |
8141 |
+ gentop= |
8142 |
+ # reload_cmds runs $LD directly, so let us get rid of |
8143 |
+ # -Wl from whole_archive_flag_spec |
8144 |
+ wl= |
8145 |
+ |
8146 |
+ if test -n "$convenience"; then |
8147 |
+ if test -n "$whole_archive_flag_spec"; then |
8148 |
+ eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" |
8149 |
+ else |
8150 |
+ gentop="$output_objdir/${obj}x" |
8151 |
+ generated="$generated $gentop" |
8152 |
+ |
8153 |
+ func_extract_archives $gentop $convenience |
8154 |
+ reload_conv_objs="$reload_objs $func_extract_archives_result" |
8155 |
+ fi |
8156 |
+ fi |
8157 |
+ |
8158 |
+ # Create the old-style object. |
8159 |
+ reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test |
8160 |
+ |
8161 |
+ output="$obj" |
8162 |
+ cmds=$reload_cmds |
8163 |
+ save_ifs="$IFS"; IFS='~' |
8164 |
+ for cmd in $cmds; do |
8165 |
+ IFS="$save_ifs" |
8166 |
+ eval cmd=\"$cmd\" |
8167 |
+ $show "$cmd" |
8168 |
+ $run eval "$cmd" || exit $? |
8169 |
+ done |
8170 |
+ IFS="$save_ifs" |
8171 |
+ |
8172 |
+ # Exit if we aren't doing a library object file. |
8173 |
+ if test -z "$libobj"; then |
8174 |
+ if test -n "$gentop"; then |
8175 |
+ $show "${rm}r $gentop" |
8176 |
+ $run ${rm}r $gentop |
8177 |
+ fi |
8178 |
+ |
8179 |
+ exit $EXIT_SUCCESS |
8180 |
+ fi |
8181 |
+ |
8182 |
+ if test "$build_libtool_libs" != yes; then |
8183 |
+ if test -n "$gentop"; then |
8184 |
+ $show "${rm}r $gentop" |
8185 |
+ $run ${rm}r $gentop |
8186 |
+ fi |
8187 |
+ |
8188 |
+ # Create an invalid libtool object if no PIC, so that we don't |
8189 |
+ # accidentally link it into a program. |
8190 |
+ # $show "echo timestamp > $libobj" |
8191 |
+ # $run eval "echo timestamp > $libobj" || exit $? |
8192 |
+ exit $EXIT_SUCCESS |
8193 |
+ fi |
8194 |
+ |
8195 |
+ if test -n "$pic_flag" || test "$pic_mode" != default; then |
8196 |
+ # Only do commands if we really have different PIC objects. |
8197 |
+ reload_objs="$libobjs $reload_conv_objs" |
8198 |
+ output="$libobj" |
8199 |
+ cmds=$reload_cmds |
8200 |
+ save_ifs="$IFS"; IFS='~' |
8201 |
+ for cmd in $cmds; do |
8202 |
+ IFS="$save_ifs" |
8203 |
+ eval cmd=\"$cmd\" |
8204 |
+ $show "$cmd" |
8205 |
+ $run eval "$cmd" || exit $? |
8206 |
+ done |
8207 |
+ IFS="$save_ifs" |
8208 |
+ fi |
8209 |
+ |
8210 |
+ if test -n "$gentop"; then |
8211 |
+ $show "${rm}r $gentop" |
8212 |
+ $run ${rm}r $gentop |
8213 |
+ fi |
8214 |
+ |
8215 |
+ exit $EXIT_SUCCESS |
8216 |
+ ;; |
8217 |
+ |
8218 |
+ prog) |
8219 |
+ case $host in |
8220 |
+ *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; |
8221 |
+ esac |
8222 |
+ if test -n "$vinfo"; then |
8223 |
+ $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 |
8224 |
+ fi |
8225 |
+ |
8226 |
+ if test -n "$release"; then |
8227 |
+ $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 |
8228 |
+ fi |
8229 |
+ |
8230 |
+ if test "$preload" = yes; then |
8231 |
+ if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && |
8232 |
+ test "$dlopen_self_static" = unknown; then |
8233 |
+ $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." |
8234 |
+ fi |
8235 |
+ fi |
8236 |
+ |
8237 |
+ case $host in |
8238 |
+ *-*-rhapsody* | *-*-darwin1.[012]) |
8239 |
+ # On Rhapsody replace the C library is the System framework |
8240 |
+ compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` |
8241 |
+ finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` |
8242 |
+ ;; |
8243 |
+ esac |
8244 |
+ |
8245 |
+ case $host in |
8246 |
+ *darwin*) |
8247 |
+ # Don't allow lazy linking, it breaks C++ global constructors |
8248 |
+ if test "$tagname" = CXX ; then |
8249 |
+ compile_command="$compile_command ${wl}-bind_at_load" |
8250 |
+ finalize_command="$finalize_command ${wl}-bind_at_load" |
8251 |
+ fi |
8252 |
+ ;; |
8253 |
+ esac |
8254 |
+ |
8255 |
+ |
8256 |
+ # move library search paths that coincide with paths to not yet |
8257 |
+ # installed libraries to the beginning of the library search list |
8258 |
+ new_libs= |
8259 |
+ for path in $notinst_path; do |
8260 |
+ case " $new_libs " in |
8261 |
+ *" -L$path/$objdir "*) ;; |
8262 |
+ *) |
8263 |
+ case " $compile_deplibs " in |
8264 |
+ *" -L$path/$objdir "*) |
8265 |
+ new_libs="$new_libs -L$path/$objdir" ;; |
8266 |
+ esac |
8267 |
+ ;; |
8268 |
+ esac |
8269 |
+ done |
8270 |
+ for deplib in $compile_deplibs; do |
8271 |
+ case $deplib in |
8272 |
+ -L*) |
8273 |
+ case " $new_libs " in |
8274 |
+ *" $deplib "*) ;; |
8275 |
+ *) new_libs="$new_libs $deplib" ;; |
8276 |
+ esac |
8277 |
+ ;; |
8278 |
+ *) new_libs="$new_libs $deplib" ;; |
8279 |
+ esac |
8280 |
+ done |
8281 |
+ compile_deplibs="$new_libs" |
8282 |
+ |
8283 |
+ |
8284 |
+ compile_command="$compile_command $compile_deplibs" |
8285 |
+ finalize_command="$finalize_command $finalize_deplibs" |
8286 |
+ |
8287 |
+ if test -n "$rpath$xrpath"; then |
8288 |
+ # If the user specified any rpath flags, then add them. |
8289 |
+ for libdir in $rpath $xrpath; do |
8290 |
+ # This is the magic to use -rpath. |
8291 |
+ case "$finalize_rpath " in |
8292 |
+ *" $libdir "*) ;; |
8293 |
+ *) finalize_rpath="$finalize_rpath $libdir" ;; |
8294 |
+ esac |
8295 |
+ done |
8296 |
+ fi |
8297 |
+ |
8298 |
+ # Now hardcode the library paths |
8299 |
+ rpath= |
8300 |
+ hardcode_libdirs= |
8301 |
+ for libdir in $compile_rpath $finalize_rpath; do |
8302 |
+ if test -n "$hardcode_libdir_flag_spec"; then |
8303 |
+ if test -n "$hardcode_libdir_separator"; then |
8304 |
+ if test -z "$hardcode_libdirs"; then |
8305 |
+ hardcode_libdirs="$libdir" |
8306 |
+ else |
8307 |
+ # Just accumulate the unique libdirs. |
8308 |
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in |
8309 |
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
8310 |
+ ;; |
8311 |
+ *) |
8312 |
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" |
8313 |
+ ;; |
8314 |
+ esac |
8315 |
+ fi |
8316 |
+ else |
8317 |
+ eval flag=\"$hardcode_libdir_flag_spec\" |
8318 |
+ rpath="$rpath $flag" |
8319 |
+ fi |
8320 |
+ elif test -n "$runpath_var"; then |
8321 |
+ case "$perm_rpath " in |
8322 |
+ *" $libdir "*) ;; |
8323 |
+ *) perm_rpath="$perm_rpath $libdir" ;; |
8324 |
+ esac |
8325 |
+ fi |
8326 |
+ case $host in |
8327 |
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
8328 |
+ testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` |
8329 |
+ case :$dllsearchpath: in |
8330 |
+ *":$libdir:"*) ;; |
8331 |
+ *) dllsearchpath="$dllsearchpath:$libdir";; |
8332 |
+ esac |
8333 |
+ case :$dllsearchpath: in |
8334 |
+ *":$testbindir:"*) ;; |
8335 |
+ *) dllsearchpath="$dllsearchpath:$testbindir";; |
8336 |
+ esac |
8337 |
+ ;; |
8338 |
+ esac |
8339 |
+ done |
8340 |
+ # Substitute the hardcoded libdirs into the rpath. |
8341 |
+ if test -n "$hardcode_libdir_separator" && |
8342 |
+ test -n "$hardcode_libdirs"; then |
8343 |
+ libdir="$hardcode_libdirs" |
8344 |
+ eval rpath=\" $hardcode_libdir_flag_spec\" |
8345 |
+ fi |
8346 |
+ compile_rpath="$rpath" |
8347 |
+ |
8348 |
+ rpath= |
8349 |
+ hardcode_libdirs= |
8350 |
+ for libdir in $finalize_rpath; do |
8351 |
+ if test -n "$hardcode_libdir_flag_spec"; then |
8352 |
+ if test -n "$hardcode_libdir_separator"; then |
8353 |
+ if test -z "$hardcode_libdirs"; then |
8354 |
+ hardcode_libdirs="$libdir" |
8355 |
+ else |
8356 |
+ # Just accumulate the unique libdirs. |
8357 |
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in |
8358 |
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
8359 |
+ ;; |
8360 |
+ *) |
8361 |
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" |
8362 |
+ ;; |
8363 |
+ esac |
8364 |
+ fi |
8365 |
+ else |
8366 |
+ eval flag=\"$hardcode_libdir_flag_spec\" |
8367 |
+ rpath="$rpath $flag" |
8368 |
+ fi |
8369 |
+ elif test -n "$runpath_var"; then |
8370 |
+ case "$finalize_perm_rpath " in |
8371 |
+ *" $libdir "*) ;; |
8372 |
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; |
8373 |
+ esac |
8374 |
+ fi |
8375 |
+ done |
8376 |
+ # Substitute the hardcoded libdirs into the rpath. |
8377 |
+ if test -n "$hardcode_libdir_separator" && |
8378 |
+ test -n "$hardcode_libdirs"; then |
8379 |
+ libdir="$hardcode_libdirs" |
8380 |
+ eval rpath=\" $hardcode_libdir_flag_spec\" |
8381 |
+ fi |
8382 |
+ finalize_rpath="$rpath" |
8383 |
+ |
8384 |
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then |
8385 |
+ # Transform all the library objects into standard objects. |
8386 |
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` |
8387 |
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` |
8388 |
+ fi |
8389 |
+ |
8390 |
+ dlsyms= |
8391 |
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then |
8392 |
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then |
8393 |
+ dlsyms="${outputname}S.c" |
8394 |
+ else |
8395 |
+ $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 |
8396 |
+ fi |
8397 |
+ fi |
8398 |
+ |
8399 |
+ if test -n "$dlsyms"; then |
8400 |
+ case $dlsyms in |
8401 |
+ "") ;; |
8402 |
+ *.c) |
8403 |
+ # Discover the nlist of each of the dlfiles. |
8404 |
+ nlist="$output_objdir/${outputname}.nm" |
8405 |
+ |
8406 |
+ $show "$rm $nlist ${nlist}S ${nlist}T" |
8407 |
+ $run $rm "$nlist" "${nlist}S" "${nlist}T" |
8408 |
+ |
8409 |
+ # Parse the name list into a source file. |
8410 |
+ $show "creating $output_objdir/$dlsyms" |
8411 |
+ |
8412 |
+ test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ |
8413 |
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ |
8414 |
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ |
8415 |
+ |
8416 |
+#ifdef __cplusplus |
8417 |
+extern \"C\" { |
8418 |
+#endif |
8419 |
+ |
8420 |
+/* Prevent the only kind of declaration conflicts we can make. */ |
8421 |
+#define lt_preloaded_symbols some_other_symbol |
8422 |
+ |
8423 |
+/* External symbol declarations for the compiler. */\ |
8424 |
+" |
8425 |
+ |
8426 |
+ if test "$dlself" = yes; then |
8427 |
+ $show "generating symbol list for \`$output'" |
8428 |
+ |
8429 |
+ test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" |
8430 |
+ |
8431 |
+ # Add our own program objects to the symbol list. |
8432 |
+ progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` |
8433 |
+ for arg in $progfiles; do |
8434 |
+ $show "extracting global C symbols from \`$arg'" |
8435 |
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" |
8436 |
+ done |
8437 |
+ |
8438 |
+ if test -n "$exclude_expsyms"; then |
8439 |
+ $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' |
8440 |
+ $run eval '$mv "$nlist"T "$nlist"' |
8441 |
+ fi |
8442 |
+ |
8443 |
+ if test -n "$export_symbols_regex"; then |
8444 |
+ $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' |
8445 |
+ $run eval '$mv "$nlist"T "$nlist"' |
8446 |
+ fi |
8447 |
+ |
8448 |
+ # Prepare the list of exported symbols |
8449 |
+ if test -z "$export_symbols"; then |
8450 |
+ export_symbols="$output_objdir/$outputname.exp" |
8451 |
+ $run $rm $export_symbols |
8452 |
+ $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' |
8453 |
+ case $host in |
8454 |
+ *cygwin* | *mingw* ) |
8455 |
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' |
8456 |
+ $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' |
8457 |
+ ;; |
8458 |
+ esac |
8459 |
+ else |
8460 |
+ $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' |
8461 |
+ $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' |
8462 |
+ $run eval 'mv "$nlist"T "$nlist"' |
8463 |
+ case $host in |
8464 |
+ *cygwin* | *mingw* ) |
8465 |
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' |
8466 |
+ $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' |
8467 |
+ ;; |
8468 |
+ esac |
8469 |
+ fi |
8470 |
+ fi |
8471 |
+ |
8472 |
+ for arg in $dlprefiles; do |
8473 |
+ $show "extracting global C symbols from \`$arg'" |
8474 |
+ name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` |
8475 |
+ $run eval '$echo ": $name " >> "$nlist"' |
8476 |
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" |
8477 |
+ done |
8478 |
+ |
8479 |
+ if test -z "$run"; then |
8480 |
+ # Make sure we have at least an empty file. |
8481 |
+ test -f "$nlist" || : > "$nlist" |
8482 |
+ |
8483 |
+ if test -n "$exclude_expsyms"; then |
8484 |
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T |
8485 |
+ $mv "$nlist"T "$nlist" |
8486 |
+ fi |
8487 |
+ |
8488 |
+ # Try sorting and uniquifying the output. |
8489 |
+ if grep -v "^: " < "$nlist" | |
8490 |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then |
8491 |
+ sort -k 3 |
8492 |
+ else |
8493 |
+ sort +2 |
8494 |
+ fi | |
8495 |
+ uniq > "$nlist"S; then |
8496 |
+ : |
8497 |
+ else |
8498 |
+ grep -v "^: " < "$nlist" > "$nlist"S |
8499 |
+ fi |
8500 |
+ |
8501 |
+ if test -f "$nlist"S; then |
8502 |
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' |
8503 |
+ else |
8504 |
+ $echo '/* NONE */' >> "$output_objdir/$dlsyms" |
8505 |
+ fi |
8506 |
+ |
8507 |
+ $echo >> "$output_objdir/$dlsyms" "\ |
8508 |
+ |
8509 |
+#undef lt_preloaded_symbols |
8510 |
+ |
8511 |
+#if defined (__STDC__) && __STDC__ |
8512 |
+# define lt_ptr void * |
8513 |
+#else |
8514 |
+# define lt_ptr char * |
8515 |
+# define const |
8516 |
+#endif |
8517 |
+ |
8518 |
+/* The mapping between symbol names and symbols. */ |
8519 |
+" |
8520 |
+ |
8521 |
+ case $host in |
8522 |
+ *cygwin* | *mingw* ) |
8523 |
+ $echo >> "$output_objdir/$dlsyms" "\ |
8524 |
+/* DATA imports from DLLs on WIN32 can't be const, because |
8525 |
+ runtime relocations are performed -- see ld's documentation |
8526 |
+ on pseudo-relocs */ |
8527 |
+struct { |
8528 |
+" |
8529 |
+ ;; |
8530 |
+ * ) |
8531 |
+ $echo >> "$output_objdir/$dlsyms" "\ |
8532 |
+const struct { |
8533 |
+" |
8534 |
+ ;; |
8535 |
+ esac |
8536 |
+ |
8537 |
+ |
8538 |
+ $echo >> "$output_objdir/$dlsyms" "\ |
8539 |
+ const char *name; |
8540 |
+ lt_ptr address; |
8541 |
+} |
8542 |
+lt_preloaded_symbols[] = |
8543 |
+{\ |
8544 |
+" |
8545 |
+ |
8546 |
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" |
8547 |
+ |
8548 |
+ $echo >> "$output_objdir/$dlsyms" "\ |
8549 |
+ {0, (lt_ptr) 0} |
8550 |
+}; |
8551 |
+ |
8552 |
+/* This works around a problem in FreeBSD linker */ |
8553 |
+#ifdef FREEBSD_WORKAROUND |
8554 |
+static const void *lt_preloaded_setup() { |
8555 |
+ return lt_preloaded_symbols; |
8556 |
+} |
8557 |
+#endif |
8558 |
+ |
8559 |
+#ifdef __cplusplus |
8560 |
+} |
8561 |
+#endif\ |
8562 |
+" |
8563 |
+ fi |
8564 |
+ |
8565 |
+ pic_flag_for_symtable= |
8566 |
+ case $host in |
8567 |
+ # compiling the symbol table file with pic_flag works around |
8568 |
+ # a FreeBSD bug that causes programs to crash when -lm is |
8569 |
+ # linked before any other PIC object. But we must not use |
8570 |
+ # pic_flag when linking with -static. The problem exists in |
8571 |
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. |
8572 |
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) |
8573 |
+ case "$compile_command " in |
8574 |
+ *" -static "*) ;; |
8575 |
+ *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; |
8576 |
+ esac;; |
8577 |
+ *-*-hpux*) |
8578 |
+ case "$compile_command " in |
8579 |
+ *" -static "*) ;; |
8580 |
+ *) pic_flag_for_symtable=" $pic_flag";; |
8581 |
+ esac |
8582 |
+ esac |
8583 |
+ |
8584 |
+ # Now compile the dynamic symbol file. |
8585 |
+ $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" |
8586 |
+ $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? |
8587 |
+ |
8588 |
+ # Clean up the generated files. |
8589 |
+ $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" |
8590 |
+ $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" |
8591 |
+ |
8592 |
+ # Transform the symbol file into the correct name. |
8593 |
+ case $host in |
8594 |
+ *cygwin* | *mingw* ) |
8595 |
+ if test -f "$output_objdir/${outputname}.def" ; then |
8596 |
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` |
8597 |
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` |
8598 |
+ else |
8599 |
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
8600 |
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
8601 |
+ fi |
8602 |
+ ;; |
8603 |
+ * ) |
8604 |
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
8605 |
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
8606 |
+ ;; |
8607 |
+ esac |
8608 |
+ ;; |
8609 |
+ *) |
8610 |
+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 |
8611 |
+ exit $EXIT_FAILURE |
8612 |
+ ;; |
8613 |
+ esac |
8614 |
+ else |
8615 |
+ # We keep going just in case the user didn't refer to |
8616 |
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe |
8617 |
+ # really was required. |
8618 |
+ |
8619 |
+ # Nullify the symbol file. |
8620 |
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` |
8621 |
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` |
8622 |
+ fi |
8623 |
+ |
8624 |
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then |
8625 |
+ # Replace the output file specification. |
8626 |
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` |
8627 |
+ link_command="$compile_command$compile_rpath" |
8628 |
+ |
8629 |
+ # We have no uninstalled library dependencies, so finalize right now. |
8630 |
+ $show "$link_command" |
8631 |
+ $run eval "$link_command" |
8632 |
+ exit_status=$? |
8633 |
+ |
8634 |
+ # Delete the generated files. |
8635 |
+ if test -n "$dlsyms"; then |
8636 |
+ $show "$rm $output_objdir/${outputname}S.${objext}" |
8637 |
+ $run $rm "$output_objdir/${outputname}S.${objext}" |
8638 |
+ fi |
8639 |
+ |
8640 |
+ exit $exit_status |
8641 |
+ fi |
8642 |
+ |
8643 |
+ if test -n "$shlibpath_var"; then |
8644 |
+ # We should set the shlibpath_var |
8645 |
+ rpath= |
8646 |
+ for dir in $temp_rpath; do |
8647 |
+ case $dir in |
8648 |
+ [\\/]* | [A-Za-z]:[\\/]*) |
8649 |
+ # Absolute path. |
8650 |
+ rpath="$rpath$dir:" |
8651 |
+ ;; |
8652 |
+ *) |
8653 |
+ # Relative path: add a thisdir entry. |
8654 |
+ rpath="$rpath\$thisdir/$dir:" |
8655 |
+ ;; |
8656 |
+ esac |
8657 |
+ done |
8658 |
+ temp_rpath="$rpath" |
8659 |
+ fi |
8660 |
+ |
8661 |
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then |
8662 |
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" |
8663 |
+ fi |
8664 |
+ if test -n "$finalize_shlibpath"; then |
8665 |
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" |
8666 |
+ fi |
8667 |
+ |
8668 |
+ compile_var= |
8669 |
+ finalize_var= |
8670 |
+ if test -n "$runpath_var"; then |
8671 |
+ if test -n "$perm_rpath"; then |
8672 |
+ # We should set the runpath_var. |
8673 |
+ rpath= |
8674 |
+ for dir in $perm_rpath; do |
8675 |
+ rpath="$rpath$dir:" |
8676 |
+ done |
8677 |
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" " |
8678 |
+ fi |
8679 |
+ if test -n "$finalize_perm_rpath"; then |
8680 |
+ # We should set the runpath_var. |
8681 |
+ rpath= |
8682 |
+ for dir in $finalize_perm_rpath; do |
8683 |
+ rpath="$rpath$dir:" |
8684 |
+ done |
8685 |
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " |
8686 |
+ fi |
8687 |
+ fi |
8688 |
+ |
8689 |
+ if test "$no_install" = yes; then |
8690 |
+ # We don't need to create a wrapper script. |
8691 |
+ link_command="$compile_var$compile_command$compile_rpath" |
8692 |
+ # Replace the output file specification. |
8693 |
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` |
8694 |
+ # Delete the old output file. |
8695 |
+ $run $rm $output |
8696 |
+ # Link the executable and exit |
8697 |
+ $show "$link_command" |
8698 |
+ $run eval "$link_command" || exit $? |
8699 |
+ exit $EXIT_SUCCESS |
8700 |
+ fi |
8701 |
+ |
8702 |
+ if test "$hardcode_action" = relink; then |
8703 |
+ # Fast installation is not supported |
8704 |
+ link_command="$compile_var$compile_command$compile_rpath" |
8705 |
+ relink_command="$finalize_var$finalize_command$finalize_rpath" |
8706 |
+ |
8707 |
+ $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 |
8708 |
+ $echo "$modename: \`$output' will be relinked during installation" 1>&2 |
8709 |
+ else |
8710 |
+ if test "$fast_install" != no; then |
8711 |
+ link_command="$finalize_var$compile_command$finalize_rpath" |
8712 |
+ if test "$fast_install" = yes; then |
8713 |
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` |
8714 |
+ else |
8715 |
+ # fast_install is set to needless |
8716 |
+ relink_command= |
8717 |
+ fi |
8718 |
+ else |
8719 |
+ link_command="$compile_var$compile_command$compile_rpath" |
8720 |
+ relink_command="$finalize_var$finalize_command$finalize_rpath" |
8721 |
+ fi |
8722 |
+ fi |
8723 |
+ |
8724 |
+ # Replace the output file specification. |
8725 |
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` |
8726 |
+ |
8727 |
+ # Delete the old output files. |
8728 |
+ $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname |
8729 |
+ |
8730 |
+ $show "$link_command" |
8731 |
+ $run eval "$link_command" || exit $? |
8732 |
+ |
8733 |
+ # Now create the wrapper script. |
8734 |
+ $show "creating $output" |
8735 |
+ |
8736 |
+ # Quote the relink command for shipping. |
8737 |
+ if test -n "$relink_command"; then |
8738 |
+ # Preserve any variables that may affect compiler behavior |
8739 |
+ for var in $variables_saved_for_relink; do |
8740 |
+ if eval test -z \"\${$var+set}\"; then |
8741 |
+ relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" |
8742 |
+ elif eval var_value=\$$var; test -z "$var_value"; then |
8743 |
+ relink_command="$var=; export $var; $relink_command" |
8744 |
+ else |
8745 |
+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` |
8746 |
+ relink_command="$var=\"$var_value\"; export $var; $relink_command" |
8747 |
+ fi |
8748 |
+ done |
8749 |
+ relink_command="(cd `pwd`; $relink_command)" |
8750 |
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` |
8751 |
+ fi |
8752 |
+ |
8753 |
+ # Quote $echo for shipping. |
8754 |
+ if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then |
8755 |
+ case $progpath in |
8756 |
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; |
8757 |
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; |
8758 |
+ esac |
8759 |
+ qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` |
8760 |
+ else |
8761 |
+ qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` |
8762 |
+ fi |
8763 |
+ |
8764 |
+ # Only actually do things if our run command is non-null. |
8765 |
+ if test -z "$run"; then |
8766 |
+ # win32 will think the script is a binary if it has |
8767 |
+ # a .exe suffix, so we strip it off here. |
8768 |
+ case $output in |
8769 |
+ *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; |
8770 |
+ esac |
8771 |
+ # test for cygwin because mv fails w/o .exe extensions |
8772 |
+ case $host in |
8773 |
+ *cygwin*) |
8774 |
+ exeext=.exe |
8775 |
+ outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; |
8776 |
+ *) exeext= ;; |
8777 |
+ esac |
8778 |
+ case $host in |
8779 |
+ *cygwin* | *mingw* ) |
8780 |
+ output_name=`basename $output` |
8781 |
+ output_path=`dirname $output` |
8782 |
+ cwrappersource="$output_path/$objdir/lt-$output_name.c" |
8783 |
+ cwrapper="$output_path/$output_name.exe" |
8784 |
+ $rm $cwrappersource $cwrapper |
8785 |
+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 |
8786 |
+ |
8787 |
+ cat > $cwrappersource <<EOF |
8788 |
+ |
8789 |
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname |
8790 |
+ Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP |
8791 |
+ |
8792 |
+ The $output program cannot be directly executed until all the libtool |
8793 |
+ libraries that it depends on are installed. |
8794 |
+ |
8795 |
+ This wrapper executable should never be moved out of the build directory. |
8796 |
+ If it is, it will not operate correctly. |
8797 |
+ |
8798 |
+ Currently, it simply execs the wrapper *script* "/bin/sh $output", |
8799 |
+ but could eventually absorb all of the scripts functionality and |
8800 |
+ exec $objdir/$outputname directly. |
8801 |
+*/ |
8802 |
+EOF |
8803 |
+ cat >> $cwrappersource<<"EOF" |
8804 |
+#include <stdio.h> |
8805 |
+#include <stdlib.h> |
8806 |
+#include <unistd.h> |
8807 |
+#include <malloc.h> |
8808 |
+#include <stdarg.h> |
8809 |
+#include <assert.h> |
8810 |
+#include <string.h> |
8811 |
+#include <ctype.h> |
8812 |
+#include <sys/stat.h> |
8813 |
+ |
8814 |
+#if defined(PATH_MAX) |
8815 |
+# define LT_PATHMAX PATH_MAX |
8816 |
+#elif defined(MAXPATHLEN) |
8817 |
+# define LT_PATHMAX MAXPATHLEN |
8818 |
+#else |
8819 |
+# define LT_PATHMAX 1024 |
8820 |
+#endif |
8821 |
+ |
8822 |
+#ifndef DIR_SEPARATOR |
8823 |
+# define DIR_SEPARATOR '/' |
8824 |
+# define PATH_SEPARATOR ':' |
8825 |
+#endif |
8826 |
+ |
8827 |
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ |
8828 |
+ defined (__OS2__) |
8829 |
+# define HAVE_DOS_BASED_FILE_SYSTEM |
8830 |
+# ifndef DIR_SEPARATOR_2 |
8831 |
+# define DIR_SEPARATOR_2 '\\' |
8832 |
+# endif |
8833 |
+# ifndef PATH_SEPARATOR_2 |
8834 |
+# define PATH_SEPARATOR_2 ';' |
8835 |
+# endif |
8836 |
+#endif |
8837 |
+ |
8838 |
+#ifndef DIR_SEPARATOR_2 |
8839 |
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) |
8840 |
+#else /* DIR_SEPARATOR_2 */ |
8841 |
+# define IS_DIR_SEPARATOR(ch) \ |
8842 |
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) |
8843 |
+#endif /* DIR_SEPARATOR_2 */ |
8844 |
+ |
8845 |
+#ifndef PATH_SEPARATOR_2 |
8846 |
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) |
8847 |
+#else /* PATH_SEPARATOR_2 */ |
8848 |
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) |
8849 |
+#endif /* PATH_SEPARATOR_2 */ |
8850 |
+ |
8851 |
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) |
8852 |
+#define XFREE(stale) do { \ |
8853 |
+ if (stale) { free ((void *) stale); stale = 0; } \ |
8854 |
+} while (0) |
8855 |
+ |
8856 |
+/* -DDEBUG is fairly common in CFLAGS. */ |
8857 |
+#undef DEBUG |
8858 |
+#if defined DEBUGWRAPPER |
8859 |
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) |
8860 |
+#else |
8861 |
+# define DEBUG(format, ...) |
8862 |
+#endif |
8863 |
+ |
8864 |
+const char *program_name = NULL; |
8865 |
+ |
8866 |
+void * xmalloc (size_t num); |
8867 |
+char * xstrdup (const char *string); |
8868 |
+const char * base_name (const char *name); |
8869 |
+char * find_executable(const char *wrapper); |
8870 |
+int check_executable(const char *path); |
8871 |
+char * strendzap(char *str, const char *pat); |
8872 |
+void lt_fatal (const char *message, ...); |
8873 |
+ |
8874 |
+int |
8875 |
+main (int argc, char *argv[]) |
8876 |
+{ |
8877 |
+ char **newargz; |
8878 |
+ int i; |
8879 |
+ |
8880 |
+ program_name = (char *) xstrdup (base_name (argv[0])); |
8881 |
+ DEBUG("(main) argv[0] : %s\n",argv[0]); |
8882 |
+ DEBUG("(main) program_name : %s\n",program_name); |
8883 |
+ newargz = XMALLOC(char *, argc+2); |
8884 |
+EOF |
8885 |
+ |
8886 |
+ cat >> $cwrappersource <<EOF |
8887 |
+ newargz[0] = (char *) xstrdup("$SHELL"); |
8888 |
+EOF |
8889 |
+ |
8890 |
+ cat >> $cwrappersource <<"EOF" |
8891 |
+ newargz[1] = find_executable(argv[0]); |
8892 |
+ if (newargz[1] == NULL) |
8893 |
+ lt_fatal("Couldn't find %s", argv[0]); |
8894 |
+ DEBUG("(main) found exe at : %s\n",newargz[1]); |
8895 |
+ /* we know the script has the same name, without the .exe */ |
8896 |
+ /* so make sure newargz[1] doesn't end in .exe */ |
8897 |
+ strendzap(newargz[1],".exe"); |
8898 |
+ for (i = 1; i < argc; i++) |
8899 |
+ newargz[i+1] = xstrdup(argv[i]); |
8900 |
+ newargz[argc+1] = NULL; |
8901 |
+ |
8902 |
+ for (i=0; i<argc+1; i++) |
8903 |
+ { |
8904 |
+ DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]); |
8905 |
+ ; |
8906 |
+ } |
8907 |
+ |
8908 |
+EOF |
8909 |
+ |
8910 |
+ case $host_os in |
8911 |
+ mingw*) |
8912 |
+ cat >> $cwrappersource <<EOF |
8913 |
+ execv("$SHELL",(char const **)newargz); |
8914 |
+EOF |
8915 |
+ ;; |
8916 |
+ *) |
8917 |
+ cat >> $cwrappersource <<EOF |
8918 |
+ execv("$SHELL",newargz); |
8919 |
+EOF |
8920 |
+ ;; |
8921 |
+ esac |
8922 |
+ |
8923 |
+ cat >> $cwrappersource <<"EOF" |
8924 |
+ return 127; |
8925 |
+} |
8926 |
+ |
8927 |
+void * |
8928 |
+xmalloc (size_t num) |
8929 |
+{ |
8930 |
+ void * p = (void *) malloc (num); |
8931 |
+ if (!p) |
8932 |
+ lt_fatal ("Memory exhausted"); |
8933 |
+ |
8934 |
+ return p; |
8935 |
+} |
8936 |
+ |
8937 |
+char * |
8938 |
+xstrdup (const char *string) |
8939 |
+{ |
8940 |
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL |
8941 |
+; |
8942 |
+} |
8943 |
+ |
8944 |
+const char * |
8945 |
+base_name (const char *name) |
8946 |
+{ |
8947 |
+ const char *base; |
8948 |
+ |
8949 |
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM) |
8950 |
+ /* Skip over the disk name in MSDOS pathnames. */ |
8951 |
+ if (isalpha ((unsigned char)name[0]) && name[1] == ':') |
8952 |
+ name += 2; |
8953 |
+#endif |
8954 |
+ |
8955 |
+ for (base = name; *name; name++) |
8956 |
+ if (IS_DIR_SEPARATOR (*name)) |
8957 |
+ base = name + 1; |
8958 |
+ return base; |
8959 |
+} |
8960 |
+ |
8961 |
+int |
8962 |
+check_executable(const char * path) |
8963 |
+{ |
8964 |
+ struct stat st; |
8965 |
+ |
8966 |
+ DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); |
8967 |
+ if ((!path) || (!*path)) |
8968 |
+ return 0; |
8969 |
+ |
8970 |
+ if ((stat (path, &st) >= 0) && |
8971 |
+ ( |
8972 |
+ /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ |
8973 |
+#if defined (S_IXOTH) |
8974 |
+ ((st.st_mode & S_IXOTH) == S_IXOTH) || |
8975 |
+#endif |
8976 |
+#if defined (S_IXGRP) |
8977 |
+ ((st.st_mode & S_IXGRP) == S_IXGRP) || |
8978 |
+#endif |
8979 |
+ ((st.st_mode & S_IXUSR) == S_IXUSR)) |
8980 |
+ ) |
8981 |
+ return 1; |
8982 |
+ else |
8983 |
+ return 0; |
8984 |
+} |
8985 |
+ |
8986 |
+/* Searches for the full path of the wrapper. Returns |
8987 |
+ newly allocated full path name if found, NULL otherwise */ |
8988 |
+char * |
8989 |
+find_executable (const char* wrapper) |
8990 |
+{ |
8991 |
+ int has_slash = 0; |
8992 |
+ const char* p; |
8993 |
+ const char* p_next; |
8994 |
+ /* static buffer for getcwd */ |
8995 |
+ char tmp[LT_PATHMAX + 1]; |
8996 |
+ int tmp_len; |
8997 |
+ char* concat_name; |
8998 |
+ |
8999 |
+ DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); |
9000 |
+ |
9001 |
+ if ((wrapper == NULL) || (*wrapper == '\0')) |
9002 |
+ return NULL; |
9003 |
+ |
9004 |
+ /* Absolute path? */ |
9005 |
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM) |
9006 |
+ if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') |
9007 |
+ { |
9008 |
+ concat_name = xstrdup (wrapper); |
9009 |
+ if (check_executable(concat_name)) |
9010 |
+ return concat_name; |
9011 |
+ XFREE(concat_name); |
9012 |
+ } |
9013 |
+ else |
9014 |
+ { |
9015 |
+#endif |
9016 |
+ if (IS_DIR_SEPARATOR (wrapper[0])) |
9017 |
+ { |
9018 |
+ concat_name = xstrdup (wrapper); |
9019 |
+ if (check_executable(concat_name)) |
9020 |
+ return concat_name; |
9021 |
+ XFREE(concat_name); |
9022 |
+ } |
9023 |
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM) |
9024 |
+ } |
9025 |
+#endif |
9026 |
+ |
9027 |
+ for (p = wrapper; *p; p++) |
9028 |
+ if (*p == '/') |
9029 |
+ { |
9030 |
+ has_slash = 1; |
9031 |
+ break; |
9032 |
+ } |
9033 |
+ if (!has_slash) |
9034 |
+ { |
9035 |
+ /* no slashes; search PATH */ |
9036 |
+ const char* path = getenv ("PATH"); |
9037 |
+ if (path != NULL) |
9038 |
+ { |
9039 |
+ for (p = path; *p; p = p_next) |
9040 |
+ { |
9041 |
+ const char* q; |
9042 |
+ size_t p_len; |
9043 |
+ for (q = p; *q; q++) |
9044 |
+ if (IS_PATH_SEPARATOR(*q)) |
9045 |
+ break; |
9046 |
+ p_len = q - p; |
9047 |
+ p_next = (*q == '\0' ? q : q + 1); |
9048 |
+ if (p_len == 0) |
9049 |
+ { |
9050 |
+ /* empty path: current directory */ |
9051 |
+ if (getcwd (tmp, LT_PATHMAX) == NULL) |
9052 |
+ lt_fatal ("getcwd failed"); |
9053 |
+ tmp_len = strlen(tmp); |
9054 |
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); |
9055 |
+ memcpy (concat_name, tmp, tmp_len); |
9056 |
+ concat_name[tmp_len] = '/'; |
9057 |
+ strcpy (concat_name + tmp_len + 1, wrapper); |
9058 |
+ } |
9059 |
+ else |
9060 |
+ { |
9061 |
+ concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); |
9062 |
+ memcpy (concat_name, p, p_len); |
9063 |
+ concat_name[p_len] = '/'; |
9064 |
+ strcpy (concat_name + p_len + 1, wrapper); |
9065 |
+ } |
9066 |
+ if (check_executable(concat_name)) |
9067 |
+ return concat_name; |
9068 |
+ XFREE(concat_name); |
9069 |
+ } |
9070 |
+ } |
9071 |
+ /* not found in PATH; assume curdir */ |
9072 |
+ } |
9073 |
+ /* Relative path | not found in path: prepend cwd */ |
9074 |
+ if (getcwd (tmp, LT_PATHMAX) == NULL) |
9075 |
+ lt_fatal ("getcwd failed"); |
9076 |
+ tmp_len = strlen(tmp); |
9077 |
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); |
9078 |
+ memcpy (concat_name, tmp, tmp_len); |
9079 |
+ concat_name[tmp_len] = '/'; |
9080 |
+ strcpy (concat_name + tmp_len + 1, wrapper); |
9081 |
+ |
9082 |
+ if (check_executable(concat_name)) |
9083 |
+ return concat_name; |
9084 |
+ XFREE(concat_name); |
9085 |
+ return NULL; |
9086 |
+} |
9087 |
+ |
9088 |
+char * |
9089 |
+strendzap(char *str, const char *pat) |
9090 |
+{ |
9091 |
+ size_t len, patlen; |
9092 |
+ |
9093 |
+ assert(str != NULL); |
9094 |
+ assert(pat != NULL); |
9095 |
+ |
9096 |
+ len = strlen(str); |
9097 |
+ patlen = strlen(pat); |
9098 |
+ |
9099 |
+ if (patlen <= len) |
9100 |
+ { |
9101 |
+ str += len - patlen; |
9102 |
+ if (strcmp(str, pat) == 0) |
9103 |
+ *str = '\0'; |
9104 |
+ } |
9105 |
+ return str; |
9106 |
+} |
9107 |
+ |
9108 |
+static void |
9109 |
+lt_error_core (int exit_status, const char * mode, |
9110 |
+ const char * message, va_list ap) |
9111 |
+{ |
9112 |
+ fprintf (stderr, "%s: %s: ", program_name, mode); |
9113 |
+ vfprintf (stderr, message, ap); |
9114 |
+ fprintf (stderr, ".\n"); |
9115 |
+ |
9116 |
+ if (exit_status >= 0) |
9117 |
+ exit (exit_status); |
9118 |
+} |
9119 |
+ |
9120 |
+void |
9121 |
+lt_fatal (const char *message, ...) |
9122 |
+{ |
9123 |
+ va_list ap; |
9124 |
+ va_start (ap, message); |
9125 |
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap); |
9126 |
+ va_end (ap); |
9127 |
+} |
9128 |
+EOF |
9129 |
+ # we should really use a build-platform specific compiler |
9130 |
+ # here, but OTOH, the wrappers (shell script and this C one) |
9131 |
+ # are only useful if you want to execute the "real" binary. |
9132 |
+ # Since the "real" binary is built for $host, then this |
9133 |
+ # wrapper might as well be built for $host, too. |
9134 |
+ $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource |
9135 |
+ ;; |
9136 |
+ esac |
9137 |
+ $rm $output |
9138 |
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 |
9139 |
+ |
9140 |
+ $echo > $output "\ |
9141 |
+#! $SHELL |
9142 |
+ |
9143 |
+# $output - temporary wrapper script for $objdir/$outputname |
9144 |
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP |
9145 |
+# |
9146 |
+# The $output program cannot be directly executed until all the libtool |
9147 |
+# libraries that it depends on are installed. |
9148 |
+# |
9149 |
+# This wrapper script should never be moved out of the build directory. |
9150 |
+# If it is, it will not operate correctly. |
9151 |
+ |
9152 |
+# Sed substitution that helps us do robust quoting. It backslashifies |
9153 |
+# metacharacters that are still active within double-quoted strings. |
9154 |
+Xsed='${SED} -e 1s/^X//' |
9155 |
+sed_quote_subst='$sed_quote_subst' |
9156 |
+ |
9157 |
+# The HP-UX ksh and POSIX shell print the target directory to stdout |
9158 |
+# if CDPATH is set. |
9159 |
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
9160 |
+ |
9161 |
+relink_command=\"$relink_command\" |
9162 |
+ |
9163 |
+# This environment variable determines our operation mode. |
9164 |
+if test \"\$libtool_install_magic\" = \"$magic\"; then |
9165 |
+ # install mode needs the following variable: |
9166 |
+ notinst_deplibs='$notinst_deplibs' |
9167 |
+else |
9168 |
+ # When we are sourced in execute mode, \$file and \$echo are already set. |
9169 |
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then |
9170 |
+ echo=\"$qecho\" |
9171 |
+ file=\"\$0\" |
9172 |
+ # Make sure echo works. |
9173 |
+ if test \"X\$1\" = X--no-reexec; then |
9174 |
+ # Discard the --no-reexec flag, and continue. |
9175 |
+ shift |
9176 |
+ elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then |
9177 |
+ # Yippee, \$echo works! |
9178 |
+ : |
9179 |
+ else |
9180 |
+ # Restart under the correct shell, and then maybe \$echo will work. |
9181 |
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} |
9182 |
+ fi |
9183 |
+ fi\ |
9184 |
+" |
9185 |
+ $echo >> $output "\ |
9186 |
+ |
9187 |
+ # Find the directory that this script lives in. |
9188 |
+ thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` |
9189 |
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=. |
9190 |
+ |
9191 |
+ # Follow symbolic links until we get to the real thisdir. |
9192 |
+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` |
9193 |
+ while test -n \"\$file\"; do |
9194 |
+ destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` |
9195 |
+ |
9196 |
+ # If there was a directory component, then change thisdir. |
9197 |
+ if test \"x\$destdir\" != \"x\$file\"; then |
9198 |
+ case \"\$destdir\" in |
9199 |
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; |
9200 |
+ *) thisdir=\"\$thisdir/\$destdir\" ;; |
9201 |
+ esac |
9202 |
+ fi |
9203 |
+ |
9204 |
+ file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` |
9205 |
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` |
9206 |
+ done |
9207 |
+ |
9208 |
+ # Try to get the absolute directory name. |
9209 |
+ absdir=\`cd \"\$thisdir\" && pwd\` |
9210 |
+ test -n \"\$absdir\" && thisdir=\"\$absdir\" |
9211 |
+" |
9212 |
+ |
9213 |
+ if test "$fast_install" = yes; then |
9214 |
+ $echo >> $output "\ |
9215 |
+ program=lt-'$outputname'$exeext |
9216 |
+ progdir=\"\$thisdir/$objdir\" |
9217 |
+ |
9218 |
+ if test ! -f \"\$progdir/\$program\" || \\ |
9219 |
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ |
9220 |
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then |
9221 |
+ |
9222 |
+ file=\"\$\$-\$program\" |
9223 |
+ |
9224 |
+ if test ! -d \"\$progdir\"; then |
9225 |
+ $mkdir \"\$progdir\" |
9226 |
+ else |
9227 |
+ $rm \"\$progdir/\$file\" |
9228 |
+ fi" |
9229 |
+ |
9230 |
+ $echo >> $output "\ |
9231 |
+ |
9232 |
+ # relink executable if necessary |
9233 |
+ if test -n \"\$relink_command\"; then |
9234 |
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then : |
9235 |
+ else |
9236 |
+ $echo \"\$relink_command_output\" >&2 |
9237 |
+ $rm \"\$progdir/\$file\" |
9238 |
+ exit $EXIT_FAILURE |
9239 |
+ fi |
9240 |
+ fi |
9241 |
+ |
9242 |
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || |
9243 |
+ { $rm \"\$progdir/\$program\"; |
9244 |
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } |
9245 |
+ $rm \"\$progdir/\$file\" |
9246 |
+ fi" |
9247 |
+ else |
9248 |
+ $echo >> $output "\ |
9249 |
+ program='$outputname' |
9250 |
+ progdir=\"\$thisdir/$objdir\" |
9251 |
+" |
9252 |
+ fi |
9253 |
+ |
9254 |
+ $echo >> $output "\ |
9255 |
+ |
9256 |
+ if test -f \"\$progdir/\$program\"; then" |
9257 |
+ |
9258 |
+ # Export our shlibpath_var if we have one. |
9259 |
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then |
9260 |
+ $echo >> $output "\ |
9261 |
+ # Add our own library path to $shlibpath_var |
9262 |
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" |
9263 |
+ |
9264 |
+ # Some systems cannot cope with colon-terminated $shlibpath_var |
9265 |
+ # The second colon is a workaround for a bug in BeOS R4 sed |
9266 |
+ $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` |
9267 |
+ |
9268 |
+ export $shlibpath_var |
9269 |
+" |
9270 |
+ fi |
9271 |
+ |
9272 |
+ # fixup the dll searchpath if we need to. |
9273 |
+ if test -n "$dllsearchpath"; then |
9274 |
+ $echo >> $output "\ |
9275 |
+ # Add the dll search path components to the executable PATH |
9276 |
+ PATH=$dllsearchpath:\$PATH |
9277 |
+" |
9278 |
+ fi |
9279 |
+ |
9280 |
+ $echo >> $output "\ |
9281 |
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then |
9282 |
+ # Run the actual program with our arguments. |
9283 |
+ |
9284 |
+ # Make sure env LD_LIBRARY_PATH does not mess us up |
9285 |
+ if test -n \"\${LD_LIBRARY_PATH+set}\"; then |
9286 |
+ export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH |
9287 |
+ fi |
9288 |
+" |
9289 |
+ case $host in |
9290 |
+ # Backslashes separate directories on plain windows |
9291 |
+ *-*-mingw | *-*-os2*) |
9292 |
+ $echo >> $output "\ |
9293 |
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} |
9294 |
+" |
9295 |
+ ;; |
9296 |
+ |
9297 |
+ *) |
9298 |
+ $echo >> $output "\ |
9299 |
+ exec \"\$progdir/\$program\" \${1+\"\$@\"} |
9300 |
+" |
9301 |
+ ;; |
9302 |
+ esac |
9303 |
+ $echo >> $output "\ |
9304 |
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" |
9305 |
+ exit $EXIT_FAILURE |
9306 |
+ fi |
9307 |
+ else |
9308 |
+ # The program doesn't exist. |
9309 |
+ \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 |
9310 |
+ \$echo \"This script is just a wrapper for \$program.\" 1>&2 |
9311 |
+ $echo \"See the $PACKAGE documentation for more information.\" 1>&2 |
9312 |
+ exit $EXIT_FAILURE |
9313 |
+ fi |
9314 |
+fi\ |
9315 |
+" |
9316 |
+ chmod +x $output |
9317 |
+ fi |
9318 |
+ exit $EXIT_SUCCESS |
9319 |
+ ;; |
9320 |
+ esac |
9321 |
+ |
9322 |
+ # See if we need to build an old-fashioned archive. |
9323 |
+ for oldlib in $oldlibs; do |
9324 |
+ |
9325 |
+ if test "$build_libtool_libs" = convenience; then |
9326 |
+ oldobjs="$libobjs_save" |
9327 |
+ addlibs="$convenience" |
9328 |
+ build_libtool_libs=no |
9329 |
+ else |
9330 |
+ if test "$build_libtool_libs" = module; then |
9331 |
+ oldobjs="$libobjs_save" |
9332 |
+ build_libtool_libs=no |
9333 |
+ else |
9334 |
+ oldobjs="$old_deplibs $non_pic_objects" |
9335 |
+ fi |
9336 |
+ addlibs="$old_convenience" |
9337 |
+ fi |
9338 |
+ |
9339 |
+ if test -n "$addlibs"; then |
9340 |
+ gentop="$output_objdir/${outputname}x" |
9341 |
+ generated="$generated $gentop" |
9342 |
+ |
9343 |
+ func_extract_archives $gentop $addlibs |
9344 |
+ oldobjs="$oldobjs $func_extract_archives_result" |
9345 |
+ fi |
9346 |
+ |
9347 |
+ # Do each command in the archive commands. |
9348 |
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then |
9349 |
+ cmds=$old_archive_from_new_cmds |
9350 |
+ else |
9351 |
+ # POSIX demands no paths to be encoded in archives. We have |
9352 |
+ # to avoid creating archives with duplicate basenames if we |
9353 |
+ # might have to extract them afterwards, e.g., when creating a |
9354 |
+ # static archive out of a convenience library, or when linking |
9355 |
+ # the entirety of a libtool archive into another (currently |
9356 |
+ # not supported by libtool). |
9357 |
+ if (for obj in $oldobjs |
9358 |
+ do |
9359 |
+ $echo "X$obj" | $Xsed -e 's%^.*/%%' |
9360 |
+ done | sort | sort -uc >/dev/null 2>&1); then |
9361 |
+ : |
9362 |
+ else |
9363 |
+ $echo "copying selected object files to avoid basename conflicts..." |
9364 |
+ |
9365 |
+ if test -z "$gentop"; then |
9366 |
+ gentop="$output_objdir/${outputname}x" |
9367 |
+ generated="$generated $gentop" |
9368 |
+ |
9369 |
+ $show "${rm}r $gentop" |
9370 |
+ $run ${rm}r "$gentop" |
9371 |
+ $show "$mkdir $gentop" |
9372 |
+ $run $mkdir "$gentop" |
9373 |
+ exit_status=$? |
9374 |
+ if test "$exit_status" -ne 0 && test ! -d "$gentop"; then |
9375 |
+ exit $exit_status |
9376 |
+ fi |
9377 |
+ fi |
9378 |
+ |
9379 |
+ save_oldobjs=$oldobjs |
9380 |
+ oldobjs= |
9381 |
+ counter=1 |
9382 |
+ for obj in $save_oldobjs |
9383 |
+ do |
9384 |
+ objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` |
9385 |
+ case " $oldobjs " in |
9386 |
+ " ") oldobjs=$obj ;; |
9387 |
+ *[\ /]"$objbase "*) |
9388 |
+ while :; do |
9389 |
+ # Make sure we don't pick an alternate name that also |
9390 |
+ # overlaps. |
9391 |
+ newobj=lt$counter-$objbase |
9392 |
+ counter=`expr $counter + 1` |
9393 |
+ case " $oldobjs " in |
9394 |
+ *[\ /]"$newobj "*) ;; |
9395 |
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;; |
9396 |
+ esac |
9397 |
+ done |
9398 |
+ $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" |
9399 |
+ $run ln "$obj" "$gentop/$newobj" || |
9400 |
+ $run cp "$obj" "$gentop/$newobj" |
9401 |
+ oldobjs="$oldobjs $gentop/$newobj" |
9402 |
+ ;; |
9403 |
+ *) oldobjs="$oldobjs $obj" ;; |
9404 |
+ esac |
9405 |
+ done |
9406 |
+ fi |
9407 |
+ |
9408 |
+ eval cmds=\"$old_archive_cmds\" |
9409 |
+ |
9410 |
+ if len=`expr "X$cmds" : ".*"` && |
9411 |
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then |
9412 |
+ cmds=$old_archive_cmds |
9413 |
+ else |
9414 |
+ # the command line is too long to link in one step, link in parts |
9415 |
+ $echo "using piecewise archive linking..." |
9416 |
+ save_RANLIB=$RANLIB |
9417 |
+ RANLIB=: |
9418 |
+ objlist= |
9419 |
+ concat_cmds= |
9420 |
+ save_oldobjs=$oldobjs |
9421 |
+ |
9422 |
+ # Is there a better way of finding the last object in the list? |
9423 |
+ for obj in $save_oldobjs |
9424 |
+ do |
9425 |
+ last_oldobj=$obj |
9426 |
+ done |
9427 |
+ for obj in $save_oldobjs |
9428 |
+ do |
9429 |
+ oldobjs="$objlist $obj" |
9430 |
+ objlist="$objlist $obj" |
9431 |
+ eval test_cmds=\"$old_archive_cmds\" |
9432 |
+ if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && |
9433 |
+ test "$len" -le "$max_cmd_len"; then |
9434 |
+ : |
9435 |
+ else |
9436 |
+ # the above command should be used before it gets too long |
9437 |
+ oldobjs=$objlist |
9438 |
+ if test "$obj" = "$last_oldobj" ; then |
9439 |
+ RANLIB=$save_RANLIB |
9440 |
+ fi |
9441 |
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~ |
9442 |
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" |
9443 |
+ objlist= |
9444 |
+ fi |
9445 |
+ done |
9446 |
+ RANLIB=$save_RANLIB |
9447 |
+ oldobjs=$objlist |
9448 |
+ if test "X$oldobjs" = "X" ; then |
9449 |
+ eval cmds=\"\$concat_cmds\" |
9450 |
+ else |
9451 |
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" |
9452 |
+ fi |
9453 |
+ fi |
9454 |
+ fi |
9455 |
+ save_ifs="$IFS"; IFS='~' |
9456 |
+ for cmd in $cmds; do |
9457 |
+ eval cmd=\"$cmd\" |
9458 |
+ IFS="$save_ifs" |
9459 |
+ $show "$cmd" |
9460 |
+ $run eval "$cmd" || exit $? |
9461 |
+ done |
9462 |
+ IFS="$save_ifs" |
9463 |
+ done |
9464 |
+ |
9465 |
+ if test -n "$generated"; then |
9466 |
+ $show "${rm}r$generated" |
9467 |
+ $run ${rm}r$generated |
9468 |
+ fi |
9469 |
+ |
9470 |
+ # Now create the libtool archive. |
9471 |
+ case $output in |
9472 |
+ *.la) |
9473 |
+ old_library= |
9474 |
+ test "$build_old_libs" = yes && old_library="$libname.$libext" |
9475 |
+ $show "creating $output" |
9476 |
+ |
9477 |
+ # Preserve any variables that may affect compiler behavior |
9478 |
+ for var in $variables_saved_for_relink; do |
9479 |
+ if eval test -z \"\${$var+set}\"; then |
9480 |
+ relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" |
9481 |
+ elif eval var_value=\$$var; test -z "$var_value"; then |
9482 |
+ relink_command="$var=; export $var; $relink_command" |
9483 |
+ else |
9484 |
+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` |
9485 |
+ relink_command="$var=\"$var_value\"; export $var; $relink_command" |
9486 |
+ fi |
9487 |
+ done |
9488 |
+ # Quote the link command for shipping. |
9489 |
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" |
9490 |
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` |
9491 |
+ if test "$hardcode_automatic" = yes ; then |
9492 |
+ relink_command= |
9493 |
+ fi |
9494 |
+ |
9495 |
+ |
9496 |
+ # Only create the output if not a dry run. |
9497 |
+ if test -z "$run"; then |
9498 |
+ for installed in no yes; do |
9499 |
+ if test "$installed" = yes; then |
9500 |
+ if test -z "$install_libdir"; then |
9501 |
+ break |
9502 |
+ fi |
9503 |
+ output="$output_objdir/$outputname"i |
9504 |
+ # Replace all uninstalled libtool libraries with the installed ones |
9505 |
+ newdependency_libs= |
9506 |
+ for deplib in $dependency_libs; do |
9507 |
+ case $deplib in |
9508 |
+ *.la) |
9509 |
+ name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` |
9510 |
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` |
9511 |
+ if test -z "$libdir"; then |
9512 |
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 |
9513 |
+ exit $EXIT_FAILURE |
9514 |
+ fi |
9515 |
+ if test "X$EGREP" = X ; then |
9516 |
+ EGREP=egrep |
9517 |
+ fi |
9518 |
+ # We do not want portage's install root ($D) present. Check only for |
9519 |
+ # this if the .la is being installed. |
9520 |
+ if test "$installed" = yes && test "$D"; then |
9521 |
+ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` |
9522 |
+ else |
9523 |
+ mynewdependency_lib="$libdir/$name" |
9524 |
+ fi |
9525 |
+ # Do not add duplicates |
9526 |
+ if test "$mynewdependency_lib"; then |
9527 |
+ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"` |
9528 |
+ if test -z "$my_little_ninja_foo_1"; then |
9529 |
+ newdependency_libs="$newdependency_libs $mynewdependency_lib" |
9530 |
+ fi |
9531 |
+ fi |
9532 |
+ ;; |
9533 |
+ *) |
9534 |
+ if test "$installed" = yes; then |
9535 |
+ # Rather use S=WORKDIR if our version of portage supports it. |
9536 |
+ # This is because some ebuild (gcc) do not use $S as buildroot. |
9537 |
+ if test "$PWORKDIR"; then |
9538 |
+ S="$PWORKDIR" |
9539 |
+ fi |
9540 |
+ # We do not want portage's build root ($S) present. |
9541 |
+ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"` |
9542 |
+ # We do not want portage's install root ($D) present. |
9543 |
+ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"` |
9544 |
+ if test -n "$my_little_ninja_foo_2" && test "$S"; then |
9545 |
+ mynewdependency_lib="" |
9546 |
+ elif test -n "$my_little_ninja_foo_3" && test "$D"; then |
9547 |
+ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` |
9548 |
+ else |
9549 |
+ mynewdependency_lib="$deplib" |
9550 |
+ fi |
9551 |
+ else |
9552 |
+ mynewdependency_lib="$deplib" |
9553 |
+ fi |
9554 |
+ # Do not add duplicates |
9555 |
+ if test "$mynewdependency_lib"; then |
9556 |
+ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"` |
9557 |
+ if test -z "$my_little_ninja_foo_4"; then |
9558 |
+ newdependency_libs="$newdependency_libs $mynewdependency_lib" |
9559 |
+ fi |
9560 |
+ fi |
9561 |
+ ;; |
9562 |
+ esac |
9563 |
+ done |
9564 |
+ dependency_libs="$newdependency_libs" |
9565 |
+ newdlfiles= |
9566 |
+ for lib in $dlfiles; do |
9567 |
+ name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` |
9568 |
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` |
9569 |
+ if test -z "$libdir"; then |
9570 |
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
9571 |
+ exit $EXIT_FAILURE |
9572 |
+ fi |
9573 |
+ newdlfiles="$newdlfiles $libdir/$name" |
9574 |
+ done |
9575 |
+ dlfiles="$newdlfiles" |
9576 |
+ newdlprefiles= |
9577 |
+ for lib in $dlprefiles; do |
9578 |
+ name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` |
9579 |
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` |
9580 |
+ if test -z "$libdir"; then |
9581 |
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
9582 |
+ exit $EXIT_FAILURE |
9583 |
+ fi |
9584 |
+ newdlprefiles="$newdlprefiles $libdir/$name" |
9585 |
+ done |
9586 |
+ dlprefiles="$newdlprefiles" |
9587 |
+ else |
9588 |
+ newdlfiles= |
9589 |
+ for lib in $dlfiles; do |
9590 |
+ case $lib in |
9591 |
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; |
9592 |
+ *) abs=`pwd`"/$lib" ;; |
9593 |
+ esac |
9594 |
+ newdlfiles="$newdlfiles $abs" |
9595 |
+ done |
9596 |
+ dlfiles="$newdlfiles" |
9597 |
+ newdlprefiles= |
9598 |
+ for lib in $dlprefiles; do |
9599 |
+ case $lib in |
9600 |
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; |
9601 |
+ *) abs=`pwd`"/$lib" ;; |
9602 |
+ esac |
9603 |
+ newdlprefiles="$newdlprefiles $abs" |
9604 |
+ done |
9605 |
+ dlprefiles="$newdlprefiles" |
9606 |
+ fi |
9607 |
+ $rm $output |
9608 |
+ # place dlname in correct position for cygwin |
9609 |
+ tdlname=$dlname |
9610 |
+ case $host,$output,$installed,$module,$dlname in |
9611 |
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; |
9612 |
+ esac |
9613 |
+ # Do not add duplicates |
9614 |
+ if test "$installed" = yes && test "$D"; then |
9615 |
+ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` |
9616 |
+ fi |
9617 |
+ $echo > $output "\ |
9618 |
+# $outputname - a libtool library file |
9619 |
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP |
9620 |
+# |
9621 |
+# Please DO NOT delete this file! |
9622 |
+# It is necessary for linking the library. |
9623 |
+ |
9624 |
+# The name that we can dlopen(3). |
9625 |
+dlname='$tdlname' |
9626 |
+ |
9627 |
+# Names of this library. |
9628 |
+library_names='$library_names' |
9629 |
+ |
9630 |
+# The name of the static archive. |
9631 |
+old_library='$old_library' |
9632 |
+ |
9633 |
+# Libraries that this one depends upon. |
9634 |
+dependency_libs='$dependency_libs' |
9635 |
+ |
9636 |
+# Version information for $libname. |
9637 |
+current=$current |
9638 |
+age=$age |
9639 |
+revision=$revision |
9640 |
+ |
9641 |
+# Is this an already installed library? |
9642 |
+installed=$installed |
9643 |
+ |
9644 |
+# Should we warn about portability when linking against -modules? |
9645 |
+shouldnotlink=$module |
9646 |
+ |
9647 |
+# Files to dlopen/dlpreopen |
9648 |
+dlopen='$dlfiles' |
9649 |
+dlpreopen='$dlprefiles' |
9650 |
+ |
9651 |
+# Directory that this library needs to be installed in: |
9652 |
+libdir='$install_libdir'" |
9653 |
+ if test "$installed" = no && test "$need_relink" = yes; then |
9654 |
+ $echo >> $output "\ |
9655 |
+relink_command=\"$relink_command\"" |
9656 |
+ fi |
9657 |
+ done |
9658 |
+ fi |
9659 |
+ |
9660 |
+ # Do a symbolic link so that the libtool archive can be found in |
9661 |
+ # LD_LIBRARY_PATH before the program is installed. |
9662 |
+ $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" |
9663 |
+ $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? |
9664 |
+ ;; |
9665 |
+ esac |
9666 |
+ exit $EXIT_SUCCESS |
9667 |
+ ;; |
9668 |
+ |
9669 |
+ # libtool install mode |
9670 |
+ install) |
9671 |
+ modename="$modename: install" |
9672 |
+ |
9673 |
+ # There may be an optional sh(1) argument at the beginning of |
9674 |
+ # install_prog (especially on Windows NT). |
9675 |
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || |
9676 |
+ # Allow the use of GNU shtool's install command. |
9677 |
+ $echo "X$nonopt" | grep shtool > /dev/null; then |
9678 |
+ # Aesthetically quote it. |
9679 |
+ arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` |
9680 |
+ case $arg in |
9681 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
9682 |
+ arg="\"$arg\"" |
9683 |
+ ;; |
9684 |
+ esac |
9685 |
+ install_prog="$arg " |
9686 |
+ arg="$1" |
9687 |
+ shift |
9688 |
+ else |
9689 |
+ install_prog= |
9690 |
+ arg=$nonopt |
9691 |
+ fi |
9692 |
+ |
9693 |
+ # The real first argument should be the name of the installation program. |
9694 |
+ # Aesthetically quote it. |
9695 |
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
9696 |
+ case $arg in |
9697 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
9698 |
+ arg="\"$arg\"" |
9699 |
+ ;; |
9700 |
+ esac |
9701 |
+ install_prog="$install_prog$arg" |
9702 |
+ |
9703 |
+ # We need to accept at least all the BSD install flags. |
9704 |
+ dest= |
9705 |
+ files= |
9706 |
+ opts= |
9707 |
+ prev= |
9708 |
+ install_type= |
9709 |
+ isdir=no |
9710 |
+ stripme= |
9711 |
+ for arg |
9712 |
+ do |
9713 |
+ if test -n "$dest"; then |
9714 |
+ files="$files $dest" |
9715 |
+ dest=$arg |
9716 |
+ continue |
9717 |
+ fi |
9718 |
+ |
9719 |
+ case $arg in |
9720 |
+ -d) isdir=yes ;; |
9721 |
+ -f) |
9722 |
+ case " $install_prog " in |
9723 |
+ *[\\\ /]cp\ *) ;; |
9724 |
+ *) prev=$arg ;; |
9725 |
+ esac |
9726 |
+ ;; |
9727 |
+ -g | -m | -o) prev=$arg ;; |
9728 |
+ -s) |
9729 |
+ stripme=" -s" |
9730 |
+ continue |
9731 |
+ ;; |
9732 |
+ -*) |
9733 |
+ ;; |
9734 |
+ *) |
9735 |
+ # If the previous option needed an argument, then skip it. |
9736 |
+ if test -n "$prev"; then |
9737 |
+ prev= |
9738 |
+ else |
9739 |
+ dest=$arg |
9740 |
+ continue |
9741 |
+ fi |
9742 |
+ ;; |
9743 |
+ esac |
9744 |
+ |
9745 |
+ # Aesthetically quote the argument. |
9746 |
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
9747 |
+ case $arg in |
9748 |
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
9749 |
+ arg="\"$arg\"" |
9750 |
+ ;; |
9751 |
+ esac |
9752 |
+ install_prog="$install_prog $arg" |
9753 |
+ done |
9754 |
+ |
9755 |
+ if test -z "$install_prog"; then |
9756 |
+ $echo "$modename: you must specify an install program" 1>&2 |
9757 |
+ $echo "$help" 1>&2 |
9758 |
+ exit $EXIT_FAILURE |
9759 |
+ fi |
9760 |
+ |
9761 |
+ if test -n "$prev"; then |
9762 |
+ $echo "$modename: the \`$prev' option requires an argument" 1>&2 |
9763 |
+ $echo "$help" 1>&2 |
9764 |
+ exit $EXIT_FAILURE |
9765 |
+ fi |
9766 |
+ |
9767 |
+ if test -z "$files"; then |
9768 |
+ if test -z "$dest"; then |
9769 |
+ $echo "$modename: no file or destination specified" 1>&2 |
9770 |
+ else |
9771 |
+ $echo "$modename: you must specify a destination" 1>&2 |
9772 |
+ fi |
9773 |
+ $echo "$help" 1>&2 |
9774 |
+ exit $EXIT_FAILURE |
9775 |
+ fi |
9776 |
+ |
9777 |
+ # Strip any trailing slash from the destination. |
9778 |
+ dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` |
9779 |
+ |
9780 |
+ # Check to see that the destination is a directory. |
9781 |
+ test -d "$dest" && isdir=yes |
9782 |
+ if test "$isdir" = yes; then |
9783 |
+ destdir="$dest" |
9784 |
+ destname= |
9785 |
+ else |
9786 |
+ destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` |
9787 |
+ test "X$destdir" = "X$dest" && destdir=. |
9788 |
+ destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` |
9789 |
+ |
9790 |
+ # Not a directory, so check to see that there is only one file specified. |
9791 |
+ set dummy $files |
9792 |
+ if test "$#" -gt 2; then |
9793 |
+ $echo "$modename: \`$dest' is not a directory" 1>&2 |
9794 |
+ $echo "$help" 1>&2 |
9795 |
+ exit $EXIT_FAILURE |
9796 |
+ fi |
9797 |
+ fi |
9798 |
+ case $destdir in |
9799 |
+ [\\/]* | [A-Za-z]:[\\/]*) ;; |
9800 |
+ *) |
9801 |
+ for file in $files; do |
9802 |
+ case $file in |
9803 |
+ *.lo) ;; |
9804 |
+ *) |
9805 |
+ $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 |
9806 |
+ $echo "$help" 1>&2 |
9807 |
+ exit $EXIT_FAILURE |
9808 |
+ ;; |
9809 |
+ esac |
9810 |
+ done |
9811 |
+ ;; |
9812 |
+ esac |
9813 |
+ |
9814 |
+ # This variable tells wrapper scripts just to set variables rather |
9815 |
+ # than running their programs. |
9816 |
+ libtool_install_magic="$magic" |
9817 |
+ |
9818 |
+ staticlibs= |
9819 |
+ future_libdirs= |
9820 |
+ current_libdirs= |
9821 |
+ for file in $files; do |
9822 |
+ |
9823 |
+ # Do each installation. |
9824 |
+ case $file in |
9825 |
+ *.$libext) |
9826 |
+ # Do the static libraries later. |
9827 |
+ staticlibs="$staticlibs $file" |
9828 |
+ ;; |
9829 |
+ |
9830 |
+ *.la) |
9831 |
+ # Check to see that this really is a libtool archive. |
9832 |
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
9833 |
+ else |
9834 |
+ $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 |
9835 |
+ $echo "$help" 1>&2 |
9836 |
+ exit $EXIT_FAILURE |
9837 |
+ fi |
9838 |
+ |
9839 |
+ library_names= |
9840 |
+ old_library= |
9841 |
+ relink_command= |
9842 |
+ # If there is no directory component, then add one. |
9843 |
+ case $file in |
9844 |
+ */* | *\\*) . $file ;; |
9845 |
+ *) . ./$file ;; |
9846 |
+ esac |
9847 |
+ |
9848 |
+ # Add the libdir to current_libdirs if it is the destination. |
9849 |
+ if test "X$destdir" = "X$libdir"; then |
9850 |
+ case "$current_libdirs " in |
9851 |
+ *" $libdir "*) ;; |
9852 |
+ *) current_libdirs="$current_libdirs $libdir" ;; |
9853 |
+ esac |
9854 |
+ else |
9855 |
+ # Note the libdir as a future libdir. |
9856 |
+ case "$future_libdirs " in |
9857 |
+ *" $libdir "*) ;; |
9858 |
+ *) future_libdirs="$future_libdirs $libdir" ;; |
9859 |
+ esac |
9860 |
+ fi |
9861 |
+ |
9862 |
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ |
9863 |
+ test "X$dir" = "X$file/" && dir= |
9864 |
+ dir="$dir$objdir" |
9865 |
+ |
9866 |
+ if test -n "$relink_command"; then |
9867 |
+ # Determine the prefix the user has applied to our future dir. |
9868 |
+ inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` |
9869 |
+ |
9870 |
+ # Don't allow the user to place us outside of our expected |
9871 |
+ # location b/c this prevents finding dependent libraries that |
9872 |
+ # are installed to the same prefix. |
9873 |
+ # At present, this check doesn't affect windows .dll's that |
9874 |
+ # are installed into $libdir/../bin (currently, that works fine) |
9875 |
+ # but it's something to keep an eye on. |
9876 |
+ if test "$inst_prefix_dir" = "$destdir"; then |
9877 |
+ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 |
9878 |
+ exit $EXIT_FAILURE |
9879 |
+ fi |
9880 |
+ |
9881 |
+ if test -n "$inst_prefix_dir"; then |
9882 |
+ # Stick the inst_prefix_dir data into the link command. |
9883 |
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` |
9884 |
+ else |
9885 |
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` |
9886 |
+ fi |
9887 |
+ |
9888 |
+ $echo "$modename: warning: relinking \`$file'" 1>&2 |
9889 |
+ $show "$relink_command" |
9890 |
+ if $run eval "$relink_command"; then : |
9891 |
+ else |
9892 |
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 |
9893 |
+ exit $EXIT_FAILURE |
9894 |
+ fi |
9895 |
+ fi |
9896 |
+ |
9897 |
+ # See the names of the shared library. |
9898 |
+ set dummy $library_names |
9899 |
+ if test -n "$2"; then |
9900 |
+ realname="$2" |
9901 |
+ shift |
9902 |
+ shift |
9903 |
+ |
9904 |
+ srcname="$realname" |
9905 |
+ test -n "$relink_command" && srcname="$realname"T |
9906 |
+ |
9907 |
+ # Install the shared library and build the symlinks. |
9908 |
+ $show "$install_prog $dir/$srcname $destdir/$realname" |
9909 |
+ $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? |
9910 |
+ if test -n "$stripme" && test -n "$striplib"; then |
9911 |
+ $show "$striplib $destdir/$realname" |
9912 |
+ $run eval "$striplib $destdir/$realname" || exit $? |
9913 |
+ fi |
9914 |
+ |
9915 |
+ if test "$#" -gt 0; then |
9916 |
+ # Delete the old symlinks, and create new ones. |
9917 |
+ # Try `ln -sf' first, because the `ln' binary might depend on |
9918 |
+ # the symlink we replace! Solaris /bin/ln does not understand -f, |
9919 |
+ # so we also need to try rm && ln -s. |
9920 |
+ for linkname |
9921 |
+ do |
9922 |
+ if test "$linkname" != "$realname"; then |
9923 |
+ $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" |
9924 |
+ $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" |
9925 |
+ fi |
9926 |
+ done |
9927 |
+ fi |
9928 |
+ |
9929 |
+ # Do each command in the postinstall commands. |
9930 |
+ lib="$destdir/$realname" |
9931 |
+ cmds=$postinstall_cmds |
9932 |
+ save_ifs="$IFS"; IFS='~' |
9933 |
+ for cmd in $cmds; do |
9934 |
+ IFS="$save_ifs" |
9935 |
+ eval cmd=\"$cmd\" |
9936 |
+ $show "$cmd" |
9937 |
+ $run eval "$cmd" || { |
9938 |
+ lt_exit=$? |
9939 |
+ |
9940 |
+ # Restore the uninstalled library and exit |
9941 |
+ if test "$mode" = relink; then |
9942 |
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' |
9943 |
+ fi |
9944 |
+ |
9945 |
+ exit $lt_exit |
9946 |
+ } |
9947 |
+ done |
9948 |
+ IFS="$save_ifs" |
9949 |
+ fi |
9950 |
+ |
9951 |
+ # Install the pseudo-library for information purposes. |
9952 |
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
9953 |
+ instname="$dir/$name"i |
9954 |
+ $show "$install_prog $instname $destdir/$name" |
9955 |
+ $run eval "$install_prog $instname $destdir/$name" || exit $? |
9956 |
+ |
9957 |
+ # Maybe install the static library, too. |
9958 |
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" |
9959 |
+ ;; |
9960 |
+ |
9961 |
+ *.lo) |
9962 |
+ # Install (i.e. copy) a libtool object. |
9963 |
+ |
9964 |
+ # Figure out destination file name, if it wasn't already specified. |
9965 |
+ if test -n "$destname"; then |
9966 |
+ destfile="$destdir/$destname" |
9967 |
+ else |
9968 |
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
9969 |
+ destfile="$destdir/$destfile" |
9970 |
+ fi |
9971 |
+ |
9972 |
+ # Deduce the name of the destination old-style object file. |
9973 |
+ case $destfile in |
9974 |
+ *.lo) |
9975 |
+ staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` |
9976 |
+ ;; |
9977 |
+ *.$objext) |
9978 |
+ staticdest="$destfile" |
9979 |
+ destfile= |
9980 |
+ ;; |
9981 |
+ *) |
9982 |
+ $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 |
9983 |
+ $echo "$help" 1>&2 |
9984 |
+ exit $EXIT_FAILURE |
9985 |
+ ;; |
9986 |
+ esac |
9987 |
+ |
9988 |
+ # Install the libtool object if requested. |
9989 |
+ if test -n "$destfile"; then |
9990 |
+ $show "$install_prog $file $destfile" |
9991 |
+ $run eval "$install_prog $file $destfile" || exit $? |
9992 |
+ fi |
9993 |
+ |
9994 |
+ # Install the old object if enabled. |
9995 |
+ if test "$build_old_libs" = yes; then |
9996 |
+ # Deduce the name of the old-style object file. |
9997 |
+ staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` |
9998 |
+ |
9999 |
+ $show "$install_prog $staticobj $staticdest" |
10000 |
+ $run eval "$install_prog \$staticobj \$staticdest" || exit $? |
10001 |
+ fi |
10002 |
+ exit $EXIT_SUCCESS |
10003 |
+ ;; |
10004 |
+ |
10005 |
+ *) |
10006 |
+ # Figure out destination file name, if it wasn't already specified. |
10007 |
+ if test -n "$destname"; then |
10008 |
+ destfile="$destdir/$destname" |
10009 |
+ else |
10010 |
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
10011 |
+ destfile="$destdir/$destfile" |
10012 |
+ fi |
10013 |
+ |
10014 |
+ # If the file is missing, and there is a .exe on the end, strip it |
10015 |
+ # because it is most likely a libtool script we actually want to |
10016 |
+ # install |
10017 |
+ stripped_ext="" |
10018 |
+ case $file in |
10019 |
+ *.exe) |
10020 |
+ if test ! -f "$file"; then |
10021 |
+ file=`$echo $file|${SED} 's,.exe$,,'` |
10022 |
+ stripped_ext=".exe" |
10023 |
+ fi |
10024 |
+ ;; |
10025 |
+ esac |
10026 |
+ |
10027 |
+ # Do a test to see if this is really a libtool program. |
10028 |
+ case $host in |
10029 |
+ *cygwin*|*mingw*) |
10030 |
+ wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` |
10031 |
+ ;; |
10032 |
+ *) |
10033 |
+ wrapper=$file |
10034 |
+ ;; |
10035 |
+ esac |
10036 |
+ if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then |
10037 |
+ notinst_deplibs= |
10038 |
+ relink_command= |
10039 |
+ |
10040 |
+ # Note that it is not necessary on cygwin/mingw to append a dot to |
10041 |
+ # foo even if both foo and FILE.exe exist: automatic-append-.exe |
10042 |
+ # behavior happens only for exec(3), not for open(2)! Also, sourcing |
10043 |
+ # `FILE.' does not work on cygwin managed mounts. |
10044 |
+ # |
10045 |
+ # If there is no directory component, then add one. |
10046 |
+ case $wrapper in |
10047 |
+ */* | *\\*) . ${wrapper} ;; |
10048 |
+ *) . ./${wrapper} ;; |
10049 |
+ esac |
10050 |
+ |
10051 |
+ # Check the variables that should have been set. |
10052 |
+ if test -z "$notinst_deplibs"; then |
10053 |
+ $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 |
10054 |
+ exit $EXIT_FAILURE |
10055 |
+ fi |
10056 |
+ |
10057 |
+ finalize=yes |
10058 |
+ for lib in $notinst_deplibs; do |
10059 |
+ # Check to see that each library is installed. |
10060 |
+ libdir= |
10061 |
+ if test -f "$lib"; then |
10062 |
+ # If there is no directory component, then add one. |
10063 |
+ case $lib in |
10064 |
+ */* | *\\*) . $lib ;; |
10065 |
+ *) . ./$lib ;; |
10066 |
+ esac |
10067 |
+ fi |
10068 |
+ libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test |
10069 |
+ if test -n "$libdir" && test ! -f "$libfile"; then |
10070 |
+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 |
10071 |
+ finalize=no |
10072 |
+ fi |
10073 |
+ done |
10074 |
+ |
10075 |
+ relink_command= |
10076 |
+ # Note that it is not necessary on cygwin/mingw to append a dot to |
10077 |
+ # foo even if both foo and FILE.exe exist: automatic-append-.exe |
10078 |
+ # behavior happens only for exec(3), not for open(2)! Also, sourcing |
10079 |
+ # `FILE.' does not work on cygwin managed mounts. |
10080 |
+ # |
10081 |
+ # If there is no directory component, then add one. |
10082 |
+ case $wrapper in |
10083 |
+ */* | *\\*) . ${wrapper} ;; |
10084 |
+ *) . ./${wrapper} ;; |
10085 |
+ esac |
10086 |
+ |
10087 |
+ outputname= |
10088 |
+ if test "$fast_install" = no && test -n "$relink_command"; then |
10089 |
+ if test "$finalize" = yes && test -z "$run"; then |
10090 |
+ tmpdir=`func_mktempdir` |
10091 |
+ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` |
10092 |
+ outputname="$tmpdir/$file" |
10093 |
+ # Replace the output file specification. |
10094 |
+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` |
10095 |
+ |
10096 |
+ $show "$relink_command" |
10097 |
+ if $run eval "$relink_command"; then : |
10098 |
+ else |
10099 |
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 |
10100 |
+ ${rm}r "$tmpdir" |
10101 |
+ continue |
10102 |
+ fi |
10103 |
+ file="$outputname" |
10104 |
+ else |
10105 |
+ $echo "$modename: warning: cannot relink \`$file'" 1>&2 |
10106 |
+ fi |
10107 |
+ else |
10108 |
+ # Install the binary that we compiled earlier. |
10109 |
+ file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` |
10110 |
+ fi |
10111 |
+ fi |
10112 |
+ |
10113 |
+ # remove .exe since cygwin /usr/bin/install will append another |
10114 |
+ # one anyway |
10115 |
+ case $install_prog,$host in |
10116 |
+ */usr/bin/install*,*cygwin*) |
10117 |
+ case $file:$destfile in |
10118 |
+ *.exe:*.exe) |
10119 |
+ # this is ok |
10120 |
+ ;; |
10121 |
+ *.exe:*) |
10122 |
+ destfile=$destfile.exe |
10123 |
+ ;; |
10124 |
+ *:*.exe) |
10125 |
+ destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` |
10126 |
+ ;; |
10127 |
+ esac |
10128 |
+ ;; |
10129 |
+ esac |
10130 |
+ $show "$install_prog$stripme $file $destfile" |
10131 |
+ $run eval "$install_prog\$stripme \$file \$destfile" || exit $? |
10132 |
+ test -n "$outputname" && ${rm}r "$tmpdir" |
10133 |
+ ;; |
10134 |
+ esac |
10135 |
+ done |
10136 |
+ |
10137 |
+ for file in $staticlibs; do |
10138 |
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
10139 |
+ |
10140 |
+ # Set up the ranlib parameters. |
10141 |
+ oldlib="$destdir/$name" |
10142 |
+ |
10143 |
+ $show "$install_prog $file $oldlib" |
10144 |
+ $run eval "$install_prog \$file \$oldlib" || exit $? |
10145 |
+ |
10146 |
+ if test -n "$stripme" && test -n "$old_striplib"; then |
10147 |
+ $show "$old_striplib $oldlib" |
10148 |
+ $run eval "$old_striplib $oldlib" || exit $? |
10149 |
+ fi |
10150 |
+ |
10151 |
+ # Do each command in the postinstall commands. |
10152 |
+ cmds=$old_postinstall_cmds |
10153 |
+ save_ifs="$IFS"; IFS='~' |
10154 |
+ for cmd in $cmds; do |
10155 |
+ IFS="$save_ifs" |
10156 |
+ eval cmd=\"$cmd\" |
10157 |
+ $show "$cmd" |
10158 |
+ $run eval "$cmd" || exit $? |
10159 |
+ done |
10160 |
+ IFS="$save_ifs" |
10161 |
+ done |
10162 |
+ |
10163 |
+ if test -n "$future_libdirs"; then |
10164 |
+ $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 |
10165 |
+ fi |
10166 |
+ |
10167 |
+ if test -n "$current_libdirs"; then |
10168 |
+ # Maybe just do a dry run. |
10169 |
+ test -n "$run" && current_libdirs=" -n$current_libdirs" |
10170 |
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' |
10171 |
+ else |
10172 |
+ exit $EXIT_SUCCESS |
10173 |
+ fi |
10174 |
+ ;; |
10175 |
+ |
10176 |
+ # libtool finish mode |
10177 |
+ finish) |
10178 |
+ modename="$modename: finish" |
10179 |
+ libdirs="$nonopt" |
10180 |
+ admincmds= |
10181 |
+ |
10182 |
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then |
10183 |
+ for dir |
10184 |
+ do |
10185 |
+ libdirs="$libdirs $dir" |
10186 |
+ done |
10187 |
+ |
10188 |
+ for libdir in $libdirs; do |
10189 |
+ if test -n "$finish_cmds"; then |
10190 |
+ # Do each command in the finish commands. |
10191 |
+ cmds=$finish_cmds |
10192 |
+ save_ifs="$IFS"; IFS='~' |
10193 |
+ for cmd in $cmds; do |
10194 |
+ IFS="$save_ifs" |
10195 |
+ eval cmd=\"$cmd\" |
10196 |
+ $show "$cmd" |
10197 |
+ $run eval "$cmd" || admincmds="$admincmds |
10198 |
+ $cmd" |
10199 |
+ done |
10200 |
+ IFS="$save_ifs" |
10201 |
+ fi |
10202 |
+ if test -n "$finish_eval"; then |
10203 |
+ # Do the single finish_eval. |
10204 |
+ eval cmds=\"$finish_eval\" |
10205 |
+ $run eval "$cmds" || admincmds="$admincmds |
10206 |
+ $cmds" |
10207 |
+ fi |
10208 |
+ done |
10209 |
+ fi |
10210 |
+ |
10211 |
+ # Exit here if they wanted silent mode. |
10212 |
+ test "$show" = : && exit $EXIT_SUCCESS |
10213 |
+ |
10214 |
+ $echo "X----------------------------------------------------------------------" | $Xsed |
10215 |
+ $echo "Libraries have been installed in:" |
10216 |
+ for libdir in $libdirs; do |
10217 |
+ $echo " $libdir" |
10218 |
+ done |
10219 |
+ $echo |
10220 |
+ $echo "If you ever happen to want to link against installed libraries" |
10221 |
+ $echo "in a given directory, LIBDIR, you must either use libtool, and" |
10222 |
+ $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" |
10223 |
+ $echo "flag during linking and do at least one of the following:" |
10224 |
+ if test -n "$shlibpath_var"; then |
10225 |
+ $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" |
10226 |
+ $echo " during execution" |
10227 |
+ fi |
10228 |
+ if test -n "$runpath_var"; then |
10229 |
+ $echo " - add LIBDIR to the \`$runpath_var' environment variable" |
10230 |
+ $echo " during linking" |
10231 |
+ fi |
10232 |
+ if test -n "$hardcode_libdir_flag_spec"; then |
10233 |
+ libdir=LIBDIR |
10234 |
+ eval flag=\"$hardcode_libdir_flag_spec\" |
10235 |
+ |
10236 |
+ $echo " - use the \`$flag' linker flag" |
10237 |
+ fi |
10238 |
+ if test -n "$admincmds"; then |
10239 |
+ $echo " - have your system administrator run these commands:$admincmds" |
10240 |
+ fi |
10241 |
+ if test -f /etc/ld.so.conf; then |
10242 |
+ $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" |
10243 |
+ fi |
10244 |
+ $echo |
10245 |
+ $echo "See any operating system documentation about shared libraries for" |
10246 |
+ $echo "more information, such as the ld(1) and ld.so(8) manual pages." |
10247 |
+ $echo "X----------------------------------------------------------------------" | $Xsed |
10248 |
+ exit $EXIT_SUCCESS |
10249 |
+ ;; |
10250 |
+ |
10251 |
+ # libtool execute mode |
10252 |
+ execute) |
10253 |
+ modename="$modename: execute" |
10254 |
+ |
10255 |
+ # The first argument is the command name. |
10256 |
+ cmd="$nonopt" |
10257 |
+ if test -z "$cmd"; then |
10258 |
+ $echo "$modename: you must specify a COMMAND" 1>&2 |
10259 |
+ $echo "$help" |
10260 |
+ exit $EXIT_FAILURE |
10261 |
+ fi |
10262 |
+ |
10263 |
+ # Handle -dlopen flags immediately. |
10264 |
+ for file in $execute_dlfiles; do |
10265 |
+ if test ! -f "$file"; then |
10266 |
+ $echo "$modename: \`$file' is not a file" 1>&2 |
10267 |
+ $echo "$help" 1>&2 |
10268 |
+ exit $EXIT_FAILURE |
10269 |
+ fi |
10270 |
+ |
10271 |
+ dir= |
10272 |
+ case $file in |
10273 |
+ *.la) |
10274 |
+ # Check to see that this really is a libtool archive. |
10275 |
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
10276 |
+ else |
10277 |
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
10278 |
+ $echo "$help" 1>&2 |
10279 |
+ exit $EXIT_FAILURE |
10280 |
+ fi |
10281 |
+ |
10282 |
+ # Read the libtool library. |
10283 |
+ dlname= |
10284 |
+ library_names= |
10285 |
+ |
10286 |
+ # If there is no directory component, then add one. |
10287 |
+ case $file in |
10288 |
+ */* | *\\*) . $file ;; |
10289 |
+ *) . ./$file ;; |
10290 |
+ esac |
10291 |
+ |
10292 |
+ # Skip this library if it cannot be dlopened. |
10293 |
+ if test -z "$dlname"; then |
10294 |
+ # Warn if it was a shared library. |
10295 |
+ test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" |
10296 |
+ continue |
10297 |
+ fi |
10298 |
+ |
10299 |
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` |
10300 |
+ test "X$dir" = "X$file" && dir=. |
10301 |
+ |
10302 |
+ if test -f "$dir/$objdir/$dlname"; then |
10303 |
+ dir="$dir/$objdir" |
10304 |
+ else |
10305 |
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 |
10306 |
+ exit $EXIT_FAILURE |
10307 |
+ fi |
10308 |
+ ;; |
10309 |
+ |
10310 |
+ *.lo) |
10311 |
+ # Just add the directory containing the .lo file. |
10312 |
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` |
10313 |
+ test "X$dir" = "X$file" && dir=. |
10314 |
+ ;; |
10315 |
+ |
10316 |
+ *) |
10317 |
+ $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 |
10318 |
+ continue |
10319 |
+ ;; |
10320 |
+ esac |
10321 |
+ |
10322 |
+ # Get the absolute pathname. |
10323 |
+ absdir=`cd "$dir" && pwd` |
10324 |
+ test -n "$absdir" && dir="$absdir" |
10325 |
+ |
10326 |
+ # Now add the directory to shlibpath_var. |
10327 |
+ if eval "test -z \"\$$shlibpath_var\""; then |
10328 |
+ eval "$shlibpath_var=\"\$dir\"" |
10329 |
+ else |
10330 |
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" |
10331 |
+ fi |
10332 |
+ done |
10333 |
+ |
10334 |
+ # This variable tells wrapper scripts just to set shlibpath_var |
10335 |
+ # rather than running their programs. |
10336 |
+ libtool_execute_magic="$magic" |
10337 |
+ |
10338 |
+ # Check if any of the arguments is a wrapper script. |
10339 |
+ args= |
10340 |
+ for file |
10341 |
+ do |
10342 |
+ case $file in |
10343 |
+ -*) ;; |
10344 |
+ *) |
10345 |
+ # Do a test to see if this is really a libtool program. |
10346 |
+ if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
10347 |
+ # If there is no directory component, then add one. |
10348 |
+ case $file in |
10349 |
+ */* | *\\*) . $file ;; |
10350 |
+ *) . ./$file ;; |
10351 |
+ esac |
10352 |
+ |
10353 |
+ # Transform arg to wrapped name. |
10354 |
+ file="$progdir/$program" |
10355 |
+ fi |
10356 |
+ ;; |
10357 |
+ esac |
10358 |
+ # Quote arguments (to preserve shell metacharacters). |
10359 |
+ file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` |
10360 |
+ args="$args \"$file\"" |
10361 |
+ done |
10362 |
+ |
10363 |
+ if test -z "$run"; then |
10364 |
+ if test -n "$shlibpath_var"; then |
10365 |
+ # Export the shlibpath_var. |
10366 |
+ eval "export $shlibpath_var" |
10367 |
+ fi |
10368 |
+ |
10369 |
+ # Restore saved environment variables |
10370 |
+ if test "${save_LC_ALL+set}" = set; then |
10371 |
+ LC_ALL="$save_LC_ALL"; export LC_ALL |
10372 |
+ fi |
10373 |
+ if test "${save_LANG+set}" = set; then |
10374 |
+ LANG="$save_LANG"; export LANG |
10375 |
+ fi |
10376 |
+ |
10377 |
+ # Now prepare to actually exec the command. |
10378 |
+ exec_cmd="\$cmd$args" |
10379 |
+ else |
10380 |
+ # Display what would be done. |
10381 |
+ if test -n "$shlibpath_var"; then |
10382 |
+ eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" |
10383 |
+ $echo "export $shlibpath_var" |
10384 |
+ fi |
10385 |
+ $echo "$cmd$args" |
10386 |
+ exit $EXIT_SUCCESS |
10387 |
+ fi |
10388 |
+ ;; |
10389 |
+ |
10390 |
+ # libtool clean and uninstall mode |
10391 |
+ clean | uninstall) |
10392 |
+ modename="$modename: $mode" |
10393 |
+ rm="$nonopt" |
10394 |
+ files= |
10395 |
+ rmforce= |
10396 |
+ exit_status=0 |
10397 |
+ |
10398 |
+ # This variable tells wrapper scripts just to set variables rather |
10399 |
+ # than running their programs. |
10400 |
+ libtool_install_magic="$magic" |
10401 |
+ |
10402 |
+ for arg |
10403 |
+ do |
10404 |
+ case $arg in |
10405 |
+ -f) rm="$rm $arg"; rmforce=yes ;; |
10406 |
+ -*) rm="$rm $arg" ;; |
10407 |
+ *) files="$files $arg" ;; |
10408 |
+ esac |
10409 |
+ done |
10410 |
+ |
10411 |
+ if test -z "$rm"; then |
10412 |
+ $echo "$modename: you must specify an RM program" 1>&2 |
10413 |
+ $echo "$help" 1>&2 |
10414 |
+ exit $EXIT_FAILURE |
10415 |
+ fi |
10416 |
+ |
10417 |
+ rmdirs= |
10418 |
+ |
10419 |
+ origobjdir="$objdir" |
10420 |
+ for file in $files; do |
10421 |
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` |
10422 |
+ if test "X$dir" = "X$file"; then |
10423 |
+ dir=. |
10424 |
+ objdir="$origobjdir" |
10425 |
+ else |
10426 |
+ objdir="$dir/$origobjdir" |
10427 |
+ fi |
10428 |
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
10429 |
+ test "$mode" = uninstall && objdir="$dir" |
10430 |
+ |
10431 |
+ # Remember objdir for removal later, being careful to avoid duplicates |
10432 |
+ if test "$mode" = clean; then |
10433 |
+ case " $rmdirs " in |
10434 |
+ *" $objdir "*) ;; |
10435 |
+ *) rmdirs="$rmdirs $objdir" ;; |
10436 |
+ esac |
10437 |
+ fi |
10438 |
+ |
10439 |
+ # Don't error if the file doesn't exist and rm -f was used. |
10440 |
+ if (test -L "$file") >/dev/null 2>&1 \ |
10441 |
+ || (test -h "$file") >/dev/null 2>&1 \ |
10442 |
+ || test -f "$file"; then |
10443 |
+ : |
10444 |
+ elif test -d "$file"; then |
10445 |
+ exit_status=1 |
10446 |
+ continue |
10447 |
+ elif test "$rmforce" = yes; then |
10448 |
+ continue |
10449 |
+ fi |
10450 |
+ |
10451 |
+ rmfiles="$file" |
10452 |
+ |
10453 |
+ case $name in |
10454 |
+ *.la) |
10455 |
+ # Possibly a libtool archive, so verify it. |
10456 |
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
10457 |
+ . $dir/$name |
10458 |
+ |
10459 |
+ # Delete the libtool libraries and symlinks. |
10460 |
+ for n in $library_names; do |
10461 |
+ rmfiles="$rmfiles $objdir/$n" |
10462 |
+ done |
10463 |
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" |
10464 |
+ |
10465 |
+ case "$mode" in |
10466 |
+ clean) |
10467 |
+ case " $library_names " in |
10468 |
+ # " " in the beginning catches empty $dlname |
10469 |
+ *" $dlname "*) ;; |
10470 |
+ *) rmfiles="$rmfiles $objdir/$dlname" ;; |
10471 |
+ esac |
10472 |
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" |
10473 |
+ ;; |
10474 |
+ uninstall) |
10475 |
+ if test -n "$library_names"; then |
10476 |
+ # Do each command in the postuninstall commands. |
10477 |
+ cmds=$postuninstall_cmds |
10478 |
+ save_ifs="$IFS"; IFS='~' |
10479 |
+ for cmd in $cmds; do |
10480 |
+ IFS="$save_ifs" |
10481 |
+ eval cmd=\"$cmd\" |
10482 |
+ $show "$cmd" |
10483 |
+ $run eval "$cmd" |
10484 |
+ if test "$?" -ne 0 && test "$rmforce" != yes; then |
10485 |
+ exit_status=1 |
10486 |
+ fi |
10487 |
+ done |
10488 |
+ IFS="$save_ifs" |
10489 |
+ fi |
10490 |
+ |
10491 |
+ if test -n "$old_library"; then |
10492 |
+ # Do each command in the old_postuninstall commands. |
10493 |
+ cmds=$old_postuninstall_cmds |
10494 |
+ save_ifs="$IFS"; IFS='~' |
10495 |
+ for cmd in $cmds; do |
10496 |
+ IFS="$save_ifs" |
10497 |
+ eval cmd=\"$cmd\" |
10498 |
+ $show "$cmd" |
10499 |
+ $run eval "$cmd" |
10500 |
+ if test "$?" -ne 0 && test "$rmforce" != yes; then |
10501 |
+ exit_status=1 |
10502 |
+ fi |
10503 |
+ done |
10504 |
+ IFS="$save_ifs" |
10505 |
+ fi |
10506 |
+ # FIXME: should reinstall the best remaining shared library. |
10507 |
+ ;; |
10508 |
+ esac |
10509 |
+ fi |
10510 |
+ ;; |
10511 |
+ |
10512 |
+ *.lo) |
10513 |
+ # Possibly a libtool object, so verify it. |
10514 |
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
10515 |
+ |
10516 |
+ # Read the .lo file |
10517 |
+ . $dir/$name |
10518 |
+ |
10519 |
+ # Add PIC object to the list of files to remove. |
10520 |
+ if test -n "$pic_object" \ |
10521 |
+ && test "$pic_object" != none; then |
10522 |
+ rmfiles="$rmfiles $dir/$pic_object" |
10523 |
+ fi |
10524 |
+ |
10525 |
+ # Add non-PIC object to the list of files to remove. |
10526 |
+ if test -n "$non_pic_object" \ |
10527 |
+ && test "$non_pic_object" != none; then |
10528 |
+ rmfiles="$rmfiles $dir/$non_pic_object" |
10529 |
+ fi |
10530 |
+ fi |
10531 |
+ ;; |
10532 |
+ |
10533 |
+ *) |
10534 |
+ if test "$mode" = clean ; then |
10535 |
+ noexename=$name |
10536 |
+ case $file in |
10537 |
+ *.exe) |
10538 |
+ file=`$echo $file|${SED} 's,.exe$,,'` |
10539 |
+ noexename=`$echo $name|${SED} 's,.exe$,,'` |
10540 |
+ # $file with .exe has already been added to rmfiles, |
10541 |
+ # add $file without .exe |
10542 |
+ rmfiles="$rmfiles $file" |
10543 |
+ ;; |
10544 |
+ esac |
10545 |
+ # Do a test to see if this is a libtool program. |
10546 |
+ if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
10547 |
+ relink_command= |
10548 |
+ . $dir/$noexename |
10549 |
+ |
10550 |
+ # note $name still contains .exe if it was in $file originally |
10551 |
+ # as does the version of $file that was added into $rmfiles |
10552 |
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" |
10553 |
+ if test "$fast_install" = yes && test -n "$relink_command"; then |
10554 |
+ rmfiles="$rmfiles $objdir/lt-$name" |
10555 |
+ fi |
10556 |
+ if test "X$noexename" != "X$name" ; then |
10557 |
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c" |
10558 |
+ fi |
10559 |
+ fi |
10560 |
+ fi |
10561 |
+ ;; |
10562 |
+ esac |
10563 |
+ $show "$rm $rmfiles" |
10564 |
+ $run $rm $rmfiles || exit_status=1 |
10565 |
+ done |
10566 |
+ objdir="$origobjdir" |
10567 |
+ |
10568 |
+ # Try to remove the ${objdir}s in the directories where we deleted files |
10569 |
+ for dir in $rmdirs; do |
10570 |
+ if test -d "$dir"; then |
10571 |
+ $show "rmdir $dir" |
10572 |
+ $run rmdir $dir >/dev/null 2>&1 |
10573 |
+ fi |
10574 |
+ done |
10575 |
+ |
10576 |
+ exit $exit_status |
10577 |
+ ;; |
10578 |
+ |
10579 |
+ "") |
10580 |
+ $echo "$modename: you must specify a MODE" 1>&2 |
10581 |
+ $echo "$generic_help" 1>&2 |
10582 |
+ exit $EXIT_FAILURE |
10583 |
+ ;; |
10584 |
+ esac |
10585 |
+ |
10586 |
+ if test -z "$exec_cmd"; then |
10587 |
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2 |
10588 |
+ $echo "$generic_help" 1>&2 |
10589 |
+ exit $EXIT_FAILURE |
10590 |
+ fi |
10591 |
+fi # test -z "$show_help" |
10592 |
+ |
10593 |
+if test -n "$exec_cmd"; then |
10594 |
+ eval exec $exec_cmd |
10595 |
+ exit $EXIT_FAILURE |
10596 |
+fi |
10597 |
+ |
10598 |
+# We need to display help for each of the modes. |
10599 |
+case $mode in |
10600 |
+"") $echo \ |
10601 |
+"Usage: $modename [OPTION]... [MODE-ARG]... |
10602 |
+ |
10603 |
+Provide generalized library-building support services. |
10604 |
+ |
10605 |
+ --config show all configuration variables |
10606 |
+ --debug enable verbose shell tracing |
10607 |
+-n, --dry-run display commands without modifying any files |
10608 |
+ --features display basic configuration information and exit |
10609 |
+ --finish same as \`--mode=finish' |
10610 |
+ --help display this help message and exit |
10611 |
+ --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] |
10612 |
+ --quiet same as \`--silent' |
10613 |
+ --silent don't print informational messages |
10614 |
+ --tag=TAG use configuration variables from tag TAG |
10615 |
+ --version print version information |
10616 |
+ |
10617 |
+MODE must be one of the following: |
10618 |
+ |
10619 |
+ clean remove files from the build directory |
10620 |
+ compile compile a source file into a libtool object |
10621 |
+ execute automatically set library path, then run a program |
10622 |
+ finish complete the installation of libtool libraries |
10623 |
+ install install libraries or executables |
10624 |
+ link create a library or an executable |
10625 |
+ uninstall remove libraries from an installed directory |
10626 |
+ |
10627 |
+MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for |
10628 |
+a more detailed description of MODE. |
10629 |
+ |
10630 |
+Report bugs to <bug-libtool@gnu.org>." |
10631 |
+ exit $EXIT_SUCCESS |
10632 |
+ ;; |
10633 |
+ |
10634 |
+clean) |
10635 |
+ $echo \ |
10636 |
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... |
10637 |
+ |
10638 |
+Remove files from the build directory. |
10639 |
+ |
10640 |
+RM is the name of the program to use to delete files associated with each FILE |
10641 |
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed |
10642 |
+to RM. |
10643 |
+ |
10644 |
+If FILE is a libtool library, object or program, all the files associated |
10645 |
+with it are deleted. Otherwise, only FILE itself is deleted using RM." |
10646 |
+ ;; |
10647 |
+ |
10648 |
+compile) |
10649 |
+ $echo \ |
10650 |
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE |
10651 |
+ |
10652 |
+Compile a source file into a libtool library object. |
10653 |
+ |
10654 |
+This mode accepts the following additional options: |
10655 |
+ |
10656 |
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE |
10657 |
+ -prefer-pic try to building PIC objects only |
10658 |
+ -prefer-non-pic try to building non-PIC objects only |
10659 |
+ -static always build a \`.o' file suitable for static linking |
10660 |
+ |
10661 |
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file |
10662 |
+from the given SOURCEFILE. |
10663 |
+ |
10664 |
+The output file name is determined by removing the directory component from |
10665 |
+SOURCEFILE, then substituting the C source code suffix \`.c' with the |
10666 |
+library object suffix, \`.lo'." |
10667 |
+ ;; |
10668 |
+ |
10669 |
+execute) |
10670 |
+ $echo \ |
10671 |
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... |
10672 |
+ |
10673 |
+Automatically set library path, then run a program. |
10674 |
+ |
10675 |
+This mode accepts the following additional options: |
10676 |
+ |
10677 |
+ -dlopen FILE add the directory containing FILE to the library path |
10678 |
+ |
10679 |
+This mode sets the library path environment variable according to \`-dlopen' |
10680 |
+flags. |
10681 |
+ |
10682 |
+If any of the ARGS are libtool executable wrappers, then they are translated |
10683 |
+into their corresponding uninstalled binary, and any of their required library |
10684 |
+directories are added to the library path. |
10685 |
+ |
10686 |
+Then, COMMAND is executed, with ARGS as arguments." |
10687 |
+ ;; |
10688 |
+ |
10689 |
+finish) |
10690 |
+ $echo \ |
10691 |
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... |
10692 |
+ |
10693 |
+Complete the installation of libtool libraries. |
10694 |
+ |
10695 |
+Each LIBDIR is a directory that contains libtool libraries. |
10696 |
+ |
10697 |
+The commands that this mode executes may require superuser privileges. Use |
10698 |
+the \`--dry-run' option if you just want to see what would be executed." |
10699 |
+ ;; |
10700 |
+ |
10701 |
+install) |
10702 |
+ $echo \ |
10703 |
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... |
10704 |
+ |
10705 |
+Install executables or libraries. |
10706 |
+ |
10707 |
+INSTALL-COMMAND is the installation command. The first component should be |
10708 |
+either the \`install' or \`cp' program. |
10709 |
+ |
10710 |
+The rest of the components are interpreted as arguments to that command (only |
10711 |
+BSD-compatible install options are recognized)." |
10712 |
+ ;; |
10713 |
+ |
10714 |
+link) |
10715 |
+ $echo \ |
10716 |
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... |
10717 |
+ |
10718 |
+Link object files or libraries together to form another library, or to |
10719 |
+create an executable program. |
10720 |
+ |
10721 |
+LINK-COMMAND is a command using the C compiler that you would use to create |
10722 |
+a program from several object files. |
10723 |
+ |
10724 |
+The following components of LINK-COMMAND are treated specially: |
10725 |
+ |
10726 |
+ -all-static do not do any dynamic linking at all |
10727 |
+ -avoid-version do not add a version suffix if possible |
10728 |
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime |
10729 |
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols |
10730 |
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) |
10731 |
+ -export-symbols SYMFILE |
10732 |
+ try to export only the symbols listed in SYMFILE |
10733 |
+ -export-symbols-regex REGEX |
10734 |
+ try to export only the symbols matching REGEX |
10735 |
+ -LLIBDIR search LIBDIR for required installed libraries |
10736 |
+ -lNAME OUTPUT-FILE requires the installed library libNAME |
10737 |
+ -module build a library that can dlopened |
10738 |
+ -no-fast-install disable the fast-install mode |
10739 |
+ -no-install link a not-installable executable |
10740 |
+ -no-undefined declare that a library does not refer to external symbols |
10741 |
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects |
10742 |
+ -objectlist FILE Use a list of object files found in FILE to specify objects |
10743 |
+ -precious-files-regex REGEX |
10744 |
+ don't remove output files matching REGEX |
10745 |
+ -release RELEASE specify package release information |
10746 |
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR |
10747 |
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries |
10748 |
+ -static do not do any dynamic linking of libtool libraries |
10749 |
+ -version-info CURRENT[:REVISION[:AGE]] |
10750 |
+ specify library version info [each variable defaults to 0] |
10751 |
+ |
10752 |
+All other options (arguments beginning with \`-') are ignored. |
10753 |
+ |
10754 |
+Every other argument is treated as a filename. Files ending in \`.la' are |
10755 |
+treated as uninstalled libtool libraries, other files are standard or library |
10756 |
+object files. |
10757 |
+ |
10758 |
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created, |
10759 |
+only library objects (\`.lo' files) may be specified, and \`-rpath' is |
10760 |
+required, except when creating a convenience library. |
10761 |
+ |
10762 |
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created |
10763 |
+using \`ar' and \`ranlib', or on Windows using \`lib'. |
10764 |
+ |
10765 |
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file |
10766 |
+is created, otherwise an executable program is created." |
10767 |
+ ;; |
10768 |
+ |
10769 |
+uninstall) |
10770 |
+ $echo \ |
10771 |
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... |
10772 |
+ |
10773 |
+Remove libraries from an installation directory. |
10774 |
+ |
10775 |
+RM is the name of the program to use to delete files associated with each FILE |
10776 |
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed |
10777 |
+to RM. |
10778 |
+ |
10779 |
+If FILE is a libtool library, all the files associated with it are deleted. |
10780 |
+Otherwise, only FILE itself is deleted using RM." |
10781 |
+ ;; |
10782 |
+ |
10783 |
+*) |
10784 |
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2 |
10785 |
+ $echo "$help" 1>&2 |
10786 |
+ exit $EXIT_FAILURE |
10787 |
+ ;; |
10788 |
+esac |
10789 |
+ |
10790 |
+$echo |
10791 |
+$echo "Try \`$modename --help' for more information about other modes." |
10792 |
+ |
10793 |
+exit $? |
10794 |
+ |
10795 |
+# The TAGs below are defined such that we never get into a situation |
10796 |
+# in which we disable both kinds of libraries. Given conflicting |
10797 |
+# choices, we go for a static library, that is the most portable, |
10798 |
+# since we can't tell whether shared libraries were disabled because |
10799 |
+# the user asked for that or because the platform doesn't support |
10800 |
+# them. This is particularly important on AIX, because we don't |
10801 |
+# support having both static and shared libraries enabled at the same |
10802 |
+# time on that platform, so we default to a shared-only configuration. |
10803 |
+# If a disable-shared tag is given, we'll fallback to a static-only |
10804 |
+# configuration. But we'll never go from static-only to shared-only. |
10805 |
+ |
10806 |
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared |
10807 |
+disable_libs=shared |
10808 |
+# ### END LIBTOOL TAG CONFIG: disable-shared |
10809 |
+ |
10810 |
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static |
10811 |
+disable_libs=static |
10812 |
+# ### END LIBTOOL TAG CONFIG: disable-static |
10813 |
+ |
10814 |
+# Local Variables: |
10815 |
+# mode:shell-script |
10816 |
+# sh-indentation:2 |
10817 |
+# End: |
10818 |
diff -urN /var/empty/missing config/missing |
10819 |
--- /var/empty/missing Thu Jan 1 01:00:00 1970 |
10820 |
+++ config/missing Wed Nov 15 05:12:11 2006 |
10821 |
@@ -0,0 +1,360 @@ |
10822 |
+#! /bin/sh |
10823 |
+# Common stub for a few missing GNU programs while installing. |
10824 |
+ |
10825 |
+scriptversion=2005-06-08.21 |
10826 |
+ |
10827 |
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 |
10828 |
+# Free Software Foundation, Inc. |
10829 |
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. |
10830 |
+ |
10831 |
+# This program is free software; you can redistribute it and/or modify |
10832 |
+# it under the terms of the GNU General Public License as published by |
10833 |
+# the Free Software Foundation; either version 2, or (at your option) |
10834 |
+# any later version. |
10835 |
+ |
10836 |
+# This program is distributed in the hope that it will be useful, |
10837 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
10838 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10839 |
+# GNU General Public License for more details. |
10840 |
+ |
10841 |
+# You should have received a copy of the GNU General Public License |
10842 |
+# along with this program; if not, write to the Free Software |
10843 |
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
10844 |
+# 02110-1301, USA. |
10845 |
+ |
10846 |
+# As a special exception to the GNU General Public License, if you |
10847 |
+# distribute this file as part of a program that contains a |
10848 |
+# configuration script generated by Autoconf, you may include it under |
10849 |
+# the same distribution terms that you use for the rest of that program. |
10850 |
+ |
10851 |
+if test $# -eq 0; then |
10852 |
+ echo 1>&2 "Try \`$0 --help' for more information" |
10853 |
+ exit 1 |
10854 |
+fi |
10855 |
+ |
10856 |
+run=: |
10857 |
+ |
10858 |
+# In the cases where this matters, `missing' is being run in the |
10859 |
+# srcdir already. |
10860 |
+if test -f configure.ac; then |
10861 |
+ configure_ac=configure.ac |
10862 |
+else |
10863 |
+ configure_ac=configure.in |
10864 |
+fi |
10865 |
+ |
10866 |
+msg="missing on your system" |
10867 |
+ |
10868 |
+case "$1" in |
10869 |
+--run) |
10870 |
+ # Try to run requested program, and just exit if it succeeds. |
10871 |
+ run= |
10872 |
+ shift |
10873 |
+ "$@" && exit 0 |
10874 |
+ # Exit code 63 means version mismatch. This often happens |
10875 |
+ # when the user try to use an ancient version of a tool on |
10876 |
+ # a file that requires a minimum version. In this case we |
10877 |
+ # we should proceed has if the program had been absent, or |
10878 |
+ # if --run hadn't been passed. |
10879 |
+ if test $? = 63; then |
10880 |
+ run=: |
10881 |
+ msg="probably too old" |
10882 |
+ fi |
10883 |
+ ;; |
10884 |
+ |
10885 |
+ -h|--h|--he|--hel|--help) |
10886 |
+ echo "\ |
10887 |
+$0 [OPTION]... PROGRAM [ARGUMENT]... |
10888 |
+ |
10889 |
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an |
10890 |
+error status if there is no known handling for PROGRAM. |
10891 |
+ |
10892 |
+Options: |
10893 |
+ -h, --help display this help and exit |
10894 |
+ -v, --version output version information and exit |
10895 |
+ --run try to run the given command, and emulate it if it fails |
10896 |
+ |
10897 |
+Supported PROGRAM values: |
10898 |
+ aclocal touch file \`aclocal.m4' |
10899 |
+ autoconf touch file \`configure' |
10900 |
+ autoheader touch file \`config.h.in' |
10901 |
+ automake touch all \`Makefile.in' files |
10902 |
+ bison create \`y.tab.[ch]', if possible, from existing .[ch] |
10903 |
+ flex create \`lex.yy.c', if possible, from existing .c |
10904 |
+ help2man touch the output file |
10905 |
+ lex create \`lex.yy.c', if possible, from existing .c |
10906 |
+ makeinfo touch the output file |
10907 |
+ tar try tar, gnutar, gtar, then tar without non-portable flags |
10908 |
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch] |
10909 |
+ |
10910 |
+Send bug reports to <bug-automake@gnu.org>." |
10911 |
+ exit $? |
10912 |
+ ;; |
10913 |
+ |
10914 |
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version) |
10915 |
+ echo "missing $scriptversion (GNU Automake)" |
10916 |
+ exit $? |
10917 |
+ ;; |
10918 |
+ |
10919 |
+ -*) |
10920 |
+ echo 1>&2 "$0: Unknown \`$1' option" |
10921 |
+ echo 1>&2 "Try \`$0 --help' for more information" |
10922 |
+ exit 1 |
10923 |
+ ;; |
10924 |
+ |
10925 |
+esac |
10926 |
+ |
10927 |
+# Now exit if we have it, but it failed. Also exit now if we |
10928 |
+# don't have it and --version was passed (most likely to detect |
10929 |
+# the program). |
10930 |
+case "$1" in |
10931 |
+ lex|yacc) |
10932 |
+ # Not GNU programs, they don't have --version. |
10933 |
+ ;; |
10934 |
+ |
10935 |
+ tar) |
10936 |
+ if test -n "$run"; then |
10937 |
+ echo 1>&2 "ERROR: \`tar' requires --run" |
10938 |
+ exit 1 |
10939 |
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then |
10940 |
+ exit 1 |
10941 |
+ fi |
10942 |
+ ;; |
10943 |
+ |
10944 |
+ *) |
10945 |
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then |
10946 |
+ # We have it, but it failed. |
10947 |
+ exit 1 |
10948 |
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then |
10949 |
+ # Could not run --version or --help. This is probably someone |
10950 |
+ # running `$TOOL --version' or `$TOOL --help' to check whether |
10951 |
+ # $TOOL exists and not knowing $TOOL uses missing. |
10952 |
+ exit 1 |
10953 |
+ fi |
10954 |
+ ;; |
10955 |
+esac |
10956 |
+ |
10957 |
+# If it does not exist, or fails to run (possibly an outdated version), |
10958 |
+# try to emulate it. |
10959 |
+case "$1" in |
10960 |
+ aclocal*) |
10961 |
+ echo 1>&2 "\ |
10962 |
+WARNING: \`$1' is $msg. You should only need it if |
10963 |
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want |
10964 |
+ to install the \`Automake' and \`Perl' packages. Grab them from |
10965 |
+ any GNU archive site." |
10966 |
+ touch aclocal.m4 |
10967 |
+ ;; |
10968 |
+ |
10969 |
+ autoconf) |
10970 |
+ echo 1>&2 "\ |
10971 |
+WARNING: \`$1' is $msg. You should only need it if |
10972 |
+ you modified \`${configure_ac}'. You might want to install the |
10973 |
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU |
10974 |
+ archive site." |
10975 |
+ touch configure |
10976 |
+ ;; |
10977 |
+ |
10978 |
+ autoheader) |
10979 |
+ echo 1>&2 "\ |
10980 |
+WARNING: \`$1' is $msg. You should only need it if |
10981 |
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want |
10982 |
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them |
10983 |
+ from any GNU archive site." |
10984 |
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` |
10985 |
+ test -z "$files" && files="config.h" |
10986 |
+ touch_files= |
10987 |
+ for f in $files; do |
10988 |
+ case "$f" in |
10989 |
+ *:*) touch_files="$touch_files "`echo "$f" | |
10990 |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;; |
10991 |
+ *) touch_files="$touch_files $f.in";; |
10992 |
+ esac |
10993 |
+ done |
10994 |
+ touch $touch_files |
10995 |
+ ;; |
10996 |
+ |
10997 |
+ automake*) |
10998 |
+ echo 1>&2 "\ |
10999 |
+WARNING: \`$1' is $msg. You should only need it if |
11000 |
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. |
11001 |
+ You might want to install the \`Automake' and \`Perl' packages. |
11002 |
+ Grab them from any GNU archive site." |
11003 |
+ find . -type f -name Makefile.am -print | |
11004 |
+ sed 's/\.am$/.in/' | |
11005 |
+ while read f; do touch "$f"; done |
11006 |
+ ;; |
11007 |
+ |
11008 |
+ autom4te) |
11009 |
+ echo 1>&2 "\ |
11010 |
+WARNING: \`$1' is needed, but is $msg. |
11011 |
+ You might have modified some files without having the |
11012 |
+ proper tools for further handling them. |
11013 |
+ You can get \`$1' as part of \`Autoconf' from any GNU |
11014 |
+ archive site." |
11015 |
+ |
11016 |
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` |
11017 |
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` |
11018 |
+ if test -f "$file"; then |
11019 |
+ touch $file |
11020 |
+ else |
11021 |
+ test -z "$file" || exec >$file |
11022 |
+ echo "#! /bin/sh" |
11023 |
+ echo "# Created by GNU Automake missing as a replacement of" |
11024 |
+ echo "# $ $@" |
11025 |
+ echo "exit 0" |
11026 |
+ chmod +x $file |
11027 |
+ exit 1 |
11028 |
+ fi |
11029 |
+ ;; |
11030 |
+ |
11031 |
+ bison|yacc) |
11032 |
+ echo 1>&2 "\ |
11033 |
+WARNING: \`$1' $msg. You should only need it if |
11034 |
+ you modified a \`.y' file. You may need the \`Bison' package |
11035 |
+ in order for those modifications to take effect. You can get |
11036 |
+ \`Bison' from any GNU archive site." |
11037 |
+ rm -f y.tab.c y.tab.h |
11038 |
+ if [ $# -ne 1 ]; then |
11039 |
+ eval LASTARG="\${$#}" |
11040 |
+ case "$LASTARG" in |
11041 |
+ *.y) |
11042 |
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` |
11043 |
+ if [ -f "$SRCFILE" ]; then |
11044 |
+ cp "$SRCFILE" y.tab.c |
11045 |
+ fi |
11046 |
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` |
11047 |
+ if [ -f "$SRCFILE" ]; then |
11048 |
+ cp "$SRCFILE" y.tab.h |
11049 |
+ fi |
11050 |
+ ;; |
11051 |
+ esac |
11052 |
+ fi |
11053 |
+ if [ ! -f y.tab.h ]; then |
11054 |
+ echo >y.tab.h |
11055 |
+ fi |
11056 |
+ if [ ! -f y.tab.c ]; then |
11057 |
+ echo 'main() { return 0; }' >y.tab.c |
11058 |
+ fi |
11059 |
+ ;; |
11060 |
+ |
11061 |
+ lex|flex) |
11062 |
+ echo 1>&2 "\ |
11063 |
+WARNING: \`$1' is $msg. You should only need it if |
11064 |
+ you modified a \`.l' file. You may need the \`Flex' package |
11065 |
+ in order for those modifications to take effect. You can get |
11066 |
+ \`Flex' from any GNU archive site." |
11067 |
+ rm -f lex.yy.c |
11068 |
+ if [ $# -ne 1 ]; then |
11069 |
+ eval LASTARG="\${$#}" |
11070 |
+ case "$LASTARG" in |
11071 |
+ *.l) |
11072 |
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` |
11073 |
+ if [ -f "$SRCFILE" ]; then |
11074 |
+ cp "$SRCFILE" lex.yy.c |
11075 |
+ fi |
11076 |
+ ;; |
11077 |
+ esac |
11078 |
+ fi |
11079 |
+ if [ ! -f lex.yy.c ]; then |
11080 |
+ echo 'main() { return 0; }' >lex.yy.c |
11081 |
+ fi |
11082 |
+ ;; |
11083 |
+ |
11084 |
+ help2man) |
11085 |
+ echo 1>&2 "\ |
11086 |
+WARNING: \`$1' is $msg. You should only need it if |
11087 |
+ you modified a dependency of a manual page. You may need the |
11088 |
+ \`Help2man' package in order for those modifications to take |
11089 |
+ effect. You can get \`Help2man' from any GNU archive site." |
11090 |
+ |
11091 |
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` |
11092 |
+ if test -z "$file"; then |
11093 |
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` |
11094 |
+ fi |
11095 |
+ if [ -f "$file" ]; then |
11096 |
+ touch $file |
11097 |
+ else |
11098 |
+ test -z "$file" || exec >$file |
11099 |
+ echo ".ab help2man is required to generate this page" |
11100 |
+ exit 1 |
11101 |
+ fi |
11102 |
+ ;; |
11103 |
+ |
11104 |
+ makeinfo) |
11105 |
+ echo 1>&2 "\ |
11106 |
+WARNING: \`$1' is $msg. You should only need it if |
11107 |
+ you modified a \`.texi' or \`.texinfo' file, or any other file |
11108 |
+ indirectly affecting the aspect of the manual. The spurious |
11109 |
+ call might also be the consequence of using a buggy \`make' (AIX, |
11110 |
+ DU, IRIX). You might want to install the \`Texinfo' package or |
11111 |
+ the \`GNU make' package. Grab either from any GNU archive site." |
11112 |
+ # The file to touch is that specified with -o ... |
11113 |
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` |
11114 |
+ if test -z "$file"; then |
11115 |
+ # ... or it is the one specified with @setfilename ... |
11116 |
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` |
11117 |
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` |
11118 |
+ # ... or it is derived from the source name (dir/f.texi becomes f.info) |
11119 |
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info |
11120 |
+ fi |
11121 |
+ # If the file does not exist, the user really needs makeinfo; |
11122 |
+ # let's fail without touching anything. |
11123 |
+ test -f $file || exit 1 |
11124 |
+ touch $file |
11125 |
+ ;; |
11126 |
+ |
11127 |
+ tar) |
11128 |
+ shift |
11129 |
+ |
11130 |
+ # We have already tried tar in the generic part. |
11131 |
+ # Look for gnutar/gtar before invocation to avoid ugly error |
11132 |
+ # messages. |
11133 |
+ if (gnutar --version > /dev/null 2>&1); then |
11134 |
+ gnutar "$@" && exit 0 |
11135 |
+ fi |
11136 |
+ if (gtar --version > /dev/null 2>&1); then |
11137 |
+ gtar "$@" && exit 0 |
11138 |
+ fi |
11139 |
+ firstarg="$1" |
11140 |
+ if shift; then |
11141 |
+ case "$firstarg" in |
11142 |
+ *o*) |
11143 |
+ firstarg=`echo "$firstarg" | sed s/o//` |
11144 |
+ tar "$firstarg" "$@" && exit 0 |
11145 |
+ ;; |
11146 |
+ esac |
11147 |
+ case "$firstarg" in |
11148 |
+ *h*) |
11149 |
+ firstarg=`echo "$firstarg" | sed s/h//` |
11150 |
+ tar "$firstarg" "$@" && exit 0 |
11151 |
+ ;; |
11152 |
+ esac |
11153 |
+ fi |
11154 |
+ |
11155 |
+ echo 1>&2 "\ |
11156 |
+WARNING: I can't seem to be able to run \`tar' with the given arguments. |
11157 |
+ You may want to install GNU tar or Free paxutils, or check the |
11158 |
+ command line arguments." |
11159 |
+ exit 1 |
11160 |
+ ;; |
11161 |
+ |
11162 |
+ *) |
11163 |
+ echo 1>&2 "\ |
11164 |
+WARNING: \`$1' is needed, and is $msg. |
11165 |
+ You might have modified some files without having the |
11166 |
+ proper tools for further handling them. Check the \`README' file, |
11167 |
+ it often tells you about the needed prerequisites for installing |
11168 |
+ this package. You may also peek at any GNU archive site, in case |
11169 |
+ some other package would contain this missing \`$1' program." |
11170 |
+ exit 1 |
11171 |
+ ;; |
11172 |
+esac |
11173 |
+ |
11174 |
+exit 0 |
11175 |
+ |
11176 |
+# Local variables: |
11177 |
+# eval: (add-hook 'write-file-hooks 'time-stamp) |
11178 |
+# time-stamp-start: "scriptversion=" |
11179 |
+# time-stamp-format: "%:y-%02m-%02d.%02H" |
11180 |
+# time-stamp-end: "$" |
11181 |
+# End: |