xref: /AOO41X/main/libxmlsec/xmlsec1-update-config-sub-and-guess.patch (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1--- misc/xmlsec1-1.2.12/config.guess    2010-04-15 09:29:35.000000000 +0000
2+++ misc/build/xmlsec1-1.2.12/config.guess  2010-04-15 09:29:46.000000000 +0000
3@@ -1,9 +1,10 @@
4 #! /bin/sh
5 # Attempt to guess a canonical system name.
6 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
7-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
8+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
9+#   Free Software Foundation, Inc.
10
11-timestamp='2003-06-17'
12+timestamp='2009-12-30'
13
14 # This file is free software; you can redistribute it and/or modify it
15 # under the terms of the GNU General Public License as published by
16@@ -17,23 +18,25 @@
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22+# 02110-1301, USA.
23 #
24 # As a special exception to the GNU General Public License, if you
25 # distribute this file as part of a program that contains a
26 # configuration script generated by Autoconf, you may include it under
27 # the same distribution terms that you use for the rest of that program.
28
29-# Originally written by Per Bothner <per@bothner.com>.
30-# Please send patches to <config-patches@gnu.org>.  Submit a context
31-# diff and a properly formatted ChangeLog entry.
32+
33+# Originally written by Per Bothner.  Please send patches (context
34+# diff format) to <config-patches@gnu.org> and include a ChangeLog
35+# entry.
36 #
37 # This script attempts to guess a canonical system name similar to
38 # config.sub.  If it succeeds, it prints the system name on stdout, and
39 # exits with 0.  Otherwise, it exits with 1.
40 #
41-# The plan is that this can be called by configure scripts if you
42-# don't specify an explicit build system type.
43+# You can get the latest version of this script from:
44+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
45
46 me=`echo "$0" | sed -e 's,.*/,,'`
47
48@@ -53,8 +56,9 @@
49 GNU config.guess ($timestamp)
50
51 Originally written by Per Bothner.
52-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
53-Free Software Foundation, Inc.
54+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
55+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
56+Software Foundation, Inc.
57
58 This is free software; see the source for copying conditions.  There is NO
59 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
60@@ -66,11 +70,11 @@
61 while test $# -gt 0 ; do
62   case $1 in
63     --time-stamp | --time* | -t )
64-       echo "$timestamp" ; exit 0 ;;
65+       echo "$timestamp" ; exit ;;
66     --version | -v )
67-       echo "$version" ; exit 0 ;;
68+       echo "$version" ; exit ;;
69     --help | --h* | -h )
70-       echo "$usage"; exit 0 ;;
71+       echo "$usage"; exit ;;
72     -- )     # Stop option processing
73        shift; break ;;
74     - )    # Use stdin as input.
75@@ -104,7 +108,7 @@
76 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
77 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
78 : ${TMPDIR=/tmp} ;
79- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
80+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
81  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
82  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
83  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
84@@ -123,7 +127,7 @@
85    ;;
86  ,,*)   CC_FOR_BUILD=$CC ;;
87  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
88-esac ;'
89+esac ; set_cc_for_build= ;'
90
91 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
92 # (ghazi@noc.rutgers.edu 1994-08-24)
93@@ -136,13 +140,6 @@
94 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
95 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
96
97-## for Red Hat Linux
98-if test -f /etc/redhat-release ; then
99-    VENDOR=redhat ;
100-else
101-    VENDOR= ;
102-fi
103-
104 # Note: order is significant - the case branches are not exclusive.
105
106 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
107@@ -165,6 +162,7 @@
108        arm*) machine=arm-unknown ;;
109        sh3el) machine=shl-unknown ;;
110        sh3eb) machine=sh-unknown ;;
111+       sh5el) machine=sh5le-unknown ;;
112        *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
113    esac
114    # The Operating System including object format, if it has switched
115@@ -173,7 +171,7 @@
116        arm*|i386|m68k|ns32k|sh3*|sparc|vax)
117        eval $set_cc_for_build
118        if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
119-           | grep __ELF__ >/dev/null
120+           | grep -q __ELF__
121        then
122            # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
123            # Return netbsd for either.  FIX?
124@@ -203,50 +201,32 @@
125    # contains redundant information, the shorter form:
126    # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
127    echo "${machine}-${os}${release}"
128-   exit 0 ;;
129-    amiga:OpenBSD:*:*)
130-   echo m68k-unknown-openbsd${UNAME_RELEASE}
131-   exit 0 ;;
132-    arc:OpenBSD:*:*)
133-   echo mipsel-unknown-openbsd${UNAME_RELEASE}
134-   exit 0 ;;
135-    hp300:OpenBSD:*:*)
136-   echo m68k-unknown-openbsd${UNAME_RELEASE}
137-   exit 0 ;;
138-    mac68k:OpenBSD:*:*)
139-   echo m68k-unknown-openbsd${UNAME_RELEASE}
140-   exit 0 ;;
141-    macppc:OpenBSD:*:*)
142-   echo powerpc-unknown-openbsd${UNAME_RELEASE}
143-   exit 0 ;;
144-    mvme68k:OpenBSD:*:*)
145-   echo m68k-unknown-openbsd${UNAME_RELEASE}
146-   exit 0 ;;
147-    mvme88k:OpenBSD:*:*)
148-   echo m88k-unknown-openbsd${UNAME_RELEASE}
149-   exit 0 ;;
150-    mvmeppc:OpenBSD:*:*)
151-   echo powerpc-unknown-openbsd${UNAME_RELEASE}
152-   exit 0 ;;
153-    pmax:OpenBSD:*:*)
154-   echo mipsel-unknown-openbsd${UNAME_RELEASE}
155-   exit 0 ;;
156-    sgi:OpenBSD:*:*)
157-   echo mipseb-unknown-openbsd${UNAME_RELEASE}
158-   exit 0 ;;
159-    sun3:OpenBSD:*:*)
160-   echo m68k-unknown-openbsd${UNAME_RELEASE}
161-   exit 0 ;;
162-    wgrisc:OpenBSD:*:*)
163-   echo mipsel-unknown-openbsd${UNAME_RELEASE}
164-   exit 0 ;;
165+   exit ;;
166     *:OpenBSD:*:*)
167-   echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
168-   exit 0 ;;
169+   UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
170+   echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
171+   exit ;;
172+    *:ekkoBSD:*:*)
173+   echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
174+   exit ;;
175+    *:SolidBSD:*:*)
176+   echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
177+   exit ;;
178+    macppc:MirBSD:*:*)
179+   echo powerpc-unknown-mirbsd${UNAME_RELEASE}
180+   exit ;;
181+    *:MirBSD:*:*)
182+   echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
183+   exit ;;
184     alpha:OSF1:*:*)
185-   if test $UNAME_RELEASE = "V4.0"; then
186+   case $UNAME_RELEASE in
187+   *4.0)
188        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
189-   fi
190+       ;;
191+   *5.*)
192+           UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
193+       ;;
194+   esac
195    # According to Compaq, /usr/sbin/psrinfo has been available on
196    # OSF/1 and Tru64 systems produced since 1995.  I hope that
197    # covers most systems running today.  This code pipes the CPU
198@@ -284,42 +264,49 @@
199        "EV7.9 (21364A)")
200        UNAME_MACHINE="alphaev79" ;;
201    esac
202+   # A Pn.n version is a patched version.
203    # A Vn.n version is a released version.
204    # A Tn.n version is a released field test version.
205    # A Xn.n version is an unreleased experimental baselevel.
206    # 1.2 uses "1.2" for uname -r.
207-   echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
208-   exit 0 ;;
209-    Alpha*:OpenVMS:*:*)
210-   echo alpha-hp-vms
211-   exit 0 ;;
212+   echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
213+   exit ;;
214     Alpha\ *:Windows_NT*:*)
215    # How do we know it's Interix rather than the generic POSIX subsystem?
216    # Should we change UNAME_MACHINE based on the output of uname instead
217    # of the specific Alpha model?
218    echo alpha-pc-interix
219-   exit 0 ;;
220+   exit ;;
221     21064:Windows_NT:50:3)
222    echo alpha-dec-winnt3.5
223-   exit 0 ;;
224+   exit ;;
225     Amiga*:UNIX_System_V:4.0:*)
226    echo m68k-unknown-sysv4
227-   exit 0;;
228+   exit ;;
229     *:[Aa]miga[Oo][Ss]:*:*)
230    echo ${UNAME_MACHINE}-unknown-amigaos
231-   exit 0 ;;
232+   exit ;;
233     *:[Mm]orph[Oo][Ss]:*:*)
234    echo ${UNAME_MACHINE}-unknown-morphos
235-   exit 0 ;;
236+   exit ;;
237     *:OS/390:*:*)
238    echo i370-ibm-openedition
239-   exit 0 ;;
240+   exit ;;
241+    *:z/VM:*:*)
242+   echo s390-ibm-zvmoe
243+   exit ;;
244+    *:OS400:*:*)
245+        echo powerpc-ibm-os400
246+   exit ;;
247     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
248    echo arm-acorn-riscix${UNAME_RELEASE}
249-   exit 0;;
250+   exit ;;
251+    arm:riscos:*:*|arm:RISCOS:*:*)
252+   echo arm-unknown-riscos
253+   exit ;;
254     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
255    echo hppa1.1-hitachi-hiuxmpp
256-   exit 0;;
257+   exit ;;
258     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
259    # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
260    if test "`(/bin/universe) 2>/dev/null`" = att ; then
261@@ -327,32 +314,51 @@
262    else
263        echo pyramid-pyramid-bsd
264    fi
265-   exit 0 ;;
266+   exit ;;
267     NILE*:*:*:dcosx)
268    echo pyramid-pyramid-svr4
269-   exit 0 ;;
270+   exit ;;
271     DRS?6000:unix:4.0:6*)
272    echo sparc-icl-nx6
273-   exit 0 ;;
274-    DRS?6000:UNIX_SV:4.2*:7*)
275+   exit ;;
276+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
277    case `/usr/bin/uname -p` in
278-       sparc) echo sparc-icl-nx7 && exit 0 ;;
279+       sparc) echo sparc-icl-nx7; exit ;;
280    esac ;;
281+    s390x:SunOS:*:*)
282+   echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
283+   exit ;;
284     sun4H:SunOS:5.*:*)
285    echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
286-   exit 0 ;;
287+   exit ;;
288     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
289    echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
290-   exit 0 ;;
291-    i86pc:SunOS:5.*:*)
292-   echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
293-   exit 0 ;;
294+   exit ;;
295+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
296+   echo i386-pc-auroraux${UNAME_RELEASE}
297+   exit ;;
298+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
299+   eval $set_cc_for_build
300+   SUN_ARCH="i386"
301+   # If there is a compiler, see if it is configured for 64-bit objects.
302+   # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
303+   # This test works for both compilers.
304+   if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
305+       if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
306+       (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
307+       grep IS_64BIT_ARCH >/dev/null
308+       then
309+       SUN_ARCH="x86_64"
310+       fi
311+   fi
312+   echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
313+   exit ;;
314     sun4*:SunOS:6*:*)
315    # According to config.sub, this is the proper way to canonicalize
316    # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
317    # it's likely to be more like Solaris than SunOS4.
318    echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
319-   exit 0 ;;
320+   exit ;;
321     sun4*:SunOS:*:*)
322    case "`/usr/bin/arch -k`" in
323        Series*|S4*)
324@@ -361,10 +367,10 @@
325    esac
326    # Japanese Language versions have a version number like `4.1.3-JL'.
327    echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
328-   exit 0 ;;
329+   exit ;;
330     sun3*:SunOS:*:*)
331    echo m68k-sun-sunos${UNAME_RELEASE}
332-   exit 0 ;;
333+   exit ;;
334     sun*:*:4.2BSD:*)
335    UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
336    test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
337@@ -376,10 +382,10 @@
338        echo sparc-sun-sunos${UNAME_RELEASE}
339        ;;
340    esac
341-   exit 0 ;;
342+   exit ;;
343     aushp:SunOS:*:*)
344    echo sparc-auspex-sunos${UNAME_RELEASE}
345-   exit 0 ;;
346+   exit ;;
347     # The situation for MiNT is a little confusing.  The machine name
348     # can be virtually everything (everything which is not
349     # "atarist" or "atariste" at least should have a processor
350@@ -390,37 +396,40 @@
351     # be no problem.
352     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
353         echo m68k-atari-mint${UNAME_RELEASE}
354-   exit 0 ;;
355+   exit ;;
356     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
357    echo m68k-atari-mint${UNAME_RELEASE}
358-        exit 0 ;;
359+        exit ;;
360     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
361         echo m68k-atari-mint${UNAME_RELEASE}
362-   exit 0 ;;
363+   exit ;;
364     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
365         echo m68k-milan-mint${UNAME_RELEASE}
366-        exit 0 ;;
367+        exit ;;
368     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
369         echo m68k-hades-mint${UNAME_RELEASE}
370-        exit 0 ;;
371+        exit ;;
372     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
373         echo m68k-unknown-mint${UNAME_RELEASE}
374-        exit 0 ;;
375+        exit ;;
376+    m68k:machten:*:*)
377+   echo m68k-apple-machten${UNAME_RELEASE}
378+   exit ;;
379     powerpc:machten:*:*)
380    echo powerpc-apple-machten${UNAME_RELEASE}
381-   exit 0 ;;
382+   exit ;;
383     RISC*:Mach:*:*)
384    echo mips-dec-mach_bsd4.3
385-   exit 0 ;;
386+   exit ;;
387     RISC*:ULTRIX:*:*)
388    echo mips-dec-ultrix${UNAME_RELEASE}
389-   exit 0 ;;
390+   exit ;;
391     VAX*:ULTRIX*:*:*)
392    echo vax-dec-ultrix${UNAME_RELEASE}
393-   exit 0 ;;
394+   exit ;;
395     2020:CLIX:*:* | 2430:CLIX:*:*)
396    echo clipper-intergraph-clix${UNAME_RELEASE}
397-   exit 0 ;;
398+   exit ;;
399     mips:*:*:UMIPS | mips:*:*:RISCos)
400    eval $set_cc_for_build
401    sed 's/^    //' << EOF >$dummy.c
402@@ -444,32 +453,33 @@
403      exit (-1);
404    }
405 EOF
406-   $CC_FOR_BUILD -o $dummy $dummy.c \
407-     && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
408-     && exit 0
409+   $CC_FOR_BUILD -o $dummy $dummy.c &&
410+     dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
411+     SYSTEM_NAME=`$dummy $dummyarg` &&
412+       { echo "$SYSTEM_NAME"; exit; }
413    echo mips-mips-riscos${UNAME_RELEASE}
414-   exit 0 ;;
415+   exit ;;
416     Motorola:PowerMAX_OS:*:*)
417    echo powerpc-motorola-powermax
418-   exit 0 ;;
419+   exit ;;
420     Motorola:*:4.3:PL8-*)
421    echo powerpc-harris-powermax
422-   exit 0 ;;
423+   exit ;;
424     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
425    echo powerpc-harris-powermax
426-   exit 0 ;;
427+   exit ;;
428     Night_Hawk:Power_UNIX:*:*)
429    echo powerpc-harris-powerunix
430-   exit 0 ;;
431+   exit ;;
432     m88k:CX/UX:7*:*)
433    echo m88k-harris-cxux7
434-   exit 0 ;;
435+   exit ;;
436     m88k:*:4*:R4*)
437    echo m88k-motorola-sysv4
438-   exit 0 ;;
439+   exit ;;
440     m88k:*:3*:R3*)
441    echo m88k-motorola-sysv3
442-   exit 0 ;;
443+   exit ;;
444     AViiON:dgux:*:*)
445         # DG/UX returns AViiON for all architectures
446         UNAME_PROCESSOR=`/usr/bin/uname -p`
447@@ -485,29 +495,29 @@
448    else
449        echo i586-dg-dgux${UNAME_RELEASE}
450    fi
451-   exit 0 ;;
452+   exit ;;
453     M88*:DolphinOS:*:*)    # DolphinOS (SVR3)
454    echo m88k-dolphin-sysv3
455-   exit 0 ;;
456+   exit ;;
457     M88*:*:R3*:*)
458    # Delta 88k system running SVR3
459    echo m88k-motorola-sysv3
460-   exit 0 ;;
461+   exit ;;
462     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
463    echo m88k-tektronix-sysv3
464-   exit 0 ;;
465+   exit ;;
466     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
467    echo m68k-tektronix-bsd
468-   exit 0 ;;
469+   exit ;;
470     *:IRIX*:*:*)
471    echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
472-   exit 0 ;;
473+   exit ;;
474     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
475-   echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
476-   exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
477+   echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
478+   exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
479     i*86:AIX:*:*)
480    echo i386-ibm-aix
481-   exit 0 ;;
482+   exit ;;
483     ia64:AIX:*:*)
484    if [ -x /usr/bin/oslevel ] ; then
485        IBM_REV=`/usr/bin/oslevel`
486@@ -515,7 +525,7 @@
487        IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
488    fi
489    echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
490-   exit 0 ;;
491+   exit ;;
492     *:AIX:2:3)
493    if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
494        eval $set_cc_for_build
495@@ -530,15 +540,19 @@
496            exit(0);
497            }
498 EOF
499-       $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
500-       echo rs6000-ibm-aix3.2.5
501+       if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
502+       then
503+           echo "$SYSTEM_NAME"
504+       else
505+           echo rs6000-ibm-aix3.2.5
506+       fi
507    elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
508        echo rs6000-ibm-aix3.2.4
509    else
510        echo rs6000-ibm-aix3.2
511    fi
512-   exit 0 ;;
513-    *:AIX:*:[45])
514+   exit ;;
515+    *:AIX:*:[456])
516    IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
517    if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
518        IBM_ARCH=rs6000
519@@ -551,28 +565,28 @@
520        IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
521    fi
522    echo ${IBM_ARCH}-ibm-aix${IBM_REV}
523-   exit 0 ;;
524+   exit ;;
525     *:AIX:*:*)
526    echo rs6000-ibm-aix
527-   exit 0 ;;
528+   exit ;;
529     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
530    echo romp-ibm-bsd4.4
531-   exit 0 ;;
532+   exit ;;
533     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
534    echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
535-   exit 0 ;;                           # report: romp-ibm BSD 4.3
536+   exit ;;                             # report: romp-ibm BSD 4.3
537     *:BOSX:*:*)
538    echo rs6000-bull-bosx
539-   exit 0 ;;
540+   exit ;;
541     DPX/2?00:B.O.S.:*:*)
542    echo m68k-bull-sysv3
543-   exit 0 ;;
544+   exit ;;
545     9000/[34]??:4.3bsd:1.*:*)
546    echo m68k-hp-bsd
547-   exit 0 ;;
548+   exit ;;
549     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
550    echo m68k-hp-bsd4.4
551-   exit 0 ;;
552+   exit ;;
553     9000/[34678]??:HP-UX:*:*)
554    HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
555    case "${UNAME_MACHINE}" in
556@@ -634,9 +648,19 @@
557    esac
558    if [ ${HP_ARCH} = "hppa2.0w" ]
559    then
560-       # avoid double evaluation of $set_cc_for_build
561-       test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
562-       if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
563+       eval $set_cc_for_build
564+
565+       # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
566+       # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
567+       # generating 64-bit code.  GNU and HP use different nomenclature:
568+       #
569+       # $ CC_FOR_BUILD=cc ./config.guess
570+       # => hppa2.0w-hp-hpux11.23
571+       # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
572+       # => hppa64-hp-hpux11.23
573+
574+       if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
575+       grep -q __LP64__
576        then
577        HP_ARCH="hppa2.0w"
578        else
579@@ -644,11 +668,11 @@
580        fi
581    fi
582    echo ${HP_ARCH}-hp-hpux${HPUX_REV}
583-   exit 0 ;;
584+   exit ;;
585     ia64:HP-UX:*:*)
586    HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
587    echo ia64-hp-hpux${HPUX_REV}
588-   exit 0 ;;
589+   exit ;;
590     3050*:HI-UX:*:*)
591    eval $set_cc_for_build
592    sed 's/^    //' << EOF >$dummy.c
593@@ -676,208 +700,248 @@
594      exit (0);
595    }
596 EOF
597-   $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
598+   $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
599+       { echo "$SYSTEM_NAME"; exit; }
600    echo unknown-hitachi-hiuxwe2
601-   exit 0 ;;
602+   exit ;;
603     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
604    echo hppa1.1-hp-bsd
605-   exit 0 ;;
606+   exit ;;
607     9000/8??:4.3bsd:*:*)
608    echo hppa1.0-hp-bsd
609-   exit 0 ;;
610+   exit ;;
611     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
612    echo hppa1.0-hp-mpeix
613-   exit 0 ;;
614+   exit ;;
615     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
616    echo hppa1.1-hp-osf
617-   exit 0 ;;
618+   exit ;;
619     hp8??:OSF1:*:*)
620    echo hppa1.0-hp-osf
621-   exit 0 ;;
622+   exit ;;
623     i*86:OSF1:*:*)
624    if [ -x /usr/sbin/sysversion ] ; then
625        echo ${UNAME_MACHINE}-unknown-osf1mk
626    else
627        echo ${UNAME_MACHINE}-unknown-osf1
628    fi
629-   exit 0 ;;
630+   exit ;;
631     parisc*:Lites*:*:*)
632    echo hppa1.1-hp-lites
633-   exit 0 ;;
634+   exit ;;
635     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
636    echo c1-convex-bsd
637-        exit 0 ;;
638+        exit ;;
639     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
640    if getsysinfo -f scalar_acc
641    then echo c32-convex-bsd
642    else echo c2-convex-bsd
643    fi
644-        exit 0 ;;
645+        exit ;;
646     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
647    echo c34-convex-bsd
648-        exit 0 ;;
649+        exit ;;
650     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
651    echo c38-convex-bsd
652-        exit 0 ;;
653+        exit ;;
654     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
655    echo c4-convex-bsd
656-        exit 0 ;;
657+        exit ;;
658     CRAY*Y-MP:*:*:*)
659    echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
660-   exit 0 ;;
661+   exit ;;
662     CRAY*[A-Z]90:*:*:*)
663    echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
664    | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
665          -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
666          -e 's/\.[^.]*$/.X/'
667-   exit 0 ;;
668+   exit ;;
669     CRAY*TS:*:*:*)
670    echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
671-   exit 0 ;;
672+   exit ;;
673     CRAY*T3E:*:*:*)
674    echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
675-   exit 0 ;;
676+   exit ;;
677     CRAY*SV1:*:*:*)
678    echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
679-   exit 0 ;;
680+   exit ;;
681     *:UNICOS/mp:*:*)
682-   echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
683-   exit 0 ;;
684+   echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
685+   exit ;;
686     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
687    FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
688         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
689         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
690         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
691-        exit 0 ;;
692+        exit ;;
693+    5000:UNIX_System_V:4.*:*)
694+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
695+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
696+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
697+   exit ;;
698     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
699    echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
700-   exit 0 ;;
701+   exit ;;
702     sparc*:BSD/OS:*:*)
703    echo sparc-unknown-bsdi${UNAME_RELEASE}
704-   exit 0 ;;
705+   exit ;;
706     *:BSD/OS:*:*)
707    echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
708-   exit 0 ;;
709-    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
710-   # Determine whether the default compiler uses glibc.
711-   eval $set_cc_for_build
712-   sed 's/^    //' << EOF >$dummy.c
713-   #include <features.h>
714-   #if __GLIBC__ >= 2
715-   LIBC=gnu
716-   #else
717-   LIBC=
718-   #endif
719-EOF
720-   eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
721-   echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
722-   exit 0 ;;
723+   exit ;;
724+    *:FreeBSD:*:*)
725+   case ${UNAME_MACHINE} in
726+       pc98)
727+       echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
728+       amd64)
729+       echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
730+       *)
731+       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
732+   esac
733+   exit ;;
734     i*:CYGWIN*:*)
735    echo ${UNAME_MACHINE}-pc-cygwin
736-   exit 0 ;;
737-    i*:MINGW*:*)
738+   exit ;;
739+    *:MINGW*:*)
740    echo ${UNAME_MACHINE}-pc-mingw32
741-   exit 0 ;;
742+   exit ;;
743+    i*:windows32*:*)
744+       # uname -m includes "-pc" on this system.
745+       echo ${UNAME_MACHINE}-mingw32
746+   exit ;;
747     i*:PW*:*)
748    echo ${UNAME_MACHINE}-pc-pw32
749-   exit 0 ;;
750-    x86:Interix*:[34]*)
751-   echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
752-   exit 0 ;;
753+   exit ;;
754+    *:Interix*:*)
755+       case ${UNAME_MACHINE} in
756+       x86)
757+       echo i586-pc-interix${UNAME_RELEASE}
758+       exit ;;
759+       authenticamd | genuineintel | EM64T)
760+       echo x86_64-unknown-interix${UNAME_RELEASE}
761+       exit ;;
762+       IA64)
763+       echo ia64-unknown-interix${UNAME_RELEASE}
764+       exit ;;
765+   esac ;;
766     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
767    echo i${UNAME_MACHINE}-pc-mks
768-   exit 0 ;;
769+   exit ;;
770+    8664:Windows_NT:*)
771+   echo x86_64-pc-mks
772+   exit ;;
773     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
774    # How do we know it's Interix rather than the generic POSIX subsystem?
775    # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
776    # UNAME_MACHINE based on the output of uname instead of i386?
777    echo i586-pc-interix
778-   exit 0 ;;
779+   exit ;;
780     i*:UWIN*:*)
781    echo ${UNAME_MACHINE}-pc-uwin
782-   exit 0 ;;
783+   exit ;;
784+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
785+   echo x86_64-unknown-cygwin
786+   exit ;;
787     p*:CYGWIN*:*)
788    echo powerpcle-unknown-cygwin
789-   exit 0 ;;
790+   exit ;;
791     prep*:SunOS:5.*:*)
792    echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
793-   exit 0 ;;
794+   exit ;;
795     *:GNU:*:*)
796+   # the GNU system
797    echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
798-   exit 0 ;;
799+   exit ;;
800+    *:GNU/*:*:*)
801+   # other systems with GNU libc and userland
802+   echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
803+   exit ;;
804     i*86:Minix:*:*)
805    echo ${UNAME_MACHINE}-pc-minix
806-   exit 0 ;;
807+   exit ;;
808+    alpha:Linux:*:*)
809+   case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
810+     EV5)   UNAME_MACHINE=alphaev5 ;;
811+     EV56)  UNAME_MACHINE=alphaev56 ;;
812+     PCA56) UNAME_MACHINE=alphapca56 ;;
813+     PCA57) UNAME_MACHINE=alphapca56 ;;
814+     EV6)   UNAME_MACHINE=alphaev6 ;;
815+     EV67)  UNAME_MACHINE=alphaev67 ;;
816+     EV68*) UNAME_MACHINE=alphaev68 ;;
817+        esac
818+   objdump --private-headers /bin/sh | grep -q ld.so.1
819+   if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
820+   echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
821+   exit ;;
822     arm*:Linux:*:*)
823+   eval $set_cc_for_build
824+   if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
825+       | grep -q __ARM_EABI__
826+   then
827+       echo ${UNAME_MACHINE}-unknown-linux-gnu
828+   else
829+       echo ${UNAME_MACHINE}-unknown-linux-gnueabi
830+   fi
831+   exit ;;
832+    avr32*:Linux:*:*)
833    echo ${UNAME_MACHINE}-unknown-linux-gnu
834-   exit 0 ;;
835+   exit ;;
836     cris:Linux:*:*)
837    echo cris-axis-linux-gnu
838-   exit 0 ;;
839-    ia64:Linux:*:*)
840-   echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
841-   exit 0 ;;
842-    m68*:Linux:*:*)
843-   echo ${UNAME_MACHINE}-unknown-linux-gnu
844-   exit 0 ;;
845-    mips:Linux:*:*)
846+   exit ;;
847+    crisv32:Linux:*:*)
848+   echo crisv32-axis-linux-gnu
849+   exit ;;
850+    frv:Linux:*:*)
851+       echo frv-unknown-linux-gnu
852+   exit ;;
853+    i*86:Linux:*:*)
854+   LIBC=gnu
855    eval $set_cc_for_build
856    sed 's/^    //' << EOF >$dummy.c
857-   #undef CPU
858-   #undef mips
859-   #undef mipsel
860-   #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
861-   CPU=mipsel
862-   #else
863-   #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
864-   CPU=mips
865-   #else
866-   CPU=
867-   #endif
868+   #ifdef __dietlibc__
869+   LIBC=dietlibc
870    #endif
871 EOF
872-   eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
873-   test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
874-   ;;
875-    mips64:Linux:*:*)
876+   eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
877+   echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
878+   exit ;;
879+    ia64:Linux:*:*)
880+   echo ${UNAME_MACHINE}-unknown-linux-gnu
881+   exit ;;
882+    m32r*:Linux:*:*)
883+   echo ${UNAME_MACHINE}-unknown-linux-gnu
884+   exit ;;
885+    m68*:Linux:*:*)
886+   echo ${UNAME_MACHINE}-unknown-linux-gnu
887+   exit ;;
888+    mips:Linux:*:* | mips64:Linux:*:*)
889    eval $set_cc_for_build
890    sed 's/^    //' << EOF >$dummy.c
891    #undef CPU
892-   #undef mips64
893-   #undef mips64el
894+   #undef ${UNAME_MACHINE}
895+   #undef ${UNAME_MACHINE}el
896    #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
897-   CPU=mips64el
898+   CPU=${UNAME_MACHINE}el
899    #else
900    #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
901-   CPU=mips64
902+   CPU=${UNAME_MACHINE}
903    #else
904    CPU=
905    #endif
906    #endif
907 EOF
908-   eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
909-   test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
910+   eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
911+   test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
912    ;;
913-    ppc:Linux:*:*)
914-   echo powerpc-${VENDOR:-unknown}-linux-gnu
915-   exit 0 ;;
916-    ppc64:Linux:*:*)
917-   echo powerpc64-${VENDOR:-unknown}-linux-gnu
918-   exit 0 ;;
919-    alpha:Linux:*:*)
920-   case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
921-     EV5)   UNAME_MACHINE=alphaev5 ;;
922-     EV56)  UNAME_MACHINE=alphaev56 ;;
923-     PCA56) UNAME_MACHINE=alphapca56 ;;
924-     PCA57) UNAME_MACHINE=alphapca56 ;;
925-     EV6)   UNAME_MACHINE=alphaev6 ;;
926-     EV67)  UNAME_MACHINE=alphaev67 ;;
927-     EV68*) UNAME_MACHINE=alphaev68 ;;
928-        esac
929-   objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
930-   if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
931-   echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
932-   exit 0 ;;
933+    or32:Linux:*:*)
934+   echo or32-unknown-linux-gnu
935+   exit ;;
936+    padre:Linux:*:*)
937+   echo sparc-unknown-linux-gnu
938+   exit ;;
939+    parisc64:Linux:*:* | hppa64:Linux:*:*)
940+   echo hppa64-unknown-linux-gnu
941+   exit ;;
942     parisc:Linux:*:* | hppa:Linux:*:*)
943    # Look for CPU level
944    case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
945@@ -885,84 +949,40 @@
946      PA8*) echo hppa2.0-unknown-linux-gnu ;;
947      *)    echo hppa-unknown-linux-gnu ;;
948    esac
949-   exit 0 ;;
950-    parisc64:Linux:*:* | hppa64:Linux:*:*)
951-   echo hppa64-unknown-linux-gnu
952-   exit 0 ;;
953+   exit ;;
954+    ppc64:Linux:*:*)
955+   echo powerpc64-unknown-linux-gnu
956+   exit ;;
957+    ppc:Linux:*:*)
958+   echo powerpc-unknown-linux-gnu
959+   exit ;;
960     s390:Linux:*:* | s390x:Linux:*:*)
961-   echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
962-   exit 0 ;;
963+   echo ${UNAME_MACHINE}-ibm-linux
964+   exit ;;
965     sh64*:Linux:*:*)
966        echo ${UNAME_MACHINE}-unknown-linux-gnu
967-   exit 0 ;;
968+   exit ;;
969     sh*:Linux:*:*)
970    echo ${UNAME_MACHINE}-unknown-linux-gnu
971-   exit 0 ;;
972+   exit ;;
973     sparc:Linux:*:* | sparc64:Linux:*:*)
974    echo ${UNAME_MACHINE}-unknown-linux-gnu
975-   exit 0 ;;
976+   exit ;;
977+    vax:Linux:*:*)
978+   echo ${UNAME_MACHINE}-dec-linux-gnu
979+   exit ;;
980     x86_64:Linux:*:*)
981-   echo x86_64-${VENDOR:-unknown}-linux-gnu
982-   exit 0 ;;
983-    i*86:Linux:*:*)
984-   # The BFD linker knows what the default object file format is, so
985-   # first see if it will tell us. cd to the root directory to prevent
986-   # problems with other programs or directories called `ld' in the path.
987-   # Set LC_ALL=C to ensure ld outputs messages in English.
988-   ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
989-            | sed -ne '/supported targets:/!d
990-                   s/[     ][  ]*/ /g
991-                   s/.*supported targets: *//
992-                   s/ .*//
993-                   p'`
994-        case "$ld_supported_targets" in
995-     elf32-i386)
996-       TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
997-       ;;
998-     a.out-i386-linux)
999-       echo "${UNAME_MACHINE}-pc-linux-gnuaout"
1000-       exit 0 ;;
1001-     coff-i386)
1002-       echo "${UNAME_MACHINE}-pc-linux-gnucoff"
1003-       exit 0 ;;
1004-     "")
1005-       # Either a pre-BFD a.out linker (linux-gnuoldld) or
1006-       # one that does not give us useful --help.
1007-       echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
1008-       exit 0 ;;
1009-   esac
1010-   # Determine whether the default compiler is a.out or elf
1011-   eval $set_cc_for_build
1012-   sed 's/^    //' << EOF >$dummy.c
1013-   #include <features.h>
1014-   #ifdef __ELF__
1015-   # ifdef __GLIBC__
1016-   #  if __GLIBC__ >= 2
1017-   LIBC=gnu
1018-   #  else
1019-   LIBC=gnulibc1
1020-   #  endif
1021-   # else
1022-   LIBC=gnulibc1
1023-   # endif
1024-   #else
1025-   #ifdef __INTEL_COMPILER
1026-   LIBC=gnu
1027-   #else
1028-   LIBC=gnuaout
1029-   #endif
1030-   #endif
1031-EOF
1032-   eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
1033-   test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
1034-   test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
1035-   ;;
1036+   echo x86_64-unknown-linux-gnu
1037+   exit ;;
1038+    xtensa*:Linux:*:*)
1039+       echo ${UNAME_MACHINE}-unknown-linux-gnu
1040+   exit ;;
1041     i*86:DYNIX/ptx:4*:*)
1042    # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1043    # earlier versions are messed up and put the nodename in both
1044    # sysname and nodename.
1045    echo i386-sequent-sysv4
1046-   exit 0 ;;
1047+   exit ;;
1048     i*86:UNIX_SV:4.2MP:2.*)
1049         # Unixware is an offshoot of SVR4, but it has its own version
1050         # number series starting with 2...
1051@@ -970,24 +990,27 @@
1052    # I just have to hope.  -- rms.
1053         # Use sysv4.2uw... so that sysv4* matches it.
1054    echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1055-   exit 0 ;;
1056+   exit ;;
1057     i*86:OS/2:*:*)
1058    # If we were able to find `uname', then EMX Unix compatibility
1059    # is probably installed.
1060    echo ${UNAME_MACHINE}-pc-os2-emx
1061-   exit 0 ;;
1062+   exit ;;
1063     i*86:XTS-300:*:STOP)
1064    echo ${UNAME_MACHINE}-unknown-stop
1065-   exit 0 ;;
1066+   exit ;;
1067     i*86:atheos:*:*)
1068    echo ${UNAME_MACHINE}-unknown-atheos
1069-   exit 0 ;;
1070-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1071+   exit ;;
1072+    i*86:syllable:*:*)
1073+   echo ${UNAME_MACHINE}-pc-syllable
1074+   exit ;;
1075+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1076    echo i386-unknown-lynxos${UNAME_RELEASE}
1077-   exit 0 ;;
1078+   exit ;;
1079     i*86:*DOS:*:*)
1080    echo ${UNAME_MACHINE}-pc-msdosdjgpp
1081-   exit 0 ;;
1082+   exit ;;
1083     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1084    UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1085    if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1086@@ -995,15 +1018,16 @@
1087    else
1088        echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1089    fi
1090-   exit 0 ;;
1091-    i*86:*:5:[78]*)
1092+   exit ;;
1093+    i*86:*:5:[678]*)
1094+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
1095    case `/bin/uname -X | grep "^Machine"` in
1096        *486*)       UNAME_MACHINE=i486 ;;
1097        *Pentium)        UNAME_MACHINE=i586 ;;
1098        *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1099    esac
1100    echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1101-   exit 0 ;;
1102+   exit ;;
1103     i*86:*:3.2:*)
1104    if test -f /usr/options/cb.name; then
1105        UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1106@@ -1021,73 +1045,86 @@
1107    else
1108        echo ${UNAME_MACHINE}-pc-sysv32
1109    fi
1110-   exit 0 ;;
1111+   exit ;;
1112     pc:*:*:*)
1113    # Left here for compatibility:
1114         # uname -m prints for DJGPP always 'pc', but it prints nothing about
1115-        # the processor, so we play safe by assuming i386.
1116-   echo i386-pc-msdosdjgpp
1117-        exit 0 ;;
1118+        # the processor, so we play safe by assuming i586.
1119+   # Note: whatever this is, it MUST be the same as what config.sub
1120+   # prints for the "djgpp" host, or else GDB configury will decide that
1121+   # this is a cross-build.
1122+   echo i586-pc-msdosdjgpp
1123+        exit ;;
1124     Intel:Mach:3*:*)
1125    echo i386-pc-mach3
1126-   exit 0 ;;
1127+   exit ;;
1128     paragon:*:*:*)
1129    echo i860-intel-osf1
1130-   exit 0 ;;
1131+   exit ;;
1132     i860:*:4.*:*) # i860-SVR4
1133    if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1134      echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1135    else # Add other i860-SVR4 vendors below as they are discovered.
1136      echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1137    fi
1138-   exit 0 ;;
1139+   exit ;;
1140     mini*:CTIX:SYS*5:*)
1141    # "miniframe"
1142    echo m68010-convergent-sysv
1143-   exit 0 ;;
1144+   exit ;;
1145     mc68k:UNIX:SYSTEM5:3.51m)
1146    echo m68k-convergent-sysv
1147-   exit 0 ;;
1148+   exit ;;
1149     M680?0:D-NIX:5.3:*)
1150    echo m68k-diab-dnix
1151-   exit 0 ;;
1152-    M68*:*:R3V[567]*:*)
1153-   test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1154-    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)
1155+   exit ;;
1156+    M68*:*:R3V[5678]*:*)
1157+   test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1158+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1159    OS_REL=''
1160    test -r /etc/.relid \
1161    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1162    /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1163-     && echo i486-ncr-sysv4.3${OS_REL} && exit 0
1164+     && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1165    /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1166-     && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
1167+     && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1168     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1169         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1170-          && echo i486-ncr-sysv4 && exit 0 ;;
1171+          && { echo i486-ncr-sysv4; exit; } ;;
1172+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1173+   OS_REL='.3'
1174+   test -r /etc/.relid \
1175+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1176+   /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1177+       && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1178+   /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1179+       && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1180+   /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1181+       && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1182     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1183    echo m68k-unknown-lynxos${UNAME_RELEASE}
1184-   exit 0 ;;
1185+   exit ;;
1186     mc68030:UNIX_System_V:4.*:*)
1187    echo m68k-atari-sysv4
1188-   exit 0 ;;
1189+   exit ;;
1190     TSUNAMI:LynxOS:2.*:*)
1191    echo sparc-unknown-lynxos${UNAME_RELEASE}
1192-   exit 0 ;;
1193+   exit ;;
1194     rs6000:LynxOS:2.*:*)
1195    echo rs6000-unknown-lynxos${UNAME_RELEASE}
1196-   exit 0 ;;
1197-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1198+   exit ;;
1199+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1200    echo powerpc-unknown-lynxos${UNAME_RELEASE}
1201-   exit 0 ;;
1202+   exit ;;
1203     SM[BE]S:UNIX_SV:*:*)
1204    echo mips-dde-sysv${UNAME_RELEASE}
1205-   exit 0 ;;
1206+   exit ;;
1207     RM*:ReliantUNIX-*:*:*)
1208    echo mips-sni-sysv4
1209-   exit 0 ;;
1210+   exit ;;
1211     RM*:SINIX-*:*:*)
1212    echo mips-sni-sysv4
1213-   exit 0 ;;
1214+   exit ;;
1215     *:SINIX-*:*:*)
1216    if uname -p 2>/dev/null >/dev/null ; then
1217        UNAME_MACHINE=`(uname -p) 2>/dev/null`
1218@@ -1095,68 +1132,94 @@
1219    else
1220        echo ns32k-sni-sysv
1221    fi
1222-   exit 0 ;;
1223+   exit ;;
1224     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1225                       # says <Richard.M.Bartel@ccMail.Census.GOV>
1226         echo i586-unisys-sysv4
1227-        exit 0 ;;
1228+        exit ;;
1229     *:UNIX_System_V:4*:FTX*)
1230    # From Gerald Hewes <hewes@openmarket.com>.
1231    # How about differentiating between stratus architectures? -djm
1232    echo hppa1.1-stratus-sysv4
1233-   exit 0 ;;
1234+   exit ;;
1235     *:*:*:FTX*)
1236    # From seanf@swdc.stratus.com.
1237    echo i860-stratus-sysv4
1238-   exit 0 ;;
1239+   exit ;;
1240+    i*86:VOS:*:*)
1241+   # From Paul.Green@stratus.com.
1242+   echo ${UNAME_MACHINE}-stratus-vos
1243+   exit ;;
1244     *:VOS:*:*)
1245    # From Paul.Green@stratus.com.
1246    echo hppa1.1-stratus-vos
1247-   exit 0 ;;
1248+   exit ;;
1249     mc68*:A/UX:*:*)
1250    echo m68k-apple-aux${UNAME_RELEASE}
1251-   exit 0 ;;
1252+   exit ;;
1253     news*:NEWS-OS:6*:*)
1254    echo mips-sony-newsos6
1255-   exit 0 ;;
1256+   exit ;;
1257     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1258    if [ -d /usr/nec ]; then
1259            echo mips-nec-sysv${UNAME_RELEASE}
1260    else
1261            echo mips-unknown-sysv${UNAME_RELEASE}
1262    fi
1263-        exit 0 ;;
1264+        exit ;;
1265     BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
1266    echo powerpc-be-beos
1267-   exit 0 ;;
1268+   exit ;;
1269     BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
1270    echo powerpc-apple-beos
1271-   exit 0 ;;
1272+   exit ;;
1273     BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1274    echo i586-pc-beos
1275-   exit 0 ;;
1276+   exit ;;
1277+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
1278+   echo i586-pc-haiku
1279+   exit ;;
1280     SX-4:SUPER-UX:*:*)
1281    echo sx4-nec-superux${UNAME_RELEASE}
1282-   exit 0 ;;
1283+   exit ;;
1284     SX-5:SUPER-UX:*:*)
1285    echo sx5-nec-superux${UNAME_RELEASE}
1286-   exit 0 ;;
1287+   exit ;;
1288     SX-6:SUPER-UX:*:*)
1289    echo sx6-nec-superux${UNAME_RELEASE}
1290-   exit 0 ;;
1291+   exit ;;
1292+    SX-7:SUPER-UX:*:*)
1293+   echo sx7-nec-superux${UNAME_RELEASE}
1294+   exit ;;
1295+    SX-8:SUPER-UX:*:*)
1296+   echo sx8-nec-superux${UNAME_RELEASE}
1297+   exit ;;
1298+    SX-8R:SUPER-UX:*:*)
1299+   echo sx8r-nec-superux${UNAME_RELEASE}
1300+   exit ;;
1301     Power*:Rhapsody:*:*)
1302    echo powerpc-apple-rhapsody${UNAME_RELEASE}
1303-   exit 0 ;;
1304+   exit ;;
1305     *:Rhapsody:*:*)
1306    echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1307-   exit 0 ;;
1308+   exit ;;
1309     *:Darwin:*:*)
1310-   case `uname -p` in
1311-       *86) UNAME_PROCESSOR=i686 ;;
1312-       powerpc) UNAME_PROCESSOR=powerpc ;;
1313+   UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1314+   case $UNAME_PROCESSOR in
1315+       i386)
1316+       eval $set_cc_for_build
1317+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1318+         if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1319+             (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1320+             grep IS_64BIT_ARCH >/dev/null
1321+         then
1322+             UNAME_PROCESSOR="x86_64"
1323+         fi
1324+       fi ;;
1325+       unknown) UNAME_PROCESSOR=powerpc ;;
1326    esac
1327    echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1328-   exit 0 ;;
1329+   exit ;;
1330     *:procnto*:*:* | *:QNX:[0123456789]*:*)
1331    UNAME_PROCESSOR=`uname -p`
1332    if test "$UNAME_PROCESSOR" = "x86"; then
1333@@ -1164,22 +1227,25 @@
1334        UNAME_MACHINE=pc
1335    fi
1336    echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1337-   exit 0 ;;
1338+   exit ;;
1339     *:QNX:*:4*)
1340    echo i386-pc-qnx
1341-   exit 0 ;;
1342-    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
1343+   exit ;;
1344+    NSE-?:NONSTOP_KERNEL:*:*)
1345+   echo nse-tandem-nsk${UNAME_RELEASE}
1346+   exit ;;
1347+    NSR-?:NONSTOP_KERNEL:*:*)
1348    echo nsr-tandem-nsk${UNAME_RELEASE}
1349-   exit 0 ;;
1350+   exit ;;
1351     *:NonStop-UX:*:*)
1352    echo mips-compaq-nonstopux
1353-   exit 0 ;;
1354+   exit ;;
1355     BS2000:POSIX*:*:*)
1356    echo bs2000-siemens-sysv
1357-   exit 0 ;;
1358+   exit ;;
1359     DS/*:UNIX_System_V:*:*)
1360    echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1361-   exit 0 ;;
1362+   exit ;;
1363     *:Plan9:*:*)
1364    # "uname -m" is not consistent, so use $cputype instead. 386
1365    # is converted to i386 for consistency with other x86
1366@@ -1190,28 +1256,50 @@
1367        UNAME_MACHINE="$cputype"
1368    fi
1369    echo ${UNAME_MACHINE}-unknown-plan9
1370-   exit 0 ;;
1371+   exit ;;
1372     *:TOPS-10:*:*)
1373    echo pdp10-unknown-tops10
1374-   exit 0 ;;
1375+   exit ;;
1376     *:TENEX:*:*)
1377    echo pdp10-unknown-tenex
1378-   exit 0 ;;
1379+   exit ;;
1380     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1381    echo pdp10-dec-tops20
1382-   exit 0 ;;
1383+   exit ;;
1384     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1385    echo pdp10-xkl-tops20
1386-   exit 0 ;;
1387+   exit ;;
1388     *:TOPS-20:*:*)
1389    echo pdp10-unknown-tops20
1390-   exit 0 ;;
1391+   exit ;;
1392     *:ITS:*:*)
1393    echo pdp10-unknown-its
1394-   exit 0 ;;
1395+   exit ;;
1396     SEI:*:*:SEIUX)
1397         echo mips-sei-seiux${UNAME_RELEASE}
1398-   exit 0 ;;
1399+   exit ;;
1400+    *:DragonFly:*:*)
1401+   echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1402+   exit ;;
1403+    *:*VMS:*:*)
1404+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
1405+   case "${UNAME_MACHINE}" in
1406+       A*) echo alpha-dec-vms ; exit ;;
1407+       I*) echo ia64-dec-vms ; exit ;;
1408+       V*) echo vax-dec-vms ; exit ;;
1409+   esac ;;
1410+    *:XENIX:*:SysV)
1411+   echo i386-pc-xenix
1412+   exit ;;
1413+    i*86:skyos:*:*)
1414+   echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1415+   exit ;;
1416+    i*86:rdos:*:*)
1417+   echo ${UNAME_MACHINE}-pc-rdos
1418+   exit ;;
1419+    i*86:AROS:*:*)
1420+   echo ${UNAME_MACHINE}-pc-aros
1421+   exit ;;
1422 esac
1423
1424 #echo '(No uname command or uname output not recognized.)' 1>&2
1425@@ -1243,7 +1331,7 @@
1426 #endif
1427
1428 #if defined (__arm) && defined (__acorn) && defined (__unix)
1429-  printf ("arm-acorn-riscix"); exit (0);
1430+  printf ("arm-acorn-riscix\n"); exit (0);
1431 #endif
1432
1433 #if defined (hp300) && !defined (hpux)
1434@@ -1332,11 +1420,12 @@
1435 }
1436 EOF
1437
1438-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
1439+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1440+   { echo "$SYSTEM_NAME"; exit; }
1441
1442 # Apollos put the system type in the environment.
1443
1444-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
1445+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1446
1447 # Convex versions that predate uname can use getsysinfo(1)
1448
1449@@ -1345,22 +1434,22 @@
1450     case `getsysinfo -f cpu_type` in
1451     c1*)
1452    echo c1-convex-bsd
1453-   exit 0 ;;
1454+   exit ;;
1455     c2*)
1456    if getsysinfo -f scalar_acc
1457    then echo c32-convex-bsd
1458    else echo c2-convex-bsd
1459    fi
1460-   exit 0 ;;
1461+   exit ;;
1462     c34*)
1463    echo c34-convex-bsd
1464-   exit 0 ;;
1465+   exit ;;
1466     c38*)
1467    echo c38-convex-bsd
1468-   exit 0 ;;
1469+   exit ;;
1470     c4*)
1471    echo c4-convex-bsd
1472-   exit 0 ;;
1473+   exit ;;
1474     esac
1475 fi
1476
1477@@ -1371,7 +1460,9 @@
1478 the operating system you are using. It is advised that you
1479 download the most up to date version of the config scripts from
1480
1481-    ftp://ftp.gnu.org/pub/gnu/config/
1482+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1483+and
1484+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1485
1486 If the version you run ($0) is already up to date, please
1487 send the following data and any information you think might be
1488--- misc/xmlsec1-1.2.12/config.sub  2010-04-15 09:29:35.000000000 +0000
1489+++ misc/build/xmlsec1-1.2.12/config.sub    2010-04-15 09:29:46.000000000 +0000
1490@@ -1,9 +1,10 @@
1491 #! /bin/sh
1492 # Configuration validation subroutine script.
1493 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1494-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
1495+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
1496+#   Free Software Foundation, Inc.
1497
1498-timestamp='2003-06-18'
1499+timestamp='2010-01-22'
1500
1501 # This file is (in principle) common to ALL GNU software.
1502 # The presence of a machine in this file suggests that SOME GNU software
1503@@ -21,22 +22,26 @@
1504 #
1505 # You should have received a copy of the GNU General Public License
1506 # along with this program; if not, write to the Free Software
1507-# Foundation, Inc., 59 Temple Place - Suite 330,
1508-# Boston, MA 02111-1307, USA.
1509-
1510+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
1511+# 02110-1301, USA.
1512+#
1513 # As a special exception to the GNU General Public License, if you
1514 # distribute this file as part of a program that contains a
1515 # configuration script generated by Autoconf, you may include it under
1516 # the same distribution terms that you use for the rest of that program.
1517
1518+
1519 # Please send patches to <config-patches@gnu.org>.  Submit a context
1520-# diff and a properly formatted ChangeLog entry.
1521+# diff and a properly formatted GNU ChangeLog entry.
1522 #
1523 # Configuration subroutine to validate and canonicalize a configuration type.
1524 # Supply the specified configuration type as an argument.
1525 # If it is invalid, we print an error message on stderr and exit with code 1.
1526 # Otherwise, we print the canonical config type on stdout and succeed.
1527
1528+# You can get the latest version of this script from:
1529+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1530+
1531 # This file is supposed to be the same for all GNU packages
1532 # and recognize all the CPU types, system types and aliases
1533 # that are meaningful with *any* GNU software.
1534@@ -70,8 +75,9 @@
1535 version="\
1536 GNU config.sub ($timestamp)
1537
1538-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
1539-Free Software Foundation, Inc.
1540+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
1541+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
1542+Software Foundation, Inc.
1543
1544 This is free software; see the source for copying conditions.  There is NO
1545 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
1546@@ -83,11 +89,11 @@
1547 while test $# -gt 0 ; do
1548   case $1 in
1549     --time-stamp | --time* | -t )
1550-       echo "$timestamp" ; exit 0 ;;
1551+       echo "$timestamp" ; exit ;;
1552     --version | -v )
1553-       echo "$version" ; exit 0 ;;
1554+       echo "$version" ; exit ;;
1555     --help | --h* | -h )
1556-       echo "$usage"; exit 0 ;;
1557+       echo "$usage"; exit ;;
1558     -- )     # Stop option processing
1559        shift; break ;;
1560     - )    # Use stdin as input.
1561@@ -99,7 +105,7 @@
1562     *local*)
1563        # First pass through any local machine types.
1564        echo $1
1565-       exit 0;;
1566+       exit ;;
1567
1568     * )
1569        break ;;
1570@@ -118,7 +124,10 @@
1571 # Here we must recognize all the valid KERNEL-OS combinations.
1572 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
1573 case $maybe_os in
1574-  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
1575+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
1576+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
1577+  kopensolaris*-gnu* | \
1578+  storm-chaos* | os2-emx* | rtmk-nova*)
1579     os=-$maybe_os
1580     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
1581     ;;
1582@@ -144,10 +153,13 @@
1583    -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
1584    -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
1585    -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
1586-   -apple | -axis)
1587+   -apple | -axis | -knuth | -cray | -microblaze)
1588        os=
1589        basic_machine=$1
1590        ;;
1591+        -bluegene*)
1592+           os=-cnk
1593+       ;;
1594    -sim | -cisco | -oki | -wec | -winbond)
1595        os=
1596        basic_machine=$1
1597@@ -169,6 +181,10 @@
1598    -hiux*)
1599        os=-hiuxwe2
1600        ;;
1601+   -sco6)
1602+       os=-sco5v6
1603+       basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1604+       ;;
1605    -sco5)
1606        os=-sco3.2v5
1607        basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1608@@ -185,6 +201,10 @@
1609        # Don't forget version if it is 3.2v4 or newer.
1610        basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1611        ;;
1612+   -sco5v6*)
1613+       # Don't forget version if it is 3.2v4 or newer.
1614+       basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1615+       ;;
1616    -sco*)
1617        os=-sco3.2v2
1618        basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1619@@ -228,54 +248,71 @@
1620    | a29k \
1621    | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
1622    | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
1623-   | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
1624+   | am33_2.0 \
1625+   | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
1626+   | bfin \
1627    | c4x | clipper \
1628    | d10v | d30v | dlx | dsp16xx \
1629-   | fr30 | frv \
1630+   | fido | fr30 | frv \
1631    | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1632    | i370 | i860 | i960 | ia64 \
1633-   | ip2k \
1634-   | m32r | m68000 | m68k | m88k | mcore \
1635+   | ip2k | iq2000 \
1636+   | lm32 \
1637+   | m32c | m32r | m32rle | m68000 | m68k | m88k \
1638+   | maxq | mb | microblaze | mcore | mep | metag \
1639    | mips | mipsbe | mipseb | mipsel | mipsle \
1640    | mips16 \
1641    | mips64 | mips64el \
1642-   | mips64vr | mips64vrel \
1643+   | mips64octeon | mips64octeonel \
1644    | mips64orion | mips64orionel \
1645+   | mips64r5900 | mips64r5900el \
1646+   | mips64vr | mips64vrel \
1647    | mips64vr4100 | mips64vr4100el \
1648    | mips64vr4300 | mips64vr4300el \
1649    | mips64vr5000 | mips64vr5000el \
1650+   | mips64vr5900 | mips64vr5900el \
1651    | mipsisa32 | mipsisa32el \
1652    | mipsisa32r2 | mipsisa32r2el \
1653    | mipsisa64 | mipsisa64el \
1654+   | mipsisa64r2 | mipsisa64r2el \
1655    | mipsisa64sb1 | mipsisa64sb1el \
1656    | mipsisa64sr71k | mipsisa64sr71kel \
1657    | mipstx39 | mipstx39el \
1658    | mn10200 | mn10300 \
1659+   | moxie \
1660+   | mt \
1661    | msp430 \
1662+   | nios | nios2 \
1663    | ns16k | ns32k \
1664-   | openrisc | or32 \
1665+   | or32 \
1666    | pdp10 | pdp11 | pj | pjl \
1667    | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
1668    | pyramid \
1669-   | s390 | s390x \
1670-   | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
1671+   | rx \
1672+   | score \
1673+   | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
1674    | sh64 | sh64le \
1675-   | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
1676-   | strongarm \
1677+   | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
1678+   | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
1679+   | spu | strongarm \
1680    | tahoe | thumb | tic4x | tic80 | tron \
1681+   | ubicom32 \
1682    | v850 | v850e \
1683    | we32k \
1684-   | x86 | xscale | xstormy16 | xtensa \
1685-   | z8k)
1686+   | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
1687+   | z8k | z80)
1688        basic_machine=$basic_machine-unknown
1689        ;;
1690-   m6811 | m68hc11 | m6812 | m68hc12)
1691+   m6811 | m68hc11 | m6812 | m68hc12 | picochip)
1692        # Motorola 68HC11/12.
1693        basic_machine=$basic_machine-unknown
1694        os=-none
1695        ;;
1696    m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
1697        ;;
1698+   ms1)
1699+       basic_machine=mt-unknown
1700+       ;;
1701
1702    # We use `pc' rather than `unknown'
1703    # because (1) that's what they normally are, and
1704@@ -295,55 +332,69 @@
1705    | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
1706    | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
1707    | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
1708-   | avr-* \
1709-   | bs2000-* \
1710+   | avr-* | avr32-* \
1711+   | bfin-* | bs2000-* \
1712    | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
1713-   | clipper-* | cydra-* \
1714+   | clipper-* | craynv-* | cydra-* \
1715    | d10v-* | d30v-* | dlx-* \
1716    | elxsi-* \
1717-   | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
1718+   | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
1719    | h8300-* | h8500-* \
1720    | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
1721    | i*86-* | i860-* | i960-* | ia64-* \
1722-   | ip2k-* \
1723-   | m32r-* \
1724+   | ip2k-* | iq2000-* \
1725+   | lm32-* \
1726+   | m32c-* | m32r-* | m32rle-* \
1727    | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
1728-   | m88110-* | m88k-* | mcore-* \
1729+   | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
1730    | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
1731    | mips16-* \
1732    | mips64-* | mips64el-* \
1733-   | mips64vr-* | mips64vrel-* \
1734+   | mips64octeon-* | mips64octeonel-* \
1735    | mips64orion-* | mips64orionel-* \
1736+   | mips64r5900-* | mips64r5900el-* \
1737+   | mips64vr-* | mips64vrel-* \
1738    | mips64vr4100-* | mips64vr4100el-* \
1739    | mips64vr4300-* | mips64vr4300el-* \
1740    | mips64vr5000-* | mips64vr5000el-* \
1741+   | mips64vr5900-* | mips64vr5900el-* \
1742    | mipsisa32-* | mipsisa32el-* \
1743    | mipsisa32r2-* | mipsisa32r2el-* \
1744    | mipsisa64-* | mipsisa64el-* \
1745+   | mipsisa64r2-* | mipsisa64r2el-* \
1746    | mipsisa64sb1-* | mipsisa64sb1el-* \
1747    | mipsisa64sr71k-* | mipsisa64sr71kel-* \
1748    | mipstx39-* | mipstx39el-* \
1749+   | mmix-* \
1750+   | mt-* \
1751    | msp430-* \
1752-   | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
1753+   | nios-* | nios2-* \
1754+   | none-* | np1-* | ns16k-* | ns32k-* \
1755    | orion-* \
1756    | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
1757    | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
1758    | pyramid-* \
1759-   | romp-* | rs6000-* \
1760-   | s390-* | s390x-* \
1761-   | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
1762+   | romp-* | rs6000-* | rx-* \
1763+   | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
1764    | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
1765-   | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
1766-   | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
1767+   | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
1768+   | sparclite-* \
1769+   | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
1770    | tahoe-* | thumb-* \
1771    | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
1772+   | tile-* | tilegx-* \
1773    | tron-* \
1774+   | ubicom32-* \
1775    | v850-* | v850e-* | vax-* \
1776    | we32k-* \
1777-   | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
1778-   | xtensa-* \
1779+   | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
1780+   | xstormy16-* | xtensa*-* \
1781    | ymp-* \
1782-   | z8k-*)
1783+   | z8k-* | z80-*)
1784+       ;;
1785+   # Recognize the basic CPU types without company name, with glob match.
1786+   xtensa*)
1787+       basic_machine=$basic_machine-unknown
1788        ;;
1789    # Recognize the various machine names and aliases which stand
1790    # for a CPU type and a company and sometimes even an OS.
1791@@ -361,6 +412,9 @@
1792        basic_machine=a29k-amd
1793        os=-udi
1794        ;;
1795+       abacus)
1796+       basic_machine=abacus-unknown
1797+       ;;
1798    adobe68k)
1799        basic_machine=m68010-adobe
1800        os=-scout
1801@@ -378,6 +432,9 @@
1802    amd64)
1803        basic_machine=x86_64-pc
1804        ;;
1805+   amd64-*)
1806+       basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
1807+       ;;
1808    amdahl)
1809        basic_machine=580-amdahl
1810        os=-sysv
1811@@ -401,6 +458,10 @@
1812        basic_machine=m68k-apollo
1813        os=-bsd
1814        ;;
1815+   aros)
1816+       basic_machine=i386-pc
1817+       os=-aros
1818+       ;;
1819    aux)
1820        basic_machine=m68k-apple
1821        os=-aux
1822@@ -409,10 +470,26 @@
1823        basic_machine=ns32k-sequent
1824        os=-dynix
1825        ;;
1826+   blackfin)
1827+       basic_machine=bfin-unknown
1828+       os=-linux
1829+       ;;
1830+   blackfin-*)
1831+       basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
1832+       os=-linux
1833+       ;;
1834+   bluegene*)
1835+       basic_machine=powerpc-ibm
1836+       os=-cnk
1837+       ;;
1838    c90)
1839        basic_machine=c90-cray
1840        os=-unicos
1841        ;;
1842+        cegcc)
1843+       basic_machine=arm-unknown
1844+       os=-cegcc
1845+       ;;
1846    convex-c1)
1847        basic_machine=c1-convex
1848        os=-bsd
1849@@ -437,12 +514,27 @@
1850        basic_machine=j90-cray
1851        os=-unicos
1852        ;;
1853+   craynv)
1854+       basic_machine=craynv-cray
1855+       os=-unicosmp
1856+       ;;
1857+   cr16)
1858+       basic_machine=cr16-unknown
1859+       os=-elf
1860+       ;;
1861    crds | unos)
1862        basic_machine=m68k-crds
1863        ;;
1864+   crisv32 | crisv32-* | etraxfs*)
1865+       basic_machine=crisv32-axis
1866+       ;;
1867    cris | cris-* | etrax*)
1868        basic_machine=cris-axis
1869        ;;
1870+   crx)
1871+       basic_machine=crx-unknown
1872+       os=-elf
1873+       ;;
1874    da30 | da30-*)
1875        basic_machine=m68k-da30
1876        ;;
1877@@ -465,6 +557,14 @@
1878        basic_machine=m88k-motorola
1879        os=-sysv3
1880        ;;
1881+   dicos)
1882+       basic_machine=i686-pc
1883+       os=-dicos
1884+       ;;
1885+   djgpp)
1886+       basic_machine=i586-pc
1887+       os=-msdosdjgpp
1888+       ;;
1889    dpx20 | dpx20-*)
1890        basic_machine=rs6000-bull
1891        os=-bosx
1892@@ -615,6 +715,14 @@
1893        basic_machine=m68k-isi
1894        os=-sysv
1895        ;;
1896+   m68knommu)
1897+       basic_machine=m68k-unknown
1898+       os=-linux
1899+       ;;
1900+   m68knommu-*)
1901+       basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
1902+       os=-linux
1903+       ;;
1904    m88k-omron*)
1905        basic_machine=m88k-omron
1906        ;;
1907@@ -626,10 +734,17 @@
1908        basic_machine=ns32k-utek
1909        os=-sysv
1910        ;;
1911+        microblaze)
1912+       basic_machine=microblaze-xilinx
1913+       ;;
1914    mingw32)
1915        basic_machine=i386-pc
1916        os=-mingw32
1917        ;;
1918+   mingw32ce)
1919+       basic_machine=arm-unknown
1920+       os=-mingw32ce
1921+       ;;
1922    miniframe)
1923        basic_machine=m68000-convergent
1924        ;;
1925@@ -643,10 +758,6 @@
1926    mips3*)
1927        basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
1928        ;;
1929-   mmix*)
1930-       basic_machine=mmix-knuth
1931-       os=-mmixware
1932-       ;;
1933    monitor)
1934        basic_machine=m68k-rom68k
1935        os=-coff
1936@@ -659,6 +770,9 @@
1937        basic_machine=i386-pc
1938        os=-msdos
1939        ;;
1940+   ms1-*)
1941+       basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
1942+       ;;
1943    mvs)
1944        basic_machine=i370-ibm
1945        os=-mvs
1946@@ -727,10 +841,6 @@
1947    np1)
1948        basic_machine=np1-gould
1949        ;;
1950-   nv1)
1951-       basic_machine=nv1-cray
1952-       os=-unicosmp
1953-       ;;
1954    nsr-tandem)
1955        basic_machine=nsr-tandem
1956        ;;
1957@@ -738,9 +848,12 @@
1958        basic_machine=hppa1.1-oki
1959        os=-proelf
1960        ;;
1961-   or32 | or32-*)
1962+   openrisc | openrisc-*)
1963        basic_machine=or32-unknown
1964-       os=-coff
1965+       ;;
1966+   os400)
1967+       basic_machine=powerpc-ibm
1968+       os=-os400
1969        ;;
1970    OSE68000 | ose68000)
1971        basic_machine=m68000-ericsson
1972@@ -758,6 +871,14 @@
1973        basic_machine=i860-intel
1974        os=-osf
1975        ;;
1976+   parisc)
1977+       basic_machine=hppa-unknown
1978+       os=-linux
1979+       ;;
1980+   parisc-*)
1981+       basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
1982+       os=-linux
1983+       ;;
1984    pbd)
1985        basic_machine=sparc-tti
1986        ;;
1987@@ -767,6 +888,12 @@
1988    pc532 | pc532-*)
1989        basic_machine=ns32k-pc532
1990        ;;
1991+   pc98)
1992+       basic_machine=i386-pc
1993+       ;;
1994+   pc98-*)
1995+       basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
1996+       ;;
1997    pentium | p5 | k5 | k6 | nexgen | viac3)
1998        basic_machine=i586-pc
1999        ;;
2000@@ -823,6 +950,10 @@
2001        basic_machine=i586-unknown
2002        os=-pw32
2003        ;;
2004+   rdos)
2005+       basic_machine=i386-pc
2006+       os=-rdos
2007+       ;;
2008    rom68k)
2009        basic_machine=m68k-rom68k
2010        os=-coff
2011@@ -833,6 +964,12 @@
2012    rtpc | rtpc-*)
2013        basic_machine=romp-ibm
2014        ;;
2015+   s390 | s390-*)
2016+       basic_machine=s390-ibm
2017+       ;;
2018+   s390x | s390x-*)
2019+       basic_machine=s390x-ibm
2020+       ;;
2021    sa29200)
2022        basic_machine=a29k-amd
2023        os=-udi
2024@@ -843,6 +980,10 @@
2025    sb1el)
2026        basic_machine=mipsisa64sb1el-unknown
2027        ;;
2028+   sde)
2029+       basic_machine=mipsisa32-sde
2030+       os=-elf
2031+       ;;
2032    sei)
2033        basic_machine=mips-sei
2034        os=-seiux
2035@@ -854,6 +995,9 @@
2036        basic_machine=sh-hitachi
2037        os=-hms
2038        ;;
2039+   sh5el)
2040+       basic_machine=sh5le-unknown
2041+       ;;
2042    sh64)
2043        basic_machine=sh64-unknown
2044        ;;
2045@@ -943,6 +1087,15 @@
2046        basic_machine=tic6x-unknown
2047        os=-coff
2048        ;;
2049+        # This must be matched before tile*.
2050+        tilegx*)
2051+       basic_machine=tilegx-unknown
2052+       os=-linux-gnu
2053+       ;;
2054+   tile*)
2055+       basic_machine=tile-unknown
2056+       os=-linux-gnu
2057+       ;;
2058    tx39)
2059        basic_machine=mipstx39-unknown
2060        ;;
2061@@ -956,6 +1109,10 @@
2062    tower | tower-32)
2063        basic_machine=m68k-ncr
2064        ;;
2065+   tpf)
2066+       basic_machine=s390x-ibm
2067+       os=-tpf
2068+       ;;
2069    udi29k)
2070        basic_machine=a29k-amd
2071        os=-udi
2072@@ -999,6 +1156,10 @@
2073        basic_machine=hppa1.1-winbond
2074        os=-proelf
2075        ;;
2076+   xbox)
2077+       basic_machine=i686-pc
2078+       os=-mingw32
2079+       ;;
2080    xps | xps100)
2081        basic_machine=xps100-honeywell
2082        ;;
2083@@ -1010,6 +1171,10 @@
2084        basic_machine=z8k-unknown
2085        os=-sim
2086        ;;
2087+   z80-*-coff)
2088+       basic_machine=z80-unknown
2089+       os=-sim
2090+       ;;
2091    none)
2092        basic_machine=none-none
2093        os=-none
2094@@ -1029,6 +1194,9 @@
2095    romp)
2096        basic_machine=romp-ibm
2097        ;;
2098+   mmix)
2099+       basic_machine=mmix-knuth
2100+       ;;
2101    rs6000)
2102        basic_machine=rs6000-ibm
2103        ;;
2104@@ -1045,13 +1213,10 @@
2105    we32k)
2106        basic_machine=we32k-att
2107        ;;
2108-   sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
2109+   sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
2110        basic_machine=sh-unknown
2111        ;;
2112-   sh64)
2113-       basic_machine=sh64-unknown
2114-       ;;
2115-   sparc | sparcv9 | sparcv9b)
2116+   sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
2117        basic_machine=sparc-sun
2118        ;;
2119    cydra)
2120@@ -1098,6 +1263,9 @@
2121         # First match some system type aliases
2122         # that might get confused with valid system types.
2123    # -solaris* is a basic system type, with this one exception.
2124+        -auroraux)
2125+           os=-auroraux
2126+       ;;
2127    -solaris1 | -solaris1.*)
2128        os=`echo $os | sed -e 's|solaris1|sunos4|'`
2129        ;;
2130@@ -1118,25 +1286,30 @@
2131    # Each alternative MUST END IN A *, to match a version number.
2132    # -sysv* is not here because it comes later, after sysvr4.
2133    -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
2134-         | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
2135-         | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
2136+         | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
2137+         | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
2138+         | -sym* | -kopensolaris* \
2139          | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
2140-         | -aos* \
2141+         | -aos* | -aros* \
2142          | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
2143          | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
2144-         | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
2145-         | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
2146+         | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
2147+         | -openbsd* | -solidbsd* \
2148+         | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
2149+         | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
2150          | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
2151          | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
2152-         | -chorusos* | -chorusrdb* \
2153+         | -chorusos* | -chorusrdb* | -cegcc* \
2154          | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
2155-         | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
2156+         | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
2157+         | -uxpv* | -beos* | -mpeix* | -udk* \
2158          | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
2159          | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
2160          | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
2161          | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
2162          | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
2163-         | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
2164+         | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
2165+         | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
2166    # Remember, each alternative MUST END IN *, to match a version number.
2167        ;;
2168    -qnx*)
2169@@ -1154,12 +1327,15 @@
2170        os=`echo $os | sed -e 's|nto|nto-qnx|'`
2171        ;;
2172    -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
2173-         | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
2174+         | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
2175          | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
2176        ;;
2177    -mac*)
2178        os=`echo $os | sed -e 's|mac|macos|'`
2179        ;;
2180+   -linux-dietlibc)
2181+       os=-linux-dietlibc
2182+       ;;
2183    -linux*)
2184        os=`echo $os | sed -e 's|linux|linux-gnu|'`
2185        ;;
2186@@ -1172,6 +1348,9 @@
2187    -opened*)
2188        os=-openedition
2189        ;;
2190+        -os400*)
2191+       os=-os400
2192+       ;;
2193    -wince*)
2194        os=-wince
2195        ;;
2196@@ -1193,6 +1372,9 @@
2197    -atheos*)
2198        os=-atheos
2199        ;;
2200+   -syllable*)
2201+       os=-syllable
2202+       ;;
2203    -386bsd)
2204        os=-bsd
2205        ;;
2206@@ -1215,6 +1397,9 @@
2207    -sinix*)
2208        os=-sysv4
2209        ;;
2210+        -tpf*)
2211+       os=-tpf
2212+       ;;
2213    -triton*)
2214        os=-sysv3
2215        ;;
2216@@ -1251,6 +1436,14 @@
2217    -kaos*)
2218        os=-kaos
2219        ;;
2220+   -zvmoe)
2221+       os=-zvmoe
2222+       ;;
2223+   -dicos*)
2224+       os=-dicos
2225+       ;;
2226+        -nacl*)
2227+           ;;
2228    -none)
2229        ;;
2230    *)
2231@@ -1273,6 +1466,12 @@
2232 # system, and we'll never get to this point.
2233
2234 case $basic_machine in
2235+        score-*)
2236+       os=-elf
2237+       ;;
2238+        spu-*)
2239+       os=-elf
2240+       ;;
2241    *-acorn)
2242        os=-riscix1.2
2243        ;;
2244@@ -1282,8 +1481,8 @@
2245    arm*-semi)
2246        os=-aout
2247        ;;
2248-   c4x-* | tic4x-*)
2249-       os=-coff
2250+        c4x-* | tic4x-*)
2251+           os=-coff
2252        ;;
2253    # This must come before the *-dec entry.
2254    pdp10-*)
2255@@ -1310,6 +1509,9 @@
2256    m68*-cisco)
2257        os=-aout
2258        ;;
2259+        mep-*)
2260+       os=-elf
2261+       ;;
2262    mips*-cisco)
2263        os=-elf
2264        ;;
2265@@ -1328,9 +1530,15 @@
2266    *-be)
2267        os=-beos
2268        ;;
2269+   *-haiku)
2270+       os=-haiku
2271+       ;;
2272    *-ibm)
2273        os=-aix
2274        ;;
2275+       *-knuth)
2276+       os=-mmixware
2277+       ;;
2278    *-wec)
2279        os=-proelf
2280        ;;
2281@@ -1433,7 +1641,7 @@
2282            -sunos*)
2283                vendor=sun
2284                ;;
2285-           -aix*)
2286+           -cnk*|-aix*)
2287                vendor=ibm
2288                ;;
2289            -beos*)
2290@@ -1463,9 +1671,15 @@
2291            -mvs* | -opened*)
2292                vendor=ibm
2293                ;;
2294+           -os400*)
2295+               vendor=ibm
2296+               ;;
2297            -ptx*)
2298                vendor=sequent
2299                ;;
2300+           -tpf*)
2301+               vendor=ibm
2302+               ;;
2303            -vxsim* | -vxworks* | -windiss*)
2304                vendor=wrs
2305                ;;
2306@@ -1490,7 +1704,7 @@
2307 esac
2308
2309 echo $basic_machine$os
2310-exit 0
2311+exit
2312
2313 # Local variables:
2314 # eval: (add-hook 'write-file-hooks 'time-stamp)
2315