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