comparison config.guess @ 47:ba203b170476

Use uw_streq(); update to newer Autoconf
author Adam Chlipala <adam@chlipala.net>
date Tue, 19 Jul 2011 09:27:10 -0400
parents 3c209338e596
children
comparison
equal deleted inserted replaced
46:72e942423f26 47:ba203b170476
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, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5 # Free Software Foundation, Inc. 5 # 2011 Free Software Foundation, Inc.
6 6
7 timestamp='2009-12-30' 7 timestamp='2011-05-11'
8 8
9 # This file is free software; you can redistribute it and/or modify it 9 # This file is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by 10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or 11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version. 12 # (at your option) any later version.
55 version="\ 55 version="\
56 GNU config.guess ($timestamp) 56 GNU config.guess ($timestamp)
57 57
58 Originally written by Per Bothner. 58 Originally written by Per Bothner.
59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
60 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 60 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
61 Software Foundation, Inc. 61 Software Foundation, Inc.
62 62
63 This is free software; see the source for copying conditions. There is NO 63 This is free software; see the source for copying conditions. There is NO
64 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 64 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
65 65
179 else 179 else
180 os=netbsdelf 180 os=netbsdelf
181 fi 181 fi
182 ;; 182 ;;
183 *) 183 *)
184 os=netbsd 184 os=netbsd
185 ;; 185 ;;
186 esac 186 esac
187 # The OS release 187 # The OS release
188 # Debian GNU/NetBSD machines have a different userland, and 188 # Debian GNU/NetBSD machines have a different userland, and
189 # thus, need a distinct triplet. However, they do not need 189 # thus, need a distinct triplet. However, they do not need
222 case $UNAME_RELEASE in 222 case $UNAME_RELEASE in
223 *4.0) 223 *4.0)
224 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 224 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
225 ;; 225 ;;
226 *5.*) 226 *5.*)
227 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 227 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
228 ;; 228 ;;
229 esac 229 esac
230 # According to Compaq, /usr/sbin/psrinfo has been available on 230 # According to Compaq, /usr/sbin/psrinfo has been available on
231 # OSF/1 and Tru64 systems produced since 1995. I hope that 231 # OSF/1 and Tru64 systems produced since 1995. I hope that
232 # covers most systems running today. This code pipes the CPU 232 # covers most systems running today. This code pipes the CPU
268 # A Vn.n version is a released version. 268 # A Vn.n version is a released version.
269 # A Tn.n version is a released field test version. 269 # A Tn.n version is a released field test version.
270 # A Xn.n version is an unreleased experimental baselevel. 270 # A Xn.n version is an unreleased experimental baselevel.
271 # 1.2 uses "1.2" for uname -r. 271 # 1.2 uses "1.2" for uname -r.
272 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 272 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
273 exit ;; 273 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
274 exitcode=$?
275 trap '' 0
276 exit $exitcode ;;
274 Alpha\ *:Windows_NT*:*) 277 Alpha\ *:Windows_NT*:*)
275 # How do we know it's Interix rather than the generic POSIX subsystem? 278 # 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 279 # Should we change UNAME_MACHINE based on the output of uname instead
277 # of the specific Alpha model? 280 # of the specific Alpha model?
278 echo alpha-pc-interix 281 echo alpha-pc-interix
294 exit ;; 297 exit ;;
295 *:z/VM:*:*) 298 *:z/VM:*:*)
296 echo s390-ibm-zvmoe 299 echo s390-ibm-zvmoe
297 exit ;; 300 exit ;;
298 *:OS400:*:*) 301 *:OS400:*:*)
299 echo powerpc-ibm-os400 302 echo powerpc-ibm-os400
300 exit ;; 303 exit ;;
301 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 304 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
302 echo arm-acorn-riscix${UNAME_RELEASE} 305 echo arm-acorn-riscix${UNAME_RELEASE}
303 exit ;; 306 exit ;;
304 arm:riscos:*:*|arm:RISCOS:*:*) 307 arm:riscos:*:*|arm:RISCOS:*:*)
393 # to the lowercase version "mint" (or "freemint"). Finally 396 # to the lowercase version "mint" (or "freemint"). Finally
394 # the system name "TOS" denotes a system which is actually not 397 # the system name "TOS" denotes a system which is actually not
395 # MiNT. But MiNT is downward compatible to TOS, so this should 398 # MiNT. But MiNT is downward compatible to TOS, so this should
396 # be no problem. 399 # be no problem.
397 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 400 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
398 echo m68k-atari-mint${UNAME_RELEASE} 401 echo m68k-atari-mint${UNAME_RELEASE}
399 exit ;; 402 exit ;;
400 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 403 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
401 echo m68k-atari-mint${UNAME_RELEASE} 404 echo m68k-atari-mint${UNAME_RELEASE}
402 exit ;; 405 exit ;;
403 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 406 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
404 echo m68k-atari-mint${UNAME_RELEASE} 407 echo m68k-atari-mint${UNAME_RELEASE}
405 exit ;; 408 exit ;;
406 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 409 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
407 echo m68k-milan-mint${UNAME_RELEASE} 410 echo m68k-milan-mint${UNAME_RELEASE}
408 exit ;; 411 exit ;;
409 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 412 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
410 echo m68k-hades-mint${UNAME_RELEASE} 413 echo m68k-hades-mint${UNAME_RELEASE}
411 exit ;; 414 exit ;;
412 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 415 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
413 echo m68k-unknown-mint${UNAME_RELEASE} 416 echo m68k-unknown-mint${UNAME_RELEASE}
414 exit ;; 417 exit ;;
415 m68k:machten:*:*) 418 m68k:machten:*:*)
416 echo m68k-apple-machten${UNAME_RELEASE} 419 echo m68k-apple-machten${UNAME_RELEASE}
417 exit ;; 420 exit ;;
418 powerpc:machten:*:*) 421 powerpc:machten:*:*)
419 echo powerpc-apple-machten${UNAME_RELEASE} 422 echo powerpc-apple-machten${UNAME_RELEASE}
479 exit ;; 482 exit ;;
480 m88k:*:3*:R3*) 483 m88k:*:3*:R3*)
481 echo m88k-motorola-sysv3 484 echo m88k-motorola-sysv3
482 exit ;; 485 exit ;;
483 AViiON:dgux:*:*) 486 AViiON:dgux:*:*)
484 # DG/UX returns AViiON for all architectures 487 # DG/UX returns AViiON for all architectures
485 UNAME_PROCESSOR=`/usr/bin/uname -p` 488 UNAME_PROCESSOR=`/usr/bin/uname -p`
486 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 489 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
487 then 490 then
488 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 491 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
489 [ ${TARGET_BINARY_INTERFACE}x = x ] 492 [ ${TARGET_BINARY_INTERFACE}x = x ]
490 then 493 then
493 echo m88k-dg-dguxbcs${UNAME_RELEASE} 496 echo m88k-dg-dguxbcs${UNAME_RELEASE}
494 fi 497 fi
495 else 498 else
496 echo i586-dg-dgux${UNAME_RELEASE} 499 echo i586-dg-dgux${UNAME_RELEASE}
497 fi 500 fi
498 exit ;; 501 exit ;;
499 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 502 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
500 echo m88k-dolphin-sysv3 503 echo m88k-dolphin-sysv3
501 exit ;; 504 exit ;;
502 M88*:*:R3*:*) 505 M88*:*:R3*:*)
503 # Delta 88k system running SVR3 506 # Delta 88k system running SVR3
550 echo rs6000-ibm-aix3.2.4 553 echo rs6000-ibm-aix3.2.4
551 else 554 else
552 echo rs6000-ibm-aix3.2 555 echo rs6000-ibm-aix3.2
553 fi 556 fi
554 exit ;; 557 exit ;;
555 *:AIX:*:[456]) 558 *:AIX:*:[4567])
556 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 559 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 560 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
558 IBM_ARCH=rs6000 561 IBM_ARCH=rs6000
559 else 562 else
560 IBM_ARCH=powerpc 563 IBM_ARCH=powerpc
593 9000/31? ) HP_ARCH=m68000 ;; 596 9000/31? ) HP_ARCH=m68000 ;;
594 9000/[34]?? ) HP_ARCH=m68k ;; 597 9000/[34]?? ) HP_ARCH=m68k ;;
595 9000/[678][0-9][0-9]) 598 9000/[678][0-9][0-9])
596 if [ -x /usr/bin/getconf ]; then 599 if [ -x /usr/bin/getconf ]; then
597 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 600 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` 601 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
599 case "${sc_cpu_version}" in 602 case "${sc_cpu_version}" in
600 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 603 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
601 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 604 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
602 532) # CPU_PA_RISC2_0 605 532) # CPU_PA_RISC2_0
603 case "${sc_kernel_bits}" in 606 case "${sc_kernel_bits}" in
604 32) HP_ARCH="hppa2.0n" ;; 607 32) HP_ARCH="hppa2.0n" ;;
605 64) HP_ARCH="hppa2.0w" ;; 608 64) HP_ARCH="hppa2.0w" ;;
606 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 609 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
607 esac ;; 610 esac ;;
608 esac 611 esac
609 fi 612 fi
610 if [ "${HP_ARCH}" = "" ]; then 613 if [ "${HP_ARCH}" = "" ]; then
611 eval $set_cc_for_build 614 eval $set_cc_for_build
612 sed 's/^ //' << EOF >$dummy.c 615 sed 's/^ //' << EOF >$dummy.c
613 616
614 #define _HPUX_SOURCE 617 #define _HPUX_SOURCE
615 #include <stdlib.h> 618 #include <stdlib.h>
616 #include <unistd.h> 619 #include <unistd.h>
617 620
618 int main () 621 int main ()
619 { 622 {
620 #if defined(_SC_KERNEL_BITS) 623 #if defined(_SC_KERNEL_BITS)
621 long bits = sysconf(_SC_KERNEL_BITS); 624 long bits = sysconf(_SC_KERNEL_BITS);
622 #endif 625 #endif
623 long cpu = sysconf (_SC_CPU_VERSION); 626 long cpu = sysconf (_SC_CPU_VERSION);
624 627
625 switch (cpu) 628 switch (cpu)
626 { 629 {
627 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 630 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
628 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 631 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629 case CPU_PA_RISC2_0: 632 case CPU_PA_RISC2_0:
630 #if defined(_SC_KERNEL_BITS) 633 #if defined(_SC_KERNEL_BITS)
631 switch (bits) 634 switch (bits)
632 { 635 {
633 case 64: puts ("hppa2.0w"); break; 636 case 64: puts ("hppa2.0w"); break;
634 case 32: puts ("hppa2.0n"); break; 637 case 32: puts ("hppa2.0n"); break;
635 default: puts ("hppa2.0"); break; 638 default: puts ("hppa2.0"); break;
636 } break; 639 } break;
637 #else /* !defined(_SC_KERNEL_BITS) */ 640 #else /* !defined(_SC_KERNEL_BITS) */
638 puts ("hppa2.0"); break; 641 puts ("hppa2.0"); break;
639 #endif 642 #endif
640 default: puts ("hppa1.0"); break; 643 default: puts ("hppa1.0"); break;
641 } 644 }
642 exit (0); 645 exit (0);
643 } 646 }
644 EOF 647 EOF
645 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 648 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
646 test -z "$HP_ARCH" && HP_ARCH=hppa 649 test -z "$HP_ARCH" && HP_ARCH=hppa
647 fi ;; 650 fi ;;
648 esac 651 esac
729 parisc*:Lites*:*:*) 732 parisc*:Lites*:*:*)
730 echo hppa1.1-hp-lites 733 echo hppa1.1-hp-lites
731 exit ;; 734 exit ;;
732 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 735 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
733 echo c1-convex-bsd 736 echo c1-convex-bsd
734 exit ;; 737 exit ;;
735 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 738 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
736 if getsysinfo -f scalar_acc 739 if getsysinfo -f scalar_acc
737 then echo c32-convex-bsd 740 then echo c32-convex-bsd
738 else echo c2-convex-bsd 741 else echo c2-convex-bsd
739 fi 742 fi
740 exit ;; 743 exit ;;
741 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 744 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
742 echo c34-convex-bsd 745 echo c34-convex-bsd
743 exit ;; 746 exit ;;
744 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 747 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
745 echo c38-convex-bsd 748 echo c38-convex-bsd
746 exit ;; 749 exit ;;
747 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 750 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
748 echo c4-convex-bsd 751 echo c4-convex-bsd
749 exit ;; 752 exit ;;
750 CRAY*Y-MP:*:*:*) 753 CRAY*Y-MP:*:*:*)
751 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 754 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
752 exit ;; 755 exit ;;
753 CRAY*[A-Z]90:*:*:*) 756 CRAY*[A-Z]90:*:*:*)
754 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 757 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
768 *:UNICOS/mp:*:*) 771 *:UNICOS/mp:*:*)
769 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 772 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
770 exit ;; 773 exit ;;
771 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 774 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
772 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 775 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
773 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 776 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 777 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
775 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 778 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776 exit ;; 779 exit ;;
777 5000:UNIX_System_V:4.*:*) 780 5000:UNIX_System_V:4.*:*)
778 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 781 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
779 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 782 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
780 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 783 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781 exit ;; 784 exit ;;
782 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 785 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
783 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 786 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
784 exit ;; 787 exit ;;
785 sparc*:BSD/OS:*:*) 788 sparc*:BSD/OS:*:*)
803 exit ;; 806 exit ;;
804 *:MINGW*:*) 807 *:MINGW*:*)
805 echo ${UNAME_MACHINE}-pc-mingw32 808 echo ${UNAME_MACHINE}-pc-mingw32
806 exit ;; 809 exit ;;
807 i*:windows32*:*) 810 i*:windows32*:*)
808 # uname -m includes "-pc" on this system. 811 # uname -m includes "-pc" on this system.
809 echo ${UNAME_MACHINE}-mingw32 812 echo ${UNAME_MACHINE}-mingw32
810 exit ;; 813 exit ;;
811 i*:PW*:*) 814 i*:PW*:*)
812 echo ${UNAME_MACHINE}-pc-pw32 815 echo ${UNAME_MACHINE}-pc-pw32
813 exit ;; 816 exit ;;
814 *:Interix*:*) 817 *:Interix*:*)
815 case ${UNAME_MACHINE} in 818 case ${UNAME_MACHINE} in
816 x86) 819 x86)
817 echo i586-pc-interix${UNAME_RELEASE} 820 echo i586-pc-interix${UNAME_RELEASE}
818 exit ;; 821 exit ;;
819 authenticamd | genuineintel | EM64T) 822 authenticamd | genuineintel | EM64T)
820 echo x86_64-unknown-interix${UNAME_RELEASE} 823 echo x86_64-unknown-interix${UNAME_RELEASE}
865 PCA56) UNAME_MACHINE=alphapca56 ;; 868 PCA56) UNAME_MACHINE=alphapca56 ;;
866 PCA57) UNAME_MACHINE=alphapca56 ;; 869 PCA57) UNAME_MACHINE=alphapca56 ;;
867 EV6) UNAME_MACHINE=alphaev6 ;; 870 EV6) UNAME_MACHINE=alphaev6 ;;
868 EV67) UNAME_MACHINE=alphaev67 ;; 871 EV67) UNAME_MACHINE=alphaev67 ;;
869 EV68*) UNAME_MACHINE=alphaev68 ;; 872 EV68*) UNAME_MACHINE=alphaev68 ;;
870 esac 873 esac
871 objdump --private-headers /bin/sh | grep -q ld.so.1 874 objdump --private-headers /bin/sh | grep -q ld.so.1
872 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 875 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
873 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 876 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
874 exit ;; 877 exit ;;
875 arm*:Linux:*:*) 878 arm*:Linux:*:*)
877 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 880 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
878 | grep -q __ARM_EABI__ 881 | grep -q __ARM_EABI__
879 then 882 then
880 echo ${UNAME_MACHINE}-unknown-linux-gnu 883 echo ${UNAME_MACHINE}-unknown-linux-gnu
881 else 884 else
882 echo ${UNAME_MACHINE}-unknown-linux-gnueabi 885 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
886 | grep -q __ARM_PCS_VFP
887 then
888 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
889 else
890 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
891 fi
883 fi 892 fi
884 exit ;; 893 exit ;;
885 avr32*:Linux:*:*) 894 avr32*:Linux:*:*)
886 echo ${UNAME_MACHINE}-unknown-linux-gnu 895 echo ${UNAME_MACHINE}-unknown-linux-gnu
887 exit ;; 896 exit ;;
890 exit ;; 899 exit ;;
891 crisv32:Linux:*:*) 900 crisv32:Linux:*:*)
892 echo crisv32-axis-linux-gnu 901 echo crisv32-axis-linux-gnu
893 exit ;; 902 exit ;;
894 frv:Linux:*:*) 903 frv:Linux:*:*)
895 echo frv-unknown-linux-gnu 904 echo frv-unknown-linux-gnu
896 exit ;; 905 exit ;;
897 i*86:Linux:*:*) 906 i*86:Linux:*:*)
898 LIBC=gnu 907 LIBC=gnu
899 eval $set_cc_for_build 908 eval $set_cc_for_build
900 sed 's/^ //' << EOF >$dummy.c 909 sed 's/^ //' << EOF >$dummy.c
958 exit ;; 967 exit ;;
959 s390:Linux:*:* | s390x:Linux:*:*) 968 s390:Linux:*:* | s390x:Linux:*:*)
960 echo ${UNAME_MACHINE}-ibm-linux 969 echo ${UNAME_MACHINE}-ibm-linux
961 exit ;; 970 exit ;;
962 sh64*:Linux:*:*) 971 sh64*:Linux:*:*)
963 echo ${UNAME_MACHINE}-unknown-linux-gnu 972 echo ${UNAME_MACHINE}-unknown-linux-gnu
964 exit ;; 973 exit ;;
965 sh*:Linux:*:*) 974 sh*:Linux:*:*)
966 echo ${UNAME_MACHINE}-unknown-linux-gnu 975 echo ${UNAME_MACHINE}-unknown-linux-gnu
967 exit ;; 976 exit ;;
968 sparc:Linux:*:* | sparc64:Linux:*:*) 977 sparc:Linux:*:* | sparc64:Linux:*:*)
969 echo ${UNAME_MACHINE}-unknown-linux-gnu 978 echo ${UNAME_MACHINE}-unknown-linux-gnu
970 exit ;; 979 exit ;;
980 tile*:Linux:*:*)
981 echo ${UNAME_MACHINE}-tilera-linux-gnu
982 exit ;;
971 vax:Linux:*:*) 983 vax:Linux:*:*)
972 echo ${UNAME_MACHINE}-dec-linux-gnu 984 echo ${UNAME_MACHINE}-dec-linux-gnu
973 exit ;; 985 exit ;;
974 x86_64:Linux:*:*) 986 x86_64:Linux:*:*)
975 echo x86_64-unknown-linux-gnu 987 echo x86_64-unknown-linux-gnu
976 exit ;; 988 exit ;;
977 xtensa*:Linux:*:*) 989 xtensa*:Linux:*:*)
978 echo ${UNAME_MACHINE}-unknown-linux-gnu 990 echo ${UNAME_MACHINE}-unknown-linux-gnu
979 exit ;; 991 exit ;;
980 i*86:DYNIX/ptx:4*:*) 992 i*86:DYNIX/ptx:4*:*)
981 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 993 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
982 # earlier versions are messed up and put the nodename in both 994 # earlier versions are messed up and put the nodename in both
983 # sysname and nodename. 995 # sysname and nodename.
984 echo i386-sequent-sysv4 996 echo i386-sequent-sysv4
985 exit ;; 997 exit ;;
986 i*86:UNIX_SV:4.2MP:2.*) 998 i*86:UNIX_SV:4.2MP:2.*)
987 # Unixware is an offshoot of SVR4, but it has its own version 999 # Unixware is an offshoot of SVR4, but it has its own version
988 # number series starting with 2... 1000 # number series starting with 2...
989 # I am not positive that other SVR4 systems won't match this, 1001 # I am not positive that other SVR4 systems won't match this,
990 # I just have to hope. -- rms. 1002 # I just have to hope. -- rms.
991 # Use sysv4.2uw... so that sysv4* matches it. 1003 # Use sysv4.2uw... so that sysv4* matches it.
992 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1004 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
993 exit ;; 1005 exit ;;
994 i*86:OS/2:*:*) 1006 i*86:OS/2:*:*)
995 # If we were able to find `uname', then EMX Unix compatibility 1007 # If we were able to find `uname', then EMX Unix compatibility
996 # is probably installed. 1008 # is probably installed.
1018 else 1030 else
1019 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1031 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1020 fi 1032 fi
1021 exit ;; 1033 exit ;;
1022 i*86:*:5:[678]*) 1034 i*86:*:5:[678]*)
1023 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1035 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1024 case `/bin/uname -X | grep "^Machine"` in 1036 case `/bin/uname -X | grep "^Machine"` in
1025 *486*) UNAME_MACHINE=i486 ;; 1037 *486*) UNAME_MACHINE=i486 ;;
1026 *Pentium) UNAME_MACHINE=i586 ;; 1038 *Pentium) UNAME_MACHINE=i586 ;;
1027 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1039 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1028 esac 1040 esac
1046 echo ${UNAME_MACHINE}-pc-sysv32 1058 echo ${UNAME_MACHINE}-pc-sysv32
1047 fi 1059 fi
1048 exit ;; 1060 exit ;;
1049 pc:*:*:*) 1061 pc:*:*:*)
1050 # Left here for compatibility: 1062 # Left here for compatibility:
1051 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1063 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1052 # the processor, so we play safe by assuming i586. 1064 # the processor, so we play safe by assuming i586.
1053 # Note: whatever this is, it MUST be the same as what config.sub 1065 # 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 1066 # prints for the "djgpp" host, or else GDB configury will decide that
1055 # this is a cross-build. 1067 # this is a cross-build.
1056 echo i586-pc-msdosdjgpp 1068 echo i586-pc-msdosdjgpp
1057 exit ;; 1069 exit ;;
1058 Intel:Mach:3*:*) 1070 Intel:Mach:3*:*)
1059 echo i386-pc-mach3 1071 echo i386-pc-mach3
1060 exit ;; 1072 exit ;;
1061 paragon:*:*:*) 1073 paragon:*:*:*)
1062 echo i860-intel-osf1 1074 echo i860-intel-osf1
1087 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1099 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1088 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1100 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1089 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1101 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1090 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1102 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1091 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1103 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1092 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1104 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1093 && { echo i486-ncr-sysv4; exit; } ;; 1105 && { echo i486-ncr-sysv4; exit; } ;;
1094 NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1106 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1095 OS_REL='.3' 1107 OS_REL='.3'
1096 test -r /etc/.relid \ 1108 test -r /etc/.relid \
1097 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1109 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1098 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1110 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1131 echo ${UNAME_MACHINE}-sni-sysv4 1143 echo ${UNAME_MACHINE}-sni-sysv4
1132 else 1144 else
1133 echo ns32k-sni-sysv 1145 echo ns32k-sni-sysv
1134 fi 1146 fi
1135 exit ;; 1147 exit ;;
1136 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1148 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1137 # says <Richard.M.Bartel@ccMail.Census.GOV> 1149 # says <Richard.M.Bartel@ccMail.Census.GOV>
1138 echo i586-unisys-sysv4 1150 echo i586-unisys-sysv4
1139 exit ;; 1151 exit ;;
1140 *:UNIX_System_V:4*:FTX*) 1152 *:UNIX_System_V:4*:FTX*)
1141 # From Gerald Hewes <hewes@openmarket.com>. 1153 # From Gerald Hewes <hewes@openmarket.com>.
1142 # How about differentiating between stratus architectures? -djm 1154 # How about differentiating between stratus architectures? -djm
1143 echo hppa1.1-stratus-sysv4 1155 echo hppa1.1-stratus-sysv4
1144 exit ;; 1156 exit ;;
1160 news*:NEWS-OS:6*:*) 1172 news*:NEWS-OS:6*:*)
1161 echo mips-sony-newsos6 1173 echo mips-sony-newsos6
1162 exit ;; 1174 exit ;;
1163 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1175 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1164 if [ -d /usr/nec ]; then 1176 if [ -d /usr/nec ]; then
1165 echo mips-nec-sysv${UNAME_RELEASE} 1177 echo mips-nec-sysv${UNAME_RELEASE}
1166 else 1178 else
1167 echo mips-unknown-sysv${UNAME_RELEASE} 1179 echo mips-unknown-sysv${UNAME_RELEASE}
1168 fi 1180 fi
1169 exit ;; 1181 exit ;;
1170 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1182 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1171 echo powerpc-be-beos 1183 echo powerpc-be-beos
1172 exit ;; 1184 exit ;;
1173 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1185 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1174 echo powerpc-apple-beos 1186 echo powerpc-apple-beos
1229 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1241 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1230 exit ;; 1242 exit ;;
1231 *:QNX:*:4*) 1243 *:QNX:*:4*)
1232 echo i386-pc-qnx 1244 echo i386-pc-qnx
1233 exit ;; 1245 exit ;;
1246 NEO-?:NONSTOP_KERNEL:*:*)
1247 echo neo-tandem-nsk${UNAME_RELEASE}
1248 exit ;;
1234 NSE-?:NONSTOP_KERNEL:*:*) 1249 NSE-?:NONSTOP_KERNEL:*:*)
1235 echo nse-tandem-nsk${UNAME_RELEASE} 1250 echo nse-tandem-nsk${UNAME_RELEASE}
1236 exit ;; 1251 exit ;;
1237 NSR-?:NONSTOP_KERNEL:*:*) 1252 NSR-?:NONSTOP_KERNEL:*:*)
1238 echo nsr-tandem-nsk${UNAME_RELEASE} 1253 echo nsr-tandem-nsk${UNAME_RELEASE}
1274 exit ;; 1289 exit ;;
1275 *:ITS:*:*) 1290 *:ITS:*:*)
1276 echo pdp10-unknown-its 1291 echo pdp10-unknown-its
1277 exit ;; 1292 exit ;;
1278 SEI:*:*:SEIUX) 1293 SEI:*:*:SEIUX)
1279 echo mips-sei-seiux${UNAME_RELEASE} 1294 echo mips-sei-seiux${UNAME_RELEASE}
1280 exit ;; 1295 exit ;;
1281 *:DragonFly:*:*) 1296 *:DragonFly:*:*)
1282 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1297 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1283 exit ;; 1298 exit ;;
1284 *:*VMS:*:*) 1299 *:*VMS:*:*)
1285 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1300 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1286 case "${UNAME_MACHINE}" in 1301 case "${UNAME_MACHINE}" in
1287 A*) echo alpha-dec-vms ; exit ;; 1302 A*) echo alpha-dec-vms ; exit ;;
1288 I*) echo ia64-dec-vms ; exit ;; 1303 I*) echo ia64-dec-vms ; exit ;;
1289 V*) echo vax-dec-vms ; exit ;; 1304 V*) echo vax-dec-vms ; exit ;;
1290 esac ;; 1305 esac ;;
1320 printf ("mips-sony-bsd\n"); exit (0); 1335 printf ("mips-sony-bsd\n"); exit (0);
1321 #else 1336 #else
1322 #include <sys/param.h> 1337 #include <sys/param.h>
1323 printf ("m68k-sony-newsos%s\n", 1338 printf ("m68k-sony-newsos%s\n",
1324 #ifdef NEWSOS4 1339 #ifdef NEWSOS4
1325 "4" 1340 "4"
1326 #else 1341 #else
1327 "" 1342 ""
1328 #endif 1343 #endif
1329 ); exit (0); 1344 ); exit (0);
1330 #endif 1345 #endif
1331 #endif 1346 #endif
1332 1347
1333 #if defined (__arm) && defined (__acorn) && defined (__unix) 1348 #if defined (__arm) && defined (__acorn) && defined (__unix)
1334 printf ("arm-acorn-riscix\n"); exit (0); 1349 printf ("arm-acorn-riscix\n"); exit (0);