Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

- Upgraded bundled libtool to 1.5.26

  • Loading branch information...
commit 0dd637ea57ca43ed8249a8137e5e2722226c62e3 1 parent 452ffe2
Jani Taskinen authored

Showing 4 changed files with 1,726 additions and 1,069 deletions. Show diff stats Hide diff stats

  1. +908 816 build/libtool.m4
  2. +80 20 config.guess
  3. +116 37 config.sub
  4. +622 196 ltmain.sh
1,724 build/libtool.m4
908 additions, 816 deletions not shown
100 config.guess
... ... @@ -1,9 +1,10 @@
1 1 #! /bin/sh
2 2 # Attempt to guess a canonical system name.
3 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4   -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
  4 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
  5 +# Free Software Foundation, Inc.
5 6
6   -timestamp='2005-08-03'
  7 +timestamp='2008-01-23'
7 8
8 9 # This file is free software; you can redistribute it and/or modify it
9 10 # under the terms of the GNU General Public License as published by
@@ -55,8 +56,8 @@ version="\
55 56 GNU config.guess ($timestamp)
56 57
57 58 Originally written by Per Bothner.
58   -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
59   -Free Software Foundation, Inc.
  59 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
  60 +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
60 61
61 62 This is free software; see the source for copying conditions. There is NO
62 63 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -106,7 +107,7 @@ set_cc_for_build='
106 107 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107 108 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
108 109 : ${TMPDIR=/tmp} ;
109   - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  110 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110 111 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111 112 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112 113 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
160 161 arm*) machine=arm-unknown ;;
161 162 sh3el) machine=shl-unknown ;;
162 163 sh3eb) machine=sh-unknown ;;
  164 + sh5el) machine=sh5le-unknown ;;
163 165 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
164 166 esac
165 167 # The Operating System including object format, if it has switched
@@ -206,8 +208,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
206 208 *:ekkoBSD:*:*)
207 209 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
208 210 exit ;;
  211 + *:SolidBSD:*:*)
  212 + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
  213 + exit ;;
209 214 macppc:MirBSD:*:*)
210   - echo powerppc-unknown-mirbsd${UNAME_RELEASE}
  215 + echo powerpc-unknown-mirbsd${UNAME_RELEASE}
211 216 exit ;;
212 217 *:MirBSD:*:*)
213 218 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -325,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
325 330 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
326 331 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
327 332 exit ;;
328   - i86pc:SunOS:5.*:*)
  333 + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
329 334 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
330 335 exit ;;
331 336 sun4*:SunOS:6*:*)
@@ -527,7 +532,7 @@ EOF
527 532 echo rs6000-ibm-aix3.2
528 533 fi
529 534 exit ;;
530   - *:AIX:*:[45])
  535 + *:AIX:*:[456])
531 536 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
532 537 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
533 538 IBM_ARCH=rs6000
@@ -764,12 +769,19 @@ EOF
764 769 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
765 770 exit ;;
766 771 *:FreeBSD:*:*)
767   - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  772 + case ${UNAME_MACHINE} in
  773 + pc98)
  774 + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  775 + amd64)
  776 + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  777 + *)
  778 + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  779 + esac
768 780 exit ;;
769 781 i*:CYGWIN*:*)
770 782 echo ${UNAME_MACHINE}-pc-cygwin
771 783 exit ;;
772   - i*:MINGW*:*)
  784 + *:MINGW*:*)
773 785 echo ${UNAME_MACHINE}-pc-mingw32
774 786 exit ;;
775 787 i*:windows32*:*)
@@ -779,9 +791,18 @@ EOF
779 791 i*:PW*:*)
780 792 echo ${UNAME_MACHINE}-pc-pw32
781 793 exit ;;
782   - x86:Interix*:[34]*)
783   - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
784   - exit ;;
  794 + *:Interix*:[3456]*)
  795 + case ${UNAME_MACHINE} in
  796 + x86)
  797 + echo i586-pc-interix${UNAME_RELEASE}
  798 + exit ;;
  799 + EM64T | authenticamd)
  800 + echo x86_64-unknown-interix${UNAME_RELEASE}
  801 + exit ;;
  802 + IA64)
  803 + echo ia64-unknown-interix${UNAME_RELEASE}
  804 + exit ;;
  805 + esac ;;
785 806 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
786 807 echo i${UNAME_MACHINE}-pc-mks
787 808 exit ;;
@@ -815,6 +836,16 @@ EOF
815 836 echo ${UNAME_MACHINE}-pc-minix
816 837 exit ;;
817 838 arm*:Linux:*:*)
  839 + eval $set_cc_for_build
  840 + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
  841 + | grep -q __ARM_EABI__
  842 + then
  843 + echo ${UNAME_MACHINE}-unknown-linux-gnu
  844 + else
  845 + echo ${UNAME_MACHINE}-unknown-linux-gnueabi
  846 + fi
  847 + exit ;;
  848 + avr32*:Linux:*:*)
818 849 echo ${UNAME_MACHINE}-unknown-linux-gnu
819 850 exit ;;
820 851 cris:Linux:*:*)
@@ -851,7 +882,11 @@ EOF
851 882 #endif
852 883 #endif
853 884 EOF
854   - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
  885 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  886 + /^CPU/{
  887 + s: ::g
  888 + p
  889 + }'`"
855 890 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
856 891 ;;
857 892 mips64:Linux:*:*)
@@ -870,7 +905,11 @@ EOF
870 905 #endif
871 906 #endif
872 907 EOF
873   - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
  908 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  909 + /^CPU/{
  910 + s: ::g
  911 + p
  912 + }'`"
874 913 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
875 914 ;;
876 915 or32:Linux:*:*)
@@ -919,9 +958,15 @@ EOF
919 958 sparc:Linux:*:* | sparc64:Linux:*:*)
920 959 echo ${UNAME_MACHINE}-unknown-linux-gnu
921 960 exit ;;
  961 + vax:Linux:*:*)
  962 + echo ${UNAME_MACHINE}-dec-linux-gnu
  963 + exit ;;
922 964 x86_64:Linux:*:*)
923 965 echo x86_64-unknown-linux-gnu
924 966 exit ;;
  967 + xtensa*:Linux:*:*)
  968 + echo ${UNAME_MACHINE}-unknown-linux-gnu
  969 + exit ;;
925 970 i*86:Linux:*:*)
926 971 # The BFD linker knows what the default object file format is, so
927 972 # first see if it will tell us. cd to the root directory to prevent
@@ -964,7 +1009,7 @@ EOF
964 1009 LIBC=gnulibc1
965 1010 # endif
966 1011 #else
967   - #ifdef __INTEL_COMPILER
  1012 + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
968 1013 LIBC=gnu
969 1014 #else
970 1015 LIBC=gnuaout
@@ -974,7 +1019,11 @@ EOF
974 1019 LIBC=dietlibc
975 1020 #endif
976 1021 EOF
977   - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
  1022 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  1023 + /^LIBC/{
  1024 + s: ::g
  1025 + p
  1026 + }'`"
978 1027 test x"${LIBC}" != x && {
979 1028 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
980 1029 exit
@@ -1176,6 +1225,15 @@ EOF
1176 1225 SX-6:SUPER-UX:*:*)
1177 1226 echo sx6-nec-superux${UNAME_RELEASE}
1178 1227 exit ;;
  1228 + SX-7:SUPER-UX:*:*)
  1229 + echo sx7-nec-superux${UNAME_RELEASE}
  1230 + exit ;;
  1231 + SX-8:SUPER-UX:*:*)
  1232 + echo sx8-nec-superux${UNAME_RELEASE}
  1233 + exit ;;
  1234 + SX-8R:SUPER-UX:*:*)
  1235 + echo sx8r-nec-superux${UNAME_RELEASE}
  1236 + exit ;;
1179 1237 Power*:Rhapsody:*:*)
1180 1238 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1181 1239 exit ;;
@@ -1185,7 +1243,6 @@ EOF
1185 1243 *:Darwin:*:*)
1186 1244 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1187 1245 case $UNAME_PROCESSOR in
1188   - *86) UNAME_PROCESSOR=i686 ;;
1189 1246 unknown) UNAME_PROCESSOR=powerpc ;;
1190 1247 esac
1191 1248 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1264,6 +1321,9 @@ EOF
1264 1321 i*86:skyos:*:*)
1265 1322 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1266 1323 exit ;;
  1324 + i*86:rdos:*:*)
  1325 + echo ${UNAME_MACHINE}-pc-rdos
  1326 + exit ;;
1267 1327 esac
1268 1328
1269 1329 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1424,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize
1424 1484 the operating system you are using. It is advised that you
1425 1485 download the most up to date version of the config scripts from
1426 1486
1427   - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
  1487 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1428 1488 and
1429   - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
  1489 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1430 1490
1431 1491 If the version you run ($0) is already up to date, please
1432 1492 send the following data and any information you think might be
153 config.sub
... ... @@ -1,9 +1,10 @@
1 1 #! /bin/sh
2 2 # Configuration validation subroutine script.
3 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4   -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
  4 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
  5 +# Free Software Foundation, Inc.
5 6
6   -timestamp='2005-07-08'
  7 +timestamp='2008-01-16'
7 8
8 9 # This file is (in principle) common to ALL GNU software.
9 10 # The presence of a machine in this file suggests that SOME GNU software
@@ -71,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
71 72 version="\
72 73 GNU config.sub ($timestamp)
73 74
74   -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
75   -Free Software Foundation, Inc.
  75 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
  76 +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
76 77
77 78 This is free software; see the source for copying conditions. There is NO
78 79 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -119,8 +120,9 @@ esac
119 120 # Here we must recognize all the valid KERNEL-OS combinations.
120 121 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121 122 case $maybe_os in
122   - nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
123   - kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
  123 + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
  124 + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
  125 + storm-chaos* | os2-emx* | rtmk-nova*)
124 126 os=-$maybe_os
125 127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
126 128 ;;
@@ -171,6 +173,10 @@ case $os in
171 173 -hiux*)
172 174 os=-hiuxwe2
173 175 ;;
  176 + -sco6)
  177 + os=-sco5v6
  178 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  179 + ;;
174 180 -sco5)
175 181 os=-sco3.2v5
176 182 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +193,10 @@ case $os in
187 193 # Don't forget version if it is 3.2v4 or newer.
188 194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
189 195 ;;
  196 + -sco5v6*)
  197 + # Don't forget version if it is 3.2v4 or newer.
  198 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  199 + ;;
190 200 -sco*)
191 201 os=-sco3.2v2
192 202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -231,15 +241,16 @@ case $basic_machine in
231 241 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
232 242 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
233 243 | am33_2.0 \
234   - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
  244 + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
235 245 | bfin \
236 246 | c4x | clipper \
237 247 | d10v | d30v | dlx | dsp16xx \
238   - | fr30 | frv \
  248 + | fido | fr30 | frv \
239 249 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
240 250 | i370 | i860 | i960 | ia64 \
241 251 | ip2k | iq2000 \
242   - | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
  252 + | m32c | m32r | m32rle | m68000 | m68k | m88k \
  253 + | maxq | mb | microblaze | mcore | mep \
