summaryrefslogtreecommitdiff
path: root/config.guess
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-05-06 10:54:15 +1000
committerDamien Miller <djm@mindrot.org>2001-05-06 10:54:15 +1000
commit5bf5f2c8f84e4b12acd2ed6baa1b110c282249ff (patch)
tree29cb0556075fd4703cd0eceff2f1fc4f327a9377 /config.guess
parent99c73b377a45d3e008e73cca9073dc006e1cfaae (diff)
- (djm) Update config.guess and config.sub with latest versions (from
ftp://ftp.gnu.org/gnu/config/) to allow configure on ia64-hpux. Suggested by Jason Mader <jason@ncac.gwu.edu>
Diffstat (limited to 'config.guess')
-rwxr-xr-xconfig.guess595
1 files changed, 348 insertions, 247 deletions
diff --git a/config.guess b/config.guess
index b4faaedca..ba6616516 100755
--- a/config.guess
+++ b/config.guess
@@ -1,9 +1,9 @@
1#! /bin/sh 1#! /bin/sh
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
4# Free Software Foundation, Inc. 4# Free Software Foundation, Inc.
5 5
6version='2000-05-30' 6timestamp='2001-04-20'
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
@@ -32,30 +32,41 @@ version='2000-05-30'
32# exits with 0. Otherwise, it exits with 1. 32# exits with 0. Otherwise, it exits with 1.
33# 33#
34# The plan is that this can be called by configure scripts if you 34# The plan is that this can be called by configure scripts if you
35# don't specify an explicit system type (host/target name). 35# don't specify an explicit build system type.
36#
37# Only a few systems have been added to this list; please add others
38# (but try to keep the structure clean).
39#
40 36
41me=`echo "$0" | sed -e 's,.*/,,'` 37me=`echo "$0" | sed -e 's,.*/,,'`
42 38
43usage="\ 39usage="\
44Usage: $0 [OPTION] 40Usage: $0 [OPTION]
45 41
46Output the configuration name of this system. 42Output the configuration name of the system \`$me' is run on.
47 43
48Operation modes: 44Operation modes:
49 -h, --help print this help, then exit 45 -h, --help print this help, then exit
50 -V, --version print version number, then exit" 46 -t, --time-stamp print date of last modification, then exit
47 -v, --version print version number, then exit
48
49Report bugs and patches to <config-patches@gnu.org>."
50
51version="\
52GNU config.guess ($timestamp)
53
54Originally written by Per Bothner.
55Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
56Free Software Foundation, Inc.
57
58This is free software; see the source for copying conditions. There is NO
59warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
51 60
52help=" 61help="
53Try \`$me --help' for more information." 62Try \`$me --help' for more information."
54 63
55# Parse command line 64# Parse command line
56while test $# -gt 0 ; do 65while test $# -gt 0 ; do
57 case "$1" in 66 case $1 in
58 --version | --vers* | -V ) 67 --time-stamp | --time* | -t )
68 echo "$timestamp" ; exit 0 ;;
69 --version | -v )
59 echo "$version" ; exit 0 ;; 70 echo "$version" ; exit 0 ;;
60 --help | --h* | -h ) 71 --help | --h* | -h )
61 echo "$usage"; exit 0 ;; 72 echo "$usage"; exit 0 ;;
@@ -64,9 +75,7 @@ while test $# -gt 0 ; do
64 - ) # Use stdin as input. 75 - ) # Use stdin as input.
65 break ;; 76 break ;;
66 -* ) 77 -* )
67 exec >&2 78 echo "$me: invalid option $1$help" >&2
68 echo "$me: invalid option $1"
69 echo "$help"
70 exit 1 ;; 79 exit 1 ;;
71 * ) 80 * )
72 break ;; 81 break ;;
@@ -78,19 +87,30 @@ if test $# != 0; then
78 exit 1 87 exit 1
79fi 88fi
80 89
81# Use $HOST_CC if defined. $CC may point to a cross-compiler
82if test x"$CC_FOR_BUILD" = x; then
83 if test x"$HOST_CC" != x; then
84 CC_FOR_BUILD="$HOST_CC"
85 else
86 if test x"$CC" != x; then
87 CC_FOR_BUILD="$CC"
88 else
89 CC_FOR_BUILD=cc
90 fi
91 fi
92fi
93 90
91dummy=dummy-$$
92trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
93
94# CC_FOR_BUILD -- compiler used by this script.
95# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
96# use `HOST_CC' if defined, but it is deprecated.
97
98case $CC_FOR_BUILD,$HOST_CC,$CC in
99 ,,) echo "int dummy(){}" > $dummy.c
100 for c in cc gcc c89 ; do
101 ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
102 if test $? = 0 ; then
103 CC_FOR_BUILD="$c"; break
104 fi
105 done
106 rm -f $dummy.c $dummy.o $dummy.rel
107 if test x"$CC_FOR_BUILD" = x ; then
108 CC_FOR_BUILD=no_compiler_found
109 fi
110 ;;
111 ,,*) CC_FOR_BUILD=$CC ;;
112 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
113esac
94 114
95# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 115# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
96# (ghazi@noc.rutgers.edu 8/24/94.) 116# (ghazi@noc.rutgers.edu 8/24/94.)
@@ -100,12 +120,9 @@ fi
100 120
101UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 121UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
102UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 122UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
103UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 123UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
104UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 124UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
105 125
106dummy=dummy-$$
107trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
108
109# Note: order is significant - the case branches are not exclusive. 126# Note: order is significant - the case branches are not exclusive.
110 127
111case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 128case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -119,7 +136,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
119 # object file format. 136 # object file format.
120 # Determine the machine/vendor (is the vendor relevant). 137 # Determine the machine/vendor (is the vendor relevant).
121 case "${UNAME_MACHINE}" in 138 case "${UNAME_MACHINE}" in
122 amiga) machine=m68k-cbm ;; 139 amiga) machine=m68k-unknown ;;
123 arm32) machine=arm-unknown ;; 140 arm32) machine=arm-unknown ;;
124 atari*) machine=m68k-atari ;; 141 atari*) machine=m68k-atari ;;
125 sun3*) machine=m68k-sun ;; 142 sun3*) machine=m68k-sun ;;
@@ -129,16 +146,24 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
129 ibmrt|romp-ibm) machine=romp-ibm ;; 146 ibmrt|romp-ibm) machine=romp-ibm ;;
130 *) machine=${UNAME_MACHINE}-unknown ;; 147 *) machine=${UNAME_MACHINE}-unknown ;;
131 esac 148 esac
132 # The Operating System including object format. 149 # The Operating System including object format, if it has switched
133 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 150 # to ELF recently, or will in the future.
134 | grep __ELF__ >/dev/null 151 case "${UNAME_MACHINE}" in
135 then 152 i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
136 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 153 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
137 # Return netbsd for either. FIX? 154 | grep __ELF__ >/dev/null
138 os=netbsd 155 then
139 else 156 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
140 os=netbsdelf 157 # Return netbsd for either. FIX?
141 fi 158 os=netbsd
159 else
160 os=netbsdelf
161 fi
162 ;;
163 *)
164 os=netbsd
165 ;;
166 esac
142 # The OS release 167 # The OS release
143 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 168 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
144 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 169 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
@@ -215,7 +240,7 @@ EOF
215 echo alpha-dec-winnt3.5 240 echo alpha-dec-winnt3.5
216 exit 0 ;; 241 exit 0 ;;
217 Amiga*:UNIX_System_V:4.0:*) 242 Amiga*:UNIX_System_V:4.0:*)
218 echo m68k-cbm-sysv4 243 echo m68k-unknown-sysv4
219 exit 0;; 244 exit 0;;
220 amiga:OpenBSD:*:*) 245 amiga:OpenBSD:*:*)
221 echo m68k-unknown-openbsd${UNAME_RELEASE} 246 echo m68k-unknown-openbsd${UNAME_RELEASE}
@@ -247,7 +272,7 @@ EOF
247 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 272 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
248 echo arm-acorn-riscix${UNAME_RELEASE} 273 echo arm-acorn-riscix${UNAME_RELEASE}
249 exit 0;; 274 exit 0;;
250 SR2?01:HI-UX/MPP:*:*) 275 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
251 echo hppa1.1-hitachi-hiuxmpp 276 echo hppa1.1-hitachi-hiuxmpp
252 exit 0;; 277 exit 0;;
253 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 278 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
@@ -383,10 +408,13 @@ EOF
383EOF 408EOF
384 $CC_FOR_BUILD $dummy.c -o $dummy \ 409 $CC_FOR_BUILD $dummy.c -o $dummy \
385 && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 410 && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
386 && rm $dummy.c $dummy && exit 0 411 && rm -f $dummy.c $dummy && exit 0
387 rm -f $dummy.c $dummy 412 rm -f $dummy.c $dummy
388 echo mips-mips-riscos${UNAME_RELEASE} 413 echo mips-mips-riscos${UNAME_RELEASE}
389 exit 0 ;; 414 exit 0 ;;
415 Motorola:PowerMAX_OS:*:*)
416 echo powerpc-motorola-powermax
417 exit 0 ;;
390 Night_Hawk:Power_UNIX:*:*) 418 Night_Hawk:Power_UNIX:*:*)
391 echo powerpc-harris-powerunix 419 echo powerpc-harris-powerunix
392 exit 0 ;; 420 exit 0 ;;
@@ -434,9 +462,17 @@ EOF
434 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 462 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
435 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 463 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
436 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 464 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
437 i?86:AIX:*:*) 465 i*86:AIX:*:*)
438 echo i386-ibm-aix 466 echo i386-ibm-aix
439 exit 0 ;; 467 exit 0 ;;
468 ia64:AIX:*:*)
469 if [ -x /usr/bin/oslevel ] ; then
470 IBM_REV=`/usr/bin/oslevel`
471 else
472 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
473 fi
474 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
475 exit 0 ;;
440 *:AIX:2:3) 476 *:AIX:2:3)
441 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 477 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
442 sed 's/^ //' << EOF >$dummy.c 478 sed 's/^ //' << EOF >$dummy.c
@@ -450,7 +486,7 @@ EOF
450 exit(0); 486 exit(0);
451 } 487 }
452EOF 488EOF
453 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 489 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
454 rm -f $dummy.c $dummy 490 rm -f $dummy.c $dummy
455 echo rs6000-ibm-aix3.2.5 491 echo rs6000-ibm-aix3.2.5
456 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 492 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
@@ -459,9 +495,9 @@ EOF
459 echo rs6000-ibm-aix3.2 495 echo rs6000-ibm-aix3.2
460 fi 496 fi
461 exit 0 ;; 497 exit 0 ;;
462 *:AIX:*:4) 498 *:AIX:*:[45])
463 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` 499 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
464 if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then 500 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
465 IBM_ARCH=rs6000 501 IBM_ARCH=rs6000
466 else 502 else
467 IBM_ARCH=powerpc 503 IBM_ARCH=powerpc
@@ -469,7 +505,7 @@ EOF
469 if [ -x /usr/bin/oslevel ] ; then 505 if [ -x /usr/bin/oslevel ] ; then
470 IBM_REV=`/usr/bin/oslevel` 506 IBM_REV=`/usr/bin/oslevel`
471 else 507 else
472 IBM_REV=4.${UNAME_RELEASE} 508 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
473 fi 509 fi
474 echo ${IBM_ARCH}-ibm-aix${IBM_REV} 510 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
475 exit 0 ;; 511 exit 0 ;;
@@ -495,10 +531,28 @@ EOF
495 echo m68k-hp-bsd4.4 531 echo m68k-hp-bsd4.4
496 exit 0 ;; 532 exit 0 ;;
497 9000/[34678]??:HP-UX:*:*) 533 9000/[34678]??:HP-UX:*:*)
534 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
498 case "${UNAME_MACHINE}" in 535 case "${UNAME_MACHINE}" in
499 9000/31? ) HP_ARCH=m68000 ;; 536 9000/31? ) HP_ARCH=m68000 ;;
500 9000/[34]?? ) HP_ARCH=m68k ;; 537 9000/[34]?? ) HP_ARCH=m68k ;;
501 9000/[678][0-9][0-9]) 538 9000/[678][0-9][0-9])
539 case "${HPUX_REV}" in
540 11.[0-9][0-9])
541 if [ -x /usr/bin/getconf ]; then
542 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
543 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
544 case "${sc_cpu_version}" in
545 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
546 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
547 532) # CPU_PA_RISC2_0
548 case "${sc_kernel_bits}" in
549 32) HP_ARCH="hppa2.0n" ;;
550 64) HP_ARCH="hppa2.0w" ;;
551 esac ;;
552 esac
553 fi ;;
554 esac
555 if [ "${HP_ARCH}" = "" ]; then
502 sed 's/^ //' << EOF >$dummy.c 556 sed 's/^ //' << EOF >$dummy.c
503 557
504 #define _HPUX_SOURCE 558 #define _HPUX_SOURCE
@@ -533,11 +587,16 @@ EOF
533 } 587 }
534EOF 588EOF
535 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` 589 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
590 if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
536 rm -f $dummy.c $dummy 591 rm -f $dummy.c $dummy
592 fi ;;
537 esac 593 esac
538 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
539 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 594 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
540 exit 0 ;; 595 exit 0 ;;
596 ia64:HP-UX:*:*)
597 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
598 echo ia64-hp-hpux${HPUX_REV}
599 exit 0 ;;
541 3050*:HI-UX:*:*) 600 3050*:HI-UX:*:*)
542 sed 's/^ //' << EOF >$dummy.c 601 sed 's/^ //' << EOF >$dummy.c
543 #include <unistd.h> 602 #include <unistd.h>
@@ -564,7 +623,7 @@ EOF
564 exit (0); 623 exit (0);
565 } 624 }
566EOF 625EOF
567 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 626 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
568 rm -f $dummy.c $dummy 627 rm -f $dummy.c $dummy
569 echo unknown-hitachi-hiuxwe2 628 echo unknown-hitachi-hiuxwe2
570 exit 0 ;; 629 exit 0 ;;
@@ -583,7 +642,7 @@ EOF
583 hp8??:OSF1:*:*) 642 hp8??:OSF1:*:*)
584 echo hppa1.0-hp-osf 643 echo hppa1.0-hp-osf
585 exit 0 ;; 644 exit 0 ;;
586 i?86:OSF1:*:*) 645 i*86:OSF1:*:*)
587 if [ -x /usr/sbin/sysversion ] ; then 646 if [ -x /usr/sbin/sysversion ] ; then
588 echo ${UNAME_MACHINE}-unknown-osf1mk 647 echo ${UNAME_MACHINE}-unknown-osf1mk
589 else 648 else
@@ -628,27 +687,28 @@ EOF
628 CRAY*TS:*:*:*) 687 CRAY*TS:*:*:*)
629 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 688 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
630 exit 0 ;; 689 exit 0 ;;
631 CRAY*T3E:*:*:*) 690 CRAY*T3D:*:*:*)
632 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 691 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
633 exit 0 ;; 692 exit 0 ;;
693 CRAY*T3E:*:*:*)
694 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
695 exit 0 ;;
634 CRAY*SV1:*:*:*) 696 CRAY*SV1:*:*:*)
635 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 697 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
636 exit 0 ;; 698 exit 0 ;;
637 CRAY-2:*:*:*) 699 CRAY-2:*:*:*)
638 echo cray2-cray-unicos 700 echo cray2-cray-unicos
639 exit 0 ;; 701 exit 0 ;;
640 F300:UNIX_System_V:*:*) 702 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
703 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
641 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 704 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
642 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 705 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
643 echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 706 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
644 exit 0 ;; 707 exit 0 ;;
645 F301:UNIX_System_V:*:*)
646 echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
647 exit 0 ;;
648 hp300:OpenBSD:*:*) 708 hp300:OpenBSD:*:*)
649 echo m68k-unknown-openbsd${UNAME_RELEASE} 709 echo m68k-unknown-openbsd${UNAME_RELEASE}
650 exit 0 ;; 710 exit 0 ;;
651 i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 711 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
652 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 712 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
653 exit 0 ;; 713 exit 0 ;;
654 sparc*:BSD/OS:*:*) 714 sparc*:BSD/OS:*:*)
@@ -669,6 +729,9 @@ EOF
669 i*:MINGW*:*) 729 i*:MINGW*:*)
670 echo ${UNAME_MACHINE}-pc-mingw32 730 echo ${UNAME_MACHINE}-pc-mingw32
671 exit 0 ;; 731 exit 0 ;;
732 i*:PW*:*)
733 echo ${UNAME_MACHINE}-pc-pw32
734 exit 0 ;;
672 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 735 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
673 # How do we know it's Interix rather than the generic POSIX subsystem? 736 # How do we know it's Interix rather than the generic POSIX subsystem?
674 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 737 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -687,58 +750,41 @@ EOF
687 *:GNU:*:*) 750 *:GNU:*:*)
688 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 751 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
689 exit 0 ;; 752 exit 0 ;;
690 *:Linux:*:*) 753 i*86:Minix:*:*)
691 754 echo ${UNAME_MACHINE}-pc-minix
692 # The BFD linker knows what the default object file format is, so 755 exit 0 ;;
693 # first see if it will tell us. cd to the root directory to prevent 756 arm*:Linux:*:*)
694 # problems with other programs or directories called `ld' in the path. 757 echo ${UNAME_MACHINE}-unknown-linux-gnu
695 ld_help_string=`cd /; ld --help 2>&1` 758 exit 0 ;;
696 ld_supported_emulations=`echo $ld_help_string \ 759 ia64:Linux:*:*)
697 | sed -ne '/supported emulations:/!d 760 echo ${UNAME_MACHINE}-unknown-linux
698 s/[ ][ ]*/ /g 761 exit 0 ;;
699 s/.*supported emulations: *// 762 m68*:Linux:*:*)
700 s/ .*// 763 echo ${UNAME_MACHINE}-unknown-linux-gnu
701 p'` 764 exit 0 ;;
702 case "$ld_supported_emulations" in 765 mips:Linux:*:*)
703 *ia64) 766 cat >$dummy.c <<EOF
704 echo "${UNAME_MACHINE}-unknown-linux" 767#ifdef __cplusplus
705 exit 0 768#include <stdio.h> /* for printf() prototype */
706 ;; 769int main (int argc, char *argv[]) {
707 i?86linux) 770#else
708 echo "${UNAME_MACHINE}-pc-linux-gnuaout" 771int main (argc, argv) int argc; char *argv[]; {
709 exit 0 772#endif
710 ;; 773#ifdef __MIPSEB__
711 elf_i?86) 774 printf ("%s-unknown-linux-gnu\n", argv[1]);
712 echo "${UNAME_MACHINE}-pc-linux" 775#endif
713 exit 0 776#ifdef __MIPSEL__
714 ;; 777 printf ("%sel-unknown-linux-gnu\n", argv[1]);
715 i?86coff) 778#endif
716 echo "${UNAME_MACHINE}-pc-linux-gnucoff" 779 return 0;
717 exit 0 780}
718 ;; 781EOF
719 sparclinux) 782 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
720 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" 783 rm -f $dummy.c $dummy
721 exit 0 784 ;;
722 ;; 785 ppc:Linux:*:*)
723 armlinux) 786 # Determine Lib Version
724 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" 787 cat >$dummy.c <<EOF
725 exit 0
726 ;;
727 elf32arm*)
728 echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
729 exit 0
730 ;;
731 armelf_linux*)
732 echo "${UNAME_MACHINE}-unknown-linux-gnu"
733 exit 0
734 ;;
735 m68klinux)
736 echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
737 exit 0
738 ;;
739 elf32ppc | elf32ppclinux)
740 # Determine Lib Version
741 cat >$dummy.c <<EOF
742#include <features.h> 788#include <features.h>
743#if defined(__GLIBC__) 789#if defined(__GLIBC__)
744extern char __libc_version[]; 790extern char __libc_version[];
@@ -751,127 +797,127 @@ main(argc, argv)
751#if defined(__GLIBC__) 797#if defined(__GLIBC__)
752 printf("%s %s\n", __libc_version, __libc_release); 798 printf("%s %s\n", __libc_version, __libc_release);
753#else 799#else
754 printf("unkown\n"); 800 printf("unknown\n");
755#endif 801#endif
756 return 0; 802 return 0;
757} 803}
758EOF 804EOF
759 LIBC="" 805 LIBC=""
760 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null 806 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
807 if test "$?" = 0 ; then
808 ./$dummy | grep 1\.99 > /dev/null
809 if test "$?" = 0 ; then LIBC="libc1" ; fi
810 fi
811 rm -f $dummy.c $dummy
812 echo powerpc-unknown-linux-gnu${LIBC}
813 exit 0 ;;
814 alpha:Linux:*:*)
815 cat <<EOF >$dummy.s
816 .data
817 \$Lformat:
818 .byte 37,100,45,37,120,10,0 # "%d-%x\n"
819 .text
820 .globl main
821 .align 4
822 .ent main
823 main:
824 .frame \$30,16,\$26,0
825 ldgp \$29,0(\$27)
826 .prologue 1
827 .long 0x47e03d80 # implver \$0
828 lda \$2,-1
829 .long 0x47e20c21 # amask \$2,\$1
830 lda \$16,\$Lformat
831 mov \$0,\$17
832 not \$1,\$18
833 jsr \$26,printf
834 ldgp \$29,0(\$26)
835 mov 0,\$16
836 jsr \$26,exit
837 .end main
838EOF
839 LIBC=""
840 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
841 if test "$?" = 0 ; then
842 case `./$dummy` in
843 0-0) UNAME_MACHINE="alpha" ;;
844 1-0) UNAME_MACHINE="alphaev5" ;;
845 1-1) UNAME_MACHINE="alphaev56" ;;
846 1-101) UNAME_MACHINE="alphapca56" ;;
847 2-303) UNAME_MACHINE="alphaev6" ;;
848 2-307) UNAME_MACHINE="alphaev67" ;;
849 esac
850 objdump --private-headers $dummy | \
851 grep ld.so.1 > /dev/null
761 if test "$?" = 0 ; then 852 if test "$?" = 0 ; then
762 ./$dummy | grep 1\.99 > /dev/null 853 LIBC="libc1"
763 if test "$?" = 0 ; then
764 LIBC="libc1"
765 fi
766 fi 854 fi
767 rm -f $dummy.c $dummy 855 fi
768 echo powerpc-unknown-linux-gnu${LIBC} 856 rm -f $dummy.s $dummy
857 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
858 exit 0 ;;
859 parisc:Linux:*:* | hppa:Linux:*:*)
860 # Look for CPU level
861 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
862 PA7*) echo hppa1.1-unknown-linux-gnu ;;
863 PA8*) echo hppa2.0-unknown-linux-gnu ;;
864 *) echo hppa-unknown-linux-gnu ;;
865 esac
866 exit 0 ;;
867 parisc64:Linux:*:* | hppa64:Linux:*:*)
868 echo hppa64-unknown-linux-gnu
869 exit 0 ;;
870 s390:Linux:*:* | s390x:Linux:*:*)
871 echo ${UNAME_MACHINE}-ibm-linux
872 exit 0 ;;
873 sh*:Linux:*:*)
874 echo ${UNAME_MACHINE}-unknown-linux-gnu
875 exit 0 ;;
876 sparc:Linux:*:* | sparc64:Linux:*:*)
877 echo ${UNAME_MACHINE}-unknown-linux-gnu
878 exit 0 ;;
879 x86_64:Linux:*:*)
880 echo x86_64-unknown-linux-gnu
881 exit 0 ;;
882 i*86:Linux:*:*)
883 # The BFD linker knows what the default object file format is, so
884 # first see if it will tell us. cd to the root directory to prevent
885 # problems with other programs or directories called `ld' in the path.
886 ld_supported_emulations=`cd /; ld --help 2>&1 \
887 | sed -ne '/supported emulations:/!d
888 s/[ ][ ]*/ /g
889 s/.*supported emulations: *//
890 s/ .*//
891 p'`
892 case "$ld_supported_emulations" in
893 i*86linux)
894 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
769 exit 0 895 exit 0
770 ;; 896 ;;
771 shelf_linux) 897 elf_i*86)
772 echo "${UNAME_MACHINE}-unknown-linux-gnu" 898 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
899 ;;
900 i*86coff)
901 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
773 exit 0 902 exit 0
774 ;; 903 ;;
775 esac 904 esac
776 905 # Either a pre-BFD a.out linker (linux-gnuoldld)
777 if test "${UNAME_MACHINE}" = "alpha" ; then 906 # or one that does not give us useful --help.
778 cat <<EOF >$dummy.s 907 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
779 .data 908 # If ld does not provide *any* "supported emulations:"
780 \$Lformat: 909 # that means it is gnuoldld.
781 .byte 37,100,45,37,120,10,0 # "%d-%x\n" 910 test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
782 911 case "${UNAME_MACHINE}" in
783 .text 912 i*86)
784 .globl main 913 VENDOR=pc;
785 .align 4 914 ;;
786 .ent main 915 *)
787 main: 916 VENDOR=unknown;
788 .frame \$30,16,\$26,0 917 ;;
789 ldgp \$29,0(\$27) 918 esac
790 .prologue 1 919 # Determine whether the default compiler is a.out or elf
791 .long 0x47e03d80 # implver \$0 920 cat >$dummy.c <<EOF
792 lda \$2,-1
793 .long 0x47e20c21 # amask \$2,\$1
794 lda \$16,\$Lformat
795 mov \$0,\$17
796 not \$1,\$18
797 jsr \$26,printf
798 ldgp \$29,0(\$26)
799 mov 0,\$16
800 jsr \$26,exit
801 .end main
802EOF
803 LIBC=""
804 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
805 if test "$?" = 0 ; then
806 case `./$dummy` in
807 0-0)
808 UNAME_MACHINE="alpha"
809 ;;
810 1-0)
811 UNAME_MACHINE="alphaev5"
812 ;;
813 1-1)
814 UNAME_MACHINE="alphaev56"
815 ;;
816 1-101)
817 UNAME_MACHINE="alphapca56"
818 ;;
819 2-303)
820 UNAME_MACHINE="alphaev6"
821 ;;
822 2-307)
823 UNAME_MACHINE="alphaev67"
824 ;;
825 esac
826
827 objdump --private-headers $dummy | \
828 grep ld.so.1 > /dev/null
829 if test "$?" = 0 ; then
830 LIBC="libc1"
831 fi
832 fi
833 rm -f $dummy.s $dummy
834 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
835 elif test "${UNAME_MACHINE}" = "mips" ; then
836 cat >$dummy.c <<EOF
837#ifdef __cplusplus
838#include <stdio.h> /* for printf() prototype */
839 int main (int argc, char *argv[]) {
840#else
841 int main (argc, argv) int argc; char *argv[]; {
842#endif
843#ifdef __MIPSEB__
844 printf ("%s-unknown-linux-gnu\n", argv[1]);
845#endif
846#ifdef __MIPSEL__
847 printf ("%sel-unknown-linux-gnu\n", argv[1]);
848#endif
849 return 0;
850}
851EOF
852 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
853 rm -f $dummy.c $dummy
854 elif test "${UNAME_MACHINE}" = "s390"; then
855 echo s390-ibm-linux && exit 0
856 else
857 # Either a pre-BFD a.out linker (linux-gnuoldld)
858 # or one that does not give us useful --help.
859 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
860 # If ld does not provide *any* "supported emulations:"
861 # that means it is gnuoldld.
862 echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
863 test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
864
865 case "${UNAME_MACHINE}" in
866 i?86)
867 VENDOR=pc;
868 ;;
869 *)
870 VENDOR=unknown;
871 ;;
872 esac
873 # Determine whether the default compiler is a.out or elf
874 cat >$dummy.c <<EOF
875#include <features.h> 921#include <features.h>
876#ifdef __cplusplus 922#ifdef __cplusplus
877#include <stdio.h> /* for printf() prototype */ 923#include <stdio.h> /* for printf() prototype */
@@ -895,15 +941,16 @@ EOF
895 return 0; 941 return 0;
896} 942}
897EOF 943EOF
898 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 944 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
899 rm -f $dummy.c $dummy 945 rm -f $dummy.c $dummy
900 fi ;; 946 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
947 ;;
901# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions 948# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
902# are messed up and put the nodename in both sysname and nodename. 949# are messed up and put the nodename in both sysname and nodename.
903 i?86:DYNIX/ptx:4*:*) 950 i*86:DYNIX/ptx:4*:*)
904 echo i386-sequent-sysv4 951 echo i386-sequent-sysv4
905 exit 0 ;; 952 exit 0 ;;
906 i?86:UNIX_SV:4.2MP:2.*) 953 i*86:UNIX_SV:4.2MP:2.*)
907 # Unixware is an offshoot of SVR4, but it has its own version 954 # Unixware is an offshoot of SVR4, but it has its own version
908 # number series starting with 2... 955 # number series starting with 2...
909 # I am not positive that other SVR4 systems won't match this, 956 # I am not positive that other SVR4 systems won't match this,
@@ -911,7 +958,7 @@ EOF
911 # Use sysv4.2uw... so that sysv4* matches it. 958 # Use sysv4.2uw... so that sysv4* matches it.
912 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 959 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
913 exit 0 ;; 960 exit 0 ;;
914 i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) 961 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
915 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 962 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
916 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 963 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
917 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 964 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
@@ -919,7 +966,7 @@ EOF
919 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 966 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
920 fi 967 fi
921 exit 0 ;; 968 exit 0 ;;
922 i?86:*:5:7*) 969 i*86:*:5:7*)
923 # Fixed at (any) Pentium or better 970 # Fixed at (any) Pentium or better
924 UNAME_MACHINE=i586 971 UNAME_MACHINE=i586
925 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then 972 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
@@ -928,7 +975,7 @@ EOF
928 echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} 975 echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
929 fi 976 fi
930 exit 0 ;; 977 exit 0 ;;
931 i?86:*:3.2:*) 978 i*86:*:3.2:*)
932 if test -f /usr/options/cb.name; then 979 if test -f /usr/options/cb.name; then
933 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 980 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
934 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 981 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
@@ -946,7 +993,7 @@ EOF
946 echo ${UNAME_MACHINE}-pc-sysv32 993 echo ${UNAME_MACHINE}-pc-sysv32
947 fi 994 fi
948 exit 0 ;; 995 exit 0 ;;
949 i?86:*DOS:*:*) 996 i*86:*DOS:*:*)
950 echo ${UNAME_MACHINE}-pc-msdosdjgpp 997 echo ${UNAME_MACHINE}-pc-msdosdjgpp
951 exit 0 ;; 998 exit 0 ;;
952 pc:*:*:*) 999 pc:*:*:*)
@@ -974,7 +1021,7 @@ EOF
974 exit 0 ;; 1021 exit 0 ;;
975 M68*:*:R3V[567]*:*) 1022 M68*:*:R3V[567]*:*)
976 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 1023 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
977 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) 1024 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
978 OS_REL='' 1025 OS_REL=''
979 test -r /etc/.relid \ 1026 test -r /etc/.relid \
980 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1027 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -985,21 +1032,24 @@ EOF
985 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1032 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
986 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1033 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
987 && echo i486-ncr-sysv4 && exit 0 ;; 1034 && echo i486-ncr-sysv4 && exit 0 ;;
988 m68*:LynxOS:2.*:*) 1035 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
989 echo m68k-unknown-lynxos${UNAME_RELEASE} 1036 echo m68k-unknown-lynxos${UNAME_RELEASE}
990 exit 0 ;; 1037 exit 0 ;;
991 mc68030:UNIX_System_V:4.*:*) 1038 mc68030:UNIX_System_V:4.*:*)
992 echo m68k-atari-sysv4 1039 echo m68k-atari-sysv4
993 exit 0 ;; 1040 exit 0 ;;
994 i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) 1041 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
995 echo i386-unknown-lynxos${UNAME_RELEASE} 1042 echo i386-unknown-lynxos${UNAME_RELEASE}
996 exit 0 ;; 1043 exit 0 ;;
997 TSUNAMI:LynxOS:2.*:*) 1044 TSUNAMI:LynxOS:2.*:*)
998 echo sparc-unknown-lynxos${UNAME_RELEASE} 1045 echo sparc-unknown-lynxos${UNAME_RELEASE}
999 exit 0 ;; 1046 exit 0 ;;
1000 rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) 1047 rs6000:LynxOS:2.*:*)
1001 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1048 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1002 exit 0 ;; 1049 exit 0 ;;
1050 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1051 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1052 exit 0 ;;
1003 SM[BE]S:UNIX_SV:*:*) 1053 SM[BE]S:UNIX_SV:*:*)
1004 echo mips-dde-sysv${UNAME_RELEASE} 1054 echo mips-dde-sysv${UNAME_RELEASE}
1005 exit 0 ;; 1055 exit 0 ;;
@@ -1033,7 +1083,7 @@ EOF
1033 mc68*:A/UX:*:*) 1083 mc68*:A/UX:*:*)
1034 echo m68k-apple-aux${UNAME_RELEASE} 1084 echo m68k-apple-aux${UNAME_RELEASE}
1035 exit 0 ;; 1085 exit 0 ;;
1036 news*:NEWS-OS:*:6*) 1086 news*:NEWS-OS:6*:*)
1037 echo mips-sony-newsos6 1087 echo mips-sony-newsos6
1038 exit 0 ;; 1088 exit 0 ;;
1039 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1089 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
@@ -1076,15 +1126,52 @@ EOF
1076 *:QNX:*:4*) 1126 *:QNX:*:4*)
1077 echo i386-pc-qnx 1127 echo i386-pc-qnx
1078 exit 0 ;; 1128 exit 0 ;;
1079 NSR-W:NONSTOP_KERNEL:*:*) 1129 NSR-[KW]:NONSTOP_KERNEL:*:*)
1080 echo nsr-tandem-nsk${UNAME_RELEASE} 1130 echo nsr-tandem-nsk${UNAME_RELEASE}
1081 exit 0 ;; 1131 exit 0 ;;
1132 *:NonStop-UX:*:*)
1133 echo mips-compaq-nonstopux
1134 exit 0 ;;
1082 BS2000:POSIX*:*:*) 1135 BS2000:POSIX*:*:*)
1083 echo bs2000-siemens-sysv 1136 echo bs2000-siemens-sysv
1084 exit 0 ;; 1137 exit 0 ;;
1085 DS/*:UNIX_System_V:*:*) 1138 DS/*:UNIX_System_V:*:*)
1086 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1139 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1087 exit 0 ;; 1140 exit 0 ;;
1141 *:Plan9:*:*)
1142 # "uname -m" is not consistent, so use $cputype instead. 386
1143 # is converted to i386 for consistency with other x86
1144 # operating systems.
1145 if test "$cputype" = "386"; then
1146 UNAME_MACHINE=i386
1147 else
1148 UNAME_MACHINE="$cputype"
1149 fi
1150 echo ${UNAME_MACHINE}-unknown-plan9
1151 exit 0 ;;
1152 i*86:OS/2:*:*)
1153 # If we were able to find `uname', then EMX Unix compatibility
1154 # is probably installed.
1155 echo ${UNAME_MACHINE}-pc-os2-emx
1156 exit 0 ;;
1157 *:TOPS-10:*:*)
1158 echo pdp10-unknown-tops10
1159 exit 0 ;;
1160 *:TENEX:*:*)
1161 echo pdp10-unknown-tenex
1162 exit 0 ;;
1163 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1164 echo pdp10-dec-tops20
1165 exit 0 ;;
1166 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1167 echo pdp10-xkl-tops20
1168 exit 0 ;;
1169 *:TOPS-20:*:*)
1170 echo pdp10-unknown-tops20
1171 exit 0 ;;
1172 *:ITS:*:*)
1173 echo pdp10-unknown-its
1174 exit 0 ;;
1088esac 1175esac
1089 1176
1090#echo '(No uname command or uname output not recognized.)' 1>&2 1177#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1176,11 +1263,24 @@ main ()
1176#endif 1263#endif
1177 1264
1178#if defined (vax) 1265#if defined (vax)
1179#if !defined (ultrix) 1266# if !defined (ultrix)
1180 printf ("vax-dec-bsd\n"); exit (0); 1267# include <sys/param.h>
1181#else 1268# if defined (BSD)
1182 printf ("vax-dec-ultrix\n"); exit (0); 1269# if BSD == 43
1183#endif 1270 printf ("vax-dec-bsd4.3\n"); exit (0);
1271# else
1272# if BSD == 199006
1273 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1274# else
1275 printf ("vax-dec-bsd\n"); exit (0);
1276# endif
1277# endif
1278# else
1279 printf ("vax-dec-bsd\n"); exit (0);
1280# endif
1281# else
1282 printf ("vax-dec-ultrix\n"); exit (0);
1283# endif
1184#endif 1284#endif
1185 1285
1186#if defined (alliant) && defined (i860) 1286#if defined (alliant) && defined (i860)
@@ -1191,7 +1291,7 @@ main ()
1191} 1291}
1192EOF 1292EOF
1193 1293
1194$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 1294$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
1195rm -f $dummy.c $dummy 1295rm -f $dummy.c $dummy
1196 1296
1197# Apollos put the system type in the environment. 1297# Apollos put the system type in the environment.
@@ -1227,8 +1327,9 @@ fi
1227cat >&2 <<EOF 1327cat >&2 <<EOF
1228$0: unable to guess system type 1328$0: unable to guess system type
1229 1329
1230The $version version of this script cannot recognize your system type. 1330This script, last modified $timestamp, has failed to recognize
1231Please download the most up to date version of the config scripts: 1331the operating system you are using. It is advised that you
1332download the most up to date version of the config scripts from
1232 1333
1233 ftp://ftp.gnu.org/pub/gnu/config/ 1334 ftp://ftp.gnu.org/pub/gnu/config/
1234 1335
@@ -1237,7 +1338,7 @@ send the following data and any information you think might be
1237pertinent to <config-patches@gnu.org> in order to provide the needed 1338pertinent to <config-patches@gnu.org> in order to provide the needed
1238information to handle your system. 1339information to handle your system.
1239 1340
1240config.guess version = $version 1341config.guess timestamp = $timestamp
1241 1342
1242uname -m = `(uname -m) 2>/dev/null || echo unknown` 1343uname -m = `(uname -m) 2>/dev/null || echo unknown`
1243uname -r = `(uname -r) 2>/dev/null || echo unknown` 1344uname -r = `(uname -r) 2>/dev/null || echo unknown`
@@ -1264,7 +1365,7 @@ exit 1
1264 1365
1265# Local variables: 1366# Local variables:
1266# eval: (add-hook 'write-file-hooks 'time-stamp) 1367# eval: (add-hook 'write-file-hooks 'time-stamp)
1267# time-stamp-start: "version='" 1368# time-stamp-start: "timestamp='"
1268# time-stamp-format: "%:y-%02m-%02d" 1369# time-stamp-format: "%:y-%02m-%02d"
1269# time-stamp-end: "'" 1370# time-stamp-end: "'"
1270# End: 1371# End: