ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/config.guess
(Generate patch)

Comparing rxvt-unicode/config.guess (file contents):
Revision 1.3 by sf-exg, Sun Jan 31 11:34:28 2010 UTC vs.
Revision 1.8 by sf-exg, Fri May 23 22:30:35 2014 UTC

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,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5# Free Software Foundation, Inc. 3# Copyright 1992-2014 Free Software Foundation, Inc.
6 4
7timestamp='2009-12-30' 5timestamp='2014-03-23'
8 6
9# This file is free software; you can redistribute it and/or modify it 7# This file is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by 8# under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2 of the License, or 9# the Free Software Foundation; either version 3 of the License, or
12# (at your option) any later version. 10# (at your option) any later version.
13# 11#
14# This program is distributed in the hope that it will be useful, but 12# This program is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of 13# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# General Public License for more details. 15# General Public License for more details.
18# 16#
19# You should have received a copy of the GNU General Public License 17# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software 18# along with this program; if not, see <http://www.gnu.org/licenses/>.
21# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22# 02110-1301, USA.
23# 19#
24# As a special exception to the GNU General Public License, if you 20# As a special exception to the GNU General Public License, if you
25# distribute this file as part of a program that contains a 21# distribute this file as part of a program that contains a
26# configuration script generated by Autoconf, you may include it under 22# configuration script generated by Autoconf, you may include it under
27# the same distribution terms that you use for the rest of that program. 23# the same distribution terms that you use for the rest of that
28 24# program. This Exception is an additional permission under section 7
29 25# of the GNU General Public License, version 3 ("GPLv3").
30# Originally written by Per Bothner. Please send patches (context
31# diff format) to <config-patches@gnu.org> and include a ChangeLog
32# entry.
33# 26#
34# This script attempts to guess a canonical system name similar to 27# Originally written by Per Bothner.
35# config.sub. If it succeeds, it prints the system name on stdout, and
36# exits with 0. Otherwise, it exits with 1.
37# 28#
38# You can get the latest version of this script from: 29# You can get the latest version of this script from:
39# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 30# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
31#
32# Please send patches with a ChangeLog entry to config-patches@gnu.org.
33
40 34
41me=`echo "$0" | sed -e 's,.*/,,'` 35me=`echo "$0" | sed -e 's,.*/,,'`
42 36
43usage="\ 37usage="\
44Usage: $0 [OPTION] 38Usage: $0 [OPTION]
54 48
55version="\ 49version="\
56GNU config.guess ($timestamp) 50GNU config.guess ($timestamp)
57 51
58Originally written by Per Bothner. 52Originally written by Per Bothner.
59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 53Copyright 1992-2014 Free Software Foundation, Inc.
602001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
61Software Foundation, Inc.
62 54
63This is free software; see the source for copying conditions. There is NO 55This is free software; see the source for copying conditions. There is NO
64warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 56warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
65 57
66help=" 58help="
138UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 130UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
139UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 131UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
140UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 132UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
141UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 133UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
142 134
135case "${UNAME_SYSTEM}" in
136Linux|GNU|GNU/*)
137 # If the system lacks a compiler, then just pick glibc.
138 # We could probably try harder.
139 LIBC=gnu
140
141 eval $set_cc_for_build
142 cat <<-EOF > $dummy.c
143 #include <features.h>
144 #if defined(__UCLIBC__)
145 LIBC=uclibc
146 #elif defined(__dietlibc__)
147 LIBC=dietlibc
148 #else
149 LIBC=gnu
150 #endif
151 EOF
152 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
153 ;;
154esac
155
143# Note: order is significant - the case branches are not exclusive. 156# Note: order is significant - the case branches are not exclusive.
144 157
145case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 158case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
146 *:NetBSD:*:*) 159 *:NetBSD:*:*)
147 # NetBSD (nbsd) targets should (where applicable) match one or 160 # NetBSD (nbsd) targets should (where applicable) match one or
148 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 161 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
149 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 162 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
150 # switched to ELF, *-*-netbsd* would select the old 163 # switched to ELF, *-*-netbsd* would select the old
151 # object file format. This provides both forward 164 # object file format. This provides both forward
152 # compatibility and a consistent mechanism for selecting the 165 # compatibility and a consistent mechanism for selecting the
153 # object file format. 166 # object file format.
179 else 192 else
180 os=netbsdelf 193 os=netbsdelf
181 fi 194 fi
182 ;; 195 ;;
183 *) 196 *)
184 os=netbsd 197 os=netbsd
185 ;; 198 ;;
186 esac 199 esac
187 # The OS release 200 # The OS release
188 # Debian GNU/NetBSD machines have a different userland, and 201 # Debian GNU/NetBSD machines have a different userland, and
189 # thus, need a distinct triplet. However, they do not need 202 # thus, need a distinct triplet. However, they do not need
200 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 213 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
201 # contains redundant information, the shorter form: 214 # contains redundant information, the shorter form:
202 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 215 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
203 echo "${machine}-${os}${release}" 216 echo "${machine}-${os}${release}"
204 exit ;; 217 exit ;;
218 *:Bitrig:*:*)
219 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
220 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
221 exit ;;
205 *:OpenBSD:*:*) 222 *:OpenBSD:*:*)
206 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 223 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
207 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 224 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
208 exit ;; 225 exit ;;
209 *:ekkoBSD:*:*) 226 *:ekkoBSD:*:*)
222 case $UNAME_RELEASE in 239 case $UNAME_RELEASE in
223 *4.0) 240 *4.0)
224 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 241 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
225 ;; 242 ;;
226 *5.*) 243 *5.*)
227 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 244 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
228 ;; 245 ;;
229 esac 246 esac
230 # According to Compaq, /usr/sbin/psrinfo has been available on 247 # According to Compaq, /usr/sbin/psrinfo has been available on
231 # OSF/1 and Tru64 systems produced since 1995. I hope that 248 # OSF/1 and Tru64 systems produced since 1995. I hope that
232 # covers most systems running today. This code pipes the CPU 249 # covers most systems running today. This code pipes the CPU
268 # A Vn.n version is a released version. 285 # A Vn.n version is a released version.
269 # A Tn.n version is a released field test version. 286 # A Tn.n version is a released field test version.
270 # A Xn.n version is an unreleased experimental baselevel. 287 # A Xn.n version is an unreleased experimental baselevel.
271 # 1.2 uses "1.2" for uname -r. 288 # 1.2 uses "1.2" for uname -r.
272 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 289 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
273 exit ;; 290 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
291 exitcode=$?
292 trap '' 0
293 exit $exitcode ;;
274 Alpha\ *:Windows_NT*:*) 294 Alpha\ *:Windows_NT*:*)
275 # How do we know it's Interix rather than the generic POSIX subsystem? 295 # How do we know it's Interix rather than the generic POSIX subsystem?
276 # Should we change UNAME_MACHINE based on the output of uname instead 296 # Should we change UNAME_MACHINE based on the output of uname instead
277 # of the specific Alpha model? 297 # of the specific Alpha model?
278 echo alpha-pc-interix 298 echo alpha-pc-interix
294 exit ;; 314 exit ;;
295 *:z/VM:*:*) 315 *:z/VM:*:*)
296 echo s390-ibm-zvmoe 316 echo s390-ibm-zvmoe
297 exit ;; 317 exit ;;
298 *:OS400:*:*) 318 *:OS400:*:*)
299 echo powerpc-ibm-os400 319 echo powerpc-ibm-os400
300 exit ;; 320 exit ;;
301 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 321 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
302 echo arm-acorn-riscix${UNAME_RELEASE} 322 echo arm-acorn-riscix${UNAME_RELEASE}
303 exit ;; 323 exit ;;
304 arm:riscos:*:*|arm:RISCOS:*:*) 324 arm*:riscos:*:*|arm*:RISCOS:*:*)
305 echo arm-unknown-riscos 325 echo arm-unknown-riscos
306 exit ;; 326 exit ;;
307 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 327 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
308 echo hppa1.1-hitachi-hiuxmpp 328 echo hppa1.1-hitachi-hiuxmpp
309 exit ;; 329 exit ;;
393 # to the lowercase version "mint" (or "freemint"). Finally 413 # to the lowercase version "mint" (or "freemint"). Finally
394 # the system name "TOS" denotes a system which is actually not 414 # the system name "TOS" denotes a system which is actually not
395 # MiNT. But MiNT is downward compatible to TOS, so this should 415 # MiNT. But MiNT is downward compatible to TOS, so this should
396 # be no problem. 416 # be no problem.
397 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 417 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
398 echo m68k-atari-mint${UNAME_RELEASE} 418 echo m68k-atari-mint${UNAME_RELEASE}
399 exit ;; 419 exit ;;
400 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 420 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
401 echo m68k-atari-mint${UNAME_RELEASE} 421 echo m68k-atari-mint${UNAME_RELEASE}
402 exit ;; 422 exit ;;
403 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 423 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
404 echo m68k-atari-mint${UNAME_RELEASE} 424 echo m68k-atari-mint${UNAME_RELEASE}
405 exit ;; 425 exit ;;
406 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 426 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
407 echo m68k-milan-mint${UNAME_RELEASE} 427 echo m68k-milan-mint${UNAME_RELEASE}
408 exit ;; 428 exit ;;
409 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 429 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
410 echo m68k-hades-mint${UNAME_RELEASE} 430 echo m68k-hades-mint${UNAME_RELEASE}
411 exit ;; 431 exit ;;
412 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 432 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
413 echo m68k-unknown-mint${UNAME_RELEASE} 433 echo m68k-unknown-mint${UNAME_RELEASE}
414 exit ;; 434 exit ;;
415 m68k:machten:*:*) 435 m68k:machten:*:*)
416 echo m68k-apple-machten${UNAME_RELEASE} 436 echo m68k-apple-machten${UNAME_RELEASE}
417 exit ;; 437 exit ;;
418 powerpc:machten:*:*) 438 powerpc:machten:*:*)
419 echo powerpc-apple-machten${UNAME_RELEASE} 439 echo powerpc-apple-machten${UNAME_RELEASE}
479 exit ;; 499 exit ;;
480 m88k:*:3*:R3*) 500 m88k:*:3*:R3*)
481 echo m88k-motorola-sysv3 501 echo m88k-motorola-sysv3
482 exit ;; 502 exit ;;
483 AViiON:dgux:*:*) 503 AViiON:dgux:*:*)
484 # DG/UX returns AViiON for all architectures 504 # DG/UX returns AViiON for all architectures
485 UNAME_PROCESSOR=`/usr/bin/uname -p` 505 UNAME_PROCESSOR=`/usr/bin/uname -p`
486 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 506 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
487 then 507 then
488 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 508 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
489 [ ${TARGET_BINARY_INTERFACE}x = x ] 509 [ ${TARGET_BINARY_INTERFACE}x = x ]
490 then 510 then
493 echo m88k-dg-dguxbcs${UNAME_RELEASE} 513 echo m88k-dg-dguxbcs${UNAME_RELEASE}
494 fi 514 fi
495 else 515 else
496 echo i586-dg-dgux${UNAME_RELEASE} 516 echo i586-dg-dgux${UNAME_RELEASE}
497 fi 517 fi
498 exit ;; 518 exit ;;
499 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 519 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
500 echo m88k-dolphin-sysv3 520 echo m88k-dolphin-sysv3
501 exit ;; 521 exit ;;
502 M88*:*:R3*:*) 522 M88*:*:R3*:*)
503 # Delta 88k system running SVR3 523 # Delta 88k system running SVR3
550 echo rs6000-ibm-aix3.2.4 570 echo rs6000-ibm-aix3.2.4
551 else 571 else
552 echo rs6000-ibm-aix3.2 572 echo rs6000-ibm-aix3.2
553 fi 573 fi
554 exit ;; 574 exit ;;
555 *:AIX:*:[456]) 575 *:AIX:*:[4567])
556 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 576 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
557 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 577 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
558 IBM_ARCH=rs6000 578 IBM_ARCH=rs6000
559 else 579 else
560 IBM_ARCH=powerpc 580 IBM_ARCH=powerpc
593 9000/31? ) HP_ARCH=m68000 ;; 613 9000/31? ) HP_ARCH=m68000 ;;
594 9000/[34]?? ) HP_ARCH=m68k ;; 614 9000/[34]?? ) HP_ARCH=m68k ;;
595 9000/[678][0-9][0-9]) 615 9000/[678][0-9][0-9])
596 if [ -x /usr/bin/getconf ]; then 616 if [ -x /usr/bin/getconf ]; then
597 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 617 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
598 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 618 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
599 case "${sc_cpu_version}" in 619 case "${sc_cpu_version}" in
600 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 620 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
601 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 621 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
602 532) # CPU_PA_RISC2_0 622 532) # CPU_PA_RISC2_0
603 case "${sc_kernel_bits}" in 623 case "${sc_kernel_bits}" in
604 32) HP_ARCH="hppa2.0n" ;; 624 32) HP_ARCH="hppa2.0n" ;;
605 64) HP_ARCH="hppa2.0w" ;; 625 64) HP_ARCH="hppa2.0w" ;;
606 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 626 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
607 esac ;; 627 esac ;;
608 esac 628 esac
609 fi 629 fi
610 if [ "${HP_ARCH}" = "" ]; then 630 if [ "${HP_ARCH}" = "" ]; then
611 eval $set_cc_for_build 631 eval $set_cc_for_build
612 sed 's/^ //' << EOF >$dummy.c 632 sed 's/^ //' << EOF >$dummy.c
613 633
614 #define _HPUX_SOURCE 634 #define _HPUX_SOURCE
615 #include <stdlib.h> 635 #include <stdlib.h>
616 #include <unistd.h> 636 #include <unistd.h>
617 637
618 int main () 638 int main ()
619 { 639 {
620 #if defined(_SC_KERNEL_BITS) 640 #if defined(_SC_KERNEL_BITS)
621 long bits = sysconf(_SC_KERNEL_BITS); 641 long bits = sysconf(_SC_KERNEL_BITS);
622 #endif 642 #endif
623 long cpu = sysconf (_SC_CPU_VERSION); 643 long cpu = sysconf (_SC_CPU_VERSION);
624 644
625 switch (cpu) 645 switch (cpu)
626 { 646 {
627 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 647 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
628 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 648 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629 case CPU_PA_RISC2_0: 649 case CPU_PA_RISC2_0:
630 #if defined(_SC_KERNEL_BITS) 650 #if defined(_SC_KERNEL_BITS)
631 switch (bits) 651 switch (bits)
632 { 652 {
633 case 64: puts ("hppa2.0w"); break; 653 case 64: puts ("hppa2.0w"); break;
634 case 32: puts ("hppa2.0n"); break; 654 case 32: puts ("hppa2.0n"); break;
635 default: puts ("hppa2.0"); break; 655 default: puts ("hppa2.0"); break;
636 } break; 656 } break;
637 #else /* !defined(_SC_KERNEL_BITS) */ 657 #else /* !defined(_SC_KERNEL_BITS) */
638 puts ("hppa2.0"); break; 658 puts ("hppa2.0"); break;
639 #endif 659 #endif
640 default: puts ("hppa1.0"); break; 660 default: puts ("hppa1.0"); break;
641 } 661 }
642 exit (0); 662 exit (0);
643 } 663 }
644EOF 664EOF
645 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 665 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
646 test -z "$HP_ARCH" && HP_ARCH=hppa 666 test -z "$HP_ARCH" && HP_ARCH=hppa
647 fi ;; 667 fi ;;
648 esac 668 esac
729 parisc*:Lites*:*:*) 749 parisc*:Lites*:*:*)
730 echo hppa1.1-hp-lites 750 echo hppa1.1-hp-lites
731 exit ;; 751 exit ;;
732 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 752 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
733 echo c1-convex-bsd 753 echo c1-convex-bsd
734 exit ;; 754 exit ;;
735 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 755 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
736 if getsysinfo -f scalar_acc 756 if getsysinfo -f scalar_acc
737 then echo c32-convex-bsd 757 then echo c32-convex-bsd
738 else echo c2-convex-bsd 758 else echo c2-convex-bsd
739 fi 759 fi
740 exit ;; 760 exit ;;
741 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 761 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
742 echo c34-convex-bsd 762 echo c34-convex-bsd
743 exit ;; 763 exit ;;
744 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 764 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
745 echo c38-convex-bsd 765 echo c38-convex-bsd
746 exit ;; 766 exit ;;
747 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 767 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
748 echo c4-convex-bsd 768 echo c4-convex-bsd
749 exit ;; 769 exit ;;
750 CRAY*Y-MP:*:*:*) 770 CRAY*Y-MP:*:*:*)
751 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 771 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
752 exit ;; 772 exit ;;
753 CRAY*[A-Z]90:*:*:*) 773 CRAY*[A-Z]90:*:*:*)
754 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 774 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
768 *:UNICOS/mp:*:*) 788 *:UNICOS/mp:*:*)
769 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 789 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
770 exit ;; 790 exit ;;
771 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 791 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
772 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 792 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
773 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 793 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 794 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
775 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 795 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776 exit ;; 796 exit ;;
777 5000:UNIX_System_V:4.*:*) 797 5000:UNIX_System_V:4.*:*)
778 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 798 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
779 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 799 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
780 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 800 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781 exit ;; 801 exit ;;
782 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 802 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
783 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 803 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
784 exit ;; 804 exit ;;
785 sparc*:BSD/OS:*:*) 805 sparc*:BSD/OS:*:*)
787 exit ;; 807 exit ;;
788 *:BSD/OS:*:*) 808 *:BSD/OS:*:*)
789 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 809 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
790 exit ;; 810 exit ;;
791 *:FreeBSD:*:*) 811 *:FreeBSD:*:*)
812 UNAME_PROCESSOR=`/usr/bin/uname -p`
792 case ${UNAME_MACHINE} in 813 case ${UNAME_PROCESSOR} in
793 pc98)
794 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
795 amd64) 814 amd64)
796 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 815 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797 *) 816 *)
798 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 817 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
799 esac 818 esac
800 exit ;; 819 exit ;;
801 i*:CYGWIN*:*) 820 i*:CYGWIN*:*)
802 echo ${UNAME_MACHINE}-pc-cygwin 821 echo ${UNAME_MACHINE}-pc-cygwin
803 exit ;; 822 exit ;;
823 *:MINGW64*:*)
824 echo ${UNAME_MACHINE}-pc-mingw64
825 exit ;;
804 *:MINGW*:*) 826 *:MINGW*:*)
805 echo ${UNAME_MACHINE}-pc-mingw32 827 echo ${UNAME_MACHINE}-pc-mingw32
806 exit ;; 828 exit ;;
829 *:MSYS*:*)
830 echo ${UNAME_MACHINE}-pc-msys
831 exit ;;
807 i*:windows32*:*) 832 i*:windows32*:*)
808 # uname -m includes "-pc" on this system. 833 # uname -m includes "-pc" on this system.
809 echo ${UNAME_MACHINE}-mingw32 834 echo ${UNAME_MACHINE}-mingw32
810 exit ;; 835 exit ;;
811 i*:PW*:*) 836 i*:PW*:*)
812 echo ${UNAME_MACHINE}-pc-pw32 837 echo ${UNAME_MACHINE}-pc-pw32
813 exit ;; 838 exit ;;
814 *:Interix*:*) 839 *:Interix*:*)
815 case ${UNAME_MACHINE} in 840 case ${UNAME_MACHINE} in
816 x86) 841 x86)
817 echo i586-pc-interix${UNAME_RELEASE} 842 echo i586-pc-interix${UNAME_RELEASE}
818 exit ;; 843 exit ;;
819 authenticamd | genuineintel | EM64T) 844 authenticamd | genuineintel | EM64T)
820 echo x86_64-unknown-interix${UNAME_RELEASE} 845 echo x86_64-unknown-interix${UNAME_RELEASE}
847 prep*:SunOS:5.*:*) 872 prep*:SunOS:5.*:*)
848 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 873 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
849 exit ;; 874 exit ;;
850 *:GNU:*:*) 875 *:GNU:*:*)
851 # the GNU system 876 # the GNU system
852 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 877 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
853 exit ;; 878 exit ;;
854 *:GNU/*:*:*) 879 *:GNU/*:*:*)
855 # other systems with GNU libc and userland 880 # other systems with GNU libc and userland
856 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 881 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
857 exit ;; 882 exit ;;
858 i*86:Minix:*:*) 883 i*86:Minix:*:*)
859 echo ${UNAME_MACHINE}-pc-minix 884 echo ${UNAME_MACHINE}-pc-minix
885 exit ;;
886 aarch64:Linux:*:*)
887 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
888 exit ;;
889 aarch64_be:Linux:*:*)
890 UNAME_MACHINE=aarch64_be
891 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
860 exit ;; 892 exit ;;
861 alpha:Linux:*:*) 893 alpha:Linux:*:*)
862 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 894 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
863 EV5) UNAME_MACHINE=alphaev5 ;; 895 EV5) UNAME_MACHINE=alphaev5 ;;
864 EV56) UNAME_MACHINE=alphaev56 ;; 896 EV56) UNAME_MACHINE=alphaev56 ;;
865 PCA56) UNAME_MACHINE=alphapca56 ;; 897 PCA56) UNAME_MACHINE=alphapca56 ;;
866 PCA57) UNAME_MACHINE=alphapca56 ;; 898 PCA57) UNAME_MACHINE=alphapca56 ;;
867 EV6) UNAME_MACHINE=alphaev6 ;; 899 EV6) UNAME_MACHINE=alphaev6 ;;
868 EV67) UNAME_MACHINE=alphaev67 ;; 900 EV67) UNAME_MACHINE=alphaev67 ;;
869 EV68*) UNAME_MACHINE=alphaev68 ;; 901 EV68*) UNAME_MACHINE=alphaev68 ;;
870 esac 902 esac
871 objdump --private-headers /bin/sh | grep -q ld.so.1 903 objdump --private-headers /bin/sh | grep -q ld.so.1
872 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 904 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
873 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 905 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
906 exit ;;
907 arc:Linux:*:* | arceb:Linux:*:*)
908 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
874 exit ;; 909 exit ;;
875 arm*:Linux:*:*) 910 arm*:Linux:*:*)
876 eval $set_cc_for_build 911 eval $set_cc_for_build
877 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 912 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
878 | grep -q __ARM_EABI__ 913 | grep -q __ARM_EABI__
879 then 914 then
880 echo ${UNAME_MACHINE}-unknown-linux-gnu 915 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
881 else 916 else
917 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
918 | grep -q __ARM_PCS_VFP
919 then
882 echo ${UNAME_MACHINE}-unknown-linux-gnueabi 920 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
921 else
922 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
923 fi
883 fi 924 fi
884 exit ;; 925 exit ;;
885 avr32*:Linux:*:*) 926 avr32*:Linux:*:*)
886 echo ${UNAME_MACHINE}-unknown-linux-gnu 927 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
887 exit ;; 928 exit ;;
888 cris:Linux:*:*) 929 cris:Linux:*:*)
889 echo cris-axis-linux-gnu 930 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
890 exit ;; 931 exit ;;
891 crisv32:Linux:*:*) 932 crisv32:Linux:*:*)
892 echo crisv32-axis-linux-gnu 933 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
893 exit ;; 934 exit ;;
894 frv:Linux:*:*) 935 frv:Linux:*:*)
895 echo frv-unknown-linux-gnu 936 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
937 exit ;;
938 hexagon:Linux:*:*)
939 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
896 exit ;; 940 exit ;;
897 i*86:Linux:*:*) 941 i*86:Linux:*:*)
898 LIBC=gnu
899 eval $set_cc_for_build
900 sed 's/^ //' << EOF >$dummy.c
901 #ifdef __dietlibc__
902 LIBC=dietlibc
903 #endif
904EOF
905 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
906 echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 942 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
907 exit ;; 943 exit ;;
908 ia64:Linux:*:*) 944 ia64:Linux:*:*)
909 echo ${UNAME_MACHINE}-unknown-linux-gnu 945 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
910 exit ;; 946 exit ;;
911 m32r*:Linux:*:*) 947 m32r*:Linux:*:*)
912 echo ${UNAME_MACHINE}-unknown-linux-gnu 948 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
913 exit ;; 949 exit ;;
914 m68*:Linux:*:*) 950 m68*:Linux:*:*)
915 echo ${UNAME_MACHINE}-unknown-linux-gnu 951 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
916 exit ;; 952 exit ;;
917 mips:Linux:*:* | mips64:Linux:*:*) 953 mips:Linux:*:* | mips64:Linux:*:*)
918 eval $set_cc_for_build 954 eval $set_cc_for_build
919 sed 's/^ //' << EOF >$dummy.c 955 sed 's/^ //' << EOF >$dummy.c
920 #undef CPU 956 #undef CPU
929 CPU= 965 CPU=
930 #endif 966 #endif
931 #endif 967 #endif
932EOF 968EOF
933 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 969 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
934 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 970 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
935 ;; 971 ;;
936 or32:Linux:*:*) 972 openrisc*:Linux:*:*)
937 echo or32-unknown-linux-gnu 973 echo or1k-unknown-linux-${LIBC}
974 exit ;;
975 or32:Linux:*:* | or1k*:Linux:*:*)
976 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
938 exit ;; 977 exit ;;
939 padre:Linux:*:*) 978 padre:Linux:*:*)
940 echo sparc-unknown-linux-gnu 979 echo sparc-unknown-linux-${LIBC}
941 exit ;; 980 exit ;;
942 parisc64:Linux:*:* | hppa64:Linux:*:*) 981 parisc64:Linux:*:* | hppa64:Linux:*:*)
943 echo hppa64-unknown-linux-gnu 982 echo hppa64-unknown-linux-${LIBC}
944 exit ;; 983 exit ;;
945 parisc:Linux:*:* | hppa:Linux:*:*) 984 parisc:Linux:*:* | hppa:Linux:*:*)
946 # Look for CPU level 985 # Look for CPU level
947 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 986 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
948 PA7*) echo hppa1.1-unknown-linux-gnu ;; 987 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
949 PA8*) echo hppa2.0-unknown-linux-gnu ;; 988 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
950 *) echo hppa-unknown-linux-gnu ;; 989 *) echo hppa-unknown-linux-${LIBC} ;;
951 esac 990 esac
952 exit ;; 991 exit ;;
953 ppc64:Linux:*:*) 992 ppc64:Linux:*:*)
954 echo powerpc64-unknown-linux-gnu 993 echo powerpc64-unknown-linux-${LIBC}
955 exit ;; 994 exit ;;
956 ppc:Linux:*:*) 995 ppc:Linux:*:*)
957 echo powerpc-unknown-linux-gnu 996 echo powerpc-unknown-linux-${LIBC}
997 exit ;;
998 ppc64le:Linux:*:*)
999 echo powerpc64le-unknown-linux-${LIBC}
1000 exit ;;
1001 ppcle:Linux:*:*)
1002 echo powerpcle-unknown-linux-${LIBC}
958 exit ;; 1003 exit ;;
959 s390:Linux:*:* | s390x:Linux:*:*) 1004 s390:Linux:*:* | s390x:Linux:*:*)
960 echo ${UNAME_MACHINE}-ibm-linux 1005 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
961 exit ;; 1006 exit ;;
962 sh64*:Linux:*:*) 1007 sh64*:Linux:*:*)
963 echo ${UNAME_MACHINE}-unknown-linux-gnu 1008 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
964 exit ;; 1009 exit ;;
965 sh*:Linux:*:*) 1010 sh*:Linux:*:*)
966 echo ${UNAME_MACHINE}-unknown-linux-gnu 1011 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
967 exit ;; 1012 exit ;;
968 sparc:Linux:*:* | sparc64:Linux:*:*) 1013 sparc:Linux:*:* | sparc64:Linux:*:*)
969 echo ${UNAME_MACHINE}-unknown-linux-gnu 1014 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1015 exit ;;
1016 tile*:Linux:*:*)
1017 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
970 exit ;; 1018 exit ;;
971 vax:Linux:*:*) 1019 vax:Linux:*:*)
972 echo ${UNAME_MACHINE}-dec-linux-gnu 1020 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
973 exit ;; 1021 exit ;;
974 x86_64:Linux:*:*) 1022 x86_64:Linux:*:*)
975 echo x86_64-unknown-linux-gnu 1023 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
976 exit ;; 1024 exit ;;
977 xtensa*:Linux:*:*) 1025 xtensa*:Linux:*:*)
978 echo ${UNAME_MACHINE}-unknown-linux-gnu 1026 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
979 exit ;; 1027 exit ;;
980 i*86:DYNIX/ptx:4*:*) 1028 i*86:DYNIX/ptx:4*:*)
981 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1029 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
982 # earlier versions are messed up and put the nodename in both 1030 # earlier versions are messed up and put the nodename in both
983 # sysname and nodename. 1031 # sysname and nodename.
984 echo i386-sequent-sysv4 1032 echo i386-sequent-sysv4
985 exit ;; 1033 exit ;;
986 i*86:UNIX_SV:4.2MP:2.*) 1034 i*86:UNIX_SV:4.2MP:2.*)
987 # Unixware is an offshoot of SVR4, but it has its own version 1035 # Unixware is an offshoot of SVR4, but it has its own version
988 # number series starting with 2... 1036 # number series starting with 2...
989 # I am not positive that other SVR4 systems won't match this, 1037 # I am not positive that other SVR4 systems won't match this,
990 # I just have to hope. -- rms. 1038 # I just have to hope. -- rms.
991 # Use sysv4.2uw... so that sysv4* matches it. 1039 # Use sysv4.2uw... so that sysv4* matches it.
992 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1040 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
993 exit ;; 1041 exit ;;
994 i*86:OS/2:*:*) 1042 i*86:OS/2:*:*)
995 # If we were able to find `uname', then EMX Unix compatibility 1043 # If we were able to find `uname', then EMX Unix compatibility
996 # is probably installed. 1044 # is probably installed.
1018 else 1066 else
1019 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1067 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1020 fi 1068 fi
1021 exit ;; 1069 exit ;;
1022 i*86:*:5:[678]*) 1070 i*86:*:5:[678]*)
1023 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1071 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1024 case `/bin/uname -X | grep "^Machine"` in 1072 case `/bin/uname -X | grep "^Machine"` in
1025 *486*) UNAME_MACHINE=i486 ;; 1073 *486*) UNAME_MACHINE=i486 ;;
1026 *Pentium) UNAME_MACHINE=i586 ;; 1074 *Pentium) UNAME_MACHINE=i586 ;;
1027 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1075 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1028 esac 1076 esac
1046 echo ${UNAME_MACHINE}-pc-sysv32 1094 echo ${UNAME_MACHINE}-pc-sysv32
1047 fi 1095 fi
1048 exit ;; 1096 exit ;;
1049 pc:*:*:*) 1097 pc:*:*:*)
1050 # Left here for compatibility: 1098 # Left here for compatibility:
1051 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1099 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1052 # the processor, so we play safe by assuming i586. 1100 # the processor, so we play safe by assuming i586.
1053 # Note: whatever this is, it MUST be the same as what config.sub 1101 # Note: whatever this is, it MUST be the same as what config.sub
1054 # prints for the "djgpp" host, or else GDB configury will decide that 1102 # prints for the "djgpp" host, or else GDB configury will decide that
1055 # this is a cross-build. 1103 # this is a cross-build.
1056 echo i586-pc-msdosdjgpp 1104 echo i586-pc-msdosdjgpp
1057 exit ;; 1105 exit ;;
1058 Intel:Mach:3*:*) 1106 Intel:Mach:3*:*)
1059 echo i386-pc-mach3 1107 echo i386-pc-mach3
1060 exit ;; 1108 exit ;;
1061 paragon:*:*:*) 1109 paragon:*:*:*)
1062 echo i860-intel-osf1 1110 echo i860-intel-osf1
1087 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1135 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1088 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1136 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1089 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1137 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1090 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1138 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1091 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1139 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1092 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1140 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1093 && { echo i486-ncr-sysv4; exit; } ;; 1141 && { echo i486-ncr-sysv4; exit; } ;;
1094 NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1142 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1095 OS_REL='.3' 1143 OS_REL='.3'
1096 test -r /etc/.relid \ 1144 test -r /etc/.relid \
1097 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1145 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1098 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1146 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1131 echo ${UNAME_MACHINE}-sni-sysv4 1179 echo ${UNAME_MACHINE}-sni-sysv4
1132 else 1180 else
1133 echo ns32k-sni-sysv 1181 echo ns32k-sni-sysv
1134 fi 1182 fi
1135 exit ;; 1183 exit ;;
1136 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1184 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1137 # says <Richard.M.Bartel@ccMail.Census.GOV> 1185 # says <Richard.M.Bartel@ccMail.Census.GOV>
1138 echo i586-unisys-sysv4 1186 echo i586-unisys-sysv4
1139 exit ;; 1187 exit ;;
1140 *:UNIX_System_V:4*:FTX*) 1188 *:UNIX_System_V:4*:FTX*)
1141 # From Gerald Hewes <hewes@openmarket.com>. 1189 # From Gerald Hewes <hewes@openmarket.com>.
1142 # How about differentiating between stratus architectures? -djm 1190 # How about differentiating between stratus architectures? -djm
1143 echo hppa1.1-stratus-sysv4 1191 echo hppa1.1-stratus-sysv4
1144 exit ;; 1192 exit ;;
1160 news*:NEWS-OS:6*:*) 1208 news*:NEWS-OS:6*:*)
1161 echo mips-sony-newsos6 1209 echo mips-sony-newsos6
1162 exit ;; 1210 exit ;;
1163 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1211 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1164 if [ -d /usr/nec ]; then 1212 if [ -d /usr/nec ]; then
1165 echo mips-nec-sysv${UNAME_RELEASE} 1213 echo mips-nec-sysv${UNAME_RELEASE}
1166 else 1214 else
1167 echo mips-unknown-sysv${UNAME_RELEASE} 1215 echo mips-unknown-sysv${UNAME_RELEASE}
1168 fi 1216 fi
1169 exit ;; 1217 exit ;;
1170 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1218 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1171 echo powerpc-be-beos 1219 echo powerpc-be-beos
1172 exit ;; 1220 exit ;;
1173 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1221 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1174 echo powerpc-apple-beos 1222 echo powerpc-apple-beos
1177 echo i586-pc-beos 1225 echo i586-pc-beos
1178 exit ;; 1226 exit ;;
1179 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1227 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1180 echo i586-pc-haiku 1228 echo i586-pc-haiku
1181 exit ;; 1229 exit ;;
1230 x86_64:Haiku:*:*)
1231 echo x86_64-unknown-haiku
1232 exit ;;
1182 SX-4:SUPER-UX:*:*) 1233 SX-4:SUPER-UX:*:*)
1183 echo sx4-nec-superux${UNAME_RELEASE} 1234 echo sx4-nec-superux${UNAME_RELEASE}
1184 exit ;; 1235 exit ;;
1185 SX-5:SUPER-UX:*:*) 1236 SX-5:SUPER-UX:*:*)
1186 echo sx5-nec-superux${UNAME_RELEASE} 1237 echo sx5-nec-superux${UNAME_RELEASE}
1203 *:Rhapsody:*:*) 1254 *:Rhapsody:*:*)
1204 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1255 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1205 exit ;; 1256 exit ;;
1206 *:Darwin:*:*) 1257 *:Darwin:*:*)
1207 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1258 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1208 case $UNAME_PROCESSOR in
1209 i386)
1210 eval $set_cc_for_build 1259 eval $set_cc_for_build
1260 if test "$UNAME_PROCESSOR" = unknown ; then
1261 UNAME_PROCESSOR=powerpc
1262 fi
1263 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1211 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1264 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1212 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1265 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1213 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1266 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1214 grep IS_64BIT_ARCH >/dev/null 1267 grep IS_64BIT_ARCH >/dev/null
1215 then 1268 then
1269 case $UNAME_PROCESSOR in
1270 i386) UNAME_PROCESSOR=x86_64 ;;
1271 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1272 esac
1273 fi
1274 fi
1275 elif test "$UNAME_PROCESSOR" = i386 ; then
1276 # Avoid executing cc on OS X 10.9, as it ships with a stub
1277 # that puts up a graphical alert prompting to install
1278 # developer tools. Any system running Mac OS X 10.7 or
1279 # later (Darwin 11 and later) is required to have a 64-bit
1280 # processor. This is not true of the ARM version of Darwin
1281 # that Apple uses in portable devices.
1216 UNAME_PROCESSOR="x86_64" 1282 UNAME_PROCESSOR=x86_64
1217 fi 1283 fi
1218 fi ;;
1219 unknown) UNAME_PROCESSOR=powerpc ;;
1220 esac
1221 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1284 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1222 exit ;; 1285 exit ;;
1223 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1286 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1224 UNAME_PROCESSOR=`uname -p` 1287 UNAME_PROCESSOR=`uname -p`
1225 if test "$UNAME_PROCESSOR" = "x86"; then 1288 if test "$UNAME_PROCESSOR" = "x86"; then
1229 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1292 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1230 exit ;; 1293 exit ;;
1231 *:QNX:*:4*) 1294 *:QNX:*:4*)
1232 echo i386-pc-qnx 1295 echo i386-pc-qnx
1233 exit ;; 1296 exit ;;
1234 NSE-?:NONSTOP_KERNEL:*:*) 1297 NEO-?:NONSTOP_KERNEL:*:*)
1298 echo neo-tandem-nsk${UNAME_RELEASE}
1299 exit ;;
1300 NSE-*:NONSTOP_KERNEL:*:*)
1235 echo nse-tandem-nsk${UNAME_RELEASE} 1301 echo nse-tandem-nsk${UNAME_RELEASE}
1236 exit ;; 1302 exit ;;
1237 NSR-?:NONSTOP_KERNEL:*:*) 1303 NSR-?:NONSTOP_KERNEL:*:*)
1238 echo nsr-tandem-nsk${UNAME_RELEASE} 1304 echo nsr-tandem-nsk${UNAME_RELEASE}
1239 exit ;; 1305 exit ;;
1274 exit ;; 1340 exit ;;
1275 *:ITS:*:*) 1341 *:ITS:*:*)
1276 echo pdp10-unknown-its 1342 echo pdp10-unknown-its
1277 exit ;; 1343 exit ;;
1278 SEI:*:*:SEIUX) 1344 SEI:*:*:SEIUX)
1279 echo mips-sei-seiux${UNAME_RELEASE} 1345 echo mips-sei-seiux${UNAME_RELEASE}
1280 exit ;; 1346 exit ;;
1281 *:DragonFly:*:*) 1347 *:DragonFly:*:*)
1282 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1348 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1283 exit ;; 1349 exit ;;
1284 *:*VMS:*:*) 1350 *:*VMS:*:*)
1285 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1351 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1286 case "${UNAME_MACHINE}" in 1352 case "${UNAME_MACHINE}" in
1287 A*) echo alpha-dec-vms ; exit ;; 1353 A*) echo alpha-dec-vms ; exit ;;
1288 I*) echo ia64-dec-vms ; exit ;; 1354 I*) echo ia64-dec-vms ; exit ;;
1289 V*) echo vax-dec-vms ; exit ;; 1355 V*) echo vax-dec-vms ; exit ;;
1290 esac ;; 1356 esac ;;
1298 echo ${UNAME_MACHINE}-pc-rdos 1364 echo ${UNAME_MACHINE}-pc-rdos
1299 exit ;; 1365 exit ;;
1300 i*86:AROS:*:*) 1366 i*86:AROS:*:*)
1301 echo ${UNAME_MACHINE}-pc-aros 1367 echo ${UNAME_MACHINE}-pc-aros
1302 exit ;; 1368 exit ;;
1369 x86_64:VMkernel:*:*)
1370 echo ${UNAME_MACHINE}-unknown-esx
1371 exit ;;
1303esac 1372esac
1304
1305#echo '(No uname command or uname output not recognized.)' 1>&2
1306#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1307
1308eval $set_cc_for_build
1309cat >$dummy.c <<EOF
1310#ifdef _SEQUENT_
1311# include <sys/types.h>
1312# include <sys/utsname.h>
1313#endif
1314main ()
1315{
1316#if defined (sony)
1317#if defined (MIPSEB)
1318 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1319 I don't know.... */
1320 printf ("mips-sony-bsd\n"); exit (0);
1321#else
1322#include <sys/param.h>
1323 printf ("m68k-sony-newsos%s\n",
1324#ifdef NEWSOS4
1325 "4"
1326#else
1327 ""
1328#endif
1329 ); exit (0);
1330#endif
1331#endif
1332
1333#if defined (__arm) && defined (__acorn) && defined (__unix)
1334 printf ("arm-acorn-riscix\n"); exit (0);
1335#endif
1336
1337#if defined (hp300) && !defined (hpux)
1338 printf ("m68k-hp-bsd\n"); exit (0);
1339#endif
1340
1341#if defined (NeXT)
1342#if !defined (__ARCHITECTURE__)
1343#define __ARCHITECTURE__ "m68k"
1344#endif
1345 int version;
1346 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1347 if (version < 4)
1348 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1349 else
1350 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1351 exit (0);
1352#endif
1353
1354#if defined (MULTIMAX) || defined (n16)
1355#if defined (UMAXV)
1356 printf ("ns32k-encore-sysv\n"); exit (0);
1357#else
1358#if defined (CMU)
1359 printf ("ns32k-encore-mach\n"); exit (0);
1360#else
1361 printf ("ns32k-encore-bsd\n"); exit (0);
1362#endif
1363#endif
1364#endif
1365
1366#if defined (__386BSD__)
1367 printf ("i386-pc-bsd\n"); exit (0);
1368#endif
1369
1370#if defined (sequent)
1371#if defined (i386)
1372 printf ("i386-sequent-dynix\n"); exit (0);
1373#endif
1374#if defined (ns32000)
1375 printf ("ns32k-sequent-dynix\n"); exit (0);
1376#endif
1377#endif
1378
1379#if defined (_SEQUENT_)
1380 struct utsname un;
1381
1382 uname(&un);
1383
1384 if (strncmp(un.version, "V2", 2) == 0) {
1385 printf ("i386-sequent-ptx2\n"); exit (0);
1386 }
1387 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1388 printf ("i386-sequent-ptx1\n"); exit (0);
1389 }
1390 printf ("i386-sequent-ptx\n"); exit (0);
1391
1392#endif
1393
1394#if defined (vax)
1395# if !defined (ultrix)
1396# include <sys/param.h>
1397# if defined (BSD)
1398# if BSD == 43
1399 printf ("vax-dec-bsd4.3\n"); exit (0);
1400# else
1401# if BSD == 199006
1402 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1403# else
1404 printf ("vax-dec-bsd\n"); exit (0);
1405# endif
1406# endif
1407# else
1408 printf ("vax-dec-bsd\n"); exit (0);
1409# endif
1410# else
1411 printf ("vax-dec-ultrix\n"); exit (0);
1412# endif
1413#endif
1414
1415#if defined (alliant) && defined (i860)
1416 printf ("i860-alliant-bsd\n"); exit (0);
1417#endif
1418
1419 exit (1);
1420}
1421EOF
1422
1423$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1424 { echo "$SYSTEM_NAME"; exit; }
1425
1426# Apollos put the system type in the environment.
1427
1428test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1429
1430# Convex versions that predate uname can use getsysinfo(1)
1431
1432if [ -x /usr/convex/getsysinfo ]
1433then
1434 case `getsysinfo -f cpu_type` in
1435 c1*)
1436 echo c1-convex-bsd
1437 exit ;;
1438 c2*)
1439 if getsysinfo -f scalar_acc
1440 then echo c32-convex-bsd
1441 else echo c2-convex-bsd
1442 fi
1443 exit ;;
1444 c34*)
1445 echo c34-convex-bsd
1446 exit ;;
1447 c38*)
1448 echo c38-convex-bsd
1449 exit ;;
1450 c4*)
1451 echo c4-convex-bsd
1452 exit ;;
1453 esac
1454fi
1455 1373
1456cat >&2 <<EOF 1374cat >&2 <<EOF
1457$0: unable to guess system type 1375$0: unable to guess system type
1458 1376
1459This script, last modified $timestamp, has failed to recognize 1377This script, last modified $timestamp, has failed to recognize

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines