Mercurial > dropbear
comparison config.guess @ 1929:315dbcef7293
Update to latest config.guess and config.sub
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 30 Mar 2022 21:42:23 +0800 |
parents | b63f1e803f70 |
children |
comparison
equal
deleted
inserted
replaced
1928:333688ec53d0 | 1929:315dbcef7293 |
---|---|
1 #! /bin/sh | 1 #! /bin/sh |
2 # Attempt to guess a canonical system name. | 2 # Attempt to guess a canonical system name. |
3 # Copyright 1992-2021 Free Software Foundation, Inc. | 3 # Copyright 1992-2022 Free Software Foundation, Inc. |
4 | 4 |
5 timestamp='2021-01-25' | 5 # shellcheck disable=SC2006,SC2268 # see below for rationale |
6 | |
7 timestamp='2022-01-09' | |
6 | 8 |
7 # This file is free software; you can redistribute it and/or modify it | 9 # This file is free software; you can redistribute it and/or modify it |
8 # under the terms of the GNU General Public License as published by | 10 # under the terms of the GNU General Public License as published by |
9 # the Free Software Foundation; either version 3 of the License, or | 11 # the Free Software Foundation, either version 3 of the License, or |
10 # (at your option) any later version. | 12 # (at your option) any later version. |
11 # | 13 # |
12 # This program is distributed in the hope that it will be useful, but | 14 # This program is distributed in the hope that it will be useful, but |
13 # WITHOUT ANY WARRANTY; without even the implied warranty of | 15 # WITHOUT ANY WARRANTY; without even the implied warranty of |
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
30 # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess | 32 # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess |
31 # | 33 # |
32 # Please send patches to <[email protected]>. | 34 # Please send patches to <[email protected]>. |
33 | 35 |
34 | 36 |
35 me=$(echo "$0" | sed -e 's,.*/,,') | 37 # The "shellcheck disable" line above the timestamp inhibits complaints |
38 # about features and limitations of the classic Bourne shell that were | |
39 # superseded or lifted in POSIX. However, this script identifies a wide | |
40 # variety of pre-POSIX systems that do not have POSIX shells at all, and | |
41 # even some reasonably current systems (Solaris 10 as case-in-point) still | |
42 # have a pre-POSIX /bin/sh. | |
43 | |
44 | |
45 me=`echo "$0" | sed -e 's,.*/,,'` | |
36 | 46 |
37 usage="\ | 47 usage="\ |
38 Usage: $0 [OPTION] | 48 Usage: $0 [OPTION] |
39 | 49 |
40 Output the configuration name of the system \`$me' is run on. | 50 Output the configuration name of the system \`$me' is run on. |
48 | 58 |
49 version="\ | 59 version="\ |
50 GNU config.guess ($timestamp) | 60 GNU config.guess ($timestamp) |
51 | 61 |
52 Originally written by Per Bothner. | 62 Originally written by Per Bothner. |
53 Copyright 1992-2021 Free Software Foundation, Inc. | 63 Copyright 1992-2022 Free Software Foundation, Inc. |
54 | 64 |
55 This is free software; see the source for copying conditions. There is NO | 65 This is free software; see the source for copying conditions. There is NO |
56 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | 66 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
57 | 67 |
58 help=" | 68 help=" |
82 if test $# != 0; then | 92 if test $# != 0; then |
83 echo "$me: too many arguments$help" >&2 | 93 echo "$me: too many arguments$help" >&2 |
84 exit 1 | 94 exit 1 |
85 fi | 95 fi |
86 | 96 |
97 # Just in case it came from the environment. | |
98 GUESS= | |
99 | |
87 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a | 100 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
88 # compiler to aid in system detection is discouraged as it requires | 101 # compiler to aid in system detection is discouraged as it requires |
89 # temporary files to be created and, as you can see below, it is a | 102 # temporary files to be created and, as you can see below, it is a |
90 # headache to deal with in a portable fashion. | 103 # headache to deal with in a portable fashion. |
91 | 104 |
100 | 113 |
101 set_cc_for_build() { | 114 set_cc_for_build() { |
102 # prevent multiple calls if $tmp is already set | 115 # prevent multiple calls if $tmp is already set |
103 test "$tmp" && return 0 | 116 test "$tmp" && return 0 |
104 : "${TMPDIR=/tmp}" | 117 : "${TMPDIR=/tmp}" |
105 # shellcheck disable=SC2039 | 118 # shellcheck disable=SC2039,SC3028 |
106 { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || | 119 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || |
107 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || | 120 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || |
108 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || | 121 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || |
109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } | 122 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } |
110 dummy=$tmp/dummy | 123 dummy=$tmp/dummy |
111 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in | 124 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in |
112 ,,) echo "int x;" > "$dummy.c" | 125 ,,) echo "int x;" > "$dummy.c" |
113 for driver in cc gcc c89 c99 ; do | 126 for driver in cc gcc c89 c99 ; do |
114 if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then | 127 if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then |
115 CC_FOR_BUILD="$driver" | 128 CC_FOR_BUILD=$driver |
116 break | 129 break |
117 fi | 130 fi |
118 done | 131 done |
119 if test x"$CC_FOR_BUILD" = x ; then | 132 if test x"$CC_FOR_BUILD" = x ; then |
120 CC_FOR_BUILD=no_compiler_found | 133 CC_FOR_BUILD=no_compiler_found |
129 # ([email protected] 1994-08-24) | 142 # ([email protected] 1994-08-24) |
130 if test -f /.attbin/uname ; then | 143 if test -f /.attbin/uname ; then |
131 PATH=$PATH:/.attbin ; export PATH | 144 PATH=$PATH:/.attbin ; export PATH |
132 fi | 145 fi |
133 | 146 |
134 UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown | 147 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
135 UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown | 148 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
136 UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown | 149 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
137 UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown | 150 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
138 | 151 |
139 case "$UNAME_SYSTEM" in | 152 case $UNAME_SYSTEM in |
140 Linux|GNU|GNU/*) | 153 Linux|GNU|GNU/*) |
141 LIBC=unknown | 154 LIBC=unknown |
142 | 155 |
143 set_cc_for_build | 156 set_cc_for_build |
144 cat <<-EOF > "$dummy.c" | 157 cat <<-EOF > "$dummy.c" |
155 #ifdef __DEFINED_va_list | 168 #ifdef __DEFINED_va_list |
156 LIBC=musl | 169 LIBC=musl |
157 #endif | 170 #endif |
158 #endif | 171 #endif |
159 EOF | 172 EOF |
160 eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" | 173 cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` |
174 eval "$cc_set_libc" | |
161 | 175 |
162 # Second heuristic to detect musl libc. | 176 # Second heuristic to detect musl libc. |
163 if [ "$LIBC" = unknown ] && | 177 if [ "$LIBC" = unknown ] && |
164 command -v ldd >/dev/null && | 178 command -v ldd >/dev/null && |
165 ldd --version 2>&1 | grep -q ^musl; then | 179 ldd --version 2>&1 | grep -q ^musl; then |
174 ;; | 188 ;; |
175 esac | 189 esac |
176 | 190 |
177 # Note: order is significant - the case branches are not exclusive. | 191 # Note: order is significant - the case branches are not exclusive. |
178 | 192 |
179 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in | 193 case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in |
180 *:NetBSD:*:*) | 194 *:NetBSD:*:*) |
181 # NetBSD (nbsd) targets should (where applicable) match one or | 195 # NetBSD (nbsd) targets should (where applicable) match one or |
182 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, | 196 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
183 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently | 197 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
184 # switched to ELF, *-*-netbsd* would select the old | 198 # switched to ELF, *-*-netbsd* would select the old |
186 # compatibility and a consistent mechanism for selecting the | 200 # compatibility and a consistent mechanism for selecting the |
187 # object file format. | 201 # object file format. |
188 # | 202 # |
189 # Note: NetBSD doesn't particularly care about the vendor | 203 # Note: NetBSD doesn't particularly care about the vendor |
190 # portion of the name. We always set it to "unknown". | 204 # portion of the name. We always set it to "unknown". |
191 UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ | 205 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ |
192 /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ | 206 /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ |
193 /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ | 207 /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ |
194 echo unknown)) | 208 echo unknown)` |
195 case "$UNAME_MACHINE_ARCH" in | 209 case $UNAME_MACHINE_ARCH in |
196 aarch64eb) machine=aarch64_be-unknown ;; | 210 aarch64eb) machine=aarch64_be-unknown ;; |
197 armeb) machine=armeb-unknown ;; | 211 armeb) machine=armeb-unknown ;; |
198 arm*) machine=arm-unknown ;; | 212 arm*) machine=arm-unknown ;; |
199 sh3el) machine=shl-unknown ;; | 213 sh3el) machine=shl-unknown ;; |
200 sh3eb) machine=sh-unknown ;; | 214 sh3eb) machine=sh-unknown ;; |
201 sh5el) machine=sh5le-unknown ;; | 215 sh5el) machine=sh5le-unknown ;; |
202 earmv*) | 216 earmv*) |
203 arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') | 217 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` |
204 endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') | 218 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` |
205 machine="${arch}${endian}"-unknown | 219 machine=${arch}${endian}-unknown |
206 ;; | 220 ;; |
207 *) machine="$UNAME_MACHINE_ARCH"-unknown ;; | 221 *) machine=$UNAME_MACHINE_ARCH-unknown ;; |
208 esac | 222 esac |
209 # The Operating System including object format, if it has switched | 223 # The Operating System including object format, if it has switched |
210 # to ELF recently (or will in the future) and ABI. | 224 # to ELF recently (or will in the future) and ABI. |
211 case "$UNAME_MACHINE_ARCH" in | 225 case $UNAME_MACHINE_ARCH in |
212 earm*) | 226 earm*) |
213 os=netbsdelf | 227 os=netbsdelf |
214 ;; | 228 ;; |
215 arm*|i386|m68k|ns32k|sh3*|sparc|vax) | 229 arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
216 set_cc_for_build | 230 set_cc_for_build |
227 *) | 241 *) |
228 os=netbsd | 242 os=netbsd |
229 ;; | 243 ;; |
230 esac | 244 esac |
231 # Determine ABI tags. | 245 # Determine ABI tags. |
232 case "$UNAME_MACHINE_ARCH" in | 246 case $UNAME_MACHINE_ARCH in |
233 earm*) | 247 earm*) |
234 expr='s/^earmv[0-9]/-eabi/;s/eb$//' | 248 expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
235 abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") | 249 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` |
236 ;; | 250 ;; |
237 esac | 251 esac |
238 # The OS release | 252 # The OS release |
239 # Debian GNU/NetBSD machines have a different userland, and | 253 # Debian GNU/NetBSD machines have a different userland, and |
240 # thus, need a distinct triplet. However, they do not need | 254 # thus, need a distinct triplet. However, they do not need |
241 # kernel version information, so it can be replaced with a | 255 # kernel version information, so it can be replaced with a |
242 # suitable tag, in the style of linux-gnu. | 256 # suitable tag, in the style of linux-gnu. |
243 case "$UNAME_VERSION" in | 257 case $UNAME_VERSION in |
244 Debian*) | 258 Debian*) |
245 release='-gnu' | 259 release='-gnu' |
246 ;; | 260 ;; |
247 *) | 261 *) |
248 release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) | 262 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` |
249 ;; | 263 ;; |
250 esac | 264 esac |
251 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | 265 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
252 # contains redundant information, the shorter form: | 266 # contains redundant information, the shorter form: |
253 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | 267 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
254 echo "$machine-${os}${release}${abi-}" | 268 GUESS=$machine-${os}${release}${abi-} |
255 exit ;; | 269 ;; |
256 *:Bitrig:*:*) | 270 *:Bitrig:*:*) |
257 UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') | 271 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
258 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" | 272 GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE |
259 exit ;; | 273 ;; |
260 *:OpenBSD:*:*) | 274 *:OpenBSD:*:*) |
261 UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') | 275 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
262 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" | 276 GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE |
263 exit ;; | 277 ;; |
278 *:SecBSD:*:*) | |
279 UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` | |
280 GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE | |
281 ;; | |
264 *:LibertyBSD:*:*) | 282 *:LibertyBSD:*:*) |
265 UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') | 283 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` |
266 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" | 284 GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE |
267 exit ;; | 285 ;; |
268 *:MidnightBSD:*:*) | 286 *:MidnightBSD:*:*) |
269 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" | 287 GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE |
270 exit ;; | 288 ;; |
271 *:ekkoBSD:*:*) | 289 *:ekkoBSD:*:*) |
272 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" | 290 GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE |
273 exit ;; | 291 ;; |
274 *:SolidBSD:*:*) | 292 *:SolidBSD:*:*) |
275 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" | 293 GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE |
276 exit ;; | 294 ;; |
277 *:OS108:*:*) | 295 *:OS108:*:*) |
278 echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" | 296 GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE |
279 exit ;; | 297 ;; |
280 macppc:MirBSD:*:*) | 298 macppc:MirBSD:*:*) |
281 echo powerpc-unknown-mirbsd"$UNAME_RELEASE" | 299 GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE |
282 exit ;; | 300 ;; |
283 *:MirBSD:*:*) | 301 *:MirBSD:*:*) |
284 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" | 302 GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE |
285 exit ;; | 303 ;; |
286 *:Sortix:*:*) | 304 *:Sortix:*:*) |
287 echo "$UNAME_MACHINE"-unknown-sortix | 305 GUESS=$UNAME_MACHINE-unknown-sortix |
288 exit ;; | 306 ;; |
289 *:Twizzler:*:*) | 307 *:Twizzler:*:*) |
290 echo "$UNAME_MACHINE"-unknown-twizzler | 308 GUESS=$UNAME_MACHINE-unknown-twizzler |
291 exit ;; | 309 ;; |
292 *:Redox:*:*) | 310 *:Redox:*:*) |
293 echo "$UNAME_MACHINE"-unknown-redox | 311 GUESS=$UNAME_MACHINE-unknown-redox |
294 exit ;; | 312 ;; |
295 mips:OSF1:*.*) | 313 mips:OSF1:*.*) |
296 echo mips-dec-osf1 | 314 GUESS=mips-dec-osf1 |
297 exit ;; | 315 ;; |
298 alpha:OSF1:*:*) | 316 alpha:OSF1:*:*) |
317 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
318 trap '' 0 | |
299 case $UNAME_RELEASE in | 319 case $UNAME_RELEASE in |
300 *4.0) | 320 *4.0) |
301 UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') | 321 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
302 ;; | 322 ;; |
303 *5.*) | 323 *5.*) |
304 UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') | 324 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` |
305 ;; | 325 ;; |
306 esac | 326 esac |
307 # According to Compaq, /usr/sbin/psrinfo has been available on | 327 # According to Compaq, /usr/sbin/psrinfo has been available on |
308 # OSF/1 and Tru64 systems produced since 1995. I hope that | 328 # OSF/1 and Tru64 systems produced since 1995. I hope that |
309 # covers most systems running today. This code pipes the CPU | 329 # covers most systems running today. This code pipes the CPU |
310 # types through head -n 1, so we only detect the type of CPU 0. | 330 # types through head -n 1, so we only detect the type of CPU 0. |
311 ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) | 331 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
312 case "$ALPHA_CPU_TYPE" in | 332 case $ALPHA_CPU_TYPE in |
313 "EV4 (21064)") | 333 "EV4 (21064)") |
314 UNAME_MACHINE=alpha ;; | 334 UNAME_MACHINE=alpha ;; |
315 "EV4.5 (21064)") | 335 "EV4.5 (21064)") |
316 UNAME_MACHINE=alpha ;; | 336 UNAME_MACHINE=alpha ;; |
317 "LCA4 (21066/21068)") | 337 "LCA4 (21066/21068)") |
344 # A Pn.n version is a patched version. | 364 # A Pn.n version is a patched version. |
345 # A Vn.n version is a released version. | 365 # A Vn.n version is a released version. |
346 # A Tn.n version is a released field test version. | 366 # A Tn.n version is a released field test version. |
347 # A Xn.n version is an unreleased experimental baselevel. | 367 # A Xn.n version is an unreleased experimental baselevel. |
348 # 1.2 uses "1.2" for uname -r. | 368 # 1.2 uses "1.2" for uname -r. |
349 echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" | 369 OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
350 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | 370 GUESS=$UNAME_MACHINE-dec-osf$OSF_REL |
351 exitcode=$? | 371 ;; |
352 trap '' 0 | |
353 exit $exitcode ;; | |
354 Amiga*:UNIX_System_V:4.0:*) | 372 Amiga*:UNIX_System_V:4.0:*) |
355 echo m68k-unknown-sysv4 | 373 GUESS=m68k-unknown-sysv4 |
356 exit ;; | 374 ;; |
357 *:[Aa]miga[Oo][Ss]:*:*) | 375 *:[Aa]miga[Oo][Ss]:*:*) |
358 echo "$UNAME_MACHINE"-unknown-amigaos | 376 GUESS=$UNAME_MACHINE-unknown-amigaos |
359 exit ;; | 377 ;; |
360 *:[Mm]orph[Oo][Ss]:*:*) | 378 *:[Mm]orph[Oo][Ss]:*:*) |
361 echo "$UNAME_MACHINE"-unknown-morphos | 379 GUESS=$UNAME_MACHINE-unknown-morphos |
362 exit ;; | 380 ;; |
363 *:OS/390:*:*) | 381 *:OS/390:*:*) |
364 echo i370-ibm-openedition | 382 GUESS=i370-ibm-openedition |
365 exit ;; | 383 ;; |
366 *:z/VM:*:*) | 384 *:z/VM:*:*) |
367 echo s390-ibm-zvmoe | 385 GUESS=s390-ibm-zvmoe |
368 exit ;; | 386 ;; |
369 *:OS400:*:*) | 387 *:OS400:*:*) |
370 echo powerpc-ibm-os400 | 388 GUESS=powerpc-ibm-os400 |
371 exit ;; | 389 ;; |
372 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | 390 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
373 echo arm-acorn-riscix"$UNAME_RELEASE" | 391 GUESS=arm-acorn-riscix$UNAME_RELEASE |
374 exit ;; | 392 ;; |
375 arm*:riscos:*:*|arm*:RISCOS:*:*) | 393 arm*:riscos:*:*|arm*:RISCOS:*:*) |
376 echo arm-unknown-riscos | 394 GUESS=arm-unknown-riscos |
377 exit ;; | 395 ;; |
378 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) | 396 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
379 echo hppa1.1-hitachi-hiuxmpp | 397 GUESS=hppa1.1-hitachi-hiuxmpp |
380 exit ;; | 398 ;; |
381 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) | 399 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
382 # [email protected] (Earle F. Ake) contributed MIS and NILE. | 400 # [email protected] (Earle F. Ake) contributed MIS and NILE. |
383 if test "$( (/bin/universe) 2>/dev/null)" = att ; then | 401 case `(/bin/universe) 2>/dev/null` in |
384 echo pyramid-pyramid-sysv3 | 402 att) GUESS=pyramid-pyramid-sysv3 ;; |
385 else | 403 *) GUESS=pyramid-pyramid-bsd ;; |
386 echo pyramid-pyramid-bsd | 404 esac |
387 fi | 405 ;; |
388 exit ;; | |
389 NILE*:*:*:dcosx) | 406 NILE*:*:*:dcosx) |
390 echo pyramid-pyramid-svr4 | 407 GUESS=pyramid-pyramid-svr4 |
391 exit ;; | 408 ;; |
392 DRS?6000:unix:4.0:6*) | 409 DRS?6000:unix:4.0:6*) |
393 echo sparc-icl-nx6 | 410 GUESS=sparc-icl-nx6 |
394 exit ;; | 411 ;; |
395 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) | 412 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
396 case $(/usr/bin/uname -p) in | 413 case `/usr/bin/uname -p` in |
397 sparc) echo sparc-icl-nx7; exit ;; | 414 sparc) GUESS=sparc-icl-nx7 ;; |
398 esac ;; | 415 esac |
416 ;; | |
399 s390x:SunOS:*:*) | 417 s390x:SunOS:*:*) |
400 echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" | 418 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
401 exit ;; | 419 GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL |
420 ;; | |
402 sun4H:SunOS:5.*:*) | 421 sun4H:SunOS:5.*:*) |
403 echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" | 422 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
404 exit ;; | 423 GUESS=sparc-hal-solaris2$SUN_REL |
424 ;; | |
405 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) | 425 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
406 echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" | 426 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
407 exit ;; | 427 GUESS=sparc-sun-solaris2$SUN_REL |
428 ;; | |
408 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) | 429 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
409 echo i386-pc-auroraux"$UNAME_RELEASE" | 430 GUESS=i386-pc-auroraux$UNAME_RELEASE |
410 exit ;; | 431 ;; |
411 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) | 432 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
412 set_cc_for_build | 433 set_cc_for_build |
413 SUN_ARCH=i386 | 434 SUN_ARCH=i386 |
414 # If there is a compiler, see if it is configured for 64-bit objects. | 435 # If there is a compiler, see if it is configured for 64-bit objects. |
415 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. | 436 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
416 # This test works for both compilers. | 437 # This test works for both compilers. |
417 if test "$CC_FOR_BUILD" != no_compiler_found; then | 438 if test "$CC_FOR_BUILD" != no_compiler_found; then |
418 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ | 439 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
419 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | 440 (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ |
420 grep IS_64BIT_ARCH >/dev/null | 441 grep IS_64BIT_ARCH >/dev/null |
421 then | 442 then |
422 SUN_ARCH=x86_64 | 443 SUN_ARCH=x86_64 |
423 fi | 444 fi |
424 fi | 445 fi |
425 echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" | 446 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
426 exit ;; | 447 GUESS=$SUN_ARCH-pc-solaris2$SUN_REL |
448 ;; | |
427 sun4*:SunOS:6*:*) | 449 sun4*:SunOS:6*:*) |
428 # According to config.sub, this is the proper way to canonicalize | 450 # According to config.sub, this is the proper way to canonicalize |
429 # SunOS6. Hard to guess exactly what SunOS6 will be like, but | 451 # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
430 # it's likely to be more like Solaris than SunOS4. | 452 # it's likely to be more like Solaris than SunOS4. |
431 echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" | 453 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
432 exit ;; | 454 GUESS=sparc-sun-solaris3$SUN_REL |
455 ;; | |
433 sun4*:SunOS:*:*) | 456 sun4*:SunOS:*:*) |
434 case "$(/usr/bin/arch -k)" in | 457 case `/usr/bin/arch -k` in |
435 Series*|S4*) | 458 Series*|S4*) |
436 UNAME_RELEASE=$(uname -v) | 459 UNAME_RELEASE=`uname -v` |
437 ;; | 460 ;; |
438 esac | 461 esac |
439 # Japanese Language versions have a version number like `4.1.3-JL'. | 462 # Japanese Language versions have a version number like `4.1.3-JL'. |
440 echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" | 463 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` |
441 exit ;; | 464 GUESS=sparc-sun-sunos$SUN_REL |
465 ;; | |
442 sun3*:SunOS:*:*) | 466 sun3*:SunOS:*:*) |
443 echo m68k-sun-sunos"$UNAME_RELEASE" | 467 GUESS=m68k-sun-sunos$UNAME_RELEASE |
444 exit ;; | 468 ;; |
445 sun*:*:4.2BSD:*) | 469 sun*:*:4.2BSD:*) |
446 UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) | 470 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
447 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 | 471 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 |
448 case "$(/bin/arch)" in | 472 case `/bin/arch` in |
449 sun3) | 473 sun3) |
450 echo m68k-sun-sunos"$UNAME_RELEASE" | 474 GUESS=m68k-sun-sunos$UNAME_RELEASE |
451 ;; | 475 ;; |
452 sun4) | 476 sun4) |
453 echo sparc-sun-sunos"$UNAME_RELEASE" | 477 GUESS=sparc-sun-sunos$UNAME_RELEASE |
454 ;; | 478 ;; |
455 esac | 479 esac |
456 exit ;; | 480 ;; |
457 aushp:SunOS:*:*) | 481 aushp:SunOS:*:*) |
458 echo sparc-auspex-sunos"$UNAME_RELEASE" | 482 GUESS=sparc-auspex-sunos$UNAME_RELEASE |
459 exit ;; | 483 ;; |
460 # The situation for MiNT is a little confusing. The machine name | 484 # The situation for MiNT is a little confusing. The machine name |
461 # can be virtually everything (everything which is not | 485 # can be virtually everything (everything which is not |
462 # "atarist" or "atariste" at least should have a processor | 486 # "atarist" or "atariste" at least should have a processor |
463 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" | 487 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" |
464 # to the lowercase version "mint" (or "freemint"). Finally | 488 # to the lowercase version "mint" (or "freemint"). Finally |
465 # the system name "TOS" denotes a system which is actually not | 489 # the system name "TOS" denotes a system which is actually not |
466 # MiNT. But MiNT is downward compatible to TOS, so this should | 490 # MiNT. But MiNT is downward compatible to TOS, so this should |
467 # be no problem. | 491 # be no problem. |
468 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) | 492 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
469 echo m68k-atari-mint"$UNAME_RELEASE" | 493 GUESS=m68k-atari-mint$UNAME_RELEASE |
470 exit ;; | 494 ;; |
471 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) | 495 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
472 echo m68k-atari-mint"$UNAME_RELEASE" | 496 GUESS=m68k-atari-mint$UNAME_RELEASE |
473 exit ;; | 497 ;; |
474 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) | 498 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
475 echo m68k-atari-mint"$UNAME_RELEASE" | 499 GUESS=m68k-atari-mint$UNAME_RELEASE |
476 exit ;; | 500 ;; |
477 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) | 501 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
478 echo m68k-milan-mint"$UNAME_RELEASE" | 502 GUESS=m68k-milan-mint$UNAME_RELEASE |
479 exit ;; | 503 ;; |
480 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) | 504 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
481 echo m68k-hades-mint"$UNAME_RELEASE" | 505 GUESS=m68k-hades-mint$UNAME_RELEASE |
482 exit ;; | 506 ;; |
483 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) | 507 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
484 echo m68k-unknown-mint"$UNAME_RELEASE" | 508 GUESS=m68k-unknown-mint$UNAME_RELEASE |
485 exit ;; | 509 ;; |
486 m68k:machten:*:*) | 510 m68k:machten:*:*) |
487 echo m68k-apple-machten"$UNAME_RELEASE" | 511 GUESS=m68k-apple-machten$UNAME_RELEASE |
488 exit ;; | 512 ;; |
489 powerpc:machten:*:*) | 513 powerpc:machten:*:*) |
490 echo powerpc-apple-machten"$UNAME_RELEASE" | 514 GUESS=powerpc-apple-machten$UNAME_RELEASE |
491 exit ;; | 515 ;; |
492 RISC*:Mach:*:*) | 516 RISC*:Mach:*:*) |
493 echo mips-dec-mach_bsd4.3 | 517 GUESS=mips-dec-mach_bsd4.3 |
494 exit ;; | 518 ;; |
495 RISC*:ULTRIX:*:*) | 519 RISC*:ULTRIX:*:*) |
496 echo mips-dec-ultrix"$UNAME_RELEASE" | 520 GUESS=mips-dec-ultrix$UNAME_RELEASE |
497 exit ;; | 521 ;; |
498 VAX*:ULTRIX*:*:*) | 522 VAX*:ULTRIX*:*:*) |
499 echo vax-dec-ultrix"$UNAME_RELEASE" | 523 GUESS=vax-dec-ultrix$UNAME_RELEASE |
500 exit ;; | 524 ;; |
501 2020:CLIX:*:* | 2430:CLIX:*:*) | 525 2020:CLIX:*:* | 2430:CLIX:*:*) |
502 echo clipper-intergraph-clix"$UNAME_RELEASE" | 526 GUESS=clipper-intergraph-clix$UNAME_RELEASE |
503 exit ;; | 527 ;; |
504 mips:*:*:UMIPS | mips:*:*:RISCos) | 528 mips:*:*:UMIPS | mips:*:*:RISCos) |
505 set_cc_for_build | 529 set_cc_for_build |
506 sed 's/^ //' << EOF > "$dummy.c" | 530 sed 's/^ //' << EOF > "$dummy.c" |
507 #ifdef __cplusplus | 531 #ifdef __cplusplus |
508 #include <stdio.h> /* for printf() prototype */ | 532 #include <stdio.h> /* for printf() prototype */ |
523 #endif | 547 #endif |
524 exit (-1); | 548 exit (-1); |
525 } | 549 } |
526 EOF | 550 EOF |
527 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && | 551 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && |
528 dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && | 552 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && |
529 SYSTEM_NAME=$("$dummy" "$dummyarg") && | 553 SYSTEM_NAME=`"$dummy" "$dummyarg"` && |
530 { echo "$SYSTEM_NAME"; exit; } | 554 { echo "$SYSTEM_NAME"; exit; } |
531 echo mips-mips-riscos"$UNAME_RELEASE" | 555 GUESS=mips-mips-riscos$UNAME_RELEASE |
532 exit ;; | 556 ;; |
533 Motorola:PowerMAX_OS:*:*) | 557 Motorola:PowerMAX_OS:*:*) |
534 echo powerpc-motorola-powermax | 558 GUESS=powerpc-motorola-powermax |
535 exit ;; | 559 ;; |
536 Motorola:*:4.3:PL8-*) | 560 Motorola:*:4.3:PL8-*) |
537 echo powerpc-harris-powermax | 561 GUESS=powerpc-harris-powermax |
538 exit ;; | 562 ;; |
539 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) | 563 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
540 echo powerpc-harris-powermax | 564 GUESS=powerpc-harris-powermax |
541 exit ;; | 565 ;; |
542 Night_Hawk:Power_UNIX:*:*) | 566 Night_Hawk:Power_UNIX:*:*) |
543 echo powerpc-harris-powerunix | 567 GUESS=powerpc-harris-powerunix |
544 exit ;; | 568 ;; |
545 m88k:CX/UX:7*:*) | 569 m88k:CX/UX:7*:*) |
546 echo m88k-harris-cxux7 | 570 GUESS=m88k-harris-cxux7 |
547 exit ;; | 571 ;; |
548 m88k:*:4*:R4*) | 572 m88k:*:4*:R4*) |
549 echo m88k-motorola-sysv4 | 573 GUESS=m88k-motorola-sysv4 |
550 exit ;; | 574 ;; |
551 m88k:*:3*:R3*) | 575 m88k:*:3*:R3*) |
552 echo m88k-motorola-sysv3 | 576 GUESS=m88k-motorola-sysv3 |
553 exit ;; | 577 ;; |
554 AViiON:dgux:*:*) | 578 AViiON:dgux:*:*) |
555 # DG/UX returns AViiON for all architectures | 579 # DG/UX returns AViiON for all architectures |
556 UNAME_PROCESSOR=$(/usr/bin/uname -p) | 580 UNAME_PROCESSOR=`/usr/bin/uname -p` |
557 if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 | 581 if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 |
558 then | 582 then |
559 if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ | 583 if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ |
560 test "$TARGET_BINARY_INTERFACE"x = x | 584 test "$TARGET_BINARY_INTERFACE"x = x |
561 then | 585 then |
562 echo m88k-dg-dgux"$UNAME_RELEASE" | 586 GUESS=m88k-dg-dgux$UNAME_RELEASE |
563 else | 587 else |
564 echo m88k-dg-dguxbcs"$UNAME_RELEASE" | 588 GUESS=m88k-dg-dguxbcs$UNAME_RELEASE |
565 fi | 589 fi |
566 else | 590 else |
567 echo i586-dg-dgux"$UNAME_RELEASE" | 591 GUESS=i586-dg-dgux$UNAME_RELEASE |
568 fi | 592 fi |
569 exit ;; | 593 ;; |
570 M88*:DolphinOS:*:*) # DolphinOS (SVR3) | 594 M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
571 echo m88k-dolphin-sysv3 | 595 GUESS=m88k-dolphin-sysv3 |
572 exit ;; | 596 ;; |
573 M88*:*:R3*:*) | 597 M88*:*:R3*:*) |
574 # Delta 88k system running SVR3 | 598 # Delta 88k system running SVR3 |
575 echo m88k-motorola-sysv3 | 599 GUESS=m88k-motorola-sysv3 |
576 exit ;; | 600 ;; |
577 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) | 601 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
578 echo m88k-tektronix-sysv3 | 602 GUESS=m88k-tektronix-sysv3 |
579 exit ;; | 603 ;; |
580 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) | 604 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
581 echo m68k-tektronix-bsd | 605 GUESS=m68k-tektronix-bsd |
582 exit ;; | 606 ;; |
583 *:IRIX*:*:*) | 607 *:IRIX*:*:*) |
584 echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" | 608 IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` |
585 exit ;; | 609 GUESS=mips-sgi-irix$IRIX_REL |
610 ;; | |
586 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. | 611 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
587 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id | 612 GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
588 exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' | 613 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' |
589 i*86:AIX:*:*) | 614 i*86:AIX:*:*) |
590 echo i386-ibm-aix | 615 GUESS=i386-ibm-aix |
591 exit ;; | 616 ;; |
592 ia64:AIX:*:*) | 617 ia64:AIX:*:*) |
593 if test -x /usr/bin/oslevel ; then | 618 if test -x /usr/bin/oslevel ; then |
594 IBM_REV=$(/usr/bin/oslevel) | 619 IBM_REV=`/usr/bin/oslevel` |
595 else | 620 else |
596 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | 621 IBM_REV=$UNAME_VERSION.$UNAME_RELEASE |
597 fi | 622 fi |
598 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" | 623 GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV |
599 exit ;; | 624 ;; |
600 *:AIX:2:3) | 625 *:AIX:2:3) |
601 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then | 626 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
602 set_cc_for_build | 627 set_cc_for_build |
603 sed 's/^ //' << EOF > "$dummy.c" | 628 sed 's/^ //' << EOF > "$dummy.c" |
604 #include <sys/systemcfg.h> | 629 #include <sys/systemcfg.h> |
609 exit(1); | 634 exit(1); |
610 puts("powerpc-ibm-aix3.2.5"); | 635 puts("powerpc-ibm-aix3.2.5"); |
611 exit(0); | 636 exit(0); |
612 } | 637 } |
613 EOF | 638 EOF |
614 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") | 639 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` |
615 then | 640 then |
616 echo "$SYSTEM_NAME" | 641 GUESS=$SYSTEM_NAME |
617 else | 642 else |
618 echo rs6000-ibm-aix3.2.5 | 643 GUESS=rs6000-ibm-aix3.2.5 |
619 fi | 644 fi |
620 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then | 645 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
621 echo rs6000-ibm-aix3.2.4 | 646 GUESS=rs6000-ibm-aix3.2.4 |
622 else | 647 else |
623 echo rs6000-ibm-aix3.2 | 648 GUESS=rs6000-ibm-aix3.2 |
624 fi | 649 fi |
625 exit ;; | 650 ;; |
626 *:AIX:*:[4567]) | 651 *:AIX:*:[4567]) |
627 IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') | 652 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
628 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then | 653 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then |
629 IBM_ARCH=rs6000 | 654 IBM_ARCH=rs6000 |
630 else | 655 else |
631 IBM_ARCH=powerpc | 656 IBM_ARCH=powerpc |
632 fi | 657 fi |
633 if test -x /usr/bin/lslpp ; then | 658 if test -x /usr/bin/lslpp ; then |
634 IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | | 659 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ |
635 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) | 660 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
636 else | 661 else |
637 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | 662 IBM_REV=$UNAME_VERSION.$UNAME_RELEASE |
638 fi | 663 fi |
639 echo "$IBM_ARCH"-ibm-aix"$IBM_REV" | 664 GUESS=$IBM_ARCH-ibm-aix$IBM_REV |
640 exit ;; | 665 ;; |
641 *:AIX:*:*) | 666 *:AIX:*:*) |
642 echo rs6000-ibm-aix | 667 GUESS=rs6000-ibm-aix |
643 exit ;; | 668 ;; |
644 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) | 669 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) |
645 echo romp-ibm-bsd4.4 | 670 GUESS=romp-ibm-bsd4.4 |
646 exit ;; | 671 ;; |
647 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and | 672 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
648 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to | 673 GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to |
649 exit ;; # report: romp-ibm BSD 4.3 | 674 ;; # report: romp-ibm BSD 4.3 |
650 *:BOSX:*:*) | 675 *:BOSX:*:*) |
651 echo rs6000-bull-bosx | 676 GUESS=rs6000-bull-bosx |
652 exit ;; | 677 ;; |
653 DPX/2?00:B.O.S.:*:*) | 678 DPX/2?00:B.O.S.:*:*) |
654 echo m68k-bull-sysv3 | 679 GUESS=m68k-bull-sysv3 |
655 exit ;; | 680 ;; |
656 9000/[34]??:4.3bsd:1.*:*) | 681 9000/[34]??:4.3bsd:1.*:*) |
657 echo m68k-hp-bsd | 682 GUESS=m68k-hp-bsd |
658 exit ;; | 683 ;; |
659 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) | 684 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
660 echo m68k-hp-bsd4.4 | 685 GUESS=m68k-hp-bsd4.4 |
661 exit ;; | 686 ;; |
662 9000/[34678]??:HP-UX:*:*) | 687 9000/[34678]??:HP-UX:*:*) |
663 HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') | 688 HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` |
664 case "$UNAME_MACHINE" in | 689 case $UNAME_MACHINE in |
665 9000/31?) HP_ARCH=m68000 ;; | 690 9000/31?) HP_ARCH=m68000 ;; |
666 9000/[34]??) HP_ARCH=m68k ;; | 691 9000/[34]??) HP_ARCH=m68k ;; |
667 9000/[678][0-9][0-9]) | 692 9000/[678][0-9][0-9]) |
668 if test -x /usr/bin/getconf; then | 693 if test -x /usr/bin/getconf; then |
669 sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) | 694 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
670 sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) | 695 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
671 case "$sc_cpu_version" in | 696 case $sc_cpu_version in |
672 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 | 697 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
673 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 | 698 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
674 532) # CPU_PA_RISC2_0 | 699 532) # CPU_PA_RISC2_0 |
675 case "$sc_kernel_bits" in | 700 case $sc_kernel_bits in |
676 32) HP_ARCH=hppa2.0n ;; | 701 32) HP_ARCH=hppa2.0n ;; |
677 64) HP_ARCH=hppa2.0w ;; | 702 64) HP_ARCH=hppa2.0w ;; |
678 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 | 703 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
679 esac ;; | 704 esac ;; |
680 esac | 705 esac |
712 default: puts ("hppa1.0"); break; | 737 default: puts ("hppa1.0"); break; |
713 } | 738 } |
714 exit (0); | 739 exit (0); |
715 } | 740 } |
716 EOF | 741 EOF |
717 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") | 742 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` |
718 test -z "$HP_ARCH" && HP_ARCH=hppa | 743 test -z "$HP_ARCH" && HP_ARCH=hppa |
719 fi ;; | 744 fi ;; |
720 esac | 745 esac |
721 if test "$HP_ARCH" = hppa2.0w | 746 if test "$HP_ARCH" = hppa2.0w |
722 then | 747 then |
737 HP_ARCH=hppa2.0w | 762 HP_ARCH=hppa2.0w |
738 else | 763 else |
739 HP_ARCH=hppa64 | 764 HP_ARCH=hppa64 |
740 fi | 765 fi |
741 fi | 766 fi |
742 echo "$HP_ARCH"-hp-hpux"$HPUX_REV" | 767 GUESS=$HP_ARCH-hp-hpux$HPUX_REV |
743 exit ;; | 768 ;; |
744 ia64:HP-UX:*:*) | 769 ia64:HP-UX:*:*) |
745 HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') | 770 HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` |
746 echo ia64-hp-hpux"$HPUX_REV" | 771 GUESS=ia64-hp-hpux$HPUX_REV |
747 exit ;; | 772 ;; |
748 3050*:HI-UX:*:*) | 773 3050*:HI-UX:*:*) |
749 set_cc_for_build | 774 set_cc_for_build |
750 sed 's/^ //' << EOF > "$dummy.c" | 775 sed 's/^ //' << EOF > "$dummy.c" |
751 #include <unistd.h> | 776 #include <unistd.h> |
752 int | 777 int |
770 puts ("m68k-hitachi-hiuxwe2"); | 795 puts ("m68k-hitachi-hiuxwe2"); |
771 else puts ("unknown-hitachi-hiuxwe2"); | 796 else puts ("unknown-hitachi-hiuxwe2"); |
772 exit (0); | 797 exit (0); |
773 } | 798 } |
774 EOF | 799 EOF |
775 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && | 800 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && |
776 { echo "$SYSTEM_NAME"; exit; } | 801 { echo "$SYSTEM_NAME"; exit; } |
777 echo unknown-hitachi-hiuxwe2 | 802 GUESS=unknown-hitachi-hiuxwe2 |
778 exit ;; | 803 ;; |
779 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) | 804 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) |
780 echo hppa1.1-hp-bsd | 805 GUESS=hppa1.1-hp-bsd |
781 exit ;; | 806 ;; |
782 9000/8??:4.3bsd:*:*) | 807 9000/8??:4.3bsd:*:*) |
783 echo hppa1.0-hp-bsd | 808 GUESS=hppa1.0-hp-bsd |
784 exit ;; | 809 ;; |
785 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) | 810 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
786 echo hppa1.0-hp-mpeix | 811 GUESS=hppa1.0-hp-mpeix |
787 exit ;; | 812 ;; |
788 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) | 813 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) |
789 echo hppa1.1-hp-osf | 814 GUESS=hppa1.1-hp-osf |
790 exit ;; | 815 ;; |
791 hp8??:OSF1:*:*) | 816 hp8??:OSF1:*:*) |
792 echo hppa1.0-hp-osf | 817 GUESS=hppa1.0-hp-osf |
793 exit ;; | 818 ;; |
794 i*86:OSF1:*:*) | 819 i*86:OSF1:*:*) |
795 if test -x /usr/sbin/sysversion ; then | 820 if test -x /usr/sbin/sysversion ; then |
796 echo "$UNAME_MACHINE"-unknown-osf1mk | 821 GUESS=$UNAME_MACHINE-unknown-osf1mk |
797 else | 822 else |
798 echo "$UNAME_MACHINE"-unknown-osf1 | 823 GUESS=$UNAME_MACHINE-unknown-osf1 |
799 fi | 824 fi |
800 exit ;; | 825 ;; |
801 parisc*:Lites*:*:*) | 826 parisc*:Lites*:*:*) |
802 echo hppa1.1-hp-lites | 827 GUESS=hppa1.1-hp-lites |
803 exit ;; | 828 ;; |
804 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) | 829 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
805 echo c1-convex-bsd | 830 GUESS=c1-convex-bsd |
806 exit ;; | 831 ;; |
807 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) | 832 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
808 if getsysinfo -f scalar_acc | 833 if getsysinfo -f scalar_acc |
809 then echo c32-convex-bsd | 834 then echo c32-convex-bsd |
810 else echo c2-convex-bsd | 835 else echo c2-convex-bsd |
811 fi | 836 fi |
812 exit ;; | 837 exit ;; |
813 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) | 838 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
814 echo c34-convex-bsd | 839 GUESS=c34-convex-bsd |
815 exit ;; | 840 ;; |
816 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) | 841 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
817 echo c38-convex-bsd | 842 GUESS=c38-convex-bsd |
818 exit ;; | 843 ;; |
819 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) | 844 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
820 echo c4-convex-bsd | 845 GUESS=c4-convex-bsd |
821 exit ;; | 846 ;; |
822 CRAY*Y-MP:*:*:*) | 847 CRAY*Y-MP:*:*:*) |
823 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | 848 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
824 exit ;; | 849 GUESS=ymp-cray-unicos$CRAY_REL |
850 ;; | |
825 CRAY*[A-Z]90:*:*:*) | 851 CRAY*[A-Z]90:*:*:*) |
826 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | 852 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ |
827 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ | 853 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
828 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ | 854 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
829 -e 's/\.[^.]*$/.X/' | 855 -e 's/\.[^.]*$/.X/' |
830 exit ;; | 856 exit ;; |
831 CRAY*TS:*:*:*) | 857 CRAY*TS:*:*:*) |
832 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | 858 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
833 exit ;; | 859 GUESS=t90-cray-unicos$CRAY_REL |
860 ;; | |
834 CRAY*T3E:*:*:*) | 861 CRAY*T3E:*:*:*) |
835 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | 862 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
836 exit ;; | 863 GUESS=alphaev5-cray-unicosmk$CRAY_REL |
864 ;; | |
837 CRAY*SV1:*:*:*) | 865 CRAY*SV1:*:*:*) |
838 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | 866 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
839 exit ;; | 867 GUESS=sv1-cray-unicos$CRAY_REL |
868 ;; | |
840 *:UNICOS/mp:*:*) | 869 *:UNICOS/mp:*:*) |
841 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | 870 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
842 exit ;; | 871 GUESS=craynv-cray-unicosmp$CRAY_REL |
872 ;; | |
843 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | 873 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
844 FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) | 874 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
845 FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') | 875 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
846 FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') | 876 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` |
847 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 877 GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} |
848 exit ;; | 878 ;; |
849 5000:UNIX_System_V:4.*:*) | 879 5000:UNIX_System_V:4.*:*) |
850 FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') | 880 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
851 FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') | 881 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` |
852 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 882 GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} |
853 exit ;; | 883 ;; |
854 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | 884 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
855 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" | 885 GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE |
856 exit ;; | 886 ;; |
857 sparc*:BSD/OS:*:*) | 887 sparc*:BSD/OS:*:*) |
858 echo sparc-unknown-bsdi"$UNAME_RELEASE" | 888 GUESS=sparc-unknown-bsdi$UNAME_RELEASE |
859 exit ;; | 889 ;; |
860 *:BSD/OS:*:*) | 890 *:BSD/OS:*:*) |
861 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" | 891 GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE |
862 exit ;; | 892 ;; |
863 arm:FreeBSD:*:*) | 893 arm:FreeBSD:*:*) |
864 UNAME_PROCESSOR=$(uname -p) | 894 UNAME_PROCESSOR=`uname -p` |
865 set_cc_for_build | 895 set_cc_for_build |
866 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | 896 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
867 | grep -q __ARM_PCS_VFP | 897 | grep -q __ARM_PCS_VFP |
868 then | 898 then |
869 echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi | 899 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
900 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi | |
870 else | 901 else |
871 echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf | 902 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
872 fi | 903 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf |
873 exit ;; | 904 fi |
905 ;; | |
874 *:FreeBSD:*:*) | 906 *:FreeBSD:*:*) |
875 UNAME_PROCESSOR=$(/usr/bin/uname -p) | 907 UNAME_PROCESSOR=`/usr/bin/uname -p` |
876 case "$UNAME_PROCESSOR" in | 908 case $UNAME_PROCESSOR in |
877 amd64) | 909 amd64) |
878 UNAME_PROCESSOR=x86_64 ;; | 910 UNAME_PROCESSOR=x86_64 ;; |
879 i386) | 911 i386) |
880 UNAME_PROCESSOR=i586 ;; | 912 UNAME_PROCESSOR=i586 ;; |
881 esac | 913 esac |
882 echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" | 914 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
883 exit ;; | 915 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL |
916 ;; | |
884 i*:CYGWIN*:*) | 917 i*:CYGWIN*:*) |
885 echo "$UNAME_MACHINE"-pc-cygwin | 918 GUESS=$UNAME_MACHINE-pc-cygwin |
886 exit ;; | 919 ;; |
887 *:MINGW64*:*) | 920 *:MINGW64*:*) |
888 echo "$UNAME_MACHINE"-pc-mingw64 | 921 GUESS=$UNAME_MACHINE-pc-mingw64 |
889 exit ;; | 922 ;; |
890 *:MINGW*:*) | 923 *:MINGW*:*) |
891 echo "$UNAME_MACHINE"-pc-mingw32 | 924 GUESS=$UNAME_MACHINE-pc-mingw32 |
892 exit ;; | 925 ;; |
893 *:MSYS*:*) | 926 *:MSYS*:*) |
894 echo "$UNAME_MACHINE"-pc-msys | 927 GUESS=$UNAME_MACHINE-pc-msys |
895 exit ;; | 928 ;; |
896 i*:PW*:*) | 929 i*:PW*:*) |
897 echo "$UNAME_MACHINE"-pc-pw32 | 930 GUESS=$UNAME_MACHINE-pc-pw32 |
898 exit ;; | 931 ;; |
932 *:SerenityOS:*:*) | |
933 GUESS=$UNAME_MACHINE-pc-serenity | |
934 ;; | |
899 *:Interix*:*) | 935 *:Interix*:*) |
900 case "$UNAME_MACHINE" in | 936 case $UNAME_MACHINE in |
901 x86) | 937 x86) |
902 echo i586-pc-interix"$UNAME_RELEASE" | 938 GUESS=i586-pc-interix$UNAME_RELEASE |
903 exit ;; | 939 ;; |
904 authenticamd | genuineintel | EM64T) | 940 authenticamd | genuineintel | EM64T) |
905 echo x86_64-unknown-interix"$UNAME_RELEASE" | 941 GUESS=x86_64-unknown-interix$UNAME_RELEASE |
906 exit ;; | 942 ;; |
907 IA64) | 943 IA64) |
908 echo ia64-unknown-interix"$UNAME_RELEASE" | 944 GUESS=ia64-unknown-interix$UNAME_RELEASE |
909 exit ;; | 945 ;; |
910 esac ;; | 946 esac ;; |
911 i*:UWIN*:*) | 947 i*:UWIN*:*) |
912 echo "$UNAME_MACHINE"-pc-uwin | 948 GUESS=$UNAME_MACHINE-pc-uwin |
913 exit ;; | 949 ;; |
914 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) | 950 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
915 echo x86_64-pc-cygwin | 951 GUESS=x86_64-pc-cygwin |
916 exit ;; | 952 ;; |
917 prep*:SunOS:5.*:*) | 953 prep*:SunOS:5.*:*) |
918 echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" | 954 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
919 exit ;; | 955 GUESS=powerpcle-unknown-solaris2$SUN_REL |
956 ;; | |
920 *:GNU:*:*) | 957 *:GNU:*:*) |
921 # the GNU system | 958 # the GNU system |
922 echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" | 959 GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` |
923 exit ;; | 960 GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` |
961 GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL | |
962 ;; | |
924 *:GNU/*:*:*) | 963 *:GNU/*:*:*) |
925 # other systems with GNU libc and userland | 964 # other systems with GNU libc and userland |
926 echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" | 965 GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` |
927 exit ;; | 966 GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
967 GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC | |
968 ;; | |
928 *:Minix:*:*) | 969 *:Minix:*:*) |
929 echo "$UNAME_MACHINE"-unknown-minix | 970 GUESS=$UNAME_MACHINE-unknown-minix |
930 exit ;; | 971 ;; |
931 aarch64:Linux:*:*) | 972 aarch64:Linux:*:*) |
932 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 973 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
933 exit ;; | 974 ;; |
934 aarch64_be:Linux:*:*) | 975 aarch64_be:Linux:*:*) |
935 UNAME_MACHINE=aarch64_be | 976 UNAME_MACHINE=aarch64_be |
936 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 977 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
937 exit ;; | 978 ;; |
938 alpha:Linux:*:*) | 979 alpha:Linux:*:*) |
939 case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in | 980 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in |
940 EV5) UNAME_MACHINE=alphaev5 ;; | 981 EV5) UNAME_MACHINE=alphaev5 ;; |
941 EV56) UNAME_MACHINE=alphaev56 ;; | 982 EV56) UNAME_MACHINE=alphaev56 ;; |
942 PCA56) UNAME_MACHINE=alphapca56 ;; | 983 PCA56) UNAME_MACHINE=alphapca56 ;; |
943 PCA57) UNAME_MACHINE=alphapca56 ;; | 984 PCA57) UNAME_MACHINE=alphapca56 ;; |
944 EV6) UNAME_MACHINE=alphaev6 ;; | 985 EV6) UNAME_MACHINE=alphaev6 ;; |
945 EV67) UNAME_MACHINE=alphaev67 ;; | 986 EV67) UNAME_MACHINE=alphaev67 ;; |
946 EV68*) UNAME_MACHINE=alphaev68 ;; | 987 EV68*) UNAME_MACHINE=alphaev68 ;; |
947 esac | 988 esac |
948 objdump --private-headers /bin/sh | grep -q ld.so.1 | 989 objdump --private-headers /bin/sh | grep -q ld.so.1 |
949 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi | 990 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi |
950 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 991 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
951 exit ;; | 992 ;; |
952 arc:Linux:*:* | arceb:Linux:*:*) | 993 arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) |
953 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 994 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
954 exit ;; | 995 ;; |
955 arm*:Linux:*:*) | 996 arm*:Linux:*:*) |
956 set_cc_for_build | 997 set_cc_for_build |
957 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | 998 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
958 | grep -q __ARM_EABI__ | 999 | grep -q __ARM_EABI__ |
959 then | 1000 then |
960 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1001 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
961 else | 1002 else |
962 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | 1003 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
963 | grep -q __ARM_PCS_VFP | 1004 | grep -q __ARM_PCS_VFP |
964 then | 1005 then |
965 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi | 1006 GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi |
966 else | 1007 else |
967 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf | 1008 GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf |
968 fi | 1009 fi |
969 fi | 1010 fi |
970 exit ;; | 1011 ;; |
971 avr32*:Linux:*:*) | 1012 avr32*:Linux:*:*) |
972 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1013 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
973 exit ;; | 1014 ;; |
974 cris:Linux:*:*) | 1015 cris:Linux:*:*) |
975 echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | 1016 GUESS=$UNAME_MACHINE-axis-linux-$LIBC |
976 exit ;; | 1017 ;; |
977 crisv32:Linux:*:*) | 1018 crisv32:Linux:*:*) |
978 echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | 1019 GUESS=$UNAME_MACHINE-axis-linux-$LIBC |
979 exit ;; | 1020 ;; |
980 e2k:Linux:*:*) | 1021 e2k:Linux:*:*) |
981 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1022 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
982 exit ;; | 1023 ;; |
983 frv:Linux:*:*) | 1024 frv:Linux:*:*) |
984 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1025 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
985 exit ;; | 1026 ;; |
986 hexagon:Linux:*:*) | 1027 hexagon:Linux:*:*) |
987 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1028 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
988 exit ;; | 1029 ;; |
989 i*86:Linux:*:*) | 1030 i*86:Linux:*:*) |
990 echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | 1031 GUESS=$UNAME_MACHINE-pc-linux-$LIBC |
991 exit ;; | 1032 ;; |
992 ia64:Linux:*:*) | 1033 ia64:Linux:*:*) |
993 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1034 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
994 exit ;; | 1035 ;; |
995 k1om:Linux:*:*) | 1036 k1om:Linux:*:*) |
996 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1037 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
997 exit ;; | 1038 ;; |
998 loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) | 1039 loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) |
999 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1040 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1000 exit ;; | 1041 ;; |
1001 m32r*:Linux:*:*) | 1042 m32r*:Linux:*:*) |
1002 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1043 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1003 exit ;; | 1044 ;; |
1004 m68*:Linux:*:*) | 1045 m68*:Linux:*:*) |
1005 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1046 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1006 exit ;; | 1047 ;; |
1007 mips:Linux:*:* | mips64:Linux:*:*) | 1048 mips:Linux:*:* | mips64:Linux:*:*) |
1008 set_cc_for_build | 1049 set_cc_for_build |
1009 IS_GLIBC=0 | 1050 IS_GLIBC=0 |
1010 test x"${LIBC}" = xgnu && IS_GLIBC=1 | 1051 test x"${LIBC}" = xgnu && IS_GLIBC=1 |
1011 sed 's/^ //' << EOF > "$dummy.c" | 1052 sed 's/^ //' << EOF > "$dummy.c" |
1046 #else | 1087 #else |
1047 MIPS_ENDIAN= | 1088 MIPS_ENDIAN= |
1048 #endif | 1089 #endif |
1049 #endif | 1090 #endif |
1050 EOF | 1091 EOF |
1051 eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" | 1092 cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` |
1093 eval "$cc_set_vars" | |
1052 test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } | 1094 test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } |
1053 ;; | 1095 ;; |
1054 mips64el:Linux:*:*) | 1096 mips64el:Linux:*:*) |
1055 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1097 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1056 exit ;; | 1098 ;; |
1057 openrisc*:Linux:*:*) | 1099 openrisc*:Linux:*:*) |
1058 echo or1k-unknown-linux-"$LIBC" | 1100 GUESS=or1k-unknown-linux-$LIBC |
1059 exit ;; | 1101 ;; |
1060 or32:Linux:*:* | or1k*:Linux:*:*) | 1102 or32:Linux:*:* | or1k*:Linux:*:*) |
1061 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1103 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1062 exit ;; | 1104 ;; |
1063 padre:Linux:*:*) | 1105 padre:Linux:*:*) |
1064 echo sparc-unknown-linux-"$LIBC" | 1106 GUESS=sparc-unknown-linux-$LIBC |
1065 exit ;; | 1107 ;; |
1066 parisc64:Linux:*:* | hppa64:Linux:*:*) | 1108 parisc64:Linux:*:* | hppa64:Linux:*:*) |
1067 echo hppa64-unknown-linux-"$LIBC" | 1109 GUESS=hppa64-unknown-linux-$LIBC |
1068 exit ;; | 1110 ;; |
1069 parisc:Linux:*:* | hppa:Linux:*:*) | 1111 parisc:Linux:*:* | hppa:Linux:*:*) |
1070 # Look for CPU level | 1112 # Look for CPU level |
1071 case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in | 1113 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
1072 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; | 1114 PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; |
1073 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; | 1115 PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; |
1074 *) echo hppa-unknown-linux-"$LIBC" ;; | 1116 *) GUESS=hppa-unknown-linux-$LIBC ;; |
1075 esac | 1117 esac |
1076 exit ;; | 1118 ;; |
1077 ppc64:Linux:*:*) | 1119 ppc64:Linux:*:*) |
1078 echo powerpc64-unknown-linux-"$LIBC" | 1120 GUESS=powerpc64-unknown-linux-$LIBC |
1079 exit ;; | 1121 ;; |
1080 ppc:Linux:*:*) | 1122 ppc:Linux:*:*) |
1081 echo powerpc-unknown-linux-"$LIBC" | 1123 GUESS=powerpc-unknown-linux-$LIBC |
1082 exit ;; | 1124 ;; |
1083 ppc64le:Linux:*:*) | 1125 ppc64le:Linux:*:*) |
1084 echo powerpc64le-unknown-linux-"$LIBC" | 1126 GUESS=powerpc64le-unknown-linux-$LIBC |
1085 exit ;; | 1127 ;; |
1086 ppcle:Linux:*:*) | 1128 ppcle:Linux:*:*) |
1087 echo powerpcle-unknown-linux-"$LIBC" | 1129 GUESS=powerpcle-unknown-linux-$LIBC |
1088 exit ;; | 1130 ;; |
1089 riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) | 1131 riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) |
1090 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1132 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1091 exit ;; | 1133 ;; |
1092 s390:Linux:*:* | s390x:Linux:*:*) | 1134 s390:Linux:*:* | s390x:Linux:*:*) |
1093 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" | 1135 GUESS=$UNAME_MACHINE-ibm-linux-$LIBC |
1094 exit ;; | 1136 ;; |
1095 sh64*:Linux:*:*) | 1137 sh64*:Linux:*:*) |
1096 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1138 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1097 exit ;; | 1139 ;; |
1098 sh*:Linux:*:*) | 1140 sh*:Linux:*:*) |
1099 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1141 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1100 exit ;; | 1142 ;; |
1101 sparc:Linux:*:* | sparc64:Linux:*:*) | 1143 sparc:Linux:*:* | sparc64:Linux:*:*) |
1102 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1144 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1103 exit ;; | 1145 ;; |
1104 tile*:Linux:*:*) | 1146 tile*:Linux:*:*) |
1105 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1147 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1106 exit ;; | 1148 ;; |
1107 vax:Linux:*:*) | 1149 vax:Linux:*:*) |
1108 echo "$UNAME_MACHINE"-dec-linux-"$LIBC" | 1150 GUESS=$UNAME_MACHINE-dec-linux-$LIBC |
1109 exit ;; | 1151 ;; |
1110 x86_64:Linux:*:*) | 1152 x86_64:Linux:*:*) |
1111 set_cc_for_build | 1153 set_cc_for_build |
1112 LIBCABI=$LIBC | 1154 LIBCABI=$LIBC |
1113 if test "$CC_FOR_BUILD" != no_compiler_found; then | 1155 if test "$CC_FOR_BUILD" != no_compiler_found; then |
1114 if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ | 1156 if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ |
1115 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | 1157 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
1116 grep IS_X32 >/dev/null | 1158 grep IS_X32 >/dev/null |
1117 then | 1159 then |
1118 LIBCABI="$LIBC"x32 | 1160 LIBCABI=${LIBC}x32 |
1119 fi | 1161 fi |
1120 fi | 1162 fi |
1121 echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" | 1163 GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI |
1122 exit ;; | 1164 ;; |
1123 xtensa*:Linux:*:*) | 1165 xtensa*:Linux:*:*) |
1124 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1166 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1125 exit ;; | 1167 ;; |
1126 i*86:DYNIX/ptx:4*:*) | 1168 i*86:DYNIX/ptx:4*:*) |
1127 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. | 1169 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1128 # earlier versions are messed up and put the nodename in both | 1170 # earlier versions are messed up and put the nodename in both |
1129 # sysname and nodename. | 1171 # sysname and nodename. |
1130 echo i386-sequent-sysv4 | 1172 GUESS=i386-sequent-sysv4 |
1131 exit ;; | 1173 ;; |
1132 i*86:UNIX_SV:4.2MP:2.*) | 1174 i*86:UNIX_SV:4.2MP:2.*) |
1133 # Unixware is an offshoot of SVR4, but it has its own version | 1175 # Unixware is an offshoot of SVR4, but it has its own version |
1134 # number series starting with 2... | 1176 # number series starting with 2... |
1135 # I am not positive that other SVR4 systems won't match this, | 1177 # I am not positive that other SVR4 systems won't match this, |
1136 # I just have to hope. -- rms. | 1178 # I just have to hope. -- rms. |
1137 # Use sysv4.2uw... so that sysv4* matches it. | 1179 # Use sysv4.2uw... so that sysv4* matches it. |
1138 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" | 1180 GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION |
1139 exit ;; | 1181 ;; |
1140 i*86:OS/2:*:*) | 1182 i*86:OS/2:*:*) |
1141 # If we were able to find `uname', then EMX Unix compatibility | 1183 # If we were able to find `uname', then EMX Unix compatibility |
1142 # is probably installed. | 1184 # is probably installed. |
1143 echo "$UNAME_MACHINE"-pc-os2-emx | 1185 GUESS=$UNAME_MACHINE-pc-os2-emx |
1144 exit ;; | 1186 ;; |
1145 i*86:XTS-300:*:STOP) | 1187 i*86:XTS-300:*:STOP) |
1146 echo "$UNAME_MACHINE"-unknown-stop | 1188 GUESS=$UNAME_MACHINE-unknown-stop |
1147 exit ;; | 1189 ;; |
1148 i*86:atheos:*:*) | 1190 i*86:atheos:*:*) |
1149 echo "$UNAME_MACHINE"-unknown-atheos | 1191 GUESS=$UNAME_MACHINE-unknown-atheos |
1150 exit ;; | 1192 ;; |
1151 i*86:syllable:*:*) | 1193 i*86:syllable:*:*) |
1152 echo "$UNAME_MACHINE"-pc-syllable | 1194 GUESS=$UNAME_MACHINE-pc-syllable |
1153 exit ;; | 1195 ;; |
1154 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) | 1196 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
1155 echo i386-unknown-lynxos"$UNAME_RELEASE" | 1197 GUESS=i386-unknown-lynxos$UNAME_RELEASE |
1156 exit ;; | 1198 ;; |
1157 i*86:*DOS:*:*) | 1199 i*86:*DOS:*:*) |
1158 echo "$UNAME_MACHINE"-pc-msdosdjgpp | 1200 GUESS=$UNAME_MACHINE-pc-msdosdjgpp |
1159 exit ;; | 1201 ;; |
1160 i*86:*:4.*:*) | 1202 i*86:*:4.*:*) |
1161 UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') | 1203 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` |
1162 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then | 1204 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
1163 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" | 1205 GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL |
1164 else | 1206 else |
1165 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" | 1207 GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL |
1166 fi | 1208 fi |
1167 exit ;; | 1209 ;; |
1168 i*86:*:5:[678]*) | 1210 i*86:*:5:[678]*) |
1169 # UnixWare 7.x, OpenUNIX and OpenServer 6. | 1211 # UnixWare 7.x, OpenUNIX and OpenServer 6. |
1170 case $(/bin/uname -X | grep "^Machine") in | 1212 case `/bin/uname -X | grep "^Machine"` in |
1171 *486*) UNAME_MACHINE=i486 ;; | 1213 *486*) UNAME_MACHINE=i486 ;; |
1172 *Pentium) UNAME_MACHINE=i586 ;; | 1214 *Pentium) UNAME_MACHINE=i586 ;; |
1173 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; | 1215 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1174 esac | 1216 esac |
1175 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" | 1217 GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} |
1176 exit ;; | 1218 ;; |
1177 i*86:*:3.2:*) | 1219 i*86:*:3.2:*) |
1178 if test -f /usr/options/cb.name; then | 1220 if test -f /usr/options/cb.name; then |
1179 UNAME_REL=$(sed -n 's/.*Version //p' </usr/options/cb.name) | 1221 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
1180 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" | 1222 GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL |
1181 elif /bin/uname -X 2>/dev/null >/dev/null ; then | 1223 elif /bin/uname -X 2>/dev/null >/dev/null ; then |
1182 UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) | 1224 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
1183 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 | 1225 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
1184 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ | 1226 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ |
1185 && UNAME_MACHINE=i586 | 1227 && UNAME_MACHINE=i586 |
1186 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ | 1228 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ |
1187 && UNAME_MACHINE=i686 | 1229 && UNAME_MACHINE=i686 |
1188 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ | 1230 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
1189 && UNAME_MACHINE=i686 | 1231 && UNAME_MACHINE=i686 |
1190 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" | 1232 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL |
1191 else | 1233 else |
1192 echo "$UNAME_MACHINE"-pc-sysv32 | 1234 GUESS=$UNAME_MACHINE-pc-sysv32 |
1193 fi | 1235 fi |
1194 exit ;; | 1236 ;; |
1195 pc:*:*:*) | 1237 pc:*:*:*) |
1196 # Left here for compatibility: | 1238 # Left here for compatibility: |
1197 # uname -m prints for DJGPP always 'pc', but it prints nothing about | 1239 # uname -m prints for DJGPP always 'pc', but it prints nothing about |
1198 # the processor, so we play safe by assuming i586. | 1240 # the processor, so we play safe by assuming i586. |
1199 # Note: whatever this is, it MUST be the same as what config.sub | 1241 # Note: whatever this is, it MUST be the same as what config.sub |
1200 # prints for the "djgpp" host, or else GDB configure will decide that | 1242 # prints for the "djgpp" host, or else GDB configure will decide that |
1201 # this is a cross-build. | 1243 # this is a cross-build. |
1202 echo i586-pc-msdosdjgpp | 1244 GUESS=i586-pc-msdosdjgpp |
1203 exit ;; | 1245 ;; |
1204 Intel:Mach:3*:*) | 1246 Intel:Mach:3*:*) |
1205 echo i386-pc-mach3 | 1247 GUESS=i386-pc-mach3 |
1206 exit ;; | 1248 ;; |
1207 paragon:*:*:*) | 1249 paragon:*:*:*) |
1208 echo i860-intel-osf1 | 1250 GUESS=i860-intel-osf1 |
1209 exit ;; | 1251 ;; |
1210 i860:*:4.*:*) # i860-SVR4 | 1252 i860:*:4.*:*) # i860-SVR4 |
1211 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then | 1253 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
1212 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 | 1254 GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 |
1213 else # Add other i860-SVR4 vendors below as they are discovered. | 1255 else # Add other i860-SVR4 vendors below as they are discovered. |
1214 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 | 1256 GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 |
1215 fi | 1257 fi |
1216 exit ;; | 1258 ;; |
1217 mini*:CTIX:SYS*5:*) | 1259 mini*:CTIX:SYS*5:*) |
1218 # "miniframe" | 1260 # "miniframe" |
1219 echo m68010-convergent-sysv | 1261 GUESS=m68010-convergent-sysv |
1220 exit ;; | 1262 ;; |
1221 mc68k:UNIX:SYSTEM5:3.51m) | 1263 mc68k:UNIX:SYSTEM5:3.51m) |
1222 echo m68k-convergent-sysv | 1264 GUESS=m68k-convergent-sysv |
1223 exit ;; | 1265 ;; |
1224 M680?0:D-NIX:5.3:*) | 1266 M680?0:D-NIX:5.3:*) |
1225 echo m68k-diab-dnix | 1267 GUESS=m68k-diab-dnix |
1226 exit ;; | 1268 ;; |
1227 M68*:*:R3V[5678]*:*) | 1269 M68*:*:R3V[5678]*:*) |
1228 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; | 1270 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; |
1229 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) | 1271 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) |
1230 OS_REL='' | 1272 OS_REL='' |
1231 test -r /etc/.relid \ | 1273 test -r /etc/.relid \ |
1232 && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) | 1274 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1233 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | 1275 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1234 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | 1276 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } |
1235 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | 1277 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1236 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; | 1278 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; |
1237 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) | 1279 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
1238 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | 1280 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1239 && { echo i486-ncr-sysv4; exit; } ;; | 1281 && { echo i486-ncr-sysv4; exit; } ;; |
1240 NCR*:*:4.2:* | MPRAS*:*:4.2:*) | 1282 NCR*:*:4.2:* | MPRAS*:*:4.2:*) |
1241 OS_REL='.3' | 1283 OS_REL='.3' |
1242 test -r /etc/.relid \ | 1284 test -r /etc/.relid \ |
1243 && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) | 1285 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1244 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | 1286 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1245 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | 1287 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } |
1246 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | 1288 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1247 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } | 1289 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } |
1248 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ | 1290 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
1249 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; | 1291 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; |
1250 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) | 1292 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
1251 echo m68k-unknown-lynxos"$UNAME_RELEASE" | 1293 GUESS=m68k-unknown-lynxos$UNAME_RELEASE |
1252 exit ;; | 1294 ;; |
1253 mc68030:UNIX_System_V:4.*:*) | 1295 mc68030:UNIX_System_V:4.*:*) |
1254 echo m68k-atari-sysv4 | 1296 GUESS=m68k-atari-sysv4 |
1255 exit ;; | 1297 ;; |
1256 TSUNAMI:LynxOS:2.*:*) | 1298 TSUNAMI:LynxOS:2.*:*) |
1257 echo sparc-unknown-lynxos"$UNAME_RELEASE" | 1299 GUESS=sparc-unknown-lynxos$UNAME_RELEASE |
1258 exit ;; | 1300 ;; |
1259 rs6000:LynxOS:2.*:*) | 1301 rs6000:LynxOS:2.*:*) |
1260 echo rs6000-unknown-lynxos"$UNAME_RELEASE" | 1302 GUESS=rs6000-unknown-lynxos$UNAME_RELEASE |
1261 exit ;; | 1303 ;; |
1262 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) | 1304 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
1263 echo powerpc-unknown-lynxos"$UNAME_RELEASE" | 1305 GUESS=powerpc-unknown-lynxos$UNAME_RELEASE |
1264 exit ;; | 1306 ;; |
1265 SM[BE]S:UNIX_SV:*:*) | 1307 SM[BE]S:UNIX_SV:*:*) |
1266 echo mips-dde-sysv"$UNAME_RELEASE" | 1308 GUESS=mips-dde-sysv$UNAME_RELEASE |
1267 exit ;; | 1309 ;; |
1268 RM*:ReliantUNIX-*:*:*) | 1310 RM*:ReliantUNIX-*:*:*) |
1269 echo mips-sni-sysv4 | 1311 GUESS=mips-sni-sysv4 |
1270 exit ;; | 1312 ;; |
1271 RM*:SINIX-*:*:*) | 1313 RM*:SINIX-*:*:*) |
1272 echo mips-sni-sysv4 | 1314 GUESS=mips-sni-sysv4 |
1273 exit ;; | 1315 ;; |
1274 *:SINIX-*:*:*) | 1316 *:SINIX-*:*:*) |
1275 if uname -p 2>/dev/null >/dev/null ; then | 1317 if uname -p 2>/dev/null >/dev/null ; then |
1276 UNAME_MACHINE=$( (uname -p) 2>/dev/null) | 1318 UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1277 echo "$UNAME_MACHINE"-sni-sysv4 | 1319 GUESS=$UNAME_MACHINE-sni-sysv4 |
1278 else | 1320 else |
1279 echo ns32k-sni-sysv | 1321 GUESS=ns32k-sni-sysv |
1280 fi | 1322 fi |
1281 exit ;; | 1323 ;; |
1282 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | 1324 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
1283 # says <[email protected]> | 1325 # says <[email protected]> |
1284 echo i586-unisys-sysv4 | 1326 GUESS=i586-unisys-sysv4 |
1285 exit ;; | 1327 ;; |
1286 *:UNIX_System_V:4*:FTX*) | 1328 *:UNIX_System_V:4*:FTX*) |
1287 # From Gerald Hewes <[email protected]>. | 1329 # From Gerald Hewes <[email protected]>. |
1288 # How about differentiating between stratus architectures? -djm | 1330 # How about differentiating between stratus architectures? -djm |
1289 echo hppa1.1-stratus-sysv4 | 1331 GUESS=hppa1.1-stratus-sysv4 |
1290 exit ;; | 1332 ;; |
1291 *:*:*:FTX*) | 1333 *:*:*:FTX*) |
1292 # From [email protected]. | 1334 # From [email protected]. |
1293 echo i860-stratus-sysv4 | 1335 GUESS=i860-stratus-sysv4 |
1294 exit ;; | 1336 ;; |
1295 i*86:VOS:*:*) | 1337 i*86:VOS:*:*) |
1296 # From [email protected]. | 1338 # From [email protected]. |
1297 echo "$UNAME_MACHINE"-stratus-vos | 1339 GUESS=$UNAME_MACHINE-stratus-vos |
1298 exit ;; | 1340 ;; |
1299 *:VOS:*:*) | 1341 *:VOS:*:*) |
1300 # From [email protected]. | 1342 # From [email protected]. |
1301 echo hppa1.1-stratus-vos | 1343 GUESS=hppa1.1-stratus-vos |
1302 exit ;; | 1344 ;; |
1303 mc68*:A/UX:*:*) | 1345 mc68*:A/UX:*:*) |
1304 echo m68k-apple-aux"$UNAME_RELEASE" | 1346 GUESS=m68k-apple-aux$UNAME_RELEASE |
1305 exit ;; | 1347 ;; |
1306 news*:NEWS-OS:6*:*) | 1348 news*:NEWS-OS:6*:*) |
1307 echo mips-sony-newsos6 | 1349 GUESS=mips-sony-newsos6 |
1308 exit ;; | 1350 ;; |
1309 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) | 1351 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1310 if test -d /usr/nec; then | 1352 if test -d /usr/nec; then |
1311 echo mips-nec-sysv"$UNAME_RELEASE" | 1353 GUESS=mips-nec-sysv$UNAME_RELEASE |
1312 else | 1354 else |
1313 echo mips-unknown-sysv"$UNAME_RELEASE" | 1355 GUESS=mips-unknown-sysv$UNAME_RELEASE |
1314 fi | 1356 fi |
1315 exit ;; | 1357 ;; |
1316 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. | 1358 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1317 echo powerpc-be-beos | 1359 GUESS=powerpc-be-beos |
1318 exit ;; | 1360 ;; |
1319 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. | 1361 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
1320 echo powerpc-apple-beos | 1362 GUESS=powerpc-apple-beos |
1321 exit ;; | 1363 ;; |
1322 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. | 1364 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
1323 echo i586-pc-beos | 1365 GUESS=i586-pc-beos |
1324 exit ;; | 1366 ;; |
1325 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. | 1367 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
1326 echo i586-pc-haiku | 1368 GUESS=i586-pc-haiku |
1327 exit ;; | 1369 ;; |
1328 x86_64:Haiku:*:*) | 1370 x86_64:Haiku:*:*) |
1329 echo x86_64-unknown-haiku | 1371 GUESS=x86_64-unknown-haiku |
1330 exit ;; | 1372 ;; |
1331 SX-4:SUPER-UX:*:*) | 1373 SX-4:SUPER-UX:*:*) |
1332 echo sx4-nec-superux"$UNAME_RELEASE" | 1374 GUESS=sx4-nec-superux$UNAME_RELEASE |
1333 exit ;; | 1375 ;; |
1334 SX-5:SUPER-UX:*:*) | 1376 SX-5:SUPER-UX:*:*) |
1335 echo sx5-nec-superux"$UNAME_RELEASE" | 1377 GUESS=sx5-nec-superux$UNAME_RELEASE |
1336 exit ;; | 1378 ;; |
1337 SX-6:SUPER-UX:*:*) | 1379 SX-6:SUPER-UX:*:*) |
1338 echo sx6-nec-superux"$UNAME_RELEASE" | 1380 GUESS=sx6-nec-superux$UNAME_RELEASE |
1339 exit ;; | 1381 ;; |
1340 SX-7:SUPER-UX:*:*) | 1382 SX-7:SUPER-UX:*:*) |
1341 echo sx7-nec-superux"$UNAME_RELEASE" | 1383 GUESS=sx7-nec-superux$UNAME_RELEASE |
1342 exit ;; | 1384 ;; |
1343 SX-8:SUPER-UX:*:*) | 1385 SX-8:SUPER-UX:*:*) |
1344 echo sx8-nec-superux"$UNAME_RELEASE" | 1386 GUESS=sx8-nec-superux$UNAME_RELEASE |
1345 exit ;; | 1387 ;; |
1346 SX-8R:SUPER-UX:*:*) | 1388 SX-8R:SUPER-UX:*:*) |
1347 echo sx8r-nec-superux"$UNAME_RELEASE" | 1389 GUESS=sx8r-nec-superux$UNAME_RELEASE |
1348 exit ;; | 1390 ;; |
1349 SX-ACE:SUPER-UX:*:*) | 1391 SX-ACE:SUPER-UX:*:*) |
1350 echo sxace-nec-superux"$UNAME_RELEASE" | 1392 GUESS=sxace-nec-superux$UNAME_RELEASE |
1351 exit ;; | 1393 ;; |
1352 Power*:Rhapsody:*:*) | 1394 Power*:Rhapsody:*:*) |
1353 echo powerpc-apple-rhapsody"$UNAME_RELEASE" | 1395 GUESS=powerpc-apple-rhapsody$UNAME_RELEASE |
1354 exit ;; | 1396 ;; |
1355 *:Rhapsody:*:*) | 1397 *:Rhapsody:*:*) |
1356 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" | 1398 GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE |
1357 exit ;; | 1399 ;; |
1358 arm64:Darwin:*:*) | 1400 arm64:Darwin:*:*) |
1359 echo aarch64-apple-darwin"$UNAME_RELEASE" | 1401 GUESS=aarch64-apple-darwin$UNAME_RELEASE |
1360 exit ;; | 1402 ;; |
1361 *:Darwin:*:*) | 1403 *:Darwin:*:*) |
1362 UNAME_PROCESSOR=$(uname -p) | 1404 UNAME_PROCESSOR=`uname -p` |
1363 case $UNAME_PROCESSOR in | 1405 case $UNAME_PROCESSOR in |
1364 unknown) UNAME_PROCESSOR=powerpc ;; | 1406 unknown) UNAME_PROCESSOR=powerpc ;; |
1365 esac | 1407 esac |
1366 if command -v xcode-select > /dev/null 2> /dev/null && \ | 1408 if command -v xcode-select > /dev/null 2> /dev/null && \ |
1367 ! xcode-select --print-path > /dev/null 2> /dev/null ; then | 1409 ! xcode-select --print-path > /dev/null 2> /dev/null ; then |
1391 fi | 1433 fi |
1392 elif test "$UNAME_PROCESSOR" = i386 ; then | 1434 elif test "$UNAME_PROCESSOR" = i386 ; then |
1393 # uname -m returns i386 or x86_64 | 1435 # uname -m returns i386 or x86_64 |
1394 UNAME_PROCESSOR=$UNAME_MACHINE | 1436 UNAME_PROCESSOR=$UNAME_MACHINE |
1395 fi | 1437 fi |
1396 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" | 1438 GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE |
1397 exit ;; | 1439 ;; |
1398 *:procnto*:*:* | *:QNX:[0123456789]*:*) | 1440 *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1399 UNAME_PROCESSOR=$(uname -p) | 1441 UNAME_PROCESSOR=`uname -p` |
1400 if test "$UNAME_PROCESSOR" = x86; then | 1442 if test "$UNAME_PROCESSOR" = x86; then |
1401 UNAME_PROCESSOR=i386 | 1443 UNAME_PROCESSOR=i386 |
1402 UNAME_MACHINE=pc | 1444 UNAME_MACHINE=pc |
1403 fi | 1445 fi |
1404 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" | 1446 GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE |
1405 exit ;; | 1447 ;; |
1406 *:QNX:*:4*) | 1448 *:QNX:*:4*) |
1407 echo i386-pc-qnx | 1449 GUESS=i386-pc-qnx |
1408 exit ;; | 1450 ;; |
1409 NEO-*:NONSTOP_KERNEL:*:*) | 1451 NEO-*:NONSTOP_KERNEL:*:*) |
1410 echo neo-tandem-nsk"$UNAME_RELEASE" | 1452 GUESS=neo-tandem-nsk$UNAME_RELEASE |
1411 exit ;; | 1453 ;; |
1412 NSE-*:NONSTOP_KERNEL:*:*) | 1454 NSE-*:NONSTOP_KERNEL:*:*) |
1413 echo nse-tandem-nsk"$UNAME_RELEASE" | 1455 GUESS=nse-tandem-nsk$UNAME_RELEASE |
1414 exit ;; | 1456 ;; |
1415 NSR-*:NONSTOP_KERNEL:*:*) | 1457 NSR-*:NONSTOP_KERNEL:*:*) |
1416 echo nsr-tandem-nsk"$UNAME_RELEASE" | 1458 GUESS=nsr-tandem-nsk$UNAME_RELEASE |
1417 exit ;; | 1459 ;; |
1418 NSV-*:NONSTOP_KERNEL:*:*) | 1460 NSV-*:NONSTOP_KERNEL:*:*) |
1419 echo nsv-tandem-nsk"$UNAME_RELEASE" | 1461 GUESS=nsv-tandem-nsk$UNAME_RELEASE |
1420 exit ;; | 1462 ;; |
1421 NSX-*:NONSTOP_KERNEL:*:*) | 1463 NSX-*:NONSTOP_KERNEL:*:*) |
1422 echo nsx-tandem-nsk"$UNAME_RELEASE" | 1464 GUESS=nsx-tandem-nsk$UNAME_RELEASE |
1423 exit ;; | 1465 ;; |
1424 *:NonStop-UX:*:*) | 1466 *:NonStop-UX:*:*) |
1425 echo mips-compaq-nonstopux | 1467 GUESS=mips-compaq-nonstopux |
1426 exit ;; | 1468 ;; |
1427 BS2000:POSIX*:*:*) | 1469 BS2000:POSIX*:*:*) |
1428 echo bs2000-siemens-sysv | 1470 GUESS=bs2000-siemens-sysv |
1429 exit ;; | 1471 ;; |
1430 DS/*:UNIX_System_V:*:*) | 1472 DS/*:UNIX_System_V:*:*) |
1431 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" | 1473 GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE |
1432 exit ;; | 1474 ;; |
1433 *:Plan9:*:*) | 1475 *:Plan9:*:*) |
1434 # "uname -m" is not consistent, so use $cputype instead. 386 | 1476 # "uname -m" is not consistent, so use $cputype instead. 386 |
1435 # is converted to i386 for consistency with other x86 | 1477 # is converted to i386 for consistency with other x86 |
1436 # operating systems. | 1478 # operating systems. |
1437 # shellcheck disable=SC2154 | 1479 if test "${cputype-}" = 386; then |
1438 if test "$cputype" = 386; then | |
1439 UNAME_MACHINE=i386 | 1480 UNAME_MACHINE=i386 |
1440 else | 1481 elif test "x${cputype-}" != x; then |
1441 UNAME_MACHINE="$cputype" | 1482 UNAME_MACHINE=$cputype |
1442 fi | 1483 fi |
1443 echo "$UNAME_MACHINE"-unknown-plan9 | 1484 GUESS=$UNAME_MACHINE-unknown-plan9 |
1444 exit ;; | 1485 ;; |
1445 *:TOPS-10:*:*) | 1486 *:TOPS-10:*:*) |
1446 echo pdp10-unknown-tops10 | 1487 GUESS=pdp10-unknown-tops10 |
1447 exit ;; | 1488 ;; |
1448 *:TENEX:*:*) | 1489 *:TENEX:*:*) |
1449 echo pdp10-unknown-tenex | 1490 GUESS=pdp10-unknown-tenex |
1450 exit ;; | 1491 ;; |
1451 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) | 1492 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
1452 echo pdp10-dec-tops20 | 1493 GUESS=pdp10-dec-tops20 |
1453 exit ;; | 1494 ;; |
1454 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) | 1495 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
1455 echo pdp10-xkl-tops20 | 1496 GUESS=pdp10-xkl-tops20 |
1456 exit ;; | 1497 ;; |
1457 *:TOPS-20:*:*) | 1498 *:TOPS-20:*:*) |
1458 echo pdp10-unknown-tops20 | 1499 GUESS=pdp10-unknown-tops20 |
1459 exit ;; | 1500 ;; |
1460 *:ITS:*:*) | 1501 *:ITS:*:*) |
1461 echo pdp10-unknown-its | 1502 GUESS=pdp10-unknown-its |
1462 exit ;; | 1503 ;; |
1463 SEI:*:*:SEIUX) | 1504 SEI:*:*:SEIUX) |
1464 echo mips-sei-seiux"$UNAME_RELEASE" | 1505 GUESS=mips-sei-seiux$UNAME_RELEASE |
1465 exit ;; | 1506 ;; |
1466 *:DragonFly:*:*) | 1507 *:DragonFly:*:*) |
1467 echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" | 1508 DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
1468 exit ;; | 1509 GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL |
1510 ;; | |
1469 *:*VMS:*:*) | 1511 *:*VMS:*:*) |
1470 UNAME_MACHINE=$( (uname -p) 2>/dev/null) | 1512 UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1471 case "$UNAME_MACHINE" in | 1513 case $UNAME_MACHINE in |
1472 A*) echo alpha-dec-vms ; exit ;; | 1514 A*) GUESS=alpha-dec-vms ;; |
1473 I*) echo ia64-dec-vms ; exit ;; | 1515 I*) GUESS=ia64-dec-vms ;; |
1474 V*) echo vax-dec-vms ; exit ;; | 1516 V*) GUESS=vax-dec-vms ;; |
1475 esac ;; | 1517 esac ;; |
1476 *:XENIX:*:SysV) | 1518 *:XENIX:*:SysV) |
1477 echo i386-pc-xenix | 1519 GUESS=i386-pc-xenix |
1478 exit ;; | 1520 ;; |
1479 i*86:skyos:*:*) | 1521 i*86:skyos:*:*) |
1480 echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" | 1522 SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` |
1481 exit ;; | 1523 GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL |
1524 ;; | |
1482 i*86:rdos:*:*) | 1525 i*86:rdos:*:*) |
1483 echo "$UNAME_MACHINE"-pc-rdos | 1526 GUESS=$UNAME_MACHINE-pc-rdos |
1484 exit ;; | 1527 ;; |
1528 i*86:Fiwix:*:*) | |
1529 GUESS=$UNAME_MACHINE-pc-fiwix | |
1530 ;; | |
1485 *:AROS:*:*) | 1531 *:AROS:*:*) |
1486 echo "$UNAME_MACHINE"-unknown-aros | 1532 GUESS=$UNAME_MACHINE-unknown-aros |
1487 exit ;; | 1533 ;; |
1488 x86_64:VMkernel:*:*) | 1534 x86_64:VMkernel:*:*) |
1489 echo "$UNAME_MACHINE"-unknown-esx | 1535 GUESS=$UNAME_MACHINE-unknown-esx |
1490 exit ;; | 1536 ;; |
1491 amd64:Isilon\ OneFS:*:*) | 1537 amd64:Isilon\ OneFS:*:*) |
1492 echo x86_64-unknown-onefs | 1538 GUESS=x86_64-unknown-onefs |
1493 exit ;; | 1539 ;; |
1494 *:Unleashed:*:*) | 1540 *:Unleashed:*:*) |
1495 echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" | 1541 GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE |
1496 exit ;; | 1542 ;; |
1497 esac | 1543 esac |
1544 | |
1545 # Do we have a guess based on uname results? | |
1546 if test "x$GUESS" != x; then | |
1547 echo "$GUESS" | |
1548 exit | |
1549 fi | |
1498 | 1550 |
1499 # No uname command or uname output not recognized. | 1551 # No uname command or uname output not recognized. |
1500 set_cc_for_build | 1552 set_cc_for_build |
1501 cat > "$dummy.c" <<EOF | 1553 cat > "$dummy.c" <<EOF |
1502 #ifdef _SEQUENT_ | 1554 #ifdef _SEQUENT_ |
1533 #if defined (NeXT) | 1585 #if defined (NeXT) |
1534 #if !defined (__ARCHITECTURE__) | 1586 #if !defined (__ARCHITECTURE__) |
1535 #define __ARCHITECTURE__ "m68k" | 1587 #define __ARCHITECTURE__ "m68k" |
1536 #endif | 1588 #endif |
1537 int version; | 1589 int version; |
1538 version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); | 1590 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; |
1539 if (version < 4) | 1591 if (version < 4) |
1540 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | 1592 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
1541 else | 1593 else |
1542 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | 1594 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); |
1543 exit (0); | 1595 exit (0); |
1625 | 1677 |
1626 exit (1); | 1678 exit (1); |
1627 } | 1679 } |
1628 EOF | 1680 EOF |
1629 | 1681 |
1630 $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && | 1682 $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && |
1631 { echo "$SYSTEM_NAME"; exit; } | 1683 { echo "$SYSTEM_NAME"; exit; } |
1632 | 1684 |
1633 # Apollos put the system type in the environment. | 1685 # Apollos put the system type in the environment. |
1634 test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } | 1686 test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } |
1635 | 1687 |
1636 echo "$0: unable to guess system type" >&2 | 1688 echo "$0: unable to guess system type" >&2 |
1637 | 1689 |
1638 case "$UNAME_MACHINE:$UNAME_SYSTEM" in | 1690 case $UNAME_MACHINE:$UNAME_SYSTEM in |
1639 mips:Linux | mips64:Linux) | 1691 mips:Linux | mips64:Linux) |
1640 # If we got here on MIPS GNU/Linux, output extra information. | 1692 # If we got here on MIPS GNU/Linux, output extra information. |
1641 cat >&2 <<EOF | 1693 cat >&2 <<EOF |
1642 | 1694 |
1643 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize | 1695 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize |
1655 https://git.savannah.gnu.org/cgit/config.git/plain/config.guess | 1707 https://git.savannah.gnu.org/cgit/config.git/plain/config.guess |
1656 and | 1708 and |
1657 https://git.savannah.gnu.org/cgit/config.git/plain/config.sub | 1709 https://git.savannah.gnu.org/cgit/config.git/plain/config.sub |
1658 EOF | 1710 EOF |
1659 | 1711 |
1660 year=$(echo $timestamp | sed 's,-.*,,') | 1712 our_year=`echo $timestamp | sed 's,-.*,,'` |
1713 thisyear=`date +%Y` | |
1661 # shellcheck disable=SC2003 | 1714 # shellcheck disable=SC2003 |
1662 if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then | 1715 script_age=`expr "$thisyear" - "$our_year"` |
1716 if test "$script_age" -lt 3 ; then | |
1663 cat >&2 <<EOF | 1717 cat >&2 <<EOF |
1664 | 1718 |
1665 If $0 has already been updated, send the following data and any | 1719 If $0 has already been updated, send the following data and any |
1666 information you think might be pertinent to [email protected] to | 1720 information you think might be pertinent to [email protected] to |
1667 provide the necessary information to handle your system. | 1721 provide the necessary information to handle your system. |
1668 | 1722 |
1669 config.guess timestamp = $timestamp | 1723 config.guess timestamp = $timestamp |
1670 | 1724 |
1671 uname -m = $( (uname -m) 2>/dev/null || echo unknown) | 1725 uname -m = `(uname -m) 2>/dev/null || echo unknown` |
1672 uname -r = $( (uname -r) 2>/dev/null || echo unknown) | 1726 uname -r = `(uname -r) 2>/dev/null || echo unknown` |
1673 uname -s = $( (uname -s) 2>/dev/null || echo unknown) | 1727 uname -s = `(uname -s) 2>/dev/null || echo unknown` |
1674 uname -v = $( (uname -v) 2>/dev/null || echo unknown) | 1728 uname -v = `(uname -v) 2>/dev/null || echo unknown` |
1675 | 1729 |
1676 /usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) | 1730 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` |
1677 /bin/uname -X = $( (/bin/uname -X) 2>/dev/null) | 1731 /bin/uname -X = `(/bin/uname -X) 2>/dev/null` |
1678 | 1732 |
1679 hostinfo = $( (hostinfo) 2>/dev/null) | 1733 hostinfo = `(hostinfo) 2>/dev/null` |
1680 /bin/universe = $( (/bin/universe) 2>/dev/null) | 1734 /bin/universe = `(/bin/universe) 2>/dev/null` |
1681 /usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) | 1735 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` |
1682 /bin/arch = $( (/bin/arch) 2>/dev/null) | 1736 /bin/arch = `(/bin/arch) 2>/dev/null` |
1683 /usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) | 1737 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` |
1684 /usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) | 1738 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` |
1685 | 1739 |
1686 UNAME_MACHINE = "$UNAME_MACHINE" | 1740 UNAME_MACHINE = "$UNAME_MACHINE" |
1687 UNAME_RELEASE = "$UNAME_RELEASE" | 1741 UNAME_RELEASE = "$UNAME_RELEASE" |
1688 UNAME_SYSTEM = "$UNAME_SYSTEM" | 1742 UNAME_SYSTEM = "$UNAME_SYSTEM" |
1689 UNAME_VERSION = "$UNAME_VERSION" | 1743 UNAME_VERSION = "$UNAME_VERSION" |