243 254 | mips | mipsbe | mipseb | mipsel | mipsle \
244 255 | mips16 \
245 256 | mips64 | mips64el \
@@ -257,28 +268,27 @@ case $basic_machine in
257 268 | mipsisa64sr71k | mipsisa64sr71kel \
258 269 | mipstx39 | mipstx39el \
259 270 | mn10200 | mn10300 \
260   - | ms1 \
  271 + | mt \
261 272 | msp430 \
  273 + | nios | nios2 \
262 274 | ns16k | ns32k \
263 275 | or32 \
264 276 | pdp10 | pdp11 | pj | pjl \
265 277 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
266 278 | pyramid \
267   - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
  279 + | score \
  280 + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
268 281 | sh64 | sh64le \
269   - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
270   - | sparcv8 | sparcv9 | sparcv9b \
271   - | strongarm \
  282 + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
  283 + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
  284 + | spu | strongarm \
272 285 | tahoe | thumb | tic4x | tic80 | tron \
273 286 | v850 | v850e \
274 287 | we32k \
275   - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
  288 + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
276 289 | z8k)
277 290 basic_machine=$basic_machine-unknown
278 291 ;;
279   - m32c)
280   - basic_machine=$basic_machine-unknown
281   - ;;
282 292 m6811 | m68hc11 | m6812 | m68hc12)
283 293 # Motorola 68HC11/12.
284 294 basic_machine=$basic_machine-unknown
@@ -286,6 +296,9 @@ case $basic_machine in
286 296 ;;
287 297 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
288 298 ;;
  299 + ms1)
  300 + basic_machine=mt-unknown
  301 + ;;
289 302
290 303 # We use `pc' rather than `unknown'
291 304 # because (1) that's what they normally are, and
@@ -305,18 +318,18 @@ case $basic_machine in
305 318 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
306 319 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
307 320 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
308   - | avr-* \
  321 + | avr-* | avr32-* \
309 322 | bfin-* | bs2000-* \
310 323 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
311 324 | clipper-* | craynv-* | cydra-* \
312 325 | d10v-* | d30v-* | dlx-* \
313 326 | elxsi-* \
314   - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
  327 + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
315 328 | h8300-* | h8500-* \
316 329 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
317 330 | i*86-* | i860-* | i960-* | ia64-* \
318 331 | ip2k-* | iq2000-* \
319   - | m32r-* | m32rle-* \
  332 + | m32c-* | m32r-* | m32rle-* \
320 333 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
321 334 | m88110-* | m88k-* | maxq-* | mcore-* \
322 335 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -336,30 +349,33 @@ case $basic_machine in
336 349 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
337 350 | mipstx39-* | mipstx39el-* \
338 351 | mmix-* \
339   - | ms1-* \
  352 + | mt-* \
340 353 | msp430-* \
  354 + | nios-* | nios2-* \
341 355 | none-* | np1-* | ns16k-* | ns32k-* \
342 356 | orion-* \
343 357 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
344 358 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
345 359 | pyramid-* \
346 360 | romp-* | rs6000-* \
347   - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
  361 + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
348 362 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
349   - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
  363 + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
350 364 | sparclite-* \
351   - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
  365 + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
352 366 | tahoe-* | thumb-* \
353 367 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
354 368 | tron-* \
355 369 | v850-* | v850e-* | vax-* \
356 370 | we32k-* \
357   - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
358   - | xstormy16-* | xtensa-* \
  371 + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
  372 + | xstormy16-* | xtensa*-* \
359 373 | ymp-* \
360 374 | z8k-*)
361 375 ;;
362   - m32c-*)
  376 + # Recognize the basic CPU types without company name, with glob match.
  377 + xtensa*)
  378 + basic_machine=$basic_machine-unknown
363 379 ;;
364 380 # Recognize the various machine names and aliases which stand
365 381 # for a CPU type and a company and sometimes even an OS.
@@ -431,6 +447,14 @@ case $basic_machine in
431 447 basic_machine=ns32k-sequent
432 448 os=-dynix
433 449 ;;
  450 + blackfin)
  451 + basic_machine=bfin-unknown
  452 + os=-linux
  453 + ;;
  454 + blackfin-*)
  455 + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
  456 + os=-linux
  457 + ;;
434 458 c90)
435 459 basic_machine=c90-cray
436 460 os=-unicos
@@ -463,8 +487,8 @@ case $basic_machine in
463 487 basic_machine=craynv-cray
464 488 os=-unicosmp
465 489 ;;
466   - cr16c)
467   - basic_machine=cr16c-unknown
  490 + cr16)
  491 + basic_machine=cr16-unknown
468 492 os=-elf
469 493 ;;
470 494 crds | unos)
@@ -656,6 +680,14 @@ case $basic_machine in
656 680 basic_machine=m68k-isi
657 681 os=-sysv
658 682 ;;
  683 + m68knommu)
  684 + basic_machine=m68k-unknown
  685 + os=-linux
  686 + ;;
  687 + m68knommu-*)
  688 + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
  689 + os=-linux
  690 + ;;
659 691 m88k-omron*)
660 692 basic_machine=m88k-omron
661 693 ;;
@@ -671,6 +703,10 @@ case $basic_machine in
671 703 basic_machine=i386-pc
672 704 os=-mingw32
673 705 ;;
  706 + mingw32ce)
  707 + basic_machine=arm-unknown
  708 + os=-mingw32ce
  709 + ;;
674 710 miniframe)
675 711 basic_machine=m68000-convergent
676 712 ;;
@@ -696,6 +732,9 @@ case $basic_machine in
696 732 basic_machine=i386-pc
697 733 os=-msdos
698 734 ;;
  735 + ms1-*)
  736 + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
  737 + ;;
