summaryrefslogtreecommitdiff
path: root/config.guess
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2004-04-21 12:29:13 +1000
committerDamien Miller <djm@mindrot.org>2004-04-21 12:29:13 +1000
commit752e4e603fdf09ce6323ad665ebce9a3f4093b9c (patch)
treeaa98d36db2591fc938cdebf9aaa64e5da6433a71 /config.guess
parent5561e0b73dcaf0d6cf56afcff2a09d87ae14f34e (diff)
- (djm) Update config.guess and config.sub to autoconf-2.59 versions; ok tim@
Diffstat (limited to 'config.guess')
-rwxr-xr-xconfig.guess441
1 files changed, 247 insertions, 194 deletions
diff --git a/config.guess b/config.guess
index 3fe4d4f35..500ee74b0 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, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002 Free Software Foundation, Inc. 4# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5 5
6timestamp='2002-07-23' 6timestamp='2003-10-03'
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
@@ -98,30 +98,32 @@ trap 'exit 1' 1 2 15
98# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 98# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
99# use `HOST_CC' if defined, but it is deprecated. 99# use `HOST_CC' if defined, but it is deprecated.
100 100
101# This shell variable is my proudest work .. or something. --bje 101# Portable tmp directory creation inspired by the Autoconf team.
102 102
103set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; 103set_cc_for_build='
104(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) 104trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
105 || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; 105trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
106dummy=$tmpdir/dummy ; 106: ${TMPDIR=/tmp} ;
107files="$dummy.c $dummy.o $dummy.rel $dummy" ; 107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
108trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; 108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
109 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
110 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
111dummy=$tmp/dummy ;
112tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
109case $CC_FOR_BUILD,$HOST_CC,$CC in 113case $CC_FOR_BUILD,$HOST_CC,$CC in
110 ,,) echo "int x;" > $dummy.c ; 114 ,,) echo "int x;" > $dummy.c ;
111 for c in cc gcc c89 c99 ; do 115 for c in cc gcc c89 c99 ; do
112 if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then 116 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
113 CC_FOR_BUILD="$c"; break ; 117 CC_FOR_BUILD="$c"; break ;
114 fi ; 118 fi ;
115 done ; 119 done ;
116 rm -f $files ;
117 if test x"$CC_FOR_BUILD" = x ; then 120 if test x"$CC_FOR_BUILD" = x ; then
118 CC_FOR_BUILD=no_compiler_found ; 121 CC_FOR_BUILD=no_compiler_found ;
119 fi 122 fi
120 ;; 123 ;;
121 ,,*) CC_FOR_BUILD=$CC ;; 124 ,,*) CC_FOR_BUILD=$CC ;;
122 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 125 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
123esac ; 126esac ;'
124unset files'
125 127
126# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 128# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
127# (ghazi@noc.rutgers.edu 1994-08-24) 129# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -174,11 +176,22 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
174 fi 176 fi
175 ;; 177 ;;
176 *) 178 *)
177 os=netbsd 179 os=netbsd
178 ;; 180 ;;
179 esac 181 esac
180 # The OS release 182 # The OS release
181 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 183 # Debian GNU/NetBSD machines have a different userland, and
184 # thus, need a distinct triplet. However, they do not need
185 # kernel version information, so it can be replaced with a
186 # suitable tag, in the style of linux-gnu.
187 case "${UNAME_VERSION}" in
188 Debian*)
189 release='-gnu'
190 ;;
191 *)
192 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
193 ;;
194 esac
182 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 195 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
183 # contains redundant information, the shorter form: 196 # contains redundant information, the shorter form:
184 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 197 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
@@ -227,68 +240,52 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
227 if test $UNAME_RELEASE = "V4.0"; then 240 if test $UNAME_RELEASE = "V4.0"; then
228 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 241 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
229 fi 242 fi
243 # According to Compaq, /usr/sbin/psrinfo has been available on
244 # OSF/1 and Tru64 systems produced since 1995. I hope that
245 # covers most systems running today. This code pipes the CPU
246 # types through head -n 1, so we only detect the type of CPU 0.
247 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
248 case "$ALPHA_CPU_TYPE" in
249 "EV4 (21064)")
250 UNAME_MACHINE="alpha" ;;
251 "EV4.5 (21064)")
252 UNAME_MACHINE="alpha" ;;
253 "LCA4 (21066/21068)")
254 UNAME_MACHINE="alpha" ;;
255 "EV5 (21164)")
256 UNAME_MACHINE="alphaev5" ;;
257 "EV5.6 (21164A)")
258 UNAME_MACHINE="alphaev56" ;;
259 "EV5.6 (21164PC)")
260 UNAME_MACHINE="alphapca56" ;;
261 "EV5.7 (21164PC)")
262 UNAME_MACHINE="alphapca57" ;;
263 "EV6 (21264)")
264 UNAME_MACHINE="alphaev6" ;;
265 "EV6.7 (21264A)")
266 UNAME_MACHINE="alphaev67" ;;
267 "EV6.8CB (21264C)")
268 UNAME_MACHINE="alphaev68" ;;
269 "EV6.8AL (21264B)")
270 UNAME_MACHINE="alphaev68" ;;
271 "EV6.8CX (21264D)")
272 UNAME_MACHINE="alphaev68" ;;
273 "EV6.9A (21264/EV69A)")
274 UNAME_MACHINE="alphaev69" ;;
275 "EV7 (21364)")
276 UNAME_MACHINE="alphaev7" ;;
277 "EV7.9 (21364A)")
278 UNAME_MACHINE="alphaev79" ;;
279 esac
230 # A Vn.n version is a released version. 280 # A Vn.n version is a released version.
231 # A Tn.n version is a released field test version. 281 # A Tn.n version is a released field test version.
232 # A Xn.n version is an unreleased experimental baselevel. 282 # A Xn.n version is an unreleased experimental baselevel.
233 # 1.2 uses "1.2" for uname -r. 283 # 1.2 uses "1.2" for uname -r.
234 eval $set_cc_for_build
235 cat <<EOF >$dummy.s
236 .data
237\$Lformat:
238 .byte 37,100,45,37,120,10,0 # "%d-%x\n"
239
240 .text
241 .globl main
242 .align 4
243 .ent main
244main:
245 .frame \$30,16,\$26,0
246 ldgp \$29,0(\$27)
247 .prologue 1
248 .long 0x47e03d80 # implver \$0
249 lda \$2,-1
250 .long 0x47e20c21 # amask \$2,\$1
251 lda \$16,\$Lformat
252 mov \$0,\$17
253 not \$1,\$18
254 jsr \$26,printf
255 ldgp \$29,0(\$26)
256 mov 0,\$16
257 jsr \$26,exit
258 .end main
259EOF
260 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
261 if test "$?" = 0 ; then
262 case `$dummy` in
263 0-0)
264 UNAME_MACHINE="alpha"
265 ;;
266 1-0)
267 UNAME_MACHINE="alphaev5"
268 ;;
269 1-1)
270 UNAME_MACHINE="alphaev56"
271 ;;
272 1-101)
273 UNAME_MACHINE="alphapca56"
274 ;;
275 2-303)
276 UNAME_MACHINE="alphaev6"
277 ;;
278 2-307)
279 UNAME_MACHINE="alphaev67"
280 ;;
281 2-1307)
282 UNAME_MACHINE="alphaev68"
283 ;;
284 3-1307)
285 UNAME_MACHINE="alphaev7"
286 ;;
287 esac
288 fi
289 rm -f $dummy.s $dummy && rmdir $tmpdir
290 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 284 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
291 exit 0 ;; 285 exit 0 ;;
286 Alpha*:OpenVMS:*:*)
287 echo alpha-hp-vms
288 exit 0 ;;
292 Alpha\ *:Windows_NT*:*) 289 Alpha\ *:Windows_NT*:*)
293 # How do we know it's Interix rather than the generic POSIX subsystem? 290 # How do we know it's Interix rather than the generic POSIX subsystem?
294 # Should we change UNAME_MACHINE based on the output of uname instead 291 # Should we change UNAME_MACHINE based on the output of uname instead
@@ -327,6 +324,9 @@ EOF
327 NILE*:*:*:dcosx) 324 NILE*:*:*:dcosx)
328 echo pyramid-pyramid-svr4 325 echo pyramid-pyramid-svr4
329 exit 0 ;; 326 exit 0 ;;
327 DRS?6000:unix:4.0:6*)
328 echo sparc-icl-nx6
329 exit 0 ;;
330 DRS?6000:UNIX_SV:4.2*:7*) 330 DRS?6000:UNIX_SV:4.2*:7*)
331 case `/usr/bin/uname -p` in 331 case `/usr/bin/uname -p` in
332 sparc) echo sparc-icl-nx7 && exit 0 ;; 332 sparc) echo sparc-icl-nx7 && exit 0 ;;
@@ -382,23 +382,23 @@ EOF
382 # MiNT. But MiNT is downward compatible to TOS, so this should 382 # MiNT. But MiNT is downward compatible to TOS, so this should
383 # be no problem. 383 # be no problem.
384 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 384 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
385 echo m68k-atari-mint${UNAME_RELEASE} 385 echo m68k-atari-mint${UNAME_RELEASE}
386 exit 0 ;; 386 exit 0 ;;
387 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 387 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
388 echo m68k-atari-mint${UNAME_RELEASE} 388 echo m68k-atari-mint${UNAME_RELEASE}
389 exit 0 ;; 389 exit 0 ;;
390 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 390 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
391 echo m68k-atari-mint${UNAME_RELEASE} 391 echo m68k-atari-mint${UNAME_RELEASE}
392 exit 0 ;; 392 exit 0 ;;
393 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 393 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
394 echo m68k-milan-mint${UNAME_RELEASE} 394 echo m68k-milan-mint${UNAME_RELEASE}
395 exit 0 ;; 395 exit 0 ;;
396 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 396 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
397 echo m68k-hades-mint${UNAME_RELEASE} 397 echo m68k-hades-mint${UNAME_RELEASE}
398 exit 0 ;; 398 exit 0 ;;
399 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 399 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
400 echo m68k-unknown-mint${UNAME_RELEASE} 400 echo m68k-unknown-mint${UNAME_RELEASE}
401 exit 0 ;; 401 exit 0 ;;
402 powerpc:machten:*:*) 402 powerpc:machten:*:*)
403 echo powerpc-apple-machten${UNAME_RELEASE} 403 echo powerpc-apple-machten${UNAME_RELEASE}
404 exit 0 ;; 404 exit 0 ;;
@@ -437,16 +437,18 @@ EOF
437 exit (-1); 437 exit (-1);
438 } 438 }
439EOF 439EOF
440 $CC_FOR_BUILD $dummy.c -o $dummy \ 440 $CC_FOR_BUILD -o $dummy $dummy.c \
441 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 441 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
442 && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 442 && exit 0
443 rm -f $dummy.c $dummy && rmdir $tmpdir
444 echo mips-mips-riscos${UNAME_RELEASE} 443 echo mips-mips-riscos${UNAME_RELEASE}
445 exit 0 ;; 444 exit 0 ;;
446 Motorola:PowerMAX_OS:*:*) 445 Motorola:PowerMAX_OS:*:*)
447 echo powerpc-motorola-powermax 446 echo powerpc-motorola-powermax
448 exit 0 ;; 447 exit 0 ;;
449 Night_Hawk:*:*:PowerMAX_OS) 448 Motorola:*:4.3:PL8-*)
449 echo powerpc-harris-powermax
450 exit 0 ;;
451 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
450 echo powerpc-harris-powermax 452 echo powerpc-harris-powermax
451 exit 0 ;; 453 exit 0 ;;
452 Night_Hawk:Power_UNIX:*:*) 454 Night_Hawk:Power_UNIX:*:*)
@@ -462,8 +464,8 @@ EOF
462 echo m88k-motorola-sysv3 464 echo m88k-motorola-sysv3
463 exit 0 ;; 465 exit 0 ;;
464 AViiON:dgux:*:*) 466 AViiON:dgux:*:*)
465 # DG/UX returns AViiON for all architectures 467 # DG/UX returns AViiON for all architectures
466 UNAME_PROCESSOR=`/usr/bin/uname -p` 468 UNAME_PROCESSOR=`/usr/bin/uname -p`
467 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 469 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
468 then 470 then
469 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 471 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -476,7 +478,7 @@ EOF
476 else 478 else
477 echo i586-dg-dgux${UNAME_RELEASE} 479 echo i586-dg-dgux${UNAME_RELEASE}
478 fi 480 fi
479 exit 0 ;; 481 exit 0 ;;
480 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 482 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
481 echo m88k-dolphin-sysv3 483 echo m88k-dolphin-sysv3
482 exit 0 ;; 484 exit 0 ;;
@@ -521,8 +523,7 @@ EOF
521 exit(0); 523 exit(0);
522 } 524 }
523EOF 525EOF
524 $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 526 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
525 rm -f $dummy.c $dummy && rmdir $tmpdir
526 echo rs6000-ibm-aix3.2.5 527 echo rs6000-ibm-aix3.2.5
527 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 528 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
528 echo rs6000-ibm-aix3.2.4 529 echo rs6000-ibm-aix3.2.4
@@ -573,58 +574,68 @@ EOF
573 9000/[678][0-9][0-9]) 574 9000/[678][0-9][0-9])
574 if [ -x /usr/bin/getconf ]; then 575 if [ -x /usr/bin/getconf ]; then
575 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 576 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
576 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 577 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
577 case "${sc_cpu_version}" in 578 case "${sc_cpu_version}" in
578 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 579 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
579 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 580 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
580 532) # CPU_PA_RISC2_0 581 532) # CPU_PA_RISC2_0
581 case "${sc_kernel_bits}" in 582 case "${sc_kernel_bits}" in
582 32) HP_ARCH="hppa2.0n" ;; 583 32) HP_ARCH="hppa2.0n" ;;
583 64) HP_ARCH="hppa2.0w" ;; 584 64) HP_ARCH="hppa2.0w" ;;
584 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 585 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
585 esac ;; 586 esac ;;
586 esac 587 esac
587 fi 588 fi
588 if [ "${HP_ARCH}" = "" ]; then 589 if [ "${HP_ARCH}" = "" ]; then
589 eval $set_cc_for_build 590 eval $set_cc_for_build
590 sed 's/^ //' << EOF >$dummy.c 591 sed 's/^ //' << EOF >$dummy.c
591 592
592 #define _HPUX_SOURCE 593 #define _HPUX_SOURCE
593 #include <stdlib.h> 594 #include <stdlib.h>
594 #include <unistd.h> 595 #include <unistd.h>
595 596
596 int main () 597 int main ()
597 { 598 {
598 #if defined(_SC_KERNEL_BITS) 599 #if defined(_SC_KERNEL_BITS)
599 long bits = sysconf(_SC_KERNEL_BITS); 600 long bits = sysconf(_SC_KERNEL_BITS);
600 #endif 601 #endif
601 long cpu = sysconf (_SC_CPU_VERSION); 602 long cpu = sysconf (_SC_CPU_VERSION);
602 603
603 switch (cpu) 604 switch (cpu)
604 { 605 {
605 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 606 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
606 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 607 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
607 case CPU_PA_RISC2_0: 608 case CPU_PA_RISC2_0:
608 #if defined(_SC_KERNEL_BITS) 609 #if defined(_SC_KERNEL_BITS)
609 switch (bits) 610 switch (bits)
610 { 611 {
611 case 64: puts ("hppa2.0w"); break; 612 case 64: puts ("hppa2.0w"); break;
612 case 32: puts ("hppa2.0n"); break; 613 case 32: puts ("hppa2.0n"); break;
613 default: puts ("hppa2.0"); break; 614 default: puts ("hppa2.0"); break;
614 } break; 615 } break;
615 #else /* !defined(_SC_KERNEL_BITS) */ 616 #else /* !defined(_SC_KERNEL_BITS) */
616 puts ("hppa2.0"); break; 617 puts ("hppa2.0"); break;
617 #endif 618 #endif
618 default: puts ("hppa1.0"); break; 619 default: puts ("hppa1.0"); break;
619 } 620 }
620 exit (0); 621 exit (0);
621 } 622 }
622EOF 623EOF
623 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy` 624 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
624 if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi 625 test -z "$HP_ARCH" && HP_ARCH=hppa
625 rm -f $dummy.c $dummy && rmdir $tmpdir
626 fi ;; 626 fi ;;
627 esac 627 esac
628 if [ ${HP_ARCH} = "hppa2.0w" ]
629 then
630 # avoid double evaluation of $set_cc_for_build
631 test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
632 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
633 then
634 HP_ARCH="hppa2.0w"
635 else
636 HP_ARCH="hppa64"
637 fi
638 fi
628 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 639 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
629 exit 0 ;; 640 exit 0 ;;
630 ia64:HP-UX:*:*) 641 ia64:HP-UX:*:*)
@@ -658,8 +669,7 @@ EOF
658 exit (0); 669 exit (0);
659 } 670 }
660EOF 671EOF
661 $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 672 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
662 rm -f $dummy.c $dummy && rmdir $tmpdir
663 echo unknown-hitachi-hiuxwe2 673 echo unknown-hitachi-hiuxwe2
664 exit 0 ;; 674 exit 0 ;;
665 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 675 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -689,22 +699,22 @@ EOF
689 exit 0 ;; 699 exit 0 ;;
690 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 700 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
691 echo c1-convex-bsd 701 echo c1-convex-bsd
692 exit 0 ;; 702 exit 0 ;;
693 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 703 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
694 if getsysinfo -f scalar_acc 704 if getsysinfo -f scalar_acc
695 then echo c32-convex-bsd 705 then echo c32-convex-bsd
696 else echo c2-convex-bsd 706 else echo c2-convex-bsd
697 fi 707 fi
698 exit 0 ;; 708 exit 0 ;;
699 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 709 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
700 echo c34-convex-bsd 710 echo c34-convex-bsd
701 exit 0 ;; 711 exit 0 ;;
702 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 712 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
703 echo c38-convex-bsd 713 echo c38-convex-bsd
704 exit 0 ;; 714 exit 0 ;;
705 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 715 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
706 echo c4-convex-bsd 716 echo c4-convex-bsd
707 exit 0 ;; 717 exit 0 ;;
708 CRAY*Y-MP:*:*:*) 718 CRAY*Y-MP:*:*:*)
709 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 719 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
710 exit 0 ;; 720 exit 0 ;;
@@ -717,9 +727,6 @@ EOF
717 CRAY*TS:*:*:*) 727 CRAY*TS:*:*:*)
718 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 728 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
719 exit 0 ;; 729 exit 0 ;;
720 CRAY*T3D:*:*:*)
721 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
722 exit 0 ;;
723 CRAY*T3E:*:*:*) 730 CRAY*T3E:*:*:*)
724 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 731 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
725 exit 0 ;; 732 exit 0 ;;
@@ -727,14 +734,14 @@ EOF
727 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 734 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
728 exit 0 ;; 735 exit 0 ;;
729 *:UNICOS/mp:*:*) 736 *:UNICOS/mp:*:*)
730 echo nv1-cray-unicosmp | sed -e 's/\.[^.]*$/.X/' 737 echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
731 exit 0 ;; 738 exit 0 ;;
732 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 739 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
733 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 740 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
734 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 741 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
735 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 742 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
736 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 743 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
737 exit 0 ;; 744 exit 0 ;;
738 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 745 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
739 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 746 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
740 exit 0 ;; 747 exit 0 ;;
@@ -744,7 +751,7 @@ EOF
744 *:BSD/OS:*:*) 751 *:BSD/OS:*:*)
745 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 752 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
746 exit 0 ;; 753 exit 0 ;;
747 *:FreeBSD:*:*) 754 *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
748 # Determine whether the default compiler uses glibc. 755 # Determine whether the default compiler uses glibc.
749 eval $set_cc_for_build 756 eval $set_cc_for_build
750 sed 's/^ //' << EOF >$dummy.c 757 sed 's/^ //' << EOF >$dummy.c
@@ -756,8 +763,10 @@ EOF
756 #endif 763 #endif
757EOF 764EOF
758 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 765 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
759 rm -f $dummy.c && rmdir $tmpdir 766 # GNU/FreeBSD systems have a "k" prefix to indicate we are using
760 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} 767 # FreeBSD's kernel, but not the complete OS.
768 case ${LIBC} in gnu) kernel_only='k' ;; esac
769 echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
761 exit 0 ;; 770 exit 0 ;;
762 i*:CYGWIN*:*) 771 i*:CYGWIN*:*)
763 echo ${UNAME_MACHINE}-pc-cygwin 772 echo ${UNAME_MACHINE}-pc-cygwin
@@ -768,14 +777,17 @@ EOF
768 i*:PW*:*) 777 i*:PW*:*)
769 echo ${UNAME_MACHINE}-pc-pw32 778 echo ${UNAME_MACHINE}-pc-pw32
770 exit 0 ;; 779 exit 0 ;;
771 x86:Interix*:3*) 780 x86:Interix*:[34]*)
772 echo i386-pc-interix3 781 echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
782 exit 0 ;;
783 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
784 echo i${UNAME_MACHINE}-pc-mks
773 exit 0 ;; 785 exit 0 ;;
774 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 786 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
775 # How do we know it's Interix rather than the generic POSIX subsystem? 787 # How do we know it's Interix rather than the generic POSIX subsystem?
776 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 788 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
777 # UNAME_MACHINE based on the output of uname instead of i386? 789 # UNAME_MACHINE based on the output of uname instead of i386?
778 echo i386-pc-interix 790 echo i586-pc-interix
779 exit 0 ;; 791 exit 0 ;;
780 i*:UWIN*:*) 792 i*:UWIN*:*)
781 echo ${UNAME_MACHINE}-pc-uwin 793 echo ${UNAME_MACHINE}-pc-uwin
@@ -795,6 +807,9 @@ EOF
795 arm*:Linux:*:*) 807 arm*:Linux:*:*)
796 echo ${UNAME_MACHINE}-unknown-linux-gnu 808 echo ${UNAME_MACHINE}-unknown-linux-gnu
797 exit 0 ;; 809 exit 0 ;;
810 cris:Linux:*:*)
811 echo cris-axis-linux-gnu
812 exit 0 ;;
798 ia64:Linux:*:*) 813 ia64:Linux:*:*)
799 echo ${UNAME_MACHINE}-unknown-linux-gnu 814 echo ${UNAME_MACHINE}-unknown-linux-gnu
800 exit 0 ;; 815 exit 0 ;;
@@ -818,8 +833,26 @@ EOF
818 #endif 833 #endif
819EOF 834EOF
820 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 835 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
821 rm -f $dummy.c && rmdir $tmpdir 836 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
822 test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 837 ;;
838 mips64:Linux:*:*)
839 eval $set_cc_for_build
840 sed 's/^ //' << EOF >$dummy.c
841 #undef CPU
842 #undef mips64
843 #undef mips64el
844 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
845 CPU=mips64el
846 #else
847 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
848 CPU=mips64
849 #else
850 CPU=
851 #endif
852 #endif
853EOF
854 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
855 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
823 ;; 856 ;;
824 ppc:Linux:*:*) 857 ppc:Linux:*:*)
825 echo powerpc-unknown-linux-gnu 858 echo powerpc-unknown-linux-gnu
@@ -836,7 +869,7 @@ EOF
836 EV6) UNAME_MACHINE=alphaev6 ;; 869 EV6) UNAME_MACHINE=alphaev6 ;;
837 EV67) UNAME_MACHINE=alphaev67 ;; 870 EV67) UNAME_MACHINE=alphaev67 ;;
838 EV68*) UNAME_MACHINE=alphaev68 ;; 871 EV68*) UNAME_MACHINE=alphaev68 ;;
839 esac 872 esac
840 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 873 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
841 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 874 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
842 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 875 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
@@ -855,6 +888,9 @@ EOF
855 s390:Linux:*:* | s390x:Linux:*:*) 888 s390:Linux:*:* | s390x:Linux:*:*)
856 echo ${UNAME_MACHINE}-ibm-linux 889 echo ${UNAME_MACHINE}-ibm-linux
857 exit 0 ;; 890 exit 0 ;;
891 sh64*:Linux:*:*)
892 echo ${UNAME_MACHINE}-unknown-linux-gnu
893 exit 0 ;;
858 sh*:Linux:*:*) 894 sh*:Linux:*:*)
859 echo ${UNAME_MACHINE}-unknown-linux-gnu 895 echo ${UNAME_MACHINE}-unknown-linux-gnu
860 exit 0 ;; 896 exit 0 ;;
@@ -875,7 +911,7 @@ EOF
875 s/.*supported targets: *// 911 s/.*supported targets: *//
876 s/ .*// 912 s/ .*//
877 p'` 913 p'`
878 case "$ld_supported_targets" in 914 case "$ld_supported_targets" in
879 elf32-i386) 915 elf32-i386)
880 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 916 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
881 ;; 917 ;;
@@ -912,9 +948,11 @@ EOF
912 LIBC=gnuaout 948 LIBC=gnuaout
913 #endif 949 #endif
914 #endif 950 #endif
951 #ifdef __dietlibc__
952 LIBC=dietlibc
953 #endif
915EOF 954EOF
916 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 955 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
917 rm -f $dummy.c && rmdir $tmpdir
918 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 956 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
919 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 957 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
920 ;; 958 ;;
@@ -925,13 +963,30 @@ EOF
925 echo i386-sequent-sysv4 963 echo i386-sequent-sysv4
926 exit 0 ;; 964 exit 0 ;;
927 i*86:UNIX_SV:4.2MP:2.*) 965 i*86:UNIX_SV:4.2MP:2.*)
928 # Unixware is an offshoot of SVR4, but it has its own version 966 # Unixware is an offshoot of SVR4, but it has its own version
929 # number series starting with 2... 967 # number series starting with 2...
930 # I am not positive that other SVR4 systems won't match this, 968 # I am not positive that other SVR4 systems won't match this,
931 # I just have to hope. -- rms. 969 # I just have to hope. -- rms.
932 # Use sysv4.2uw... so that sysv4* matches it. 970 # Use sysv4.2uw... so that sysv4* matches it.
933 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 971 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
934 exit 0 ;; 972 exit 0 ;;
973 i*86:OS/2:*:*)
974 # If we were able to find `uname', then EMX Unix compatibility
975 # is probably installed.
976 echo ${UNAME_MACHINE}-pc-os2-emx
977 exit 0 ;;
978 i*86:XTS-300:*:STOP)
979 echo ${UNAME_MACHINE}-unknown-stop
980 exit 0 ;;
981 i*86:atheos:*:*)
982 echo ${UNAME_MACHINE}-unknown-atheos
983 exit 0 ;;
984 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
985 echo i386-unknown-lynxos${UNAME_RELEASE}
986 exit 0 ;;
987 i*86:*DOS:*:*)
988 echo ${UNAME_MACHINE}-pc-msdosdjgpp
989 exit 0 ;;
935 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 990 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
936 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 991 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
937 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 992 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -966,15 +1021,12 @@ EOF
966 echo ${UNAME_MACHINE}-pc-sysv32 1021 echo ${UNAME_MACHINE}-pc-sysv32
967 fi 1022 fi
968 exit 0 ;; 1023 exit 0 ;;
969 i*86:*DOS:*:*)
970 echo ${UNAME_MACHINE}-pc-msdosdjgpp
971 exit 0 ;;
972 pc:*:*:*) 1024 pc:*:*:*)
973 # Left here for compatibility: 1025 # Left here for compatibility:
974 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1026 # uname -m prints for DJGPP always 'pc', but it prints nothing about
975 # the processor, so we play safe by assuming i386. 1027 # the processor, so we play safe by assuming i386.
976 echo i386-pc-msdosdjgpp 1028 echo i386-pc-msdosdjgpp
977 exit 0 ;; 1029 exit 0 ;;
978 Intel:Mach:3*:*) 1030 Intel:Mach:3*:*)
979 echo i386-pc-mach3 1031 echo i386-pc-mach3
980 exit 0 ;; 1032 exit 0 ;;
@@ -992,9 +1044,15 @@ EOF
992 # "miniframe" 1044 # "miniframe"
993 echo m68010-convergent-sysv 1045 echo m68010-convergent-sysv
994 exit 0 ;; 1046 exit 0 ;;
1047 mc68k:UNIX:SYSTEM5:3.51m)
1048 echo m68k-convergent-sysv
1049 exit 0 ;;
1050 M680?0:D-NIX:5.3:*)
1051 echo m68k-diab-dnix
1052 exit 0 ;;
995 M68*:*:R3V[567]*:*) 1053 M68*:*:R3V[567]*:*)
996 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 1054 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
997 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) 1055 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
998 OS_REL='' 1056 OS_REL=''
999 test -r /etc/.relid \ 1057 test -r /etc/.relid \
1000 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1058 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1003,17 +1061,14 @@ EOF
1003 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1061 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1004 && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 1062 && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
1005 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1063 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1006 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1064 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1007 && echo i486-ncr-sysv4 && exit 0 ;; 1065 && echo i486-ncr-sysv4 && exit 0 ;;
1008 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1066 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1009 echo m68k-unknown-lynxos${UNAME_RELEASE} 1067 echo m68k-unknown-lynxos${UNAME_RELEASE}
1010 exit 0 ;; 1068 exit 0 ;;
1011 mc68030:UNIX_System_V:4.*:*) 1069 mc68030:UNIX_System_V:4.*:*)
1012 echo m68k-atari-sysv4 1070 echo m68k-atari-sysv4
1013 exit 0 ;; 1071 exit 0 ;;
1014 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1015 echo i386-unknown-lynxos${UNAME_RELEASE}
1016 exit 0 ;;
1017 TSUNAMI:LynxOS:2.*:*) 1072 TSUNAMI:LynxOS:2.*:*)
1018 echo sparc-unknown-lynxos${UNAME_RELEASE} 1073 echo sparc-unknown-lynxos${UNAME_RELEASE}
1019 exit 0 ;; 1074 exit 0 ;;
@@ -1041,9 +1096,9 @@ EOF
1041 fi 1096 fi
1042 exit 0 ;; 1097 exit 0 ;;
1043 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1098 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1044 # says <Richard.M.Bartel@ccMail.Census.GOV> 1099 # says <Richard.M.Bartel@ccMail.Census.GOV>
1045 echo i586-unisys-sysv4 1100 echo i586-unisys-sysv4
1046 exit 0 ;; 1101 exit 0 ;;
1047 *:UNIX_System_V:4*:FTX*) 1102 *:UNIX_System_V:4*:FTX*)
1048 # From Gerald Hewes <hewes@openmarket.com>. 1103 # From Gerald Hewes <hewes@openmarket.com>.
1049 # How about differentiating between stratus architectures? -djm 1104 # How about differentiating between stratus architectures? -djm
@@ -1065,11 +1120,11 @@ EOF
1065 exit 0 ;; 1120 exit 0 ;;
1066 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1121 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1067 if [ -d /usr/nec ]; then 1122 if [ -d /usr/nec ]; then
1068 echo mips-nec-sysv${UNAME_RELEASE} 1123 echo mips-nec-sysv${UNAME_RELEASE}
1069 else 1124 else
1070 echo mips-unknown-sysv${UNAME_RELEASE} 1125 echo mips-unknown-sysv${UNAME_RELEASE}
1071 fi 1126 fi
1072 exit 0 ;; 1127 exit 0 ;;
1073 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1128 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1074 echo powerpc-be-beos 1129 echo powerpc-be-beos
1075 exit 0 ;; 1130 exit 0 ;;
@@ -1085,6 +1140,9 @@ EOF
1085 SX-5:SUPER-UX:*:*) 1140 SX-5:SUPER-UX:*:*)
1086 echo sx5-nec-superux${UNAME_RELEASE} 1141 echo sx5-nec-superux${UNAME_RELEASE}
1087 exit 0 ;; 1142 exit 0 ;;
1143 SX-6:SUPER-UX:*:*)
1144 echo sx6-nec-superux${UNAME_RELEASE}
1145 exit 0 ;;
1088 Power*:Rhapsody:*:*) 1146 Power*:Rhapsody:*:*)
1089 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1147 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1090 exit 0 ;; 1148 exit 0 ;;
@@ -1092,7 +1150,11 @@ EOF
1092 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1150 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1093 exit 0 ;; 1151 exit 0 ;;
1094 *:Darwin:*:*) 1152 *:Darwin:*:*)
1095 echo `uname -p`-apple-darwin${UNAME_RELEASE} 1153 case `uname -p` in
1154 *86) UNAME_PROCESSOR=i686 ;;
1155 powerpc) UNAME_PROCESSOR=powerpc ;;
1156 esac
1157 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1096 exit 0 ;; 1158 exit 0 ;;
1097 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1159 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1098 UNAME_PROCESSOR=`uname -p` 1160 UNAME_PROCESSOR=`uname -p`
@@ -1105,7 +1167,7 @@ EOF
1105 *:QNX:*:4*) 1167 *:QNX:*:4*)
1106 echo i386-pc-qnx 1168 echo i386-pc-qnx
1107 exit 0 ;; 1169 exit 0 ;;
1108 NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) 1170 NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
1109 echo nsr-tandem-nsk${UNAME_RELEASE} 1171 echo nsr-tandem-nsk${UNAME_RELEASE}
1110 exit 0 ;; 1172 exit 0 ;;
1111 *:NonStop-UX:*:*) 1173 *:NonStop-UX:*:*)
@@ -1128,11 +1190,6 @@ EOF
1128 fi 1190 fi
1129 echo ${UNAME_MACHINE}-unknown-plan9 1191 echo ${UNAME_MACHINE}-unknown-plan9
1130 exit 0 ;; 1192 exit 0 ;;
1131 i*86:OS/2:*:*)
1132 # If we were able to find `uname', then EMX Unix compatibility
1133 # is probably installed.
1134 echo ${UNAME_MACHINE}-pc-os2-emx
1135 exit 0 ;;
1136 *:TOPS-10:*:*) 1193 *:TOPS-10:*:*)
1137 echo pdp10-unknown-tops10 1194 echo pdp10-unknown-tops10
1138 exit 0 ;; 1195 exit 0 ;;
@@ -1151,11 +1208,8 @@ EOF
1151 *:ITS:*:*) 1208 *:ITS:*:*)
1152 echo pdp10-unknown-its 1209 echo pdp10-unknown-its
1153 exit 0 ;; 1210 exit 0 ;;
1154 i*86:XTS-300:*:STOP) 1211 SEI:*:*:SEIUX)
1155 echo ${UNAME_MACHINE}-unknown-stop 1212 echo mips-sei-seiux${UNAME_RELEASE}
1156 exit 0 ;;
1157 i*86:atheos:*:*)
1158 echo ${UNAME_MACHINE}-unknown-atheos
1159 exit 0 ;; 1213 exit 0 ;;
1160esac 1214esac
1161 1215
@@ -1179,11 +1233,11 @@ main ()
1179#include <sys/param.h> 1233#include <sys/param.h>
1180 printf ("m68k-sony-newsos%s\n", 1234 printf ("m68k-sony-newsos%s\n",
1181#ifdef NEWSOS4 1235#ifdef NEWSOS4
1182 "4" 1236 "4"
1183#else 1237#else
1184 "" 1238 ""
1185#endif 1239#endif
1186 ); exit (0); 1240 ); exit (0);
1187#endif 1241#endif
1188#endif 1242#endif
1189 1243
@@ -1277,8 +1331,7 @@ main ()
1277} 1331}
1278EOF 1332EOF
1279 1333
1280$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 1334$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
1281rm -f $dummy.c $dummy && rmdir $tmpdir
1282 1335
1283# Apollos put the system type in the environment. 1336# Apollos put the system type in the environment.
1284 1337