Mercurial > hg > xemacs-beta
comparison config.guess @ 410:de805c49cfc1 r21-2-35
Import from CVS: tag r21-2-35
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:19:21 +0200 |
parents | 74fd4e045ea6 |
children | 697ef44129c6 |
comparison
equal
deleted
inserted
replaced
409:301b9ebbdf3b | 410:de805c49cfc1 |
---|---|
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, 2000 |
4 # Free Software Foundation, Inc. | 4 # Free Software Foundation, Inc. |
5 # | 5 |
6 version='2000-05-30' | |
7 | |
6 # 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 |
7 # 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 |
8 # the Free Software Foundation; either version 2 of the License, or | 10 # the Free Software Foundation; either version 2 of the License, or |
9 # (at your option) any later version. | 11 # (at your option) any later version. |
10 # | 12 # |
21 # distribute this file as part of a program that contains a | 23 # distribute this file as part of a program that contains a |
22 # configuration script generated by Autoconf, you may include it under | 24 # configuration script generated by Autoconf, you may include it under |
23 # the same distribution terms that you use for the rest of that program. | 25 # the same distribution terms that you use for the rest of that program. |
24 | 26 |
25 # Written by Per Bothner <bothner@cygnus.com>. | 27 # Written by Per Bothner <bothner@cygnus.com>. |
26 # The master version of this file is at the FSF in /home/gd/gnu/lib. | 28 # Please send patches to <config-patches@gnu.org>. |
27 # Please send patches to <autoconf-patches@gnu.org>. | |
28 # | 29 # |
29 # This script attempts to guess a canonical system name similar to | 30 # This script attempts to guess a canonical system name similar to |
30 # 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 |
31 # exits with 0. Otherwise, it exits with 1. | 32 # exits with 0. Otherwise, it exits with 1. |
32 # | 33 # |
34 # don't specify an explicit system type (host/target name). | 35 # don't specify an explicit system type (host/target name). |
35 # | 36 # |
36 # 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 |
37 # (but try to keep the structure clean). | 38 # (but try to keep the structure clean). |
38 # | 39 # |
40 | |
41 me=`echo "$0" | sed -e 's,.*/,,'` | |
42 | |
43 usage="\ | |
44 Usage: $0 [OPTION] | |
45 | |
46 Output the configuration name of this system. | |
47 | |
48 Operation modes: | |
49 -h, --help print this help, then exit | |
50 -V, --version print version number, then exit" | |
51 | |
52 help=" | |
53 Try \`$me --help' for more information." | |
54 | |
55 # Parse command line | |
56 while test $# -gt 0 ; do | |
57 case "$1" in | |
58 --version | --vers* | -V ) | |
59 echo "$version" ; exit 0 ;; | |
60 --help | --h* | -h ) | |
61 echo "$usage"; exit 0 ;; | |
62 -- ) # Stop option processing | |
63 shift; break ;; | |
64 - ) # Use stdin as input. | |
65 break ;; | |
66 -* ) | |
67 exec >&2 | |
68 echo "$me: invalid option $1" | |
69 echo "$help" | |
70 exit 1 ;; | |
71 * ) | |
72 break ;; | |
73 esac | |
74 done | |
75 | |
76 if test $# != 0; then | |
77 echo "$me: too many arguments$help" >&2 | |
78 exit 1 | |
79 fi | |
39 | 80 |
40 # Use $HOST_CC if defined. $CC may point to a cross-compiler | 81 # Use $HOST_CC if defined. $CC may point to a cross-compiler |
41 if test x"$CC_FOR_BUILD" = x; then | 82 if test x"$CC_FOR_BUILD" = x; then |
42 if test x"$HOST_CC" != x; then | 83 if test x"$HOST_CC" != x; then |
43 CC_FOR_BUILD="$HOST_CC" | 84 CC_FOR_BUILD="$HOST_CC" |
66 trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 | 107 trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 |
67 | 108 |
68 # Note: order is significant - the case branches are not exclusive. | 109 # Note: order is significant - the case branches are not exclusive. |
69 | 110 |
70 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | 111 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
112 *:NetBSD:*:*) | |
113 # Netbsd (nbsd) targets should (where applicable) match one or | |
114 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, | |
115 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently | |
116 # switched to ELF, *-*-netbsd* would select the old | |
117 # object file format. This provides both forward | |
118 # compatibility and a consistent mechanism for selecting the | |
119 # object file format. | |
120 # Determine the machine/vendor (is the vendor relevant). | |
121 case "${UNAME_MACHINE}" in | |
122 amiga) machine=m68k-cbm ;; | |
123 arm32) machine=arm-unknown ;; | |
124 atari*) machine=m68k-atari ;; | |
125 sun3*) machine=m68k-sun ;; | |
126 mac68k) machine=m68k-apple ;; | |
127 macppc) machine=powerpc-apple ;; | |
128 hp3[0-9][05]) machine=m68k-hp ;; | |
129 ibmrt|romp-ibm) machine=romp-ibm ;; | |
130 *) machine=${UNAME_MACHINE}-unknown ;; | |
131 esac | |
132 # The Operating System including object format. | |
133 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | |
134 | grep __ELF__ >/dev/null | |
135 then | |
136 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). | |
137 # Return netbsd for either. FIX? | |
138 os=netbsd | |
139 else | |
140 os=netbsdelf | |
141 fi | |
142 # The OS release | |
143 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | |
144 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | |
145 # contains redundant information, the shorter form: | |
146 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | |
147 echo "${machine}-${os}${release}" | |
148 exit 0 ;; | |
71 alpha:OSF1:*:*) | 149 alpha:OSF1:*:*) |
72 if test $UNAME_RELEASE = "V4.0"; then | 150 if test $UNAME_RELEASE = "V4.0"; then |
73 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | 151 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
74 fi | 152 fi |
75 # A Vn.n version is a released version. | 153 # A Vn.n version is a released version. |
76 # A Tn.n version is a released field test version. | 154 # A Tn.n version is a released field test version. |
77 # A Xn.n version is an unreleased experimental baselevel. | 155 # A Xn.n version is an unreleased experimental baselevel. |
78 # 1.2 uses "1.2" for uname -r. | 156 # 1.2 uses "1.2" for uname -r. |
79 cat <<EOF >$dummy.s | 157 cat <<EOF >$dummy.s |
158 .data | |
159 \$Lformat: | |
160 .byte 37,100,45,37,120,10,0 # "%d-%x\n" | |
161 | |
162 .text | |
80 .globl main | 163 .globl main |
164 .align 4 | |
81 .ent main | 165 .ent main |
82 main: | 166 main: |
83 .frame \$30,0,\$26,0 | 167 .frame \$30,16,\$26,0 |
84 .prologue 0 | 168 ldgp \$29,0(\$27) |
85 .long 0x47e03d80 # implver $0 | 169 .prologue 1 |
86 lda \$2,259 | 170 .long 0x47e03d80 # implver \$0 |
87 .long 0x47e20c21 # amask $2,$1 | 171 lda \$2,-1 |
88 srl \$1,8,\$2 | 172 .long 0x47e20c21 # amask \$2,\$1 |
89 sll \$2,2,\$2 | 173 lda \$16,\$Lformat |
90 sll \$0,3,\$0 | 174 mov \$0,\$17 |
91 addl \$1,\$0,\$0 | 175 not \$1,\$18 |
92 addl \$2,\$0,\$0 | 176 jsr \$26,printf |
93 ret \$31,(\$26),1 | 177 ldgp \$29,0(\$26) |
178 mov 0,\$16 | |
179 jsr \$26,exit | |
94 .end main | 180 .end main |
95 EOF | 181 EOF |
96 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null | 182 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null |
97 if test "$?" = 0 ; then | 183 if test "$?" = 0 ; then |
98 ./$dummy | 184 case `./$dummy` in |
99 case "$?" in | 185 0-0) |
100 7) | |
101 UNAME_MACHINE="alpha" | 186 UNAME_MACHINE="alpha" |
102 ;; | 187 ;; |
103 15) | 188 1-0) |
104 UNAME_MACHINE="alphaev5" | 189 UNAME_MACHINE="alphaev5" |
105 ;; | 190 ;; |
106 14) | 191 1-1) |
107 UNAME_MACHINE="alphaev56" | 192 UNAME_MACHINE="alphaev56" |
108 ;; | 193 ;; |
109 10) | 194 1-101) |
110 UNAME_MACHINE="alphapca56" | 195 UNAME_MACHINE="alphapca56" |
111 ;; | 196 ;; |
112 16) | 197 2-303) |
113 UNAME_MACHINE="alphaev6" | 198 UNAME_MACHINE="alphaev6" |
199 ;; | |
200 2-307) | |
201 UNAME_MACHINE="alphaev67" | |
114 ;; | 202 ;; |
115 esac | 203 esac |
116 fi | 204 fi |
117 rm -f $dummy.s $dummy | 205 rm -f $dummy.s $dummy |
118 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | 206 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
127 echo alpha-dec-winnt3.5 | 215 echo alpha-dec-winnt3.5 |
128 exit 0 ;; | 216 exit 0 ;; |
129 Amiga*:UNIX_System_V:4.0:*) | 217 Amiga*:UNIX_System_V:4.0:*) |
130 echo m68k-cbm-sysv4 | 218 echo m68k-cbm-sysv4 |
131 exit 0;; | 219 exit 0;; |
132 amiga:NetBSD:*:*) | |
133 echo m68k-cbm-netbsd${UNAME_RELEASE} | |
134 exit 0 ;; | |
135 amiga:OpenBSD:*:*) | 220 amiga:OpenBSD:*:*) |
136 echo m68k-unknown-openbsd${UNAME_RELEASE} | 221 echo m68k-unknown-openbsd${UNAME_RELEASE} |
137 exit 0 ;; | 222 exit 0 ;; |
138 *:[Aa]miga[Oo][Ss]:*:*) | 223 *:[Aa]miga[Oo][Ss]:*:*) |
139 echo ${UNAME_MACHINE}-unknown-amigaos | 224 echo ${UNAME_MACHINE}-unknown-amigaos |
160 echo i370-ibm-openedition | 245 echo i370-ibm-openedition |
161 exit 0 ;; | 246 exit 0 ;; |
162 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | 247 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
163 echo arm-acorn-riscix${UNAME_RELEASE} | 248 echo arm-acorn-riscix${UNAME_RELEASE} |
164 exit 0;; | 249 exit 0;; |
165 arm32:NetBSD:*:*) | |
166 echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | |
167 exit 0 ;; | |
168 SR2?01:HI-UX/MPP:*:*) | 250 SR2?01:HI-UX/MPP:*:*) |
169 echo hppa1.1-hitachi-hiuxmpp | 251 echo hppa1.1-hitachi-hiuxmpp |
170 exit 0;; | 252 exit 0;; |
171 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) | 253 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
172 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. | 254 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. |
219 esac | 301 esac |
220 exit 0 ;; | 302 exit 0 ;; |
221 aushp:SunOS:*:*) | 303 aushp:SunOS:*:*) |
222 echo sparc-auspex-sunos${UNAME_RELEASE} | 304 echo sparc-auspex-sunos${UNAME_RELEASE} |
223 exit 0 ;; | 305 exit 0 ;; |
224 atari*:NetBSD:*:*) | |
225 echo m68k-atari-netbsd${UNAME_RELEASE} | |
226 exit 0 ;; | |
227 atari*:OpenBSD:*:*) | 306 atari*:OpenBSD:*:*) |
228 echo m68k-unknown-openbsd${UNAME_RELEASE} | 307 echo m68k-unknown-openbsd${UNAME_RELEASE} |
229 exit 0 ;; | 308 exit 0 ;; |
230 # The situation for MiNT is a little confusing. The machine name | 309 # The situation for MiNT is a little confusing. The machine name |
231 # can be virtually everything (everything which is not | 310 # can be virtually everything (everything which is not |
232 # "atarist" or "atariste" at least should have a processor | 311 # "atarist" or "atariste" at least should have a processor |
233 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" | 312 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" |
234 # to the lowercase version "mint" (or "freemint"). Finally | 313 # to the lowercase version "mint" (or "freemint"). Finally |
235 # the system name "TOS" denotes a system which is actually not | 314 # the system name "TOS" denotes a system which is actually not |
236 # MiNT. But MiNT is downward compatible to TOS, so this should | 315 # MiNT. But MiNT is downward compatible to TOS, so this should |
237 # be no problem. | 316 # be no problem. |
251 echo m68k-hades-mint${UNAME_RELEASE} | 330 echo m68k-hades-mint${UNAME_RELEASE} |
252 exit 0 ;; | 331 exit 0 ;; |
253 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) | 332 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
254 echo m68k-unknown-mint${UNAME_RELEASE} | 333 echo m68k-unknown-mint${UNAME_RELEASE} |
255 exit 0 ;; | 334 exit 0 ;; |
256 sun3*:NetBSD:*:*) | |
257 echo m68k-sun-netbsd${UNAME_RELEASE} | |
258 exit 0 ;; | |
259 sun3*:OpenBSD:*:*) | 335 sun3*:OpenBSD:*:*) |
260 echo m68k-unknown-openbsd${UNAME_RELEASE} | 336 echo m68k-unknown-openbsd${UNAME_RELEASE} |
261 exit 0 ;; | 337 exit 0 ;; |
262 mac68k:NetBSD:*:*) | |
263 echo m68k-apple-netbsd${UNAME_RELEASE} | |
264 exit 0 ;; | |
265 mac68k:OpenBSD:*:*) | 338 mac68k:OpenBSD:*:*) |
266 echo m68k-unknown-openbsd${UNAME_RELEASE} | 339 echo m68k-unknown-openbsd${UNAME_RELEASE} |
267 exit 0 ;; | 340 exit 0 ;; |
268 mvme68k:OpenBSD:*:*) | 341 mvme68k:OpenBSD:*:*) |
269 echo m68k-unknown-openbsd${UNAME_RELEASE} | 342 echo m68k-unknown-openbsd${UNAME_RELEASE} |
272 echo m88k-unknown-openbsd${UNAME_RELEASE} | 345 echo m88k-unknown-openbsd${UNAME_RELEASE} |
273 exit 0 ;; | 346 exit 0 ;; |
274 powerpc:machten:*:*) | 347 powerpc:machten:*:*) |
275 echo powerpc-apple-machten${UNAME_RELEASE} | 348 echo powerpc-apple-machten${UNAME_RELEASE} |
276 exit 0 ;; | 349 exit 0 ;; |
277 macppc:NetBSD:*:*) | |
278 echo powerpc-apple-netbsd${UNAME_RELEASE} | |
279 exit 0 ;; | |
280 RISC*:Mach:*:*) | 350 RISC*:Mach:*:*) |
281 echo mips-dec-mach_bsd4.3 | 351 echo mips-dec-mach_bsd4.3 |
282 exit 0 ;; | 352 exit 0 ;; |
283 RISC*:ULTRIX:*:*) | 353 RISC*:ULTRIX:*:*) |
284 echo mips-dec-ultrix${UNAME_RELEASE} | 354 echo mips-dec-ultrix${UNAME_RELEASE} |
290 echo clipper-intergraph-clix${UNAME_RELEASE} | 360 echo clipper-intergraph-clix${UNAME_RELEASE} |
291 exit 0 ;; | 361 exit 0 ;; |
292 mips:*:*:UMIPS | mips:*:*:RISCos) | 362 mips:*:*:UMIPS | mips:*:*:RISCos) |
293 sed 's/^ //' << EOF >$dummy.c | 363 sed 's/^ //' << EOF >$dummy.c |
294 #ifdef __cplusplus | 364 #ifdef __cplusplus |
365 #include <stdio.h> /* for printf() prototype */ | |
295 int main (int argc, char *argv[]) { | 366 int main (int argc, char *argv[]) { |
296 #else | 367 #else |
297 int main (argc, argv) int argc; char *argv[]; { | 368 int main (argc, argv) int argc; char *argv[]; { |
298 #endif | 369 #endif |
299 #if defined (host_mips) && defined (MIPSEB) | 370 #if defined (host_mips) && defined (MIPSEB) |
329 echo m88k-motorola-sysv3 | 400 echo m88k-motorola-sysv3 |
330 exit 0 ;; | 401 exit 0 ;; |
331 AViiON:dgux:*:*) | 402 AViiON:dgux:*:*) |
332 # DG/UX returns AViiON for all architectures | 403 # DG/UX returns AViiON for all architectures |
333 UNAME_PROCESSOR=`/usr/bin/uname -p` | 404 UNAME_PROCESSOR=`/usr/bin/uname -p` |
334 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110] | 405 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] |
335 then | 406 then |
336 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ | 407 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ |
337 [ ${TARGET_BINARY_INTERFACE}x = x ] | 408 [ ${TARGET_BINARY_INTERFACE}x = x ] |
338 then | 409 then |
339 echo m88k-dg-dgux${UNAME_RELEASE} | 410 echo m88k-dg-dgux${UNAME_RELEASE} |
406 echo rs6000-ibm-aix | 477 echo rs6000-ibm-aix |
407 exit 0 ;; | 478 exit 0 ;; |
408 ibmrt:4.4BSD:*|romp-ibm:BSD:*) | 479 ibmrt:4.4BSD:*|romp-ibm:BSD:*) |
409 echo romp-ibm-bsd4.4 | 480 echo romp-ibm-bsd4.4 |
410 exit 0 ;; | 481 exit 0 ;; |
411 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and | 482 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
412 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to | 483 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to |
413 exit 0 ;; # report: romp-ibm BSD 4.3 | 484 exit 0 ;; # report: romp-ibm BSD 4.3 |
414 *:BOSX:*:*) | 485 *:BOSX:*:*) |
415 echo rs6000-bull-bosx | 486 echo rs6000-bull-bosx |
416 exit 0 ;; | 487 exit 0 ;; |
427 case "${UNAME_MACHINE}" in | 498 case "${UNAME_MACHINE}" in |
428 9000/31? ) HP_ARCH=m68000 ;; | 499 9000/31? ) HP_ARCH=m68000 ;; |
429 9000/[34]?? ) HP_ARCH=m68k ;; | 500 9000/[34]?? ) HP_ARCH=m68k ;; |
430 9000/[678][0-9][0-9]) | 501 9000/[678][0-9][0-9]) |
431 sed 's/^ //' << EOF >$dummy.c | 502 sed 's/^ //' << EOF >$dummy.c |
503 | |
504 #define _HPUX_SOURCE | |
432 #include <stdlib.h> | 505 #include <stdlib.h> |
433 #include <unistd.h> | 506 #include <unistd.h> |
434 | 507 |
435 int main () | 508 int main () |
436 { | 509 { |
551 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | 624 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ |
552 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ | 625 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
553 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ | 626 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ |
554 exit 0 ;; | 627 exit 0 ;; |
555 CRAY*TS:*:*:*) | 628 CRAY*TS:*:*:*) |
556 echo t90-cray-unicos${UNAME_RELEASE} | 629 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
557 exit 0 ;; | 630 exit 0 ;; |
558 CRAY*T3E:*:*:*) | 631 CRAY*T3E:*:*:*) |
559 echo alpha-cray-unicosmk${UNAME_RELEASE} | 632 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
633 exit 0 ;; | |
634 CRAY*SV1:*:*:*) | |
635 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
560 exit 0 ;; | 636 exit 0 ;; |
561 CRAY-2:*:*:*) | 637 CRAY-2:*:*:*) |
562 echo cray2-cray-unicos | 638 echo cray2-cray-unicos |
563 exit 0 ;; | 639 exit 0 ;; |
564 F300:UNIX_System_V:*:*) | 640 F300:UNIX_System_V:*:*) |
567 echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 643 echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
568 exit 0 ;; | 644 exit 0 ;; |
569 F301:UNIX_System_V:*:*) | 645 F301:UNIX_System_V:*:*) |
570 echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` | 646 echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` |
571 exit 0 ;; | 647 exit 0 ;; |
572 hp3[0-9][05]:NetBSD:*:*) | |
573 echo m68k-hp-netbsd${UNAME_RELEASE} | |
574 exit 0 ;; | |
575 hp300:OpenBSD:*:*) | 648 hp300:OpenBSD:*:*) |
576 echo m68k-unknown-openbsd${UNAME_RELEASE} | 649 echo m68k-unknown-openbsd${UNAME_RELEASE} |
577 exit 0 ;; | 650 exit 0 ;; |
578 i?86:BSD/386:*:* | i?86:BSD/OS:*:*) | 651 i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
579 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | 652 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
580 exit 0 ;; | 653 exit 0 ;; |
581 sparc*:BSD/OS:*:*) | 654 sparc*:BSD/OS:*:*) |
582 echo sparc-unknown-bsdi${UNAME_RELEASE} | 655 echo sparc-unknown-bsdi${UNAME_RELEASE} |
583 exit 0 ;; | 656 exit 0 ;; |
584 *:BSD/OS:*:*) | 657 *:BSD/OS:*:*) |
585 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} | 658 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |
586 exit 0 ;; | 659 exit 0 ;; |
587 *:FreeBSD:*:*) | 660 *:FreeBSD:*:*) |
588 if test -x /usr/bin/objformat; then | |
589 if test "elf" = "`/usr/bin/objformat`"; then | |
590 echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` | |
591 exit 0 | |
592 fi | |
593 fi | |
594 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | 661 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
595 exit 0 ;; | |
596 *:NetBSD:*:*) | |
597 echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` | |
598 exit 0 ;; | 662 exit 0 ;; |
599 *:OpenBSD:*:*) | 663 *:OpenBSD:*:*) |
600 echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | 664 echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
601 exit 0 ;; | 665 exit 0 ;; |
602 i*:CYGWIN*:*) | 666 i*:CYGWIN*:*) |
642 ;; | 706 ;; |
643 i?86linux) | 707 i?86linux) |
644 echo "${UNAME_MACHINE}-pc-linux-gnuaout" | 708 echo "${UNAME_MACHINE}-pc-linux-gnuaout" |
645 exit 0 | 709 exit 0 |
646 ;; | 710 ;; |
711 elf_i?86) | |
712 echo "${UNAME_MACHINE}-pc-linux" | |
713 exit 0 | |
714 ;; | |
647 i?86coff) | 715 i?86coff) |
648 echo "${UNAME_MACHINE}-pc-linux-gnucoff" | 716 echo "${UNAME_MACHINE}-pc-linux-gnucoff" |
649 exit 0 | 717 exit 0 |
650 ;; | 718 ;; |
651 sparclinux) | 719 sparclinux) |
655 armlinux) | 723 armlinux) |
656 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" | 724 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" |
657 exit 0 | 725 exit 0 |
658 ;; | 726 ;; |
659 elf32arm*) | 727 elf32arm*) |
660 echo "${UNAME_MACHINE}-unknown-linux-gnu" | 728 echo "${UNAME_MACHINE}-unknown-linux-gnuoldld" |
661 exit 0 | 729 exit 0 |
662 ;; | 730 ;; |
663 armelf_linux*) | 731 armelf_linux*) |
664 echo "${UNAME_MACHINE}-unknown-linux-gnu" | 732 echo "${UNAME_MACHINE}-unknown-linux-gnu" |
665 exit 0 | 733 exit 0 |
666 ;; | 734 ;; |
667 m68klinux) | 735 m68klinux) |
668 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" | 736 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" |
669 exit 0 | 737 exit 0 |
670 ;; | 738 ;; |
671 elf32ppc) | 739 elf32ppc | elf32ppclinux) |
672 # Determine Lib Version | 740 # Determine Lib Version |
673 cat >$dummy.c <<EOF | 741 cat >$dummy.c <<EOF |
674 #include <features.h> | 742 #include <features.h> |
675 #if defined(__GLIBC__) | 743 #if defined(__GLIBC__) |
676 extern char __libc_version[]; | 744 extern char __libc_version[]; |
693 if test "$?" = 0 ; then | 761 if test "$?" = 0 ; then |
694 ./$dummy | grep 1\.99 > /dev/null | 762 ./$dummy | grep 1\.99 > /dev/null |
695 if test "$?" = 0 ; then | 763 if test "$?" = 0 ; then |
696 LIBC="libc1" | 764 LIBC="libc1" |
697 fi | 765 fi |
698 fi | 766 fi |
699 rm -f $dummy.c $dummy | 767 rm -f $dummy.c $dummy |
700 echo powerpc-unknown-linux-gnu${LIBC} | 768 echo powerpc-unknown-linux-gnu${LIBC} |
701 exit 0 | 769 exit 0 |
702 ;; | 770 ;; |
771 shelf_linux) | |
772 echo "${UNAME_MACHINE}-unknown-linux-gnu" | |
773 exit 0 | |
774 ;; | |
703 esac | 775 esac |
704 | 776 |
705 if test "${UNAME_MACHINE}" = "alpha" ; then | 777 if test "${UNAME_MACHINE}" = "alpha" ; then |
706 sed 's/^ //' <<EOF >$dummy.s | 778 cat <<EOF >$dummy.s |
707 .globl main | 779 .data |
708 .ent main | 780 \$Lformat: |
709 main: | 781 .byte 37,100,45,37,120,10,0 # "%d-%x\n" |
710 .frame \$30,0,\$26,0 | 782 |
711 .prologue 0 | 783 .text |
712 .long 0x47e03d80 # implver $0 | 784 .globl main |
713 lda \$2,259 | 785 .align 4 |
714 .long 0x47e20c21 # amask $2,$1 | 786 .ent main |
715 srl \$1,8,\$2 | 787 main: |
716 sll \$2,2,\$2 | 788 .frame \$30,16,\$26,0 |
717 sll \$0,3,\$0 | 789 ldgp \$29,0(\$27) |
718 addl \$1,\$0,\$0 | 790 .prologue 1 |
719 addl \$2,\$0,\$0 | 791 .long 0x47e03d80 # implver \$0 |
720 ret \$31,(\$26),1 | 792 lda \$2,-1 |
721 .end main | 793 .long 0x47e20c21 # amask \$2,\$1 |
794 lda \$16,\$Lformat | |
795 mov \$0,\$17 | |
796 not \$1,\$18 | |
797 jsr \$26,printf | |
798 ldgp \$29,0(\$26) | |
799 mov 0,\$16 | |
800 jsr \$26,exit | |
801 .end main | |
722 EOF | 802 EOF |
723 LIBC="" | 803 LIBC="" |
724 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null | 804 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null |
725 if test "$?" = 0 ; then | 805 if test "$?" = 0 ; then |
726 ./$dummy | 806 case `./$dummy` in |
727 case "$?" in | 807 0-0) |
728 7) | |
729 UNAME_MACHINE="alpha" | 808 UNAME_MACHINE="alpha" |
730 ;; | 809 ;; |
731 15) | 810 1-0) |
732 UNAME_MACHINE="alphaev5" | 811 UNAME_MACHINE="alphaev5" |
733 ;; | 812 ;; |
734 14) | 813 1-1) |
735 UNAME_MACHINE="alphaev56" | 814 UNAME_MACHINE="alphaev56" |
736 ;; | 815 ;; |
737 10) | 816 1-101) |
738 UNAME_MACHINE="alphapca56" | 817 UNAME_MACHINE="alphapca56" |
739 ;; | 818 ;; |
740 16) | 819 2-303) |
741 UNAME_MACHINE="alphaev6" | 820 UNAME_MACHINE="alphaev6" |
821 ;; | |
822 2-307) | |
823 UNAME_MACHINE="alphaev67" | |
742 ;; | 824 ;; |
743 esac | 825 esac |
744 | 826 |
745 objdump --private-headers $dummy | \ | 827 objdump --private-headers $dummy | \ |
746 grep ld.so.1 > /dev/null | 828 grep ld.so.1 > /dev/null |
751 rm -f $dummy.s $dummy | 833 rm -f $dummy.s $dummy |
752 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 | 834 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 |
753 elif test "${UNAME_MACHINE}" = "mips" ; then | 835 elif test "${UNAME_MACHINE}" = "mips" ; then |
754 cat >$dummy.c <<EOF | 836 cat >$dummy.c <<EOF |
755 #ifdef __cplusplus | 837 #ifdef __cplusplus |
838 #include <stdio.h> /* for printf() prototype */ | |
756 int main (int argc, char *argv[]) { | 839 int main (int argc, char *argv[]) { |
757 #else | 840 #else |
758 int main (argc, argv) int argc; char *argv[]; { | 841 int main (argc, argv) int argc; char *argv[]; { |
759 #endif | 842 #endif |
760 #ifdef __MIPSEB__ | 843 #ifdef __MIPSEB__ |
766 return 0; | 849 return 0; |
767 } | 850 } |
768 EOF | 851 EOF |
769 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 | 852 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 |
770 rm -f $dummy.c $dummy | 853 rm -f $dummy.c $dummy |
854 elif test "${UNAME_MACHINE}" = "s390"; then | |
855 echo s390-ibm-linux && exit 0 | |
771 else | 856 else |
772 # Either a pre-BFD a.out linker (linux-gnuoldld) | 857 # Either a pre-BFD a.out linker (linux-gnuoldld) |
773 # or one that does not give us useful --help. | 858 # or one that does not give us useful --help. |
774 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. | 859 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. |
775 # If ld does not provide *any* "supported emulations:" | 860 # If ld does not provide *any* "supported emulations:" |
787 esac | 872 esac |
788 # Determine whether the default compiler is a.out or elf | 873 # Determine whether the default compiler is a.out or elf |
789 cat >$dummy.c <<EOF | 874 cat >$dummy.c <<EOF |
790 #include <features.h> | 875 #include <features.h> |
791 #ifdef __cplusplus | 876 #ifdef __cplusplus |
877 #include <stdio.h> /* for printf() prototype */ | |
792 int main (int argc, char *argv[]) { | 878 int main (int argc, char *argv[]) { |
793 #else | 879 #else |
794 int main (argc, argv) int argc; char *argv[]; { | 880 int main (argc, argv) int argc; char *argv[]; { |
795 #endif | 881 #endif |
796 #ifdef __ELF__ | 882 #ifdef __ELF__ |
858 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | 944 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL |
859 else | 945 else |
860 echo ${UNAME_MACHINE}-pc-sysv32 | 946 echo ${UNAME_MACHINE}-pc-sysv32 |
861 fi | 947 fi |
862 exit 0 ;; | 948 exit 0 ;; |
949 i?86:*DOS:*:*) | |
950 echo ${UNAME_MACHINE}-pc-msdosdjgpp | |
951 exit 0 ;; | |
863 pc:*:*:*) | 952 pc:*:*:*) |
953 # Left here for compatibility: | |
864 # uname -m prints for DJGPP always 'pc', but it prints nothing about | 954 # uname -m prints for DJGPP always 'pc', but it prints nothing about |
865 # the processor, so we play safe by assuming i386. | 955 # the processor, so we play safe by assuming i386. |
866 echo i386-pc-msdosdjgpp | 956 echo i386-pc-msdosdjgpp |
867 exit 0 ;; | 957 exit 0 ;; |
868 Intel:Mach:3*:*) | 958 Intel:Mach:3*:*) |
972 echo powerpc-apple-rhapsody${UNAME_RELEASE} | 1062 echo powerpc-apple-rhapsody${UNAME_RELEASE} |
973 exit 0 ;; | 1063 exit 0 ;; |
974 *:Rhapsody:*:*) | 1064 *:Rhapsody:*:*) |
975 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | 1065 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} |
976 exit 0 ;; | 1066 exit 0 ;; |
1067 *:Darwin:*:*) | |
1068 echo `uname -p`-apple-darwin${UNAME_RELEASE} | |
1069 exit 0 ;; | |
1070 *:procnto*:*:* | *:QNX:[0123456789]*:*) | |
1071 if test "${UNAME_MACHINE}" = "x86pc"; then | |
1072 UNAME_MACHINE=pc | |
1073 fi | |
1074 echo `uname -p`-${UNAME_MACHINE}-nto-qnx | |
1075 exit 0 ;; | |
977 *:QNX:*:4*) | 1076 *:QNX:*:4*) |
978 echo i386-qnx-qnx${UNAME_VERSION} | 1077 echo i386-pc-qnx |
1078 exit 0 ;; | |
1079 NSR-W:NONSTOP_KERNEL:*:*) | |
1080 echo nsr-tandem-nsk${UNAME_RELEASE} | |
1081 exit 0 ;; | |
1082 BS2000:POSIX*:*:*) | |
1083 echo bs2000-siemens-sysv | |
1084 exit 0 ;; | |
1085 DS/*:UNIX_System_V:*:*) | |
1086 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | |
979 exit 0 ;; | 1087 exit 0 ;; |
980 esac | 1088 esac |
981 | 1089 |
982 #echo '(No uname command or uname output not recognized.)' 1>&2 | 1090 #echo '(No uname command or uname output not recognized.)' 1>&2 |
983 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 | 1091 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 |
1114 echo c4-convex-bsd | 1222 echo c4-convex-bsd |
1115 exit 0 ;; | 1223 exit 0 ;; |
1116 esac | 1224 esac |
1117 fi | 1225 fi |
1118 | 1226 |
1119 #echo '(Unable to guess system type)' 1>&2 | 1227 cat >&2 <<EOF |
1228 $0: unable to guess system type | |
1229 | |
1230 The $version version of this script cannot recognize your system type. | |
1231 Please download the most up to date version of the config scripts: | |
1232 | |
1233 ftp://ftp.gnu.org/pub/gnu/config/ | |
1234 | |
1235 If the version you run ($0) is already up to date, please | |
1236 send the following data and any information you think might be | |
1237 pertinent to <config-patches@gnu.org> in order to provide the needed | |
1238 information to handle your system. | |
1239 | |
1240 config.guess version = $version | |
1241 | |
1242 uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1243 uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1244 uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1245 uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1246 | |
1247 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` | |
1248 /bin/uname -X = `(/bin/uname -X) 2>/dev/null` | |
1249 | |
1250 hostinfo = `(hostinfo) 2>/dev/null` | |
1251 /bin/universe = `(/bin/universe) 2>/dev/null` | |
1252 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` | |
1253 /bin/arch = `(/bin/arch) 2>/dev/null` | |
1254 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` | |
1255 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` | |
1256 | |
1257 UNAME_MACHINE = ${UNAME_MACHINE} | |
1258 UNAME_RELEASE = ${UNAME_RELEASE} | |
1259 UNAME_SYSTEM = ${UNAME_SYSTEM} | |
1260 UNAME_VERSION = ${UNAME_VERSION} | |
1261 EOF | |
1120 | 1262 |
1121 exit 1 | 1263 exit 1 |
1264 | |
1265 # Local variables: | |
1266 # eval: (add-hook 'write-file-hooks 'time-stamp) | |
1267 # time-stamp-start: "version='" | |
1268 # time-stamp-format: "%:y-%02m-%02d" | |
1269 # time-stamp-end: "'" | |
1270 # End: |