699 738 mvs)
700 739 basic_machine=i370-ibm
701 740 os=-mvs
@@ -794,6 +833,14 @@ case $basic_machine in
794 833 basic_machine=i860-intel
795 834 os=-osf
796 835 ;;
  836 + parisc)
  837 + basic_machine=hppa-unknown
  838 + os=-linux
  839 + ;;
  840 + parisc-*)
  841 + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
  842 + os=-linux
  843 + ;;
797 844 pbd)
798 845 basic_machine=sparc-tti
799 846 ;;
@@ -803,6 +850,12 @@ case $basic_machine in
803 850 pc532 | pc532-*)
804 851 basic_machine=ns32k-pc532
805 852 ;;
  853 + pc98)
  854 + basic_machine=i386-pc
  855 + ;;
  856 + pc98-*)
  857 + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
  858 + ;;
806 859 pentium | p5 | k5 | k6 | nexgen | viac3)
807 860 basic_machine=i586-pc
808 861 ;;
@@ -859,6 +912,10 @@ case $basic_machine in
859 912 basic_machine=i586-unknown
860 913 os=-pw32
861 914 ;;
  915 + rdos)
  916 + basic_machine=i386-pc
  917 + os=-rdos
  918 + ;;
862 919 rom68k)
863 920 basic_machine=m68k-rom68k
864 921 os=-coff
@@ -885,6 +942,10 @@ case $basic_machine in
885 942 sb1el)
886 943 basic_machine=mipsisa64sb1el-unknown
887 944 ;;
  945 + sde)
  946 + basic_machine=mipsisa32-sde
  947 + os=-elf
  948 + ;;
888 949 sei)
889 950 basic_machine=mips-sei
890 951 os=-seiux
@@ -896,6 +957,9 @@ case $basic_machine in
896 957 basic_machine=sh-hitachi
897 958 os=-hms
898 959 ;;
  960 + sh5el)
  961 + basic_machine=sh5le-unknown
  962 + ;;
899 963 sh64)
900 964 basic_machine=sh64-unknown
901 965 ;;
@@ -985,6 +1049,10 @@ case $basic_machine in
985 1049 basic_machine=tic6x-unknown
986 1050 os=-coff
987 1051 ;;
  1052 + tile*)
  1053 + basic_machine=tile-unknown
  1054 + os=-linux-gnu
  1055 + ;;
988 1056 tx39)
989 1057 basic_machine=mipstx39-unknown
990 1058 ;;
@@ -1101,7 +1169,7 @@ case $basic_machine in
1101 1169 sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1102 1170 basic_machine=sh-unknown
1103 1171 ;;
1104   - sparc | sparcv8 | sparcv9 | sparcv9b)
  1172 + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1105 1173 basic_machine=sparc-sun
1106 1174 ;;
1107 1175 cydra)
@@ -1174,21 +1242,23 @@ case $os in
1174 1242 | -aos* \
1175 1243 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1176 1244 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1177   - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
  1245 + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
  1246 + | -openbsd* | -solidbsd* \
1178 1247 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1179 1248 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1180 1249 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1181 1250 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1182 1251 | -chorusos* | -chorusrdb* \
1183 1252 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1184   - | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
  1253 + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
  1254 + | -uxpv* | -beos* | -mpeix* | -udk* \
1185 1255 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1186 1256 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1187 1257 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1188 1258 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1189 1259 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1190 1260 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1191   - | -skyos* | -haiku*)
  1261 + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1192 1262 # Remember, each alternative MUST END IN *, to match a version number.
1193 1263 ;;
1194 1264 -qnx*)
@@ -1340,6 +1410,12 @@ else
1340 1410 # system, and we'll never get to this point.
1341 1411
1342 1412 case $basic_machine in
  1413 + score-*)
  1414 + os=-elf
  1415 + ;;
  1416 + spu-*)
  1417 + os=-elf
  1418 + ;;
1343 1419 *-acorn)
1344 1420 os=-riscix1.2
1345 1421 ;;
@@ -1349,9 +1425,9 @@ case $basic_machine in
1349 1425 arm*-semi)
1350 1426 os=-aout
1351 1427 ;;
1352   - c4x-* | tic4x-*)
1353   - os=-coff
1354   - ;;
  1428 + c4x-* | tic4x-*)
  1429 + os=-coff
  1430 + ;;
1355 1431 # This must come before the *-dec entry.
1356 1432 pdp10-*)
1357 1433 os=-tops20
@@ -1377,6 +1453,9 @@ case $basic_machine in
1377 1453 m68*-cisco)
1378 1454 os=-aout
1379 1455 ;;
  1456 + mep-*)
  1457 + os=-elf
  1458 + ;;
1380 1459 mips*-cisco)
1381 1460 os=-elf
1382 1461 ;;
818 ltmain.sh
... ... @@ -1,8 +1,8 @@
1 1 # ltmain.sh - Provide generalized library-building support services.
2 2 # NOTE: Changing this file will not affect anything until you rerun configure.
3 3 #
4   -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
5   -# Free Software Foundation, Inc.
  4 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
  5 +# 2007, 2008 Free Software Foundation, Inc.
6 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7 7 #
8 8 # This program is free software; you can redistribute it and/or modify
@@ -43,14 +43,22 @@ EXIT_FAILURE=1
43 43
44 44 PROGRAM=ltmain.sh
45 45 PACKAGE=libtool
46   -VERSION=1.5.20
47   -TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
48   -
49   -# See if we are running on zsh, and set the options which allow our
50   -# commands through without removal of \ escapes.
51   -if test -n "${ZSH_VERSION+set}" ; then
  46 +VERSION=1.5.26
  47 +TIMESTAMP=" (1.1220.2.492 2008/01/30 06:40:56)"
  48 +
  49 +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
  50 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  51 + emulate sh
  52 + NULLCMD=:
  53 + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  54 + # is contrary to our usage. Disable this feature.
  55 + alias -g '${1+"$@"}'='"$@"'
52 56 setopt NO_GLOB_SUBST
  57 +else
  58 + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
53 59 fi
  60 +BIN_SH=xpg4; export BIN_SH # for Tru64
  61 +DUALCASE=1; export DUALCASE # for MKS sh
54 62
55 63 # Check that we have a working $echo.
56 64 if test "X$1" = X--no-reexec; then
@@ -105,11 +113,19 @@ esac
105 113 # These must not be set unconditionally because not all systems understand
106 114 # e.g. LANG=C (notably SCO).
107 115 # We save the old values to restore during execute mode.
108   -if test "${LC_ALL+set}" = set; then
109   - save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
110   -fi
111   -if test "${LANG+set}" = set; then
112   - save_LANG="$LANG"; LANG=C; export LANG
  116 +lt_env=
  117 +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
  118 +do
  119 + eval "if test \"\${$lt_var+set}\" = set; then
  120 + save_$lt_var=\$$lt_var
  121 + lt_env=\"$lt_var=\$$lt_var \$lt_env\"
  122 + $lt_var=C
  123 + export $lt_var
  124 + fi"
  125 +done
  126 +
  127 +if test -n "$lt_env"; then
  128 + lt_env="env $lt_env"
113 129 fi
114 130
115 131 # Make sure IFS has a sensible default
@@ -132,13 +148,54 @@ run=
132 148 show="$echo"
133 149 show_help=
134 150 execute_dlfiles=
  151 +duplicate_deps=no
  152 +preserve_args=
135 153 lo2o="s/\\.lo\$/.${objext}/"
136 154 o2lo="s/\\.${objext}\$/.lo/"
  155 +extracted_archives=
  156 +extracted_serial=0
137 157
138 158 #####################################
139 159 # Shell function definitions:
140 160 # This seems to be the best place for them
141 161
  162 +# func_mktempdir [string]
  163 +# Make a temporary directory that won't clash with other running
  164 +# libtool processes, and avoids race conditions if possible. If
  165 +# given, STRING is the basename for that directory.
  166 +func_mktempdir ()
  167 +{
  168 + my_template="${TMPDIR-/tmp}/${1-$progname}"
  169 +
  170 + if test "$run" = ":"; then
  171 + # Return a directory name, but don't create it in dry-run mode
  172 + my_tmpdir="${my_template}-$$"
  173 + else
  174 +
  175 + # If mktemp works, use that first and foremost
  176 + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
  177 +
  178 + if test ! -d "$my_tmpdir"; then
  179 + # Failing that, at least try and use $RANDOM to avoid a race
  180 + my_tmpdir="${my_template}-${RANDOM-0}$$"
  181 +
  182 + save_mktempdir_umask=`umask`
  183 + umask 0077
  184 + $mkdir "$my_tmpdir"
  185 + umask $save_mktempdir_umask
  186 + fi
  187 +
  188 + # If we're not in dry-run mode, bomb out on failure
  189 + test -d "$my_tmpdir" || {
  190 + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
  191 + exit $EXIT_FAILURE
  192 + }
  193 + fi
  194 +
  195 + $echo "X$my_tmpdir" | $Xsed
  196 +}
  197 +
  198 +
142 199 # func_win32_libid arg
143 200 # return the library type of file 'arg'
144 201 #
@@ -157,12 +214,17 @@ func_win32_libid ()
157 214 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
158 215 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
159 216 win32_nmres=`eval $NM -f posix -A $1 | \
160   - sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
161   - if test "X$win32_nmres" = "Ximport" ; then
162   - win32_libid_type="x86 archive import"
163   - else
164   - win32_libid_type="x86 archive static"
165   - fi
  217 + $SED -n -e '1,100{
  218 + / I /{
  219 + s,.*,import,
  220 + p
  221 + q
  222 + }
  223 + }'`
  224 + case $win32_nmres in
  225 + import*) win32_libid_type="x86 archive import";;
  226 + *) win32_libid_type="x86 archive static";;
  227 + esac
166 228 fi
167 229 ;;
168 230 *DLL*)
@@ -289,15 +351,25 @@ func_extract_archives ()
289 351 *) my_xabs=`pwd`"/$my_xlib" ;;
290 352 esac
291 353 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
292   - my_xdir="$my_gentop/$my_xlib"
  354 + my_xlib_u=$my_xlib
  355 + while :; do
  356 + case " $extracted_archives " in
  357 + *" $my_xlib_u "*)
  358 + extracted_serial=`expr $extracted_serial + 1`
  359 + my_xlib_u=lt$extracted_serial-$my_xlib ;;
  360 + *) break ;;
  361 + esac
  362 + done
  363 + extracted_archives="$extracted_archives $my_xlib_u"
  364 + my_xdir="$my_gentop/$my_xlib_u"
293 365
294 366 $show "${rm}r $my_xdir"
295 367 $run ${rm}r "$my_xdir"
296 368 $show "$mkdir $my_xdir"
297 369 $run $mkdir "$my_xdir"
298   - status=$?
299   - if test "$status" -ne 0 && test ! -d "$my_xdir"; then
300   - exit $status
  370 + exit_status=$?
  371 + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
  372 + exit $exit_status
