aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2002-05-27 06:43:19 +0000
committerPaul Eggert2002-05-27 06:43:19 +0000
commit4e405419efb78eddf8adbfb704b1e9170b069816 (patch)
tree3b891515ac010c128783044612150890253e608f
parentf6a9d2d8cf551ffa7a61b704912338cbf9c23532 (diff)
downloademacs-4e405419efb78eddf8adbfb704b1e9170b069816.tar.gz
emacs-4e405419efb78eddf8adbfb704b1e9170b069816.zip
Updated from master source.
-rwxr-xr-xconfig.guess792
-rwxr-xr-xconfig.sub337
2 files changed, 622 insertions, 507 deletions
diff --git a/config.guess b/config.guess
index a7983e69258..fbad77f14ba 100755
--- a/config.guess
+++ b/config.guess
@@ -1,9 +1,9 @@
1#! /bin/sh 1#! /bin/sh
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# Free Software Foundation, Inc. 4# 2000, 2001, 2002 Free Software Foundation, Inc.
5 5
6version='2000-11-10' 6timestamp='2002-05-22'
7 7
8# This file is free software; you can redistribute it and/or modify it 8# This file is free software; you can redistribute it and/or modify it
9# under the terms of the GNU General Public License as published by 9# under the terms of the GNU General Public License as published by
@@ -24,38 +24,50 @@ version='2000-11-10'
24# configuration script generated by Autoconf, you may include it under 24# configuration script generated by Autoconf, you may include it under
25# the same distribution terms that you use for the rest of that program. 25# the same distribution terms that you use for the rest of that program.
26 26
27# Written by Per Bothner <bothner@cygnus.com>. 27# Originally written by Per Bothner <per@bothner.com>.
28# Please send patches to <config-patches@gnu.org>. 28# Please send patches to <config-patches@gnu.org>. Submit a context
29# diff and a properly formatted ChangeLog entry.
29# 30#
30# This script attempts to guess a canonical system name similar to 31# This script attempts to guess a canonical system name similar to
31# config.sub. If it succeeds, it prints the system name on stdout, and 32# config.sub. If it succeeds, it prints the system name on stdout, and
32# exits with 0. Otherwise, it exits with 1. 33# exits with 0. Otherwise, it exits with 1.
33# 34#
34# The plan is that this can be called by configure scripts if you 35# The plan is that this can be called by configure scripts if you
35# don't specify an explicit system type (host/target name). 36# don't specify an explicit build system type.
36#
37# Only a few systems have been added to this list; please add others
38# (but try to keep the structure clean).
39#
40 37
41me=`echo "$0" | sed -e 's,.*/,,'` 38me=`echo "$0" | sed -e 's,.*/,,'`
42 39
43usage="\ 40usage="\
44Usage: $0 [OPTION] 41Usage: $0 [OPTION]
45 42
46Output the configuration name of this system. 43Output the configuration name of the system \`$me' is run on.
47 44
48Operation modes: 45Operation modes:
49 -h, --help print this help, then exit 46 -h, --help print this help, then exit
50 -V, --version print version number, then exit" 47 -t, --time-stamp print date of last modification, then exit
48 -v, --version print version number, then exit
49
50Report bugs and patches to <config-patches@gnu.org>."
51
52version="\
53GNU config.guess ($timestamp)
54
55Originally written by Per Bothner.
56Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
57Free Software Foundation, Inc.
58
59This is free software; see the source for copying conditions. There is NO
60warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
51 61
52help=" 62help="
53Try \`$me --help' for more information." 63Try \`$me --help' for more information."
54 64
55# Parse command line 65# Parse command line
56while test $# -gt 0 ; do 66while test $# -gt 0 ; do
57 case "$1" in 67 case $1 in
58 --version | --vers* | -V ) 68 --time-stamp | --time* | -t )
69 echo "$timestamp" ; exit 0 ;;
70 --version | -v )
59 echo "$version" ; exit 0 ;; 71 echo "$version" ; exit 0 ;;
60 --help | --h* | -h ) 72 --help | --h* | -h )
61 echo "$usage"; exit 0 ;; 73 echo "$usage"; exit 0 ;;
@@ -64,9 +76,7 @@ while test $# -gt 0 ; do
64 - ) # Use stdin as input. 76 - ) # Use stdin as input.
65 break ;; 77 break ;;
66 -* ) 78 -* )
67 exec >&2 79 echo "$me: invalid option $1$help" >&2
68 echo "$me: invalid option $1"
69 echo "$help"
70 exit 1 ;; 80 exit 1 ;;
71 * ) 81 * )
72 break ;; 82 break ;;
@@ -80,76 +90,83 @@ fi
80 90
81 91
82dummy=dummy-$$ 92dummy=dummy-$$
83trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 93trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
84 94
85# Use $HOST_CC if defined. $CC may point to a cross-compiler 95# CC_FOR_BUILD -- compiler used by this script.
86if test x"$CC_FOR_BUILD" = x; then 96# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
87 if test x"$HOST_CC" != x; then 97# use `HOST_CC' if defined, but it is deprecated.
88 CC_FOR_BUILD="$HOST_CC"
89 else
90 if test x"$CC" != x; then
91 CC_FOR_BUILD="$CC"
92 else
93 echo 'int dummy(){}' >$dummy.c
94 for c in cc c89 gcc; do
95 ($c $dummy.c -c) >/dev/null 2>&1
96 if test $? = 0; then
97 CC_FOR_BUILD="$c"; break
98 fi
99 done
100 rm -f $dummy.c $dummy.o
101 if test x"$CC_FOR_BUILD" = x; then
102 CC_FOR_BUILD=no_compiler_found
103 fi
104 fi
105 fi
106fi
107 98
99set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
100 ,,) echo "int dummy(){}" > $dummy.c ;
101 for c in cc gcc c89 c99 ; do
102 ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
103 if test $? = 0 ; then
104 CC_FOR_BUILD="$c"; break ;
105 fi ;
106 done ;
107 rm -f $dummy.c $dummy.o $dummy.rel ;
108 if test x"$CC_FOR_BUILD" = x ; then
109 CC_FOR_BUILD=no_compiler_found ;
110 fi
111 ;;
112 ,,*) CC_FOR_BUILD=$CC ;;
113 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
114esac'
108 115
109# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 116# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
110# (ghazi@noc.rutgers.edu 8/24/94.) 117# (ghazi@noc.rutgers.edu 1994-08-24)
111if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 118if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
112 PATH=$PATH:/.attbin ; export PATH 119 PATH=$PATH:/.attbin ; export PATH
113fi 120fi
114 121
115UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 122UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
116UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 123UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
117UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 124UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
118UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 125UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
119 126
120# Note: order is significant - the case branches are not exclusive. 127# Note: order is significant - the case branches are not exclusive.
121 128
122case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 129case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
123 *:NetBSD:*:*) 130 *:NetBSD:*:*)
124 # Netbsd (nbsd) targets should (where applicable) match one or 131 # NetBSD (nbsd) targets should (where applicable) match one or
125 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 132 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
126 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 133 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
127 # switched to ELF, *-*-netbsd* would select the old 134 # switched to ELF, *-*-netbsd* would select the old
128 # object file format. This provides both forward 135 # object file format. This provides both forward
129 # compatibility and a consistent mechanism for selecting the 136 # compatibility and a consistent mechanism for selecting the
130 # object file format. 137 # object file format.
131 # Determine the machine/vendor (is the vendor relevant). 138 #
132 case "${UNAME_MACHINE}" in 139 # Note: NetBSD doesn't particularly care about the vendor
133 amiga) machine=m68k-unknown ;; 140 # portion of the name. We always set it to "unknown".
134 arm32) machine=arm-unknown ;; 141 sysctl="sysctl -n hw.machine_arch"
135 atari*) machine=m68k-atari ;; 142 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
136 sun3*) machine=m68k-sun ;; 143 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
137 mac68k) machine=m68k-apple ;; 144 case "${UNAME_MACHINE_ARCH}" in
138 macppc) machine=powerpc-apple ;; 145 armeb) machine=armeb-unknown ;;
139 hp3[0-9][05]) machine=m68k-hp ;; 146 arm*) machine=arm-unknown ;;
140 ibmrt|romp-ibm) machine=romp-ibm ;; 147 sh3el) machine=shl-unknown ;;
141 *) machine=${UNAME_MACHINE}-unknown ;; 148 sh3eb) machine=sh-unknown ;;
149 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
150 esac
151 # The Operating System including object format, if it has switched
152 # to ELF recently, or will in the future.
153 case "${UNAME_MACHINE_ARCH}" in
154 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
155 eval $set_cc_for_build
156 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
157 | grep __ELF__ >/dev/null
158 then
159 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
160 # Return netbsd for either. FIX?
161 os=netbsd
162 else
163 os=netbsdelf
164 fi
165 ;;
166 *)
167 os=netbsd
168 ;;
142 esac 169 esac
143 # The Operating System including object format.
144 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
145 | grep __ELF__ >/dev/null
146 then
147 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
148 # Return netbsd for either. FIX?
149 os=netbsd
150 else
151 os=netbsdelf
152 fi
153 # The OS release 170 # The OS release
154 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 171 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
155 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 172 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
@@ -157,6 +174,45 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
157 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 174 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
158 echo "${machine}-${os}${release}" 175 echo "${machine}-${os}${release}"
159 exit 0 ;; 176 exit 0 ;;
177 amiga:OpenBSD:*:*)
178 echo m68k-unknown-openbsd${UNAME_RELEASE}
179 exit 0 ;;
180 arc:OpenBSD:*:*)
181 echo mipsel-unknown-openbsd${UNAME_RELEASE}
182 exit 0 ;;
183 hp300:OpenBSD:*:*)
184 echo m68k-unknown-openbsd${UNAME_RELEASE}
185 exit 0 ;;
186 mac68k:OpenBSD:*:*)
187 echo m68k-unknown-openbsd${UNAME_RELEASE}
188 exit 0 ;;
189 macppc:OpenBSD:*:*)
190 echo powerpc-unknown-openbsd${UNAME_RELEASE}
191 exit 0 ;;
192 mvme68k:OpenBSD:*:*)
193 echo m68k-unknown-openbsd${UNAME_RELEASE}
194 exit 0 ;;
195 mvme88k:OpenBSD:*:*)
196 echo m88k-unknown-openbsd${UNAME_RELEASE}
197 exit 0 ;;
198 mvmeppc:OpenBSD:*:*)
199 echo powerpc-unknown-openbsd${UNAME_RELEASE}
200 exit 0 ;;
201 pmax:OpenBSD:*:*)
202 echo mipsel-unknown-openbsd${UNAME_RELEASE}
203 exit 0 ;;
204 sgi:OpenBSD:*:*)
205 echo mipseb-unknown-openbsd${UNAME_RELEASE}
206 exit 0 ;;
207 sun3:OpenBSD:*:*)
208 echo m68k-unknown-openbsd${UNAME_RELEASE}
209 exit 0 ;;
210 wgrisc:OpenBSD:*:*)
211 echo mipsel-unknown-openbsd${UNAME_RELEASE}
212 exit 0 ;;
213 *:OpenBSD:*:*)
214 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
215 exit 0 ;;
160 alpha:OSF1:*:*) 216 alpha:OSF1:*:*)
161 if test $UNAME_RELEASE = "V4.0"; then 217 if test $UNAME_RELEASE = "V4.0"; then
162 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 218 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -190,6 +246,7 @@ main:
190 jsr \$26,exit 246 jsr \$26,exit
191 .end main 247 .end main
192EOF 248EOF
249 eval $set_cc_for_build
193 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null 250 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
194 if test "$?" = 0 ; then 251 if test "$?" = 0 ; then
195 case `./$dummy` in 252 case `./$dummy` in
@@ -211,6 +268,9 @@ EOF
211 2-307) 268 2-307)
212 UNAME_MACHINE="alphaev67" 269 UNAME_MACHINE="alphaev67"
213 ;; 270 ;;
271 2-1307)
272 UNAME_MACHINE="alphaev68"
273 ;;
214 esac 274 esac
215 fi 275 fi
216 rm -f $dummy.s $dummy 276 rm -f $dummy.s $dummy
@@ -228,29 +288,11 @@ EOF
228 Amiga*:UNIX_System_V:4.0:*) 288 Amiga*:UNIX_System_V:4.0:*)
229 echo m68k-unknown-sysv4 289 echo m68k-unknown-sysv4
230 exit 0;; 290 exit 0;;
231 amiga:OpenBSD:*:*)
232 echo m68k-unknown-openbsd${UNAME_RELEASE}
233 exit 0 ;;
234 *:[Aa]miga[Oo][Ss]:*:*) 291 *:[Aa]miga[Oo][Ss]:*:*)
235 echo ${UNAME_MACHINE}-unknown-amigaos 292 echo ${UNAME_MACHINE}-unknown-amigaos
236 exit 0 ;; 293 exit 0 ;;
237 arc64:OpenBSD:*:*) 294 *:[Mm]orph[Oo][Ss]:*:*)
238 echo mips64el-unknown-openbsd${UNAME_RELEASE} 295 echo ${UNAME_MACHINE}-unknown-morphos
239 exit 0 ;;
240 arc:OpenBSD:*:*)
241 echo mipsel-unknown-openbsd${UNAME_RELEASE}
242 exit 0 ;;
243 hkmips:OpenBSD:*:*)
244 echo mips-unknown-openbsd${UNAME_RELEASE}
245 exit 0 ;;
246 pmax:OpenBSD:*:*)
247 echo mipsel-unknown-openbsd${UNAME_RELEASE}
248 exit 0 ;;
249 sgi:OpenBSD:*:*)
250 echo mips-unknown-openbsd${UNAME_RELEASE}
251 exit 0 ;;
252 wgrisc:OpenBSD:*:*)
253 echo mipsel-unknown-openbsd${UNAME_RELEASE}
254 exit 0 ;; 296 exit 0 ;;
255 *:OS/390:*:*) 297 *:OS/390:*:*)
256 echo i370-ibm-openedition 298 echo i370-ibm-openedition
@@ -258,7 +300,7 @@ EOF
258 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 300 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
259 echo arm-acorn-riscix${UNAME_RELEASE} 301 echo arm-acorn-riscix${UNAME_RELEASE}
260 exit 0;; 302 exit 0;;
261 SR2?01:HI-UX/MPP:*:*) 303 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
262 echo hppa1.1-hitachi-hiuxmpp 304 echo hppa1.1-hitachi-hiuxmpp
263 exit 0;; 305 exit 0;;
264 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 306 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
@@ -300,7 +342,7 @@ EOF
300 echo m68k-sun-sunos${UNAME_RELEASE} 342 echo m68k-sun-sunos${UNAME_RELEASE}
301 exit 0 ;; 343 exit 0 ;;
302 sun*:*:4.2BSD:*) 344 sun*:*:4.2BSD:*)
303 UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 345 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
304 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 346 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
305 case "`/bin/arch`" in 347 case "`/bin/arch`" in
306 sun3) 348 sun3)
@@ -314,9 +356,6 @@ EOF
314 aushp:SunOS:*:*) 356 aushp:SunOS:*:*)
315 echo sparc-auspex-sunos${UNAME_RELEASE} 357 echo sparc-auspex-sunos${UNAME_RELEASE}
316 exit 0 ;; 358 exit 0 ;;
317 atari*:OpenBSD:*:*)
318 echo m68k-unknown-openbsd${UNAME_RELEASE}
319 exit 0 ;;
320 # The situation for MiNT is a little confusing. The machine name 359 # The situation for MiNT is a little confusing. The machine name
321 # can be virtually everything (everything which is not 360 # can be virtually everything (everything which is not
322 # "atarist" or "atariste" at least should have a processor 361 # "atarist" or "atariste" at least should have a processor
@@ -343,18 +382,6 @@ EOF
343 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 382 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
344 echo m68k-unknown-mint${UNAME_RELEASE} 383 echo m68k-unknown-mint${UNAME_RELEASE}
345 exit 0 ;; 384 exit 0 ;;
346 sun3*:OpenBSD:*:*)
347 echo m68k-unknown-openbsd${UNAME_RELEASE}
348 exit 0 ;;
349 mac68k:OpenBSD:*:*)
350 echo m68k-unknown-openbsd${UNAME_RELEASE}
351 exit 0 ;;
352 mvme68k:OpenBSD:*:*)
353 echo m68k-unknown-openbsd${UNAME_RELEASE}
354 exit 0 ;;
355 mvme88k:OpenBSD:*:*)
356 echo m88k-unknown-openbsd${UNAME_RELEASE}
357 exit 0 ;;
358 powerpc:machten:*:*) 385 powerpc:machten:*:*)
359 echo powerpc-apple-machten${UNAME_RELEASE} 386 echo powerpc-apple-machten${UNAME_RELEASE}
360 exit 0 ;; 387 exit 0 ;;
@@ -371,6 +398,7 @@ EOF
371 echo clipper-intergraph-clix${UNAME_RELEASE} 398 echo clipper-intergraph-clix${UNAME_RELEASE}
372 exit 0 ;; 399 exit 0 ;;
373 mips:*:*:UMIPS | mips:*:*:RISCos) 400 mips:*:*:UMIPS | mips:*:*:RISCos)
401 eval $set_cc_for_build
374 sed 's/^ //' << EOF >$dummy.c 402 sed 's/^ //' << EOF >$dummy.c
375#ifdef __cplusplus 403#ifdef __cplusplus
376#include <stdio.h> /* for printf() prototype */ 404#include <stdio.h> /* for printf() prototype */
@@ -394,10 +422,16 @@ EOF
394EOF 422EOF
395 $CC_FOR_BUILD $dummy.c -o $dummy \ 423 $CC_FOR_BUILD $dummy.c -o $dummy \
396 && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 424 && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
397 && rm $dummy.c $dummy && exit 0 425 && rm -f $dummy.c $dummy && exit 0
398 rm -f $dummy.c $dummy 426 rm -f $dummy.c $dummy
399 echo mips-mips-riscos${UNAME_RELEASE} 427 echo mips-mips-riscos${UNAME_RELEASE}
400 exit 0 ;; 428 exit 0 ;;
429 Motorola:PowerMAX_OS:*:*)
430 echo powerpc-motorola-powermax
431 exit 0 ;;
432 Night_Hawk:*:*:PowerMAX_OS)
433 echo powerpc-harris-powermax
434 exit 0 ;;
401 Night_Hawk:Power_UNIX:*:*) 435 Night_Hawk:Power_UNIX:*:*)
402 echo powerpc-harris-powerunix 436 echo powerpc-harris-powerunix
403 exit 0 ;; 437 exit 0 ;;
@@ -445,11 +479,20 @@ EOF
445 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 479 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
446 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 480 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
447 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 481 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
448 i?86:AIX:*:*) 482 i*86:AIX:*:*)
449 echo i386-ibm-aix 483 echo i386-ibm-aix
450 exit 0 ;; 484 exit 0 ;;
485 ia64:AIX:*:*)
486 if [ -x /usr/bin/oslevel ] ; then
487 IBM_REV=`/usr/bin/oslevel`
488 else
489 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
490 fi
491 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
492 exit 0 ;;
451 *:AIX:2:3) 493 *:AIX:2:3)
452 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 494 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
495 eval $set_cc_for_build
453 sed 's/^ //' << EOF >$dummy.c 496 sed 's/^ //' << EOF >$dummy.c
454 #include <sys/systemcfg.h> 497 #include <sys/systemcfg.h>
455 498
@@ -461,7 +504,7 @@ EOF
461 exit(0); 504 exit(0);
462 } 505 }
463EOF 506EOF
464 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 507 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
465 rm -f $dummy.c $dummy 508 rm -f $dummy.c $dummy
466 echo rs6000-ibm-aix3.2.5 509 echo rs6000-ibm-aix3.2.5
467 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 510 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
@@ -470,9 +513,9 @@ EOF
470 echo rs6000-ibm-aix3.2 513 echo rs6000-ibm-aix3.2
471 fi 514 fi
472 exit 0 ;; 515 exit 0 ;;
473 *:AIX:*:4) 516 *:AIX:*:[45])
474 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` 517 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
475 if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then 518 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
476 IBM_ARCH=rs6000 519 IBM_ARCH=rs6000
477 else 520 else
478 IBM_ARCH=powerpc 521 IBM_ARCH=powerpc
@@ -480,7 +523,7 @@ EOF
480 if [ -x /usr/bin/oslevel ] ; then 523 if [ -x /usr/bin/oslevel ] ; then
481 IBM_REV=`/usr/bin/oslevel` 524 IBM_REV=`/usr/bin/oslevel`
482 else 525 else
483 IBM_REV=4.${UNAME_RELEASE} 526 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
484 fi 527 fi
485 echo ${IBM_ARCH}-ibm-aix${IBM_REV} 528 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
486 exit 0 ;; 529 exit 0 ;;
@@ -506,11 +549,28 @@ EOF
506 echo m68k-hp-bsd4.4 549 echo m68k-hp-bsd4.4
507 exit 0 ;; 550 exit 0 ;;
508 9000/[34678]??:HP-UX:*:*) 551 9000/[34678]??:HP-UX:*:*)
552 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
509 case "${UNAME_MACHINE}" in 553 case "${UNAME_MACHINE}" in
510 9000/31? ) HP_ARCH=m68000 ;; 554 9000/31? ) HP_ARCH=m68000 ;;
511 9000/[34]?? ) HP_ARCH=m68k ;; 555 9000/[34]?? ) HP_ARCH=m68k ;;
512 9000/[678][0-9][0-9]) 556 9000/[678][0-9][0-9])
513 sed 's/^ //' << EOF >$dummy.c 557 if [ -x /usr/bin/getconf ]; then
558 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
559 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
560 case "${sc_cpu_version}" in
561 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
562 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
563 532) # CPU_PA_RISC2_0
564 case "${sc_kernel_bits}" in
565 32) HP_ARCH="hppa2.0n" ;;
566 64) HP_ARCH="hppa2.0w" ;;
567 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
568 esac ;;
569 esac
570 fi
571 if [ "${HP_ARCH}" = "" ]; then
572 eval $set_cc_for_build
573 sed 's/^ //' << EOF >$dummy.c
514 574
515 #define _HPUX_SOURCE 575 #define _HPUX_SOURCE
516 #include <stdlib.h> 576 #include <stdlib.h>
@@ -543,14 +603,19 @@ EOF
543 exit (0); 603 exit (0);
544 } 604 }
545EOF 605EOF
546 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` 606 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
547 if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi 607 if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
548 rm -f $dummy.c $dummy 608 rm -f $dummy.c $dummy
609 fi ;;
549 esac 610 esac
550 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
551 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 611 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
552 exit 0 ;; 612 exit 0 ;;
613 ia64:HP-UX:*:*)
614 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
615 echo ia64-hp-hpux${HPUX_REV}
616 exit 0 ;;
553 3050*:HI-UX:*:*) 617 3050*:HI-UX:*:*)
618 eval $set_cc_for_build
554 sed 's/^ //' << EOF >$dummy.c 619 sed 's/^ //' << EOF >$dummy.c
555 #include <unistd.h> 620 #include <unistd.h>
556 int 621 int
@@ -576,7 +641,7 @@ EOF
576 exit (0); 641 exit (0);
577 } 642 }
578EOF 643EOF
579 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 644 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
580 rm -f $dummy.c $dummy 645 rm -f $dummy.c $dummy
581 echo unknown-hitachi-hiuxwe2 646 echo unknown-hitachi-hiuxwe2
582 exit 0 ;; 647 exit 0 ;;
@@ -586,7 +651,7 @@ EOF
586 9000/8??:4.3bsd:*:*) 651 9000/8??:4.3bsd:*:*)
587 echo hppa1.0-hp-bsd 652 echo hppa1.0-hp-bsd
588 exit 0 ;; 653 exit 0 ;;
589 *9??*:MPE/iX:*:*) 654 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
590 echo hppa1.0-hp-mpeix 655 echo hppa1.0-hp-mpeix
591 exit 0 ;; 656 exit 0 ;;
592 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 657 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
@@ -595,7 +660,7 @@ EOF
595 hp8??:OSF1:*:*) 660 hp8??:OSF1:*:*)
596 echo hppa1.0-hp-osf 661 echo hppa1.0-hp-osf
597 exit 0 ;; 662 exit 0 ;;
598 i?86:OSF1:*:*) 663 i*86:OSF1:*:*)
599 if [ -x /usr/sbin/sysversion ] ; then 664 if [ -x /usr/sbin/sysversion ] ; then
600 echo ${UNAME_MACHINE}-unknown-osf1mk 665 echo ${UNAME_MACHINE}-unknown-osf1mk
601 else 666 else
@@ -605,9 +670,6 @@ EOF
605 parisc*:Lites*:*:*) 670 parisc*:Lites*:*:*)
606 echo hppa1.1-hp-lites 671 echo hppa1.1-hp-lites
607 exit 0 ;; 672 exit 0 ;;
608 hppa*:OpenBSD:*:*)
609 echo hppa-unknown-openbsd
610 exit 0 ;;
611 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 673 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
612 echo c1-convex-bsd 674 echo c1-convex-bsd
613 exit 0 ;; 675 exit 0 ;;
@@ -626,41 +688,34 @@ EOF
626 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 688 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
627 echo c4-convex-bsd 689 echo c4-convex-bsd
628 exit 0 ;; 690 exit 0 ;;
629 CRAY*X-MP:*:*:*)
630 echo xmp-cray-unicos
631 exit 0 ;;
632 CRAY*Y-MP:*:*:*) 691 CRAY*Y-MP:*:*:*)
633 echo ymp-cray-unicos${UNAME_RELEASE} 692 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
634 exit 0 ;; 693 exit 0 ;;
635 CRAY*[A-Z]90:*:*:*) 694 CRAY*[A-Z]90:*:*:*)
636 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 695 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
637 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 696 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
638 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ 697 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
698 -e 's/\.[^.]*$/.X/'
639 exit 0 ;; 699 exit 0 ;;
640 CRAY*TS:*:*:*) 700 CRAY*TS:*:*:*)
641 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 701 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
642 exit 0 ;; 702 exit 0 ;;
643 CRAY*T3E:*:*:*) 703 CRAY*T3D:*:*:*)
644 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 704 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
645 exit 0 ;; 705 exit 0 ;;
706 CRAY*T3E:*:*:*)
707 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
708 exit 0 ;;
646 CRAY*SV1:*:*:*) 709 CRAY*SV1:*:*:*)
647 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 710 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
648 exit 0 ;; 711 exit 0 ;;
649 CRAY-2:*:*:*) 712 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
650 echo cray2-cray-unicos 713 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
651 exit 0 ;;
652 F300:UNIX_System_V:*:*)
653 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 714 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
654 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 715 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
655 echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 716 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
656 exit 0 ;; 717 exit 0 ;;
657 F301:UNIX_System_V:*:*) 718 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
658 echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
659 exit 0 ;;
660 hp300:OpenBSD:*:*)
661 echo m68k-unknown-openbsd${UNAME_RELEASE}
662 exit 0 ;;
663 i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
664 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 719 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
665 exit 0 ;; 720 exit 0 ;;
666 sparc*:BSD/OS:*:*) 721 sparc*:BSD/OS:*:*)
@@ -672,9 +727,6 @@ EOF
672 *:FreeBSD:*:*) 727 *:FreeBSD:*:*)
673 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 728 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
674 exit 0 ;; 729 exit 0 ;;
675 *:OpenBSD:*:*)
676 echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
677 exit 0 ;;
678 i*:CYGWIN*:*) 730 i*:CYGWIN*:*)
679 echo ${UNAME_MACHINE}-pc-cygwin 731 echo ${UNAME_MACHINE}-pc-cygwin
680 exit 0 ;; 732 exit 0 ;;
@@ -684,6 +736,9 @@ EOF
684 i*:PW*:*) 736 i*:PW*:*)
685 echo ${UNAME_MACHINE}-pc-pw32 737 echo ${UNAME_MACHINE}-pc-pw32
686 exit 0 ;; 738 exit 0 ;;
739 x86:Interix*:3*)
740 echo i386-pc-interix3
741 exit 0 ;;
687 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 742 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
688 # How do we know it's Interix rather than the generic POSIX subsystem? 743 # How do we know it's Interix rather than the generic POSIX subsystem?
689 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 744 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -705,242 +760,139 @@ EOF
705 i*86:Minix:*:*) 760 i*86:Minix:*:*)
706 echo ${UNAME_MACHINE}-pc-minix 761 echo ${UNAME_MACHINE}-pc-minix
707 exit 0 ;; 762 exit 0 ;;
708 *:Linux:*:*) 763 arm*:Linux:*:*)
709 764 echo ${UNAME_MACHINE}-unknown-linux-gnu
765 exit 0 ;;
766 ia64:Linux:*:*)
767 echo ${UNAME_MACHINE}-unknown-linux-gnu
768 exit 0 ;;
769 m68*:Linux:*:*)
770 echo ${UNAME_MACHINE}-unknown-linux-gnu
771 exit 0 ;;
772 mips:Linux:*:*)
773 eval $set_cc_for_build
774 sed 's/^ //' << EOF >$dummy.c
775 #undef CPU
776 #undef mips
777 #undef mipsel
778 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
779 CPU=mipsel
780 #else
781 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
782 CPU=mips
783 #else
784 CPU=
785 #endif
786 #endif
787EOF
788 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
789 rm -f $dummy.c
790 test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
791 ;;
792 ppc:Linux:*:*)
793 echo powerpc-unknown-linux-gnu
794 exit 0 ;;
795 ppc64:Linux:*:*)
796 echo powerpc64-unknown-linux-gnu
797 exit 0 ;;
798 alpha:Linux:*:*)
799 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
800 EV5) UNAME_MACHINE=alphaev5 ;;
801 EV56) UNAME_MACHINE=alphaev56 ;;
802 PCA56) UNAME_MACHINE=alphapca56 ;;
803 PCA57) UNAME_MACHINE=alphapca56 ;;
804 EV6) UNAME_MACHINE=alphaev6 ;;
805 EV67) UNAME_MACHINE=alphaev67 ;;
806 EV68*) UNAME_MACHINE=alphaev68 ;;
807 esac
808 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
809 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
810 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
811 exit 0 ;;
812 parisc:Linux:*:* | hppa:Linux:*:*)
813 # Look for CPU level
814 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
815 PA7*) echo hppa1.1-unknown-linux-gnu ;;
816 PA8*) echo hppa2.0-unknown-linux-gnu ;;
817 *) echo hppa-unknown-linux-gnu ;;
818 esac
819 exit 0 ;;
820 parisc64:Linux:*:* | hppa64:Linux:*:*)
821 echo hppa64-unknown-linux-gnu
822 exit 0 ;;
823 s390:Linux:*:* | s390x:Linux:*:*)
824 echo ${UNAME_MACHINE}-ibm-linux
825 exit 0 ;;
826 sh*:Linux:*:*)
827 echo ${UNAME_MACHINE}-unknown-linux-gnu
828 exit 0 ;;
829 sparc:Linux:*:* | sparc64:Linux:*:*)
830 echo ${UNAME_MACHINE}-unknown-linux-gnu
831 exit 0 ;;
832 x86_64:Linux:*:*)
833 echo x86_64-unknown-linux-gnu
834 exit 0 ;;
835 i*86:Linux:*:*)
710 # The BFD linker knows what the default object file format is, so 836 # The BFD linker knows what the default object file format is, so
711 # first see if it will tell us. cd to the root directory to prevent 837 # first see if it will tell us. cd to the root directory to prevent
712 # problems with other programs or directories called `ld' in the path. 838 # problems with other programs or directories called `ld' in the path.
713 ld_supported_emulations=`cd /; ld --help 2>&1 \ 839 # Set LC_ALL=C to ensure ld outputs messages in English.
714 | sed -ne '/supported emulations:/!d 840 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
841 | sed -ne '/supported targets:/!d
715 s/[ ][ ]*/ /g 842 s/[ ][ ]*/ /g
716 s/.*supported emulations: *// 843 s/.*supported targets: *//
717 s/ .*// 844 s/ .*//
718 p'` 845 p'`
719 case "$ld_supported_emulations" in 846 case "$ld_supported_targets" in
720 *ia64) 847 elf32-i386)
721 echo "${UNAME_MACHINE}-unknown-linux"
722 exit 0
723 ;;
724 i?86linux)
725 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
726 exit 0
727 ;;
728 elf_i?86)
729 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 848 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
730 ;; 849 ;;
731 i?86coff) 850 a.out-i386-linux)
851 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
852 exit 0 ;;
853 coff-i386)
732 echo "${UNAME_MACHINE}-pc-linux-gnucoff" 854 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
733 exit 0 855 exit 0 ;;
734 ;; 856 "")
735 sparclinux) 857 # Either a pre-BFD a.out linker (linux-gnuoldld) or
736 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" 858 # one that does not give us useful --help.
737 exit 0 859 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
738 ;; 860 exit 0 ;;
739 elf32_sparc)
740 echo "${UNAME_MACHINE}-unknown-linux-gnu"
741 exit 0
742 ;;
743 armlinux)
744 echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
745 exit 0
746 ;;
747 elf32arm*)
748 echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
749 exit 0
750 ;;
751 armelf_linux*)
752 echo "${UNAME_MACHINE}-unknown-linux-gnu"
753 exit 0
754 ;;
755 m68klinux)
756 echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
757 exit 0
758 ;;
759 elf32ppc | elf32ppclinux)
760 # Determine Lib Version
761 cat >$dummy.c <<EOF
762#include <features.h>
763#if defined(__GLIBC__)
764extern char __libc_version[];
765extern char __libc_release[];
766#endif
767main(argc, argv)
768 int argc;
769 char *argv[];
770{
771#if defined(__GLIBC__)
772 printf("%s %s\n", __libc_version, __libc_release);
773#else
774 printf("unkown\n");
775#endif
776 return 0;
777}
778EOF
779 LIBC=""
780 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
781 if test "$?" = 0 ; then
782 ./$dummy | grep 1\.99 > /dev/null
783 if test "$?" = 0 ; then
784 LIBC="libc1"
785 fi
786 fi
787 rm -f $dummy.c $dummy
788 echo powerpc-unknown-linux-gnu${LIBC}
789 exit 0
790 ;;
791 shelf_linux)
792 echo "${UNAME_MACHINE}-unknown-linux-gnu"
793 exit 0
794 ;;
795 esac 861 esac
796 862 # Determine whether the default compiler is a.out or elf
797 if test "${UNAME_MACHINE}" = "alpha" ; then 863 eval $set_cc_for_build
798 cat <<EOF >$dummy.s 864 sed 's/^ //' << EOF >$dummy.c
799 .data 865 #include <features.h>
800 \$Lformat: 866 #ifdef __ELF__
801 .byte 37,100,45,37,120,10,0 # "%d-%x\n" 867 # ifdef __GLIBC__
802 868 # if __GLIBC__ >= 2
803 .text 869 LIBC=gnu
804 .globl main 870 # else
805 .align 4 871 LIBC=gnulibc1
806 .ent main 872 # endif
807 main: 873 # else
808 .frame \$30,16,\$26,0 874 LIBC=gnulibc1
809 ldgp \$29,0(\$27) 875 # endif
810 .prologue 1 876 #else
811 .long 0x47e03d80 # implver \$0 877 #ifdef __INTEL_COMPILER
812 lda \$2,-1 878 LIBC=gnu
813 .long 0x47e20c21 # amask \$2,\$1 879 #else
814 lda \$16,\$Lformat 880 LIBC=gnuaout
815 mov \$0,\$17 881 #endif
816 not \$1,\$18 882 #endif
817 jsr \$26,printf
818 ldgp \$29,0(\$26)
819 mov 0,\$16
820 jsr \$26,exit
821 .end main
822EOF
823 LIBC=""
824 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
825 if test "$?" = 0 ; then
826 case `./$dummy` in
827 0-0)
828 UNAME_MACHINE="alpha"
829 ;;
830 1-0)
831 UNAME_MACHINE="alphaev5"
832 ;;
833 1-1)
834 UNAME_MACHINE="alphaev56"
835 ;;
836 1-101)
837 UNAME_MACHINE="alphapca56"
838 ;;
839 2-303)
840 UNAME_MACHINE="alphaev6"
841 ;;
842 2-307)
843 UNAME_MACHINE="alphaev67"
844 ;;
845 esac
846
847 objdump --private-headers $dummy | \
848 grep ld.so.1 > /dev/null
849 if test "$?" = 0 ; then
850 LIBC="libc1"
851 fi
852 fi
853 rm -f $dummy.s $dummy
854 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
855 elif test "${UNAME_MACHINE}" = "mips" ; then
856 cat >$dummy.c <<EOF
857#ifdef __cplusplus
858#include <stdio.h> /* for printf() prototype */
859 int main (int argc, char *argv[]) {
860#else
861 int main (argc, argv) int argc; char *argv[]; {
862#endif
863#ifdef __MIPSEB__
864 printf ("%s-unknown-linux-gnu\n", argv[1]);
865#endif
866#ifdef __MIPSEL__
867 printf ("%sel-unknown-linux-gnu\n", argv[1]);
868#endif
869 return 0;
870}
871EOF
872 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
873 rm -f $dummy.c $dummy
874 elif test "${UNAME_MACHINE}" = "s390"; then
875 echo s390-ibm-linux && exit 0
876 elif test "${UNAME_MACHINE}" = "x86_64"; then
877 echo x86_64-unknown-linux-gnu && exit 0
878 elif test "${UNAME_MACHINE}" = "parisc" -o "${UNAME_MACHINE}" = "hppa"; then
879 # Look for CPU level
880 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
881 PA7*)
882 echo hppa1.1-unknown-linux-gnu
883 ;;
884 PA8*)
885 echo hppa2.0-unknown-linux-gnu
886 ;;
887 *)
888 echo hppa-unknown-linux-gnu
889 ;;
890 esac
891 exit 0
892 else
893 # Either a pre-BFD a.out linker (linux-gnuoldld)
894 # or one that does not give us useful --help.
895 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
896 # If ld does not provide *any* "supported emulations:"
897 # that means it is gnuoldld.
898 test -z "$ld_supported_emulations" \
899 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
900
901 case "${UNAME_MACHINE}" in
902 i?86)
903 VENDOR=pc;
904 ;;
905 *)
906 VENDOR=unknown;
907 ;;
908 esac
909 # Determine whether the default compiler is a.out or elf
910 cat >$dummy.c <<EOF
911#include <features.h>
912#ifdef __cplusplus
913#include <stdio.h> /* for printf() prototype */
914 int main (int argc, char *argv[]) {
915#else
916 int main (argc, argv) int argc; char *argv[]; {
917#endif
918#ifdef __ELF__
919# ifdef __GLIBC__
920# if __GLIBC__ >= 2
921 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
922# else
923 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
924# endif
925# else
926 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
927# endif
928#else
929 printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
930#endif
931 return 0;
932}
933EOF 883EOF
934 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 884 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
935 rm -f $dummy.c $dummy 885 rm -f $dummy.c
936 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 886 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
937 fi ;; 887 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
938# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions 888 ;;
939# are messed up and put the nodename in both sysname and nodename. 889 i*86:DYNIX/ptx:4*:*)
940 i?86:DYNIX/ptx:4*:*) 890 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
891 # earlier versions are messed up and put the nodename in both
892 # sysname and nodename.
941 echo i386-sequent-sysv4 893 echo i386-sequent-sysv4
942 exit 0 ;; 894 exit 0 ;;
943 i?86:UNIX_SV:4.2MP:2.*) 895 i*86:UNIX_SV:4.2MP:2.*)
944 # Unixware is an offshoot of SVR4, but it has its own version 896 # Unixware is an offshoot of SVR4, but it has its own version
945 # number series starting with 2... 897 # number series starting with 2...
946 # I am not positive that other SVR4 systems won't match this, 898 # I am not positive that other SVR4 systems won't match this,
@@ -948,7 +900,7 @@ EOF
948 # Use sysv4.2uw... so that sysv4* matches it. 900 # Use sysv4.2uw... so that sysv4* matches it.
949 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 901 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
950 exit 0 ;; 902 exit 0 ;;
951 i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) 903 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
952 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 904 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
953 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 905 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
954 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 906 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
@@ -956,16 +908,15 @@ EOF
956 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 908 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
957 fi 909 fi
958 exit 0 ;; 910 exit 0 ;;
959 i?86:*:5:7*) 911 i*86:*:5:[78]*)
960 # Fixed at (any) Pentium or better 912 case `/bin/uname -X | grep "^Machine"` in
961 UNAME_MACHINE=i586 913 *486*) UNAME_MACHINE=i486 ;;
962 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then 914 *Pentium) UNAME_MACHINE=i586 ;;
963 echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} 915 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
964 else 916 esac
965 echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} 917 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
966 fi
967 exit 0 ;; 918 exit 0 ;;
968 i?86:*:3.2:*) 919 i*86:*:3.2:*)
969 if test -f /usr/options/cb.name; then 920 if test -f /usr/options/cb.name; then
970 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 921 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
971 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 922 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
@@ -983,7 +934,7 @@ EOF
983 echo ${UNAME_MACHINE}-pc-sysv32 934 echo ${UNAME_MACHINE}-pc-sysv32
984 fi 935 fi
985 exit 0 ;; 936 exit 0 ;;
986 i?86:*DOS:*:*) 937 i*86:*DOS:*:*)
987 echo ${UNAME_MACHINE}-pc-msdosdjgpp 938 echo ${UNAME_MACHINE}-pc-msdosdjgpp
988 exit 0 ;; 939 exit 0 ;;
989 pc:*:*:*) 940 pc:*:*:*)
@@ -1011,7 +962,7 @@ EOF
1011 exit 0 ;; 962 exit 0 ;;
1012 M68*:*:R3V[567]*:*) 963 M68*:*:R3V[567]*:*)
1013 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 964 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1014 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) 965 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)
1015 OS_REL='' 966 OS_REL=''
1016 test -r /etc/.relid \ 967 test -r /etc/.relid \
1017 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 968 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1022,21 +973,24 @@ EOF
1022 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 973 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1023 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 974 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1024 && echo i486-ncr-sysv4 && exit 0 ;; 975 && echo i486-ncr-sysv4 && exit 0 ;;
1025 m68*:LynxOS:2.*:*) 976 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1026 echo m68k-unknown-lynxos${UNAME_RELEASE} 977 echo m68k-unknown-lynxos${UNAME_RELEASE}
1027 exit 0 ;; 978 exit 0 ;;
1028 mc68030:UNIX_System_V:4.*:*) 979 mc68030:UNIX_System_V:4.*:*)
1029 echo m68k-atari-sysv4 980 echo m68k-atari-sysv4
1030 exit 0 ;; 981 exit 0 ;;
1031 i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) 982 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1032 echo i386-unknown-lynxos${UNAME_RELEASE} 983 echo i386-unknown-lynxos${UNAME_RELEASE}
1033 exit 0 ;; 984 exit 0 ;;
1034 TSUNAMI:LynxOS:2.*:*) 985 TSUNAMI:LynxOS:2.*:*)
1035 echo sparc-unknown-lynxos${UNAME_RELEASE} 986 echo sparc-unknown-lynxos${UNAME_RELEASE}
1036 exit 0 ;; 987 exit 0 ;;
1037 rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) 988 rs6000:LynxOS:2.*:*)
1038 echo rs6000-unknown-lynxos${UNAME_RELEASE} 989 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1039 exit 0 ;; 990 exit 0 ;;
991 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
992 echo powerpc-unknown-lynxos${UNAME_RELEASE}
993 exit 0 ;;
1040 SM[BE]S:UNIX_SV:*:*) 994 SM[BE]S:UNIX_SV:*:*)
1041 echo mips-dde-sysv${UNAME_RELEASE} 995 echo mips-dde-sysv${UNAME_RELEASE}
1042 exit 0 ;; 996 exit 0 ;;
@@ -1054,8 +1008,8 @@ EOF
1054 echo ns32k-sni-sysv 1008 echo ns32k-sni-sysv
1055 fi 1009 fi
1056 exit 0 ;; 1010 exit 0 ;;
1057 PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1011 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1058 # says <Richard.M.Bartel@ccMail.Census.GOV> 1012 # says <Richard.M.Bartel@ccMail.Census.GOV>
1059 echo i586-unisys-sysv4 1013 echo i586-unisys-sysv4
1060 exit 0 ;; 1014 exit 0 ;;
1061 *:UNIX_System_V:4*:FTX*) 1015 *:UNIX_System_V:4*:FTX*)
@@ -1067,6 +1021,10 @@ EOF
1067 # From seanf@swdc.stratus.com. 1021 # From seanf@swdc.stratus.com.
1068 echo i860-stratus-sysv4 1022 echo i860-stratus-sysv4
1069 exit 0 ;; 1023 exit 0 ;;
1024 *:VOS:*:*)
1025 # From Paul.Green@stratus.com.
1026 echo hppa1.1-stratus-vos
1027 exit 0 ;;
1070 mc68*:A/UX:*:*) 1028 mc68*:A/UX:*:*)
1071 echo m68k-apple-aux${UNAME_RELEASE} 1029 echo m68k-apple-aux${UNAME_RELEASE}
1072 exit 0 ;; 1030 exit 0 ;;
@@ -1105,15 +1063,17 @@ EOF
1105 echo `uname -p`-apple-darwin${UNAME_RELEASE} 1063 echo `uname -p`-apple-darwin${UNAME_RELEASE}
1106 exit 0 ;; 1064 exit 0 ;;
1107 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1065 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1108 if test "${UNAME_MACHINE}" = "x86pc"; then 1066 UNAME_PROCESSOR=`uname -p`
1067 if test "$UNAME_PROCESSOR" = "x86"; then
1068 UNAME_PROCESSOR=i386
1109 UNAME_MACHINE=pc 1069 UNAME_MACHINE=pc
1110 fi 1070 fi
1111 echo `uname -p`-${UNAME_MACHINE}-nto-qnx 1071 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1112 exit 0 ;; 1072 exit 0 ;;
1113 *:QNX:*:4*) 1073 *:QNX:*:4*)
1114 echo i386-pc-qnx 1074 echo i386-pc-qnx
1115 exit 0 ;; 1075 exit 0 ;;
1116 NSR-[KW]:NONSTOP_KERNEL:*:*) 1076 NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
1117 echo nsr-tandem-nsk${UNAME_RELEASE} 1077 echo nsr-tandem-nsk${UNAME_RELEASE}
1118 exit 0 ;; 1078 exit 0 ;;
1119 *:NonStop-UX:*:*) 1079 *:NonStop-UX:*:*)
@@ -1136,11 +1096,41 @@ EOF
1136 fi 1096 fi
1137 echo ${UNAME_MACHINE}-unknown-plan9 1097 echo ${UNAME_MACHINE}-unknown-plan9
1138 exit 0 ;; 1098 exit 0 ;;
1099 i*86:OS/2:*:*)
1100 # If we were able to find `uname', then EMX Unix compatibility
1101 # is probably installed.
1102 echo ${UNAME_MACHINE}-pc-os2-emx
1103 exit 0 ;;
1104 *:TOPS-10:*:*)
1105 echo pdp10-unknown-tops10
1106 exit 0 ;;
1107 *:TENEX:*:*)
1108 echo pdp10-unknown-tenex
1109 exit 0 ;;
1110 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1111 echo pdp10-dec-tops20
1112 exit 0 ;;
1113 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1114 echo pdp10-xkl-tops20
1115 exit 0 ;;
1116 *:TOPS-20:*:*)
1117 echo pdp10-unknown-tops20
1118 exit 0 ;;
1119 *:ITS:*:*)
1120 echo pdp10-unknown-its
1121 exit 0 ;;
1122 i*86:XTS-300:*:STOP)
1123 echo ${UNAME_MACHINE}-unknown-stop
1124 exit 0 ;;
1125 i*86:atheos:*:*)
1126 echo ${UNAME_MACHINE}-unknown-atheos
1127 exit 0 ;;
1139esac 1128esac
1140 1129
1141#echo '(No uname command or uname output not recognized.)' 1>&2 1130#echo '(No uname command or uname output not recognized.)' 1>&2
1142#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1131#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1143 1132
1133eval $set_cc_for_build
1144cat >$dummy.c <<EOF 1134cat >$dummy.c <<EOF
1145#ifdef _SEQUENT_ 1135#ifdef _SEQUENT_
1146# include <sys/types.h> 1136# include <sys/types.h>
@@ -1227,11 +1217,24 @@ main ()
1227#endif 1217#endif
1228 1218
1229#if defined (vax) 1219#if defined (vax)
1230#if !defined (ultrix) 1220# if !defined (ultrix)
1231 printf ("vax-dec-bsd\n"); exit (0); 1221# include <sys/param.h>
1232#else 1222# if defined (BSD)
1233 printf ("vax-dec-ultrix\n"); exit (0); 1223# if BSD == 43
1234#endif 1224 printf ("vax-dec-bsd4.3\n"); exit (0);
1225# else
1226# if BSD == 199006
1227 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1228# else
1229 printf ("vax-dec-bsd\n"); exit (0);
1230# endif
1231# endif
1232# else
1233 printf ("vax-dec-bsd\n"); exit (0);
1234# endif
1235# else
1236 printf ("vax-dec-ultrix\n"); exit (0);
1237# endif
1235#endif 1238#endif
1236 1239
1237#if defined (alliant) && defined (i860) 1240#if defined (alliant) && defined (i860)
@@ -1242,7 +1245,7 @@ main ()
1242} 1245}
1243EOF 1246EOF
1244 1247
1245$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 1248$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
1246rm -f $dummy.c $dummy 1249rm -f $dummy.c $dummy
1247 1250
1248# Apollos put the system type in the environment. 1251# Apollos put the system type in the environment.
@@ -1278,8 +1281,9 @@ fi
1278cat >&2 <<EOF 1281cat >&2 <<EOF
1279$0: unable to guess system type 1282$0: unable to guess system type
1280 1283
1281The $version version of this script cannot recognize your system type. 1284This script, last modified $timestamp, has failed to recognize
1282Please download the most up to date version of the config scripts: 1285the operating system you are using. It is advised that you
1286download the most up to date version of the config scripts from
1283 1287
1284 ftp://ftp.gnu.org/pub/gnu/config/ 1288 ftp://ftp.gnu.org/pub/gnu/config/
1285 1289
@@ -1288,7 +1292,7 @@ send the following data and any information you think might be
1288pertinent to <config-patches@gnu.org> in order to provide the needed 1292pertinent to <config-patches@gnu.org> in order to provide the needed
1289information to handle your system. 1293information to handle your system.
1290 1294
1291config.guess version = $version 1295config.guess timestamp = $timestamp
1292 1296
1293uname -m = `(uname -m) 2>/dev/null || echo unknown` 1297uname -m = `(uname -m) 2>/dev/null || echo unknown`
1294uname -r = `(uname -r) 2>/dev/null || echo unknown` 1298uname -r = `(uname -r) 2>/dev/null || echo unknown`
@@ -1315,7 +1319,7 @@ exit 1
1315 1319
1316# Local variables: 1320# Local variables:
1317# eval: (add-hook 'write-file-hooks 'time-stamp) 1321# eval: (add-hook 'write-file-hooks 'time-stamp)
1318# time-stamp-start: "version='" 1322# time-stamp-start: "timestamp='"
1319# time-stamp-format: "%:y-%02m-%02d" 1323# time-stamp-format: "%:y-%02m-%02d"
1320# time-stamp-end: "'" 1324# time-stamp-end: "'"
1321# End: 1325# End:
diff --git a/config.sub b/config.sub
index 004c7debc6b..85a5fb21e9f 100755
--- a/config.sub
+++ b/config.sub
@@ -1,9 +1,9 @@
1#! /bin/sh 1#! /bin/sh
2# Configuration validation subroutine script, version 1.1. 2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# Free Software Foundation, Inc. 4# 2000, 2001, 2002 Free Software Foundation, Inc.
5 5
6version='2000-11-10' 6timestamp='2002-05-22'
7 7
8# This file is (in principle) common to ALL GNU software. 8# This file is (in principle) common to ALL GNU software.
9# The presence of a machine in this file suggests that SOME GNU software 9# The presence of a machine in this file suggests that SOME GNU software
@@ -29,7 +29,8 @@ version='2000-11-10'
29# configuration script generated by Autoconf, you may include it under 29# configuration script generated by Autoconf, you may include it under
30# the same distribution terms that you use for the rest of that program. 30# the same distribution terms that you use for the rest of that program.
31 31
32# Please send patches to <config-patches@gnu.org>. 32# Please send patches to <config-patches@gnu.org>. Submit a context
33# diff and a properly formatted ChangeLog entry.
33# 34#
34# Configuration subroutine to validate and canonicalize a configuration type. 35# Configuration subroutine to validate and canonicalize a configuration type.
35# Supply the specified configuration type as an argument. 36# Supply the specified configuration type as an argument.
@@ -60,16 +61,30 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS
60Canonicalize a configuration name. 61Canonicalize a configuration name.
61 62
62Operation modes: 63Operation modes:
63 -h, --help print this help, then exit 64 -h, --help print this help, then exit
64 -V, --version print version number, then exit" 65 -t, --time-stamp print date of last modification, then exit
66 -v, --version print version number, then exit
67
68Report bugs and patches to <config-patches@gnu.org>."
69
70version="\
71GNU config.sub ($timestamp)
72
73Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
74Free Software Foundation, Inc.
75
76This is free software; see the source for copying conditions. There is NO
77warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
65 78
66help=" 79help="
67Try \`$me --help' for more information." 80Try \`$me --help' for more information."
68 81
69# Parse command line 82# Parse command line
70while test $# -gt 0 ; do 83while test $# -gt 0 ; do
71 case "$1" in 84 case $1 in
72 --version | --vers* | -V ) 85 --time-stamp | --time* | -t )
86 echo "$timestamp" ; exit 0 ;;
87 --version | -v )
73 echo "$version" ; exit 0 ;; 88 echo "$version" ; exit 0 ;;
74 --help | --h* | -h ) 89 --help | --h* | -h )
75 echo "$usage"; exit 0 ;; 90 echo "$usage"; exit 0 ;;
@@ -78,9 +93,7 @@ while test $# -gt 0 ; do
78 - ) # Use stdin as input. 93 - ) # Use stdin as input.
79 break ;; 94 break ;;
80 -* ) 95 -* )
81 exec >&2 96 echo "$me: invalid option $1$help"
82 echo "$me: invalid option $1"
83 echo "$help"
84 exit 1 ;; 97 exit 1 ;;
85 98
86 *local*) 99 *local*)
@@ -105,7 +118,7 @@ esac
105# Here we must recognize all the valid KERNEL-OS combinations. 118# Here we must recognize all the valid KERNEL-OS combinations.
106maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 119maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
107case $maybe_os in 120case $maybe_os in
108 nto-qnx* | linux-gnu* | storm-chaos*) 121 nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
109 os=-$maybe_os 122 os=-$maybe_os
110 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
111 ;; 124 ;;
@@ -145,6 +158,14 @@ case $os in
145 os=-vxworks 158 os=-vxworks
146 basic_machine=$1 159 basic_machine=$1
147 ;; 160 ;;
161 -chorusos*)
162 os=-chorusos
163 basic_machine=$1
164 ;;
165 -chorusrdb)
166 os=-chorusrdb
167 basic_machine=$1
168 ;;
148 -hiux*) 169 -hiux*)
149 os=-hiuxwe2 170 os=-hiuxwe2
150 ;; 171 ;;
@@ -203,22 +224,36 @@ esac
203case $basic_machine in 224case $basic_machine in
204 # Recognize the basic CPU types without company name. 225 # Recognize the basic CPU types without company name.
205 # Some are omitted here because they have special meanings below. 226 # Some are omitted here because they have special meanings below.
206 tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ 227 1750a | 580 \
207 | arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \ 228 | a29k \
208 | 580 | i960 | h8300 \ 229 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
209 | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ 230 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
210 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ 231 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
211 | hppa64 \ 232 | c4x | clipper \
212 | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ 233 | d10v | d30v | dsp16xx \
213 | alphaev6[78] \ 234 | fr30 \
214 | we32k | ns16k | clipper | i370 | sh | sh[34] \ 235 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
215 | powerpc | powerpcle \ 236 | i370 | i860 | i960 | ia64 \
216 | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ 237 | m32r | m68000 | m68k | m88k | mcore \
217 | mips64orion | mips64orionel | mipstx39 | mipstx39el \ 238 | mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
218 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ 239 | mips64vr4100 | mips64vr4100el | mips64vr4300 \
219 | mips64vr5000 | miprs64vr5000el | mcore \ 240 | mips64vr4300el | mips64vr5000 | mips64vr5000el \
220 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ 241 | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
221 | thumb | d10v | d30v | fr30 | avr) 242 | mipsisa32 | mipsisa64 \
243 | mn10200 | mn10300 \
244 | ns16k | ns32k \
245 | openrisc | or32 \
246 | pdp10 | pdp11 | pj | pjl \
247 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
248 | pyramid \
249 | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
250 | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
251 | strongarm \
252 | tahoe | thumb | tic80 | tron \
253 | v850 | v850e \
254 | we32k \
255 | x86 | xscale | xstormy16 | xtensa \
256 | z8k)
222 basic_machine=$basic_machine-unknown 257 basic_machine=$basic_machine-unknown
223 ;; 258 ;;
224 m6811 | m68hc11 | m6812 | m68hc12) 259 m6811 | m68hc11 | m6812 | m68hc12)
@@ -226,13 +261,13 @@ case $basic_machine in
226 basic_machine=$basic_machine-unknown 261 basic_machine=$basic_machine-unknown
227 os=-none 262 os=-none
228 ;; 263 ;;
229 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) 264 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
230 ;; 265 ;;
231 266
232 # We use `pc' rather than `unknown' 267 # We use `pc' rather than `unknown'
233 # because (1) that's what they normally are, and 268 # because (1) that's what they normally are, and
234 # (2) the word "unknown" tends to confuse beginning users. 269 # (2) the word "unknown" tends to confuse beginning users.
235 i[234567]86 | x86_64) 270 i*86 | x86_64)
236 basic_machine=$basic_machine-pc 271 basic_machine=$basic_machine-pc
237 ;; 272 ;;
238 # Object if more than one company name word. 273 # Object if more than one company name word.
@@ -241,28 +276,45 @@ case $basic_machine in
241 exit 1 276 exit 1
242 ;; 277 ;;
243 # Recognize the basic CPU types with company name. 278 # Recognize the basic CPU types with company name.
244 # FIXME: clean up the formatting here. 279 580-* \
245 vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ 280 | a29k-* \
246 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ 281 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
247 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ 282 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
248 | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ 283 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
249 | xmp-* | ymp-* \ 284 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
250 | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ 285 | avr-* \
251 | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ 286 | bs2000-* \
252 | hppa2.0n-* | hppa64-* \ 287 | c[123]* | c30-* | [cjt]90-* | c54x-* \
253 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ 288 | clipper-* | cydra-* \
254 | alphaev6[78]-* \ 289 | d10v-* | d30v-* \
255 | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ 290 | elxsi-* \
256 | clipper-* | orion-* \ 291 | f30[01]-* | f700-* | fr30-* | fx80-* \
257 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ 292 | h8300-* | h8500-* \
258 | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ 293 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
259 | mips64el-* | mips64orion-* | mips64orionel-* \ 294 | i*86-* | i860-* | i960-* | ia64-* \
260 | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ 295 | m32r-* \
261 | mipstx39-* | mipstx39el-* | mcore-* \ 296 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
262 | f301-* | armv*-* | s390-* | sv1-* | t3e-* \ 297 | m88110-* | m88k-* | mcore-* \
263 | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ 298 | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
264 | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ 299 | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
265 | bs2000-* | tic54x-* | c54x-* | x86_64-*) 300 | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
301 | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
302 | none-* | np1-* | ns16k-* | ns32k-* \
303 | orion-* \
304 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
305 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
306 | pyramid-* \
307 | romp-* | rs6000-* \
308 | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
309 | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
310 | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
311 | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
312 | v850-* | v850e-* | vax-* \
313 | we32k-* \
314 | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
315 | xtensa-* \
316 | ymp-* \
317 | z8k-*)
266 ;; 318 ;;
267 # Recognize the various machine names and aliases which stand 319 # Recognize the various machine names and aliases which stand
268 # for a CPU type and a company and sometimes even an OS. 320 # for a CPU type and a company and sometimes even an OS.
@@ -325,6 +377,10 @@ case $basic_machine in
325 basic_machine=ns32k-sequent 377 basic_machine=ns32k-sequent
326 os=-dynix 378 os=-dynix
327 ;; 379 ;;
380 c90)
381 basic_machine=c90-cray
382 os=-unicos
383 ;;
328 convex-c1) 384 convex-c1)
329 basic_machine=c1-convex 385 basic_machine=c1-convex
330 os=-bsd 386 os=-bsd
@@ -345,16 +401,8 @@ case $basic_machine in
345 basic_machine=c38-convex 401 basic_machine=c38-convex
346 os=-bsd 402 os=-bsd
347 ;; 403 ;;
348 cray | ymp) 404 cray | j90)
349 basic_machine=ymp-cray 405 basic_machine=j90-cray
350 os=-unicos
351 ;;
352 cray2)
353 basic_machine=cray2-cray
354 os=-unicos
355 ;;
356 [ctj]90-cray)
357 basic_machine=c90-cray
358 os=-unicos 406 os=-unicos
359 ;; 407 ;;
360 crds | unos) 408 crds | unos)
@@ -369,6 +417,14 @@ case $basic_machine in
369 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 417 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
370 basic_machine=mips-dec 418 basic_machine=mips-dec
371 ;; 419 ;;
420 decsystem10* | dec10*)
421 basic_machine=pdp10-dec
422 os=-tops10
423 ;;
424 decsystem20* | dec20*)
425 basic_machine=pdp10-dec
426 os=-tops20
427 ;;
372 delta | 3300 | motorola-3300 | motorola-delta \ 428 delta | 3300 | motorola-3300 | motorola-delta \
373 | 3300-motorola | delta-motorola) 429 | 3300-motorola | delta-motorola)
374 basic_machine=m68k-motorola 430 basic_machine=m68k-motorola
@@ -410,6 +466,10 @@ case $basic_machine in
410 basic_machine=tron-gmicro 466 basic_machine=tron-gmicro
411 os=-sysv 467 os=-sysv
412 ;; 468 ;;
469 go32)
470 basic_machine=i386-pc
471 os=-go32
472 ;;
413 h3050r* | hiux*) 473 h3050r* | hiux*)
414 basic_machine=hppa1.1-hitachi 474 basic_machine=hppa1.1-hitachi
415 os=-hiuxwe2 475 os=-hiuxwe2
@@ -485,19 +545,19 @@ case $basic_machine in
485 basic_machine=i370-ibm 545 basic_machine=i370-ibm
486 ;; 546 ;;
487# I'm not sure what "Sysv32" means. Should this be sysv3.2? 547# I'm not sure what "Sysv32" means. Should this be sysv3.2?
488 i[34567]86v32) 548 i*86v32)
489 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 549 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
490 os=-sysv32 550 os=-sysv32
491 ;; 551 ;;
492 i[34567]86v4*) 552 i*86v4*)
493 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 553 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
494 os=-sysv4 554 os=-sysv4
495 ;; 555 ;;
496 i[34567]86v) 556 i*86v)
497 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 557 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
498 os=-sysv 558 os=-sysv
499 ;; 559 ;;
500 i[34567]86sol2) 560 i*86sol2)
501 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 561 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
502 os=-solaris2 562 os=-solaris2
503 ;; 563 ;;
@@ -509,18 +569,6 @@ case $basic_machine in
509 basic_machine=i386-unknown 569 basic_machine=i386-unknown
510 os=-vsta 570 os=-vsta
511 ;; 571 ;;
512 i386-go32 | go32)
513 basic_machine=i386-unknown
514 os=-go32
515 ;;
516 i386-mingw32 | mingw32)
517 basic_machine=i386-unknown
518 os=-mingw32
519 ;;
520 i[34567]86-pw32 | pw32)
521 basic_machine=i586-unknown
522 os=-pw32
523 ;;
524 iris | iris4d) 572 iris | iris4d)
525 basic_machine=mips-sgi 573 basic_machine=mips-sgi
526 case $os in 574 case $os in
@@ -546,6 +594,10 @@ case $basic_machine in
546 basic_machine=ns32k-utek 594 basic_machine=ns32k-utek
547 os=-sysv 595 os=-sysv
548 ;; 596 ;;
597 mingw32)
598 basic_machine=i386-pc
599 os=-mingw32
600 ;;
549 miniframe) 601 miniframe)
550 basic_machine=m68000-convergent 602 basic_machine=m68000-convergent
551 ;; 603 ;;
@@ -553,14 +605,6 @@ case $basic_machine in
553 basic_machine=m68k-atari 605 basic_machine=m68k-atari
554 os=-mint 606 os=-mint
555 ;; 607 ;;
556 mipsel*-linux*)
557 basic_machine=mipsel-unknown
558 os=-linux-gnu
559 ;;
560 mips*-linux*)
561 basic_machine=mips-unknown
562 os=-linux-gnu
563 ;;
564 mips3*-*) 608 mips3*-*)
565 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 609 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
566 ;; 610 ;;
@@ -575,8 +619,12 @@ case $basic_machine in
575 basic_machine=m68k-rom68k 619 basic_machine=m68k-rom68k
576 os=-coff 620 os=-coff
577 ;; 621 ;;
622 morphos)
623 basic_machine=powerpc-unknown
624 os=-morphos
625 ;;
578 msdos) 626 msdos)
579 basic_machine=i386-unknown 627 basic_machine=i386-pc
580 os=-msdos 628 os=-msdos
581 ;; 629 ;;
582 mvs) 630 mvs)
@@ -654,6 +702,10 @@ case $basic_machine in
654 basic_machine=hppa1.1-oki 702 basic_machine=hppa1.1-oki
655 os=-proelf 703 os=-proelf
656 ;; 704 ;;
705 or32 | or32-*)
706 basic_machine=or32-unknown
707 os=-coff
708 ;;
657 OSE68000 | ose68000) 709 OSE68000 | ose68000)
658 basic_machine=m68000-ericsson 710 basic_machine=m68000-ericsson
659 os=-ose 711 os=-ose
@@ -679,7 +731,7 @@ case $basic_machine in
679 pc532 | pc532-*) 731 pc532 | pc532-*)
680 basic_machine=ns32k-pc532 732 basic_machine=ns32k-pc532
681 ;; 733 ;;
682 pentium | p5 | k5 | k6 | nexgen) 734 pentium | p5 | k5 | k6 | nexgen | viac3)
683 basic_machine=i586-pc 735 basic_machine=i586-pc
684 ;; 736 ;;
685 pentiumpro | p6 | 6x86 | athlon) 737 pentiumpro | p6 | 6x86 | athlon)
@@ -688,7 +740,7 @@ case $basic_machine in
688 pentiumii | pentium2) 740 pentiumii | pentium2)
689 basic_machine=i686-pc 741 basic_machine=i686-pc
690 ;; 742 ;;
691 pentium-* | p5-* | k5-* | k6-* | nexgen-*) 743 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
692 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 744 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
693 ;; 745 ;;
694 pentiumpro-* | p6-* | 6x86-* | athlon-*) 746 pentiumpro-* | p6-* | 6x86-* | athlon-*)
@@ -700,7 +752,7 @@ case $basic_machine in
700 pn) 752 pn)
701 basic_machine=pn-gould 753 basic_machine=pn-gould
702 ;; 754 ;;
703 power) basic_machine=rs6000-ibm 755 power) basic_machine=power-ibm
704 ;; 756 ;;
705 ppc) basic_machine=powerpc-unknown 757 ppc) basic_machine=powerpc-unknown
706 ;; 758 ;;
@@ -712,9 +764,23 @@ case $basic_machine in
712 ppcle-* | powerpclittle-*) 764 ppcle-* | powerpclittle-*)
713 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 765 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
714 ;; 766 ;;
767 ppc64) basic_machine=powerpc64-unknown
768 ;;
769 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
770 ;;
771 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
772 basic_machine=powerpc64le-unknown
773 ;;
774 ppc64le-* | powerpc64little-*)
775 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
776 ;;
715 ps2) 777 ps2)
716 basic_machine=i386-ibm 778 basic_machine=i386-ibm
717 ;; 779 ;;
780 pw32)
781 basic_machine=i586-unknown
782 os=-pw32
783 ;;
718 rom68k) 784 rom68k)
719 basic_machine=m68k-rom68k 785 basic_machine=m68k-rom68k
720 os=-coff 786 os=-coff
@@ -725,6 +791,12 @@ case $basic_machine in
725 rtpc | rtpc-*) 791 rtpc | rtpc-*)
726 basic_machine=romp-ibm 792 basic_machine=romp-ibm
727 ;; 793 ;;
794 s390 | s390-*)
795 basic_machine=s390-ibm
796 ;;
797 s390x | s390x-*)
798 basic_machine=s390x-ibm
799 ;;
728 sa29200) 800 sa29200)
729 basic_machine=a29k-amd 801 basic_machine=a29k-amd
730 os=-udi 802 os=-udi
@@ -736,7 +808,7 @@ case $basic_machine in
736 basic_machine=sh-hitachi 808 basic_machine=sh-hitachi
737 os=-hms 809 os=-hms
738 ;; 810 ;;
739 sparclite-wrs) 811 sparclite-wrs | simso-wrs)
740 basic_machine=sparclite-wrs 812 basic_machine=sparclite-wrs
741 os=-vxworks 813 os=-vxworks
742 ;; 814 ;;
@@ -794,7 +866,7 @@ case $basic_machine in
794 sun386 | sun386i | roadrunner) 866 sun386 | sun386i | roadrunner)
795 basic_machine=i386-sun 867 basic_machine=i386-sun
796 ;; 868 ;;
797 sv1) 869 sv1)
798 basic_machine=sv1-cray 870 basic_machine=sv1-cray
799 os=-unicos 871 os=-unicos
800 ;; 872 ;;
@@ -802,8 +874,16 @@ case $basic_machine in
802 basic_machine=i386-sequent 874 basic_machine=i386-sequent
803 os=-dynix 875 os=-dynix
804 ;; 876 ;;
877 t3d)
878 basic_machine=alpha-cray
879 os=-unicos
880 ;;
805 t3e) 881 t3e)
806 basic_machine=t3e-cray 882 basic_machine=alphaev5-cray
883 os=-unicos
884 ;;
885 t90)
886 basic_machine=t90-cray
807 os=-unicos 887 os=-unicos
808 ;; 888 ;;
809 tic54x | c54x*) 889 tic54x | c54x*)
@@ -816,6 +896,10 @@ case $basic_machine in
816 tx39el) 896 tx39el)
817 basic_machine=mipstx39el-unknown 897 basic_machine=mipstx39el-unknown
818 ;; 898 ;;
899 toad1)
900 basic_machine=pdp10-xkl
901 os=-tops20
902 ;;
819 tower | tower-32) 903 tower | tower-32)
820 basic_machine=m68k-ncr 904 basic_machine=m68k-ncr
821 ;; 905 ;;
@@ -862,13 +946,17 @@ case $basic_machine in
862 basic_machine=hppa1.1-winbond 946 basic_machine=hppa1.1-winbond
863 os=-proelf 947 os=-proelf
864 ;; 948 ;;
865 xmp) 949 windows32)
866 basic_machine=xmp-cray 950 basic_machine=i386-pc
867 os=-unicos 951 os=-windows32-msvcrt
868 ;; 952 ;;
869 xps | xps100) 953 xps | xps100)
870 basic_machine=xps100-honeywell 954 basic_machine=xps100-honeywell
871 ;; 955 ;;
956 ymp)
957 basic_machine=ymp-cray
958 os=-unicos
959 ;;
872 z8k-*-coff) 960 z8k-*-coff)
873 basic_machine=z8k-unknown 961 basic_machine=z8k-unknown
874 os=-sim 962 os=-sim
@@ -889,13 +977,6 @@ case $basic_machine in
889 op60c) 977 op60c)
890 basic_machine=hppa1.1-oki 978 basic_machine=hppa1.1-oki
891 ;; 979 ;;
892 mips)
893 if [ x$os = x-linux-gnu ]; then
894 basic_machine=mips-unknown
895 else
896 basic_machine=mips-mips
897 fi
898 ;;
899 romp) 980 romp)
900 basic_machine=romp-ibm 981 basic_machine=romp-ibm
901 ;; 982 ;;
@@ -905,16 +986,23 @@ case $basic_machine in
905 vax) 986 vax)
906 basic_machine=vax-dec 987 basic_machine=vax-dec
907 ;; 988 ;;
989 pdp10)
990 # there are many clones, so DEC is not a safe bet
991 basic_machine=pdp10-unknown
992 ;;
908 pdp11) 993 pdp11)
909 basic_machine=pdp11-dec 994 basic_machine=pdp11-dec
910 ;; 995 ;;
911 we32k) 996 we32k)
912 basic_machine=we32k-att 997 basic_machine=we32k-att
913 ;; 998 ;;
914 sh3 | sh4) 999 sh3 | sh4 | sh3eb | sh4eb)
915 basic_machine=sh-unknown 1000 basic_machine=sh-unknown
916 ;; 1001 ;;
917 sparc | sparcv9) 1002 sh64)
1003 basic_machine=sh64-unknown
1004 ;;
1005 sparc | sparcv9 | sparcv9b)
918 basic_machine=sparc-sun 1006 basic_machine=sparc-sun
919 ;; 1007 ;;
920 cydra) 1008 cydra)
@@ -936,6 +1024,9 @@ case $basic_machine in
936 basic_machine=c4x-none 1024 basic_machine=c4x-none
937 os=-coff 1025 os=-coff
938 ;; 1026 ;;
1027 *-unknown)
1028 # Make sure to match an already-canonicalized machine name.
1029 ;;
939 *) 1030 *)
940 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 1031 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
941 exit 1 1032 exit 1
@@ -992,15 +1083,19 @@ case $os in
992 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1083 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
993 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1084 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
994 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1085 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1086 | -chorusos* | -chorusrdb* \
995 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1087 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
996 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ 1088 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
997 | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ 1089 | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
998 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* | -storm-chaos*) 1090 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1091 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1092 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1093 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
999 # Remember, each alternative MUST END IN *, to match a version number. 1094 # Remember, each alternative MUST END IN *, to match a version number.
1000 ;; 1095 ;;
1001 -qnx*) 1096 -qnx*)
1002 case $basic_machine in 1097 case $basic_machine in
1003 x86-* | i[34567]86-*) 1098 x86-* | i*86-*)
1004 ;; 1099 ;;
1005 *) 1100 *)
1006 os=-nto$os 1101 os=-nto$os
@@ -1047,12 +1142,18 @@ case $os in
1047 -acis*) 1142 -acis*)
1048 os=-aos 1143 os=-aos
1049 ;; 1144 ;;
1145 -atheos*)
1146 os=-atheos
1147 ;;
1050 -386bsd) 1148 -386bsd)
1051 os=-bsd 1149 os=-bsd
1052 ;; 1150 ;;
1053 -ctix* | -uts*) 1151 -ctix* | -uts*)
1054 os=-sysv 1152 os=-sysv
1055 ;; 1153 ;;
1154 -nova*)
1155 os=-rtmk-nova
1156 ;;
1056 -ns2 ) 1157 -ns2 )
1057 os=-nextstep2 1158 os=-nextstep2
1058 ;; 1159 ;;
@@ -1093,7 +1194,7 @@ case $os in
1093 -xenix) 1194 -xenix)
1094 os=-xenix 1195 os=-xenix
1095 ;; 1196 ;;
1096 -*mint | -*MiNT) 1197 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1097 os=-mint 1198 os=-mint
1098 ;; 1199 ;;
1099 -none) 1200 -none)
@@ -1127,6 +1228,10 @@ case $basic_machine in
1127 arm*-semi) 1228 arm*-semi)
1128 os=-aout 1229 os=-aout
1129 ;; 1230 ;;
1231 # This must come before the *-dec entry.
1232 pdp10-*)
1233 os=-tops20
1234 ;;
1130 pdp11-*) 1235 pdp11-*)
1131 os=-none 1236 os=-none
1132 ;; 1237 ;;
@@ -1154,6 +1259,9 @@ case $basic_machine in
1154 mips*-*) 1259 mips*-*)
1155 os=-elf 1260 os=-elf
1156 ;; 1261 ;;
1262 or32-*)
1263 os=-coff
1264 ;;
1157 *-tti) # must be before sparc entry or we get the wrong os. 1265 *-tti) # must be before sparc entry or we get the wrong os.
1158 os=-sysv3 1266 os=-sysv3
1159 ;; 1267 ;;
@@ -1235,7 +1343,7 @@ case $basic_machine in
1235 *-masscomp) 1343 *-masscomp)
1236 os=-rtu 1344 os=-rtu
1237 ;; 1345 ;;
1238 f301-fujitsu) 1346 f30[01]-fujitsu | f700-fujitsu)
1239 os=-uxpv 1347 os=-uxpv
1240 ;; 1348 ;;
1241 *-rom68k) 1349 *-rom68k)
@@ -1301,7 +1409,7 @@ case $basic_machine in
1301 -ptx*) 1409 -ptx*)
1302 vendor=sequent 1410 vendor=sequent
1303 ;; 1411 ;;
1304 -vxsim* | -vxworks*) 1412 -vxsim* | -vxworks* | -windiss*)
1305 vendor=wrs 1413 vendor=wrs
1306 ;; 1414 ;;
1307 -aux*) 1415 -aux*)
@@ -1313,9 +1421,12 @@ case $basic_machine in
1313 -mpw* | -macos*) 1421 -mpw* | -macos*)
1314 vendor=apple 1422 vendor=apple
1315 ;; 1423 ;;
1316 -*mint | -*MiNT) 1424 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1317 vendor=atari 1425 vendor=atari
1318 ;; 1426 ;;
1427 -vos*)
1428 vendor=stratus
1429 ;;
1319 esac 1430 esac
1320 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 1431 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1321 ;; 1432 ;;
@@ -1326,7 +1437,7 @@ exit 0
1326 1437
1327# Local variables: 1438# Local variables:
1328# eval: (add-hook 'write-file-hooks 'time-stamp) 1439# eval: (add-hook 'write-file-hooks 'time-stamp)
1329# time-stamp-start: "version='" 1440# time-stamp-start: "timestamp='"
1330# time-stamp-format: "%:y-%02m-%02d" 1441# time-stamp-format: "%:y-%02m-%02d"
1331# time-stamp-end: "'" 1442# time-stamp-end: "'"
1332# End: 1443# End: