Mercurial > hg > xemacs-beta
comparison config.guess @ 458:c33ae14dd6d0 r21-2-44
Import from CVS: tag r21-2-44
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:42:25 +0200 |
parents | abe6d1db359e |
children | 352d35ff1c82 |
comparison
equal
deleted
inserted
replaced
457:4b9290a33024 | 458:c33ae14dd6d0 |
---|---|
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 |
6 version='2000-05-30' | 6 timestamp='2001-01-17' |
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 |
10 # the Free Software Foundation; either version 2 of the License, or | 10 # the Free Software Foundation; either version 2 of the License, or |
11 # (at your option) any later version. | 11 # (at your option) any later version. |
30 # This script attempts to guess a canonical system name similar to | 30 # This script attempts to guess a canonical system name similar to |
31 # config.sub. If it succeeds, it prints the system name on stdout, and | 31 # config.sub. If it succeeds, it prints the system name on stdout, and |
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 # | 36 # |
37 # Only a few systems have been added to this list; please add others | 37 # Only a few systems have been added to this list; please add others |
38 # (but try to keep the structure clean). | 38 # (but try to keep the structure clean). |
39 # | 39 # |
40 | 40 |
41 me=`echo "$0" | sed -e 's,.*/,,'` | 41 me=`echo "$0" | sed -e 's,.*/,,'` |
42 | 42 |
43 usage="\ | 43 usage="\ |
44 Usage: $0 [OPTION] | 44 Usage: $0 [OPTION] |
45 | 45 |
46 Output the configuration name of this system. | 46 Output the configuration name of the system \`$me' is run on. |
47 | 47 |
48 Operation modes: | 48 Operation modes: |
49 -h, --help print this help, then exit | 49 -h, --help print this help, then exit |
50 -V, --version print version number, then exit" | 50 -t, --time-stamp print date of last modification, then exit |
51 -v, --version print version number, then exit | |
52 | |
53 Report bugs and patches to <config-patches@gnu.org>." | |
54 | |
55 version="\ | |
56 GNU config.guess ($timestamp) | |
57 | |
58 Originally written by Per Bothner. | |
59 Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 | |
60 Free Software Foundation, Inc. | |
61 | |
62 This is free software; see the source for copying conditions. There is NO | |
63 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
51 | 64 |
52 help=" | 65 help=" |
53 Try \`$me --help' for more information." | 66 Try \`$me --help' for more information." |
54 | 67 |
55 # Parse command line | 68 # Parse command line |
56 while test $# -gt 0 ; do | 69 while test $# -gt 0 ; do |
57 case "$1" in | 70 case $1 in |
58 --version | --vers* | -V ) | 71 --time-stamp | --time* | -t ) |
72 echo "$timestamp" ; exit 0 ;; | |
73 --version | -v ) | |
59 echo "$version" ; exit 0 ;; | 74 echo "$version" ; exit 0 ;; |
60 --help | --h* | -h ) | 75 --help | --h* | -h ) |
61 echo "$usage"; exit 0 ;; | 76 echo "$usage"; exit 0 ;; |
62 -- ) # Stop option processing | 77 -- ) # Stop option processing |
63 shift; break ;; | 78 shift; break ;; |
64 - ) # Use stdin as input. | 79 - ) # Use stdin as input. |
65 break ;; | 80 break ;; |
66 -* ) | 81 -* ) |
67 exec >&2 | 82 echo "$me: invalid option $1$help" >&2 |
68 echo "$me: invalid option $1" | |
69 echo "$help" | |
70 exit 1 ;; | 83 exit 1 ;; |
71 * ) | 84 * ) |
72 break ;; | 85 break ;; |
73 esac | 86 esac |
74 done | 87 done |
76 if test $# != 0; then | 89 if test $# != 0; then |
77 echo "$me: too many arguments$help" >&2 | 90 echo "$me: too many arguments$help" >&2 |
78 exit 1 | 91 exit 1 |
79 fi | 92 fi |
80 | 93 |
81 # Use $HOST_CC if defined. $CC may point to a cross-compiler | 94 |
82 if test x"$CC_FOR_BUILD" = x; then | 95 dummy=dummy-$$ |
83 if test x"$HOST_CC" != x; then | 96 trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 |
84 CC_FOR_BUILD="$HOST_CC" | 97 |
85 else | 98 # CC_FOR_BUILD -- compiler used by this script. |
86 if test x"$CC" != x; then | 99 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still |
87 CC_FOR_BUILD="$CC" | 100 # use `HOST_CC' if defined, but it is deprecated. |
88 else | 101 |
89 CC_FOR_BUILD=cc | 102 case $CC_FOR_BUILD,$HOST_CC,$CC in |
90 fi | 103 ,,) echo "int dummy(){}" > $dummy.c |
91 fi | 104 for c in cc gcc c89 ; do |
92 fi | 105 ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 |
93 | 106 if test $? = 0 ; then |
107 CC_FOR_BUILD="$c"; break | |
108 fi | |
109 done | |
110 rm -f $dummy.c $dummy.o $dummy.rel | |
111 if test x"$CC_FOR_BUILD" = x ; then | |
112 CC_FOR_BUILD=no_compiler_found | |
113 fi | |
114 ;; | |
115 ,,*) CC_FOR_BUILD=$CC ;; | |
116 ,*,*) CC_FOR_BUILD=$HOST_CC ;; | |
117 esac | |
94 | 118 |
95 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. | 119 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
96 # (ghazi@noc.rutgers.edu 8/24/94.) | 120 # (ghazi@noc.rutgers.edu 8/24/94.) |
97 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then | 121 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then |
98 PATH=$PATH:/.attbin ; export PATH | 122 PATH=$PATH:/.attbin ; export PATH |
99 fi | 123 fi |
100 | 124 |
101 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown | 125 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
102 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown | 126 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
103 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | 127 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
104 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown | 128 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
105 | |
106 dummy=dummy-$$ | |
107 trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 | |
108 | 129 |
109 # Note: order is significant - the case branches are not exclusive. | 130 # Note: order is significant - the case branches are not exclusive. |
110 | 131 |
111 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | 132 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
112 *:NetBSD:*:*) | 133 *:NetBSD:*:*) |
117 # object file format. This provides both forward | 138 # object file format. This provides both forward |
118 # compatibility and a consistent mechanism for selecting the | 139 # compatibility and a consistent mechanism for selecting the |
119 # object file format. | 140 # object file format. |
120 # Determine the machine/vendor (is the vendor relevant). | 141 # Determine the machine/vendor (is the vendor relevant). |
121 case "${UNAME_MACHINE}" in | 142 case "${UNAME_MACHINE}" in |
122 amiga) machine=m68k-cbm ;; | 143 amiga) machine=m68k-unknown ;; |
123 arm32) machine=arm-unknown ;; | 144 arm32) machine=arm-unknown ;; |
124 atari*) machine=m68k-atari ;; | 145 atari*) machine=m68k-atari ;; |
125 sun3*) machine=m68k-sun ;; | 146 sun3*) machine=m68k-sun ;; |
126 mac68k) machine=m68k-apple ;; | 147 mac68k) machine=m68k-apple ;; |
127 macppc) machine=powerpc-apple ;; | 148 macppc) machine=powerpc-apple ;; |
128 hp3[0-9][05]) machine=m68k-hp ;; | 149 hp3[0-9][05]) machine=m68k-hp ;; |
129 ibmrt|romp-ibm) machine=romp-ibm ;; | 150 ibmrt|romp-ibm) machine=romp-ibm ;; |
130 *) machine=${UNAME_MACHINE}-unknown ;; | 151 *) machine=${UNAME_MACHINE}-unknown ;; |
131 esac | 152 esac |
132 # The Operating System including object format. | 153 # The Operating System including object format, if it has switched |
133 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | 154 # to ELF recently, or will in the future. |
134 | grep __ELF__ >/dev/null | 155 case "${UNAME_MACHINE}" in |
135 then | 156 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). | 157 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
137 # Return netbsd for either. FIX? | 158 | grep __ELF__ >/dev/null |
138 os=netbsd | 159 then |
139 else | 160 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). |
140 os=netbsdelf | 161 # Return netbsd for either. FIX? |
141 fi | 162 os=netbsd |
163 else | |
164 os=netbsdelf | |
165 fi | |
166 ;; | |
167 *) | |
168 os=netbsd | |
169 ;; | |
170 esac | |
142 # The OS release | 171 # The OS release |
143 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | 172 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
144 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | 173 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
145 # contains redundant information, the shorter form: | 174 # contains redundant information, the shorter form: |
146 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | 175 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
213 exit 0 ;; | 242 exit 0 ;; |
214 21064:Windows_NT:50:3) | 243 21064:Windows_NT:50:3) |
215 echo alpha-dec-winnt3.5 | 244 echo alpha-dec-winnt3.5 |
216 exit 0 ;; | 245 exit 0 ;; |
217 Amiga*:UNIX_System_V:4.0:*) | 246 Amiga*:UNIX_System_V:4.0:*) |
218 echo m68k-cbm-sysv4 | 247 echo m68k-unknown-sysv4 |
219 exit 0;; | 248 exit 0;; |
220 amiga:OpenBSD:*:*) | 249 amiga:OpenBSD:*:*) |
221 echo m68k-unknown-openbsd${UNAME_RELEASE} | 250 echo m68k-unknown-openbsd${UNAME_RELEASE} |
222 exit 0 ;; | 251 exit 0 ;; |
223 *:[Aa]miga[Oo][Ss]:*:*) | 252 *:[Aa]miga[Oo][Ss]:*:*) |
245 echo i370-ibm-openedition | 274 echo i370-ibm-openedition |
246 exit 0 ;; | 275 exit 0 ;; |
247 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | 276 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
248 echo arm-acorn-riscix${UNAME_RELEASE} | 277 echo arm-acorn-riscix${UNAME_RELEASE} |
249 exit 0;; | 278 exit 0;; |
250 SR2?01:HI-UX/MPP:*:*) | 279 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
251 echo hppa1.1-hitachi-hiuxmpp | 280 echo hppa1.1-hitachi-hiuxmpp |
252 exit 0;; | 281 exit 0;; |
253 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) | 282 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
254 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. | 283 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. |
255 if test "`(/bin/universe) 2>/dev/null`" = att ; then | 284 if test "`(/bin/universe) 2>/dev/null`" = att ; then |
471 else | 500 else |
472 IBM_REV=4.${UNAME_RELEASE} | 501 IBM_REV=4.${UNAME_RELEASE} |
473 fi | 502 fi |
474 echo ${IBM_ARCH}-ibm-aix${IBM_REV} | 503 echo ${IBM_ARCH}-ibm-aix${IBM_REV} |
475 exit 0 ;; | 504 exit 0 ;; |
505 *:AIX:*:5) | |
506 case "`lsattr -El proc0 -a type -F value`" in | |
507 PowerPC*) IBM_ARCH=powerpc | |
508 IBM_MANUF=ibm ;; | |
509 Itanium) IBM_ARCH=ia64 | |
510 IBM_MANUF=unknown ;; | |
511 POWER*) IBM_ARCH=power | |
512 IBM_MANUF=ibm ;; | |
513 *) IBM_ARCH=powerpc | |
514 IBM_MANUF=ibm ;; | |
515 esac | |
516 echo ${IBM_ARCH}-${IBM_MANUF}-aix${UNAME_VERSION}.${UNAME_RELEASE} | |
517 exit 0 ;; | |
476 *:AIX:*:*) | 518 *:AIX:*:*) |
477 echo rs6000-ibm-aix | 519 echo rs6000-ibm-aix |
478 exit 0 ;; | 520 exit 0 ;; |
479 ibmrt:4.4BSD:*|romp-ibm:BSD:*) | 521 ibmrt:4.4BSD:*|romp-ibm:BSD:*) |
480 echo romp-ibm-bsd4.4 | 522 echo romp-ibm-bsd4.4 |
493 exit 0 ;; | 535 exit 0 ;; |
494 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) | 536 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
495 echo m68k-hp-bsd4.4 | 537 echo m68k-hp-bsd4.4 |
496 exit 0 ;; | 538 exit 0 ;; |
497 9000/[34678]??:HP-UX:*:*) | 539 9000/[34678]??:HP-UX:*:*) |
540 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
498 case "${UNAME_MACHINE}" in | 541 case "${UNAME_MACHINE}" in |
499 9000/31? ) HP_ARCH=m68000 ;; | 542 9000/31? ) HP_ARCH=m68000 ;; |
500 9000/[34]?? ) HP_ARCH=m68k ;; | 543 9000/[34]?? ) HP_ARCH=m68k ;; |
501 9000/[678][0-9][0-9]) | 544 9000/[678][0-9][0-9]) |
545 case "${HPUX_REV}" in | |
546 11.[0-9][0-9]) | |
547 if [ -x /usr/bin/getconf ]; then | |
548 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` | |
549 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | |
550 case "${sc_cpu_version}" in | |
551 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | |
552 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | |
553 532) # CPU_PA_RISC2_0 | |
554 case "${sc_kernel_bits}" in | |
555 32) HP_ARCH="hppa2.0n" ;; | |
556 64) HP_ARCH="hppa2.0w" ;; | |
557 esac ;; | |
558 esac | |
559 fi ;; | |
560 esac | |
561 if [ "${HP_ARCH}" = "" ]; then | |
502 sed 's/^ //' << EOF >$dummy.c | 562 sed 's/^ //' << EOF >$dummy.c |
503 | 563 |
504 #define _HPUX_SOURCE | 564 #define _HPUX_SOURCE |
505 #include <stdlib.h> | 565 #include <stdlib.h> |
506 #include <unistd.h> | 566 #include <unistd.h> |
531 } | 591 } |
532 exit (0); | 592 exit (0); |
533 } | 593 } |
534 EOF | 594 EOF |
535 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` | 595 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` |
596 if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi | |
536 rm -f $dummy.c $dummy | 597 rm -f $dummy.c $dummy |
598 fi ;; | |
537 esac | 599 esac |
600 echo ${HP_ARCH}-hp-hpux${HPUX_REV} | |
601 exit 0 ;; | |
602 ia64:HP-UX:*:*) | |
538 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | 603 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
539 echo ${HP_ARCH}-hp-hpux${HPUX_REV} | 604 echo ia64-hp-hpux${HPUX_REV} |
540 exit 0 ;; | 605 exit 0 ;; |
541 3050*:HI-UX:*:*) | 606 3050*:HI-UX:*:*) |
542 sed 's/^ //' << EOF >$dummy.c | 607 sed 's/^ //' << EOF >$dummy.c |
543 #include <unistd.h> | 608 #include <unistd.h> |
544 int | 609 int |
626 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ | 691 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ |
627 exit 0 ;; | 692 exit 0 ;; |
628 CRAY*TS:*:*:*) | 693 CRAY*TS:*:*:*) |
629 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 694 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
630 exit 0 ;; | 695 exit 0 ;; |
696 CRAY*T3D:*:*:*) | |
697 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
698 exit 0 ;; | |
631 CRAY*T3E:*:*:*) | 699 CRAY*T3E:*:*:*) |
632 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 700 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
633 exit 0 ;; | 701 exit 0 ;; |
634 CRAY*SV1:*:*:*) | 702 CRAY*SV1:*:*:*) |
635 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 703 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
636 exit 0 ;; | 704 exit 0 ;; |
637 CRAY-2:*:*:*) | 705 CRAY-2:*:*:*) |
638 echo cray2-cray-unicos | 706 echo cray2-cray-unicos |
639 exit 0 ;; | 707 exit 0 ;; |
640 F300:UNIX_System_V:*:*) | 708 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
709 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | |
641 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | 710 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
642 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | 711 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
643 echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 712 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
644 exit 0 ;; | 713 exit 0 ;; |
645 F301:UNIX_System_V:*:*) | |
646 echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` | |
647 exit 0 ;; | |
648 hp300:OpenBSD:*:*) | 714 hp300:OpenBSD:*:*) |
649 echo m68k-unknown-openbsd${UNAME_RELEASE} | 715 echo m68k-unknown-openbsd${UNAME_RELEASE} |
650 exit 0 ;; | 716 exit 0 ;; |
651 i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | 717 i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
652 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | 718 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
666 i*:CYGWIN*:*) | 732 i*:CYGWIN*:*) |
667 echo ${UNAME_MACHINE}-pc-cygwin | 733 echo ${UNAME_MACHINE}-pc-cygwin |
668 exit 0 ;; | 734 exit 0 ;; |
669 i*:MINGW*:*) | 735 i*:MINGW*:*) |
670 echo ${UNAME_MACHINE}-pc-mingw32 | 736 echo ${UNAME_MACHINE}-pc-mingw32 |
737 exit 0 ;; | |
738 i*:PW*:*) | |
739 echo ${UNAME_MACHINE}-pc-pw32 | |
671 exit 0 ;; | 740 exit 0 ;; |
672 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | 741 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) |
673 # How do we know it's Interix rather than the generic POSIX subsystem? | 742 # 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 | 743 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we |
675 # UNAME_MACHINE based on the output of uname instead of i386? | 744 # UNAME_MACHINE based on the output of uname instead of i386? |
685 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | 754 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
686 exit 0 ;; | 755 exit 0 ;; |
687 *:GNU:*:*) | 756 *:GNU:*:*) |
688 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | 757 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
689 exit 0 ;; | 758 exit 0 ;; |
759 i*86:Minix:*:*) | |
760 echo ${UNAME_MACHINE}-pc-minix | |
761 exit 0 ;; | |
690 *:Linux:*:*) | 762 *:Linux:*:*) |
691 | 763 |
692 # The BFD linker knows what the default object file format is, so | 764 # The BFD linker knows what the default object file format is, so |
693 # first see if it will tell us. cd to the root directory to prevent | 765 # first see if it will tell us. cd to the root directory to prevent |
694 # problems with other programs or directories called `ld' in the path. | 766 # problems with other programs or directories called `ld' in the path. |
695 ld_help_string=`cd /; ld --help 2>&1` | 767 ld_supported_emulations=`cd /; ld --help 2>&1 \ |
696 ld_supported_emulations=`echo $ld_help_string \ | |
697 | sed -ne '/supported emulations:/!d | 768 | sed -ne '/supported emulations:/!d |
698 s/[ ][ ]*/ /g | 769 s/[ ][ ]*/ /g |
699 s/.*supported emulations: *// | 770 s/.*supported emulations: *// |
700 s/ .*// | 771 s/ .*// |
701 p'` | 772 p'` |
707 i?86linux) | 778 i?86linux) |
708 echo "${UNAME_MACHINE}-pc-linux-gnuaout" | 779 echo "${UNAME_MACHINE}-pc-linux-gnuaout" |
709 exit 0 | 780 exit 0 |
710 ;; | 781 ;; |
711 elf_i?86) | 782 elf_i?86) |
712 echo "${UNAME_MACHINE}-pc-linux" | 783 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" |
713 exit 0 | |
714 ;; | 784 ;; |
715 i?86coff) | 785 i?86coff) |
716 echo "${UNAME_MACHINE}-pc-linux-gnucoff" | 786 echo "${UNAME_MACHINE}-pc-linux-gnucoff" |
717 exit 0 | 787 exit 0 |
718 ;; | 788 ;; |
719 sparclinux) | 789 sparclinux) |
720 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" | 790 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" |
791 exit 0 | |
792 ;; | |
793 elf32_sparc) | |
794 echo "${UNAME_MACHINE}-unknown-linux-gnu" | |
721 exit 0 | 795 exit 0 |
722 ;; | 796 ;; |
723 armlinux) | 797 armlinux) |
724 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" | 798 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" |
725 exit 0 | 799 exit 0 |
851 EOF | 925 EOF |
852 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 | 926 $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 | 927 rm -f $dummy.c $dummy |
854 elif test "${UNAME_MACHINE}" = "s390"; then | 928 elif test "${UNAME_MACHINE}" = "s390"; then |
855 echo s390-ibm-linux && exit 0 | 929 echo s390-ibm-linux && exit 0 |
930 elif test "${UNAME_MACHINE}" = "x86_64"; then | |
931 echo x86_64-unknown-linux-gnu && exit 0 | |
932 elif test "${UNAME_MACHINE}" = "parisc" -o "${UNAME_MACHINE}" = "hppa"; then | |
933 # Look for CPU level | |
934 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | |
935 PA7*) | |
936 echo hppa1.1-unknown-linux-gnu | |
937 ;; | |
938 PA8*) | |
939 echo hppa2.0-unknown-linux-gnu | |
940 ;; | |
941 *) | |
942 echo hppa-unknown-linux-gnu | |
943 ;; | |
944 esac | |
945 exit 0 | |
856 else | 946 else |
857 # Either a pre-BFD a.out linker (linux-gnuoldld) | 947 # Either a pre-BFD a.out linker (linux-gnuoldld) |
858 # or one that does not give us useful --help. | 948 # or one that does not give us useful --help. |
859 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. | 949 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. |
860 # If ld does not provide *any* "supported emulations:" | 950 # If ld does not provide *any* "supported emulations:" |
861 # that means it is gnuoldld. | 951 # that means it is gnuoldld. |
862 echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" | 952 test -z "$ld_supported_emulations" \ |
863 test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 | 953 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 |
864 | 954 |
865 case "${UNAME_MACHINE}" in | 955 case "${UNAME_MACHINE}" in |
866 i?86) | 956 i?86) |
867 VENDOR=pc; | 957 VENDOR=pc; |
868 ;; | 958 ;; |
895 return 0; | 985 return 0; |
896 } | 986 } |
897 EOF | 987 EOF |
898 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 | 988 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 |
899 rm -f $dummy.c $dummy | 989 rm -f $dummy.c $dummy |
990 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 | |
900 fi ;; | 991 fi ;; |
901 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions | 992 # 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. | 993 # are messed up and put the nodename in both sysname and nodename. |
903 i?86:DYNIX/ptx:4*:*) | 994 i?86:DYNIX/ptx:4*:*) |
904 echo i386-sequent-sysv4 | 995 echo i386-sequent-sysv4 |
972 # "miniframe" | 1063 # "miniframe" |
973 echo m68010-convergent-sysv | 1064 echo m68010-convergent-sysv |
974 exit 0 ;; | 1065 exit 0 ;; |
975 M68*:*:R3V[567]*:*) | 1066 M68*:*:R3V[567]*:*) |
976 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; | 1067 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) | 1068 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='' | 1069 OS_REL='' |
979 test -r /etc/.relid \ | 1070 test -r /etc/.relid \ |
980 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | 1071 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
981 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | 1072 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
982 && echo i486-ncr-sysv4.3${OS_REL} && exit 0 | 1073 && echo i486-ncr-sysv4.3${OS_REL} && exit 0 |
995 echo i386-unknown-lynxos${UNAME_RELEASE} | 1086 echo i386-unknown-lynxos${UNAME_RELEASE} |
996 exit 0 ;; | 1087 exit 0 ;; |
997 TSUNAMI:LynxOS:2.*:*) | 1088 TSUNAMI:LynxOS:2.*:*) |
998 echo sparc-unknown-lynxos${UNAME_RELEASE} | 1089 echo sparc-unknown-lynxos${UNAME_RELEASE} |
999 exit 0 ;; | 1090 exit 0 ;; |
1000 rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) | 1091 rs6000:LynxOS:2.*:*) |
1001 echo rs6000-unknown-lynxos${UNAME_RELEASE} | 1092 echo rs6000-unknown-lynxos${UNAME_RELEASE} |
1093 exit 0 ;; | |
1094 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*) | |
1095 echo powerpc-unknown-lynxos${UNAME_RELEASE} | |
1002 exit 0 ;; | 1096 exit 0 ;; |
1003 SM[BE]S:UNIX_SV:*:*) | 1097 SM[BE]S:UNIX_SV:*:*) |
1004 echo mips-dde-sysv${UNAME_RELEASE} | 1098 echo mips-dde-sysv${UNAME_RELEASE} |
1005 exit 0 ;; | 1099 exit 0 ;; |
1006 RM*:ReliantUNIX-*:*:*) | 1100 RM*:ReliantUNIX-*:*:*) |
1031 echo i860-stratus-sysv4 | 1125 echo i860-stratus-sysv4 |
1032 exit 0 ;; | 1126 exit 0 ;; |
1033 mc68*:A/UX:*:*) | 1127 mc68*:A/UX:*:*) |
1034 echo m68k-apple-aux${UNAME_RELEASE} | 1128 echo m68k-apple-aux${UNAME_RELEASE} |
1035 exit 0 ;; | 1129 exit 0 ;; |
1036 news*:NEWS-OS:*:6*) | 1130 news*:NEWS-OS:6*:*) |
1037 echo mips-sony-newsos6 | 1131 echo mips-sony-newsos6 |
1038 exit 0 ;; | 1132 exit 0 ;; |
1039 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) | 1133 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1040 if [ -d /usr/nec ]; then | 1134 if [ -d /usr/nec ]; then |
1041 echo mips-nec-sysv${UNAME_RELEASE} | 1135 echo mips-nec-sysv${UNAME_RELEASE} |
1074 echo `uname -p`-${UNAME_MACHINE}-nto-qnx | 1168 echo `uname -p`-${UNAME_MACHINE}-nto-qnx |
1075 exit 0 ;; | 1169 exit 0 ;; |
1076 *:QNX:*:4*) | 1170 *:QNX:*:4*) |
1077 echo i386-pc-qnx | 1171 echo i386-pc-qnx |
1078 exit 0 ;; | 1172 exit 0 ;; |
1079 NSR-W:NONSTOP_KERNEL:*:*) | 1173 NSR-[KW]:NONSTOP_KERNEL:*:*) |
1080 echo nsr-tandem-nsk${UNAME_RELEASE} | 1174 echo nsr-tandem-nsk${UNAME_RELEASE} |
1175 exit 0 ;; | |
1176 *:NonStop-UX:*:*) | |
1177 echo mips-compaq-nonstopux | |
1081 exit 0 ;; | 1178 exit 0 ;; |
1082 BS2000:POSIX*:*:*) | 1179 BS2000:POSIX*:*:*) |
1083 echo bs2000-siemens-sysv | 1180 echo bs2000-siemens-sysv |
1084 exit 0 ;; | 1181 exit 0 ;; |
1085 DS/*:UNIX_System_V:*:*) | 1182 DS/*:UNIX_System_V:*:*) |
1086 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | 1183 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} |
1184 exit 0 ;; | |
1185 *:Plan9:*:*) | |
1186 # "uname -m" is not consistent, so use $cputype instead. 386 | |
1187 # is converted to i386 for consistency with other x86 | |
1188 # operating systems. | |
1189 if test "$cputype" = "386"; then | |
1190 UNAME_MACHINE=i386 | |
1191 else | |
1192 UNAME_MACHINE="$cputype" | |
1193 fi | |
1194 echo ${UNAME_MACHINE}-unknown-plan9 | |
1195 exit 0 ;; | |
1196 i?86:OS/2:*:*) | |
1197 # If we were able to find `uname', then EMX Unix compatibility | |
1198 # is probably installed. | |
1199 echo ${UNAME_MACHINE}-pc-os2-emx | |
1200 exit 0 ;; | |
1201 *:TOPS-10:*:*) | |
1202 echo pdp10-unknown-tops10 | |
1203 exit 0 ;; | |
1204 *:TENEX:*:*) | |
1205 echo pdp10-unknown-tenex | |
1206 exit 0 ;; | |
1207 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) | |
1208 echo pdp10-dec-tops20 | |
1209 exit 0 ;; | |
1210 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) | |
1211 echo pdp10-xkl-tops20 | |
1212 exit 0 ;; | |
1213 *:TOPS-20:*:*) | |
1214 echo pdp10-unknown-tops20 | |
1215 exit 0 ;; | |
1216 *:ITS:*:*) | |
1217 echo pdp10-unknown-its | |
1087 exit 0 ;; | 1218 exit 0 ;; |
1088 esac | 1219 esac |
1089 | 1220 |
1090 #echo '(No uname command or uname output not recognized.)' 1>&2 | 1221 #echo '(No uname command or uname output not recognized.)' 1>&2 |
1091 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 | 1222 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 |
1225 fi | 1356 fi |
1226 | 1357 |
1227 cat >&2 <<EOF | 1358 cat >&2 <<EOF |
1228 $0: unable to guess system type | 1359 $0: unable to guess system type |
1229 | 1360 |
1230 The $version version of this script cannot recognize your system type. | 1361 This script, last modified $timestamp, has failed to recognize |
1231 Please download the most up to date version of the config scripts: | 1362 the operating system you are using. It is advised that you |
1363 download the most up to date version of the config scripts from | |
1232 | 1364 |
1233 ftp://ftp.gnu.org/pub/gnu/config/ | 1365 ftp://ftp.gnu.org/pub/gnu/config/ |
1234 | 1366 |
1235 If the version you run ($0) is already up to date, please | 1367 If the version you run ($0) is already up to date, please |
1236 send the following data and any information you think might be | 1368 send the following data and any information you think might be |
1237 pertinent to <config-patches@gnu.org> in order to provide the needed | 1369 pertinent to <config-patches@gnu.org> in order to provide the needed |
1238 information to handle your system. | 1370 information to handle your system. |
1239 | 1371 |
1240 config.guess version = $version | 1372 config.guess timestamp = $timestamp |
1241 | 1373 |
1242 uname -m = `(uname -m) 2>/dev/null || echo unknown` | 1374 uname -m = `(uname -m) 2>/dev/null || echo unknown` |
1243 uname -r = `(uname -r) 2>/dev/null || echo unknown` | 1375 uname -r = `(uname -r) 2>/dev/null || echo unknown` |
1244 uname -s = `(uname -s) 2>/dev/null || echo unknown` | 1376 uname -s = `(uname -s) 2>/dev/null || echo unknown` |
1245 uname -v = `(uname -v) 2>/dev/null || echo unknown` | 1377 uname -v = `(uname -v) 2>/dev/null || echo unknown` |
1262 | 1394 |
1263 exit 1 | 1395 exit 1 |
1264 | 1396 |
1265 # Local variables: | 1397 # Local variables: |
1266 # eval: (add-hook 'write-file-hooks 'time-stamp) | 1398 # eval: (add-hook 'write-file-hooks 'time-stamp) |
1267 # time-stamp-start: "version='" | 1399 # time-stamp-start: "timestamp='" |
1268 # time-stamp-format: "%:y-%02m-%02d" | 1400 # time-stamp-format: "%:y-%02m-%02d" |
1269 # time-stamp-end: "'" | 1401 # time-stamp-end: "'" |
1270 # End: | 1402 # End: |