301 373 fi
302 374 case $host in
303 375 *-darwin*)
@@ -352,6 +424,8 @@ func_extract_archives ()
352 424 # Darwin sucks
353 425 eval std_shrext=\"$shrext_cmds\"
354 426
  427 +disable_libs=no
  428 +
355 429 # Parse our command line options once, thoroughly.
356 430 while test "$#" -gt 0
357 431 do
@@ -414,11 +488,12 @@ do
414 488 ;;
415 489
416 490 --version)
417   - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
418   - $echo
419   - $echo "Copyright (C) 2005 Free Software Foundation, Inc."
420   - $echo "This is free software; see the source for copying conditions. There is NO"
421   - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  491 + echo "\
  492 +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
  493 +
  494 +Copyright (C) 2008 Free Software Foundation, Inc.
  495 +This is free software; see the source for copying conditions. There is NO
  496 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
422 497 exit $?
423 498 ;;
424 499
@@ -468,7 +543,11 @@ do
468 543 preserve_args="$preserve_args $arg"
469 544 ;;
470 545
471   - --tag) prevopt="--tag" prev=tag ;;
  546 + --tag)
  547 + prevopt="--tag"
  548 + prev=tag
  549 + preserve_args="$preserve_args --tag"
  550 + ;;
472 551 --tag=*)
473 552 set tag "$optarg" ${1+"$@"}
474 553 shift
@@ -500,6 +579,18 @@ if test -n "$prevopt"; then
500 579 exit $EXIT_FAILURE
501 580 fi
502 581
  582 +case $disable_libs in
  583 +no)
  584 + ;;
  585 +shared)
  586 + build_libtool_libs=no
  587 + build_old_libs=yes
  588 + ;;
  589 +static)
  590 + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
  591 + ;;
  592 +esac
  593 +
503 594 # If this variable is set in any of the actions, the command in it
504 595 # will be execed at the end. This prevents here-documents from being
505 596 # left over by shells.
@@ -699,9 +790,11 @@ if test -z "$show_help"; then
699 790 *.class) xform=class ;;
700 791 *.cpp) xform=cpp ;;
701 792 *.cxx) xform=cxx ;;
702   - *.f90) xform=f90 ;;
  793 + *.[fF][09]?) xform=[fF][09]. ;;
703 794 *.for) xform=for ;;
704 795 *.java) xform=java ;;
  796 + *.obj) xform=obj ;;
  797 + *.sx) xform=sx ;;
705 798 esac
706 799
707 800 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -856,9 +949,9 @@ EOF
856 949 if test ! -d "${xdir}$objdir"; then
857 950 $show "$mkdir ${xdir}$objdir"
858 951 $run $mkdir ${xdir}$objdir
859   - status=$?
860   - if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
861   - exit $status
  952 + exit_status=$?
  953 + if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
  954 + exit $exit_status
862 955 fi
863 956 fi
864 957
@@ -871,7 +964,7 @@ EOF
871 964 fi
872 965
873 966 $show "$command"
874   - if $run eval "$command"; then :
  967 + if $run eval $lt_env "$command"; then :
875 968 else
876 969 test -n "$output_obj" && $run $rm $removelist
877 970 exit $EXIT_FAILURE
@@ -943,7 +1036,7 @@ EOF
943 1036 command="$command$suppress_output"
944 1037 $run $rm "$obj" "$output_obj"
945 1038 $show "$command"
946   - if $run eval "$command"; then :
  1039 + if $run eval $lt_env "$command"; then :
947 1040 else
948 1041 $run $rm $removelist
949 1042 exit $EXIT_FAILURE
@@ -1062,6 +1155,7 @@ EOF
1062 1155 no_install=no
1063 1156 objs=
1064 1157 non_pic_objects=
  1158 + notinst_path= # paths that contain not-installed libtool libraries
1065 1159 precious_files_regex=
1066 1160 prefer_static_libs=no
1067 1161 preload=no
@@ -1075,6 +1169,7 @@ EOF
1075 1169 thread_safe=no
1076 1170 vinfo=
1077 1171 vinfo_number=no
  1172 + single_module="${wl}-single_module"
1078 1173
1079 1174 func_infer_tag $base_compile
1080 1175
@@ -1082,22 +1177,32 @@ EOF
1082 1177 for arg
1083 1178 do
1084 1179 case $arg in
1085   - -all-static | -static)
1086   - if test "X$arg" = "X-all-static"; then
  1180 + -all-static | -static | -static-libtool-libs)
  1181 + case $arg in
  1182 + -all-static)
1087 1183 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1088 1184 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1089 1185 fi
1090 1186 if test -n "$link_static_flag"; then
1091 1187 dlopen_self=$dlopen_self_static
1092 1188 fi
1093   - else
  1189 + prefer_static_libs=yes
  1190 + ;;
  1191 + -static)
1094 1192 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1095 1193 dlopen_self=$dlopen_self_static
1096 1194 fi
1097   - fi
  1195 + prefer_static_libs=built
  1196 + ;;
  1197 + -static-libtool-libs)
  1198 + if test -z "$pic_flag" && test -n "$link_static_flag"; then
  1199 + dlopen_self=$dlopen_self_static
  1200 + fi
  1201 + prefer_static_libs=yes
  1202 + ;;
  1203 + esac
1098 1204 build_libtool_libs=no
1099 1205 build_old_libs=yes
1100   - prefer_static_libs=yes
1101 1206 break
1102 1207 ;;
1103 1208 esac
@@ -1272,6 +1377,11 @@ EOF
1272 1377 if test -z "$pic_object" || test "$pic_object" = none ; then
1273 1378 arg="$non_pic_object"
1274 1379 fi
  1380 + else
  1381 + # If the PIC object exists, use it instead.
  1382 + # $xdir was prepended to $pic_object above.
  1383 + non_pic_object="$pic_object"
  1384 + non_pic_objects="$non_pic_objects $non_pic_object"
1275 1385 fi
1276 1386 else
1277 1387 # Only an error if not doing a dry-run.
@@ -1355,8 +1465,8 @@ EOF
1355 1465 prev=
1356 1466 continue
1357 1467 ;;
1358   - darwin_framework)
1359   - compiler_flags="$compiler_flags $arg"
  1468 + darwin_framework|darwin_framework_skip)
  1469 + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1360 1470 compile_command="$compile_command $arg"
1361 1471 finalize_command="$finalize_command $arg"
1362 1472 prev=
@@ -1420,13 +1530,17 @@ EOF
1420 1530 continue
1421 1531 ;;
1422 1532
1423   - -framework|-arch)
1424   - prev=darwin_framework
1425   - compiler_flags="$compiler_flags $arg"
  1533 + -framework|-arch|-isysroot)
  1534 + case " $CC " in
  1535 + *" ${arg} ${1} "* | *" ${arg} ${1} "*)
  1536 + prev=darwin_framework_skip ;;
  1537 + *) compiler_flags="$compiler_flags $arg"
  1538 + prev=darwin_framework ;;
  1539 + esac
1426 1540 compile_command="$compile_command $arg"
1427 1541 finalize_command="$finalize_command $arg"
1428   - continue
1429   - ;;
  1542 + continue
  1543 + ;;
1430 1544
1431 1545 -inst-prefix-dir)
1432 1546 prev=inst_prefix
@@ -1454,7 +1568,8 @@ EOF
1454 1568 absdir=`cd "$dir" && pwd`
1455 1569 if test -z "$absdir"; then
1456 1570 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1457   - exit $EXIT_FAILURE
  1571 + absdir="$dir"
  1572 + notinst_path="$notinst_path $dir"
1458 1573 fi
1459 1574 dir="$absdir"
1460 1575 ;;
@@ -1468,10 +1583,15 @@ EOF
1468 1583 esac
1469 1584 case $host in
1470 1585 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  1586 + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1471 1587 case :$dllsearchpath: in
1472 1588 *":$dir:"*) ;;
1473 1589 *) dllsearchpath="$dllsearchpath:$dir";;
1474 1590 esac
  1591 + case :$dllsearchpath: in
  1592 + *":$testbindir:"*) ;;
  1593 + *) dllsearchpath="$dllsearchpath:$testbindir";;
  1594 + esac
1475 1595 ;;
1476 1596 esac
1477 1597 continue
@@ -1480,11 +1600,11 @@ EOF
1480 1600 -l*)
1481 1601 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1482 1602 case $host in
1483   - *-*-cygwin* | *-*-pw32* | *-*-beos*)
  1603 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1484 1604 # These systems don't actually have a C or math library (as such)
1485 1605 continue
1486 1606 ;;
1487   - *-*-mingw* | *-*-os2*)
  1607 + *-*-os2*)
1488 1608 # These systems don't actually have a C library (as such)
1489 1609 test "X$arg" = "X-lc" && continue
1490 1610 ;;
@@ -1496,6 +1616,15 @@ EOF
1496 1616 # Rhapsody C and math libraries are in the System framework
1497 1617 deplibs="$deplibs -framework System"
1498 1618 continue
  1619 + ;;
  1620 + *-*-sco3.2v5* | *-*-sco5v6*)
  1621 + # Causes problems with __ctype
  1622 + test "X$arg" = "X-lc" && continue
  1623 + ;;
  1624 + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
  1625 + # Compiler inserts libc in the correct place for threads to work
  1626 + test "X$arg" = "X-lc" && continue
  1627 + ;;
1499 1628 esac
1500 1629 elif test "X$arg" = "X-lc_r"; then
1501 1630 case $host in
@@ -1519,13 +1648,18 @@ EOF
1519 1648 continue
1520 1649 ;;
1521 1650
1522   - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
  1651 + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1523 1652 compiler_flags="$compiler_flags $arg"
1524 1653 compile_command="$compile_command $arg"
1525 1654 finalize_command="$finalize_command $arg"
1526 1655 continue
1527 1656 ;;
1528 1657
  1658 + -multi_module)
  1659 + single_module="${wl}-multi_module"
  1660 + continue
  1661 + ;;
  1662 +
1529 1663 -module)
1530 1664 module=yes
1531 1665 continue
@@ -1537,7 +1671,13 @@ EOF
1537 1671 # +DA*, +DD* enable 64-bit mode on the HP compiler
1538 1672 # -q* pass through compiler args for the IBM compiler
1539 1673 # -m* pass through architecture-specific compiler args for GCC
1540   - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
  1674 + # -m*, -t[45]*, -txscale* pass through architecture-specific
  1675 + # compiler args for GCC
  1676 + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
  1677 + # -F/path gives path to uninstalled frameworks, gcc on darwin
  1678 + # @file GCC response files
  1679 + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
  1680 + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
1541 1681
1542 1682 # Unknown arguments in both finalize_command and compile_command need
1543 1683 # to be aesthetically quoted because they are evaled later.
@@ -1549,9 +1689,7 @@ EOF
1549 1689 esac
1550 1690 compile_command="$compile_command $arg"
1551 1691 finalize_command="$finalize_command $arg"
1552   - if test "$with_gcc" = "yes" ; then
1553   - compiler_flags="$compiler_flags $arg"
1554   - fi
  1692 + compiler_flags="$compiler_flags $arg"
1555 1693 continue
1556 1694 ;;
1557 1695
@@ -1567,9 +1705,9 @@ EOF
1567 1705
1568 1706 -no-install)
1569 1707 case $host in
1570   - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  1708 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
1571 1709 # The PATH hackery in wrapper scripts is required on Windows
1572   - # in order for the loader to find any dlls it needs.
  1710 + # and Darwin in order for the loader to find any dlls it needs.
1573 1711 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1574 1712 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1575 1713 fast_install=no
@@ -1628,7 +1766,7 @@ EOF
1628 1766 continue
1629 1767 ;;
1630 1768
1631   - -static)
  1769 + -static | -static-libtool-libs)
1632 1770 # The effects of -static are defined in a previous loop.
1633 1771 # We used to do the same as -all-static on platforms that
1634 1772 # didn't have a PIC flag, but the assumption that the effects
@@ -1789,6 +1927,11 @@ EOF
1789 1927 if test -z "$pic_object" || test "$pic_object" = none ; then
1790 1928 arg="$non_pic_object"
1791 1929 fi
  1930 + else
  1931 + # If the PIC object exists, use it instead.
  1932 + # $xdir was prepended to $pic_object above.
  1933 + non_pic_object="$pic_object"
  1934 + non_pic_objects="$non_pic_objects $non_pic_object"
1792 1935 fi
1793 1936 else
1794 1937 # Only an error if not doing a dry-run.
@@ -1894,9 +2037,9 @@ EOF
1894 2037 if test ! -d "$output_objdir"; then
1895 2038 $show "$mkdir $output_objdir"
1896 2039 $run $mkdir $output_objdir
1897   - status=$?
1898   - if test "$status" -ne 0 && test ! -d "$output_objdir"; then
1899   - exit $status
  2040 + exit_status=$?
  2041 + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
  2042 + exit $exit_status
1900 2043 fi
1901 2044 fi
1902 2045
@@ -1959,7 +2102,6 @@ EOF
1959 2102 newlib_search_path=
1960 2103 need_relink=no # whether we're linking any uninstalled libtool libraries
1961 2104 notinst_deplibs= # not-installed libtool libraries
1962   - notinst_path= # paths that contain not-installed libtool libraries
1963 2105 case $linkmode in
1964 2106 lib)
1965 2107 passes="conv link"
@@ -2006,7 +2148,7 @@ EOF
2006 2148 lib=
2007 2149 found=no
2008 2150 case $deplib in
2009   - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
  2151 + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2010 2152 if test "$linkmode,$pass" = "prog,link"; then
2011 2153 compile_deplibs="$deplib $compile_deplibs"
2012 2154 finalize_deplibs="$deplib $finalize_deplibs"
@@ -2021,7 +2163,12 @@ EOF
2021 2163 continue
2022 2164 fi
2023 2165 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2024   - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
  2166 + if test "$linkmode" = lib; then
  2167 + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
  2168 + else
  2169 + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
  2170 + fi
  2171 + for searchdir in $searchdirs; do
2025 2172 for search_ext in .la $std_shrext .so .a; do
2026 2173 # Search the libtool library
2027 2174 lib="$searchdir/lib${name}${search_ext}"
@@ -2195,7 +2342,7 @@ EOF
2195 2342 esac # case $deplib
2196 2343 if test "$found" = yes || test -f "$lib"; then :
2197 2344 else
2198   - $echo "$modename: cannot find the library \`$lib'" 1>&2
  2345 + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2199 2346 exit $EXIT_FAILURE
2200 2347 fi
2201 2348
@@ -2402,7 +2549,9 @@ EOF
2402 2549
2403 2550 if test "$linkmode,$pass" = "prog,link"; then
2404 2551 if test -n "$library_names" &&
2405   - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  2552 + { { test "$prefer_static_libs" = no ||
  2553 + test "$prefer_static_libs,$installed" = "built,yes"; } ||
  2554 + test -z "$old_library"; }; then
2406 2555 # We need to hardcode the library path
2407 2556 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2408 2557 # Make sure the rpath contains only unique directories.
@@ -2446,8 +2595,12 @@ EOF
2446 2595 fi
2447 2596
2448 2597 link_static=no # Whether the deplib will be linked statically
  2598 + use_static_libs=$prefer_static_libs
  2599 + if test "$use_static_libs" = built && test "$installed" = yes ; then
  2600 + use_static_libs=no
  2601 + fi
2449 2602 if test -n "$library_names" &&
2450   - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  2603 + { test "$use_static_libs" = no || test -z "$old_library"; }; then
2451 2604 if test "$installed" = no; then
2452 2605 notinst_deplibs="$notinst_deplibs $lib"
2453 2606 need_relink=yes
@@ -2560,11 +2713,15 @@ EOF
2560 2713 if test "$hardcode_direct" = no; then
2561 2714 add="$dir/$linklib"
2562 2715 case $host in
2563   - *-*-sco3.2v5* ) add_dir="-L$dir" ;;
  2716 + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
  2717 + *-*-sysv4*uw2*) add_dir="-L$dir" ;;
  2718 + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
  2719 + *-*-unixware7*) add_dir="-L$dir" ;;
2564 2720 *-*-darwin* )
2565 2721 # if the lib is a module then we can not link against
2566 2722 # it, someone is ignoring the new warnings I added
2567   - if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
  2723 + if /usr/bin/file -L $add 2> /dev/null |
  2724 + $EGREP ": [^:]* bundle" >/dev/null ; then
2568 2725 $echo "** Warning, lib $linklib is a module, not a shared library"
2569 2726 if test -z "$old_library" ; then