Mercurial > hg > xemacs-beta
comparison config.guess @ 438:84b14dcb0985 r21-2-27
Import from CVS: tag r21-2-27
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:32:25 +0200 |
parents | 41dbb7a9d5f2 |
children | abe6d1db359e |
comparison
equal
deleted
inserted
replaced
437:e2a4e8b94b82 | 438:84b14dcb0985 |
---|---|
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, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. | 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 |
4 # Free Software Foundation, Inc. | |
4 # | 5 # |
5 # This file is free software; you can redistribute it and/or modify it | 6 # This file is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License as published by | 7 # under the terms of the GNU General Public License as published by |
7 # the Free Software Foundation; either version 2 of the License, or | 8 # the Free Software Foundation; either version 2 of the License, or |
8 # (at your option) any later version. | 9 # (at your option) any later version. |
21 # configuration script generated by Autoconf, you may include it under | 22 # configuration script generated by Autoconf, you may include it under |
22 # 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 program. |
23 | 24 |
24 # Written by Per Bothner <bothner@cygnus.com>. | 25 # Written by Per Bothner <bothner@cygnus.com>. |
25 # The master version of this file is at the FSF in /home/gd/gnu/lib. | 26 # The master version of this file is at the FSF in /home/gd/gnu/lib. |
27 # Please send patches to <autoconf-patches@gnu.org>. | |
26 # | 28 # |
27 # This script attempts to guess a canonical system name similar to | 29 # This script attempts to guess a canonical system name similar to |
28 # config.sub. If it succeeds, it prints the system name on stdout, and | 30 # config.sub. If it succeeds, it prints the system name on stdout, and |
29 # exits with 0. Otherwise, it exits with 1. | 31 # exits with 0. Otherwise, it exits with 1. |
30 # | 32 # |
33 # | 35 # |
34 # Only a few systems have been added to this list; please add others | 36 # Only a few systems have been added to this list; please add others |
35 # (but try to keep the structure clean). | 37 # (but try to keep the structure clean). |
36 # | 38 # |
37 | 39 |
40 # Use $HOST_CC if defined. $CC may point to a cross-compiler | |
41 if test x"$CC_FOR_BUILD" = x; then | |
42 if test x"$HOST_CC" != x; then | |
43 CC_FOR_BUILD="$HOST_CC" | |
44 else | |
45 if test x"$CC" != x; then | |
46 CC_FOR_BUILD="$CC" | |
47 else | |
48 CC_FOR_BUILD=cc | |
49 fi | |
50 fi | |
51 fi | |
52 | |
53 | |
38 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. | 54 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
39 # (ghazi@noc.rutgers.edu 8/24/94.) | 55 # (ghazi@noc.rutgers.edu 8/24/94.) |
40 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then | 56 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then |
41 PATH=$PATH:/.attbin ; export PATH | 57 PATH=$PATH:/.attbin ; export PATH |
42 fi | 58 fi |
44 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown | 60 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
45 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown | 61 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
46 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | 62 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
47 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown | 63 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
48 | 64 |
49 trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 | 65 dummy=dummy-$$ |
66 trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 | |
50 | 67 |
51 # Note: order is significant - the case branches are not exclusive. | 68 # Note: order is significant - the case branches are not exclusive. |
52 | 69 |
53 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | 70 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
54 alpha:OSF1:*:*) | 71 alpha:OSF1:*:*) |
57 fi | 74 fi |
58 # A Vn.n version is a released version. | 75 # A Vn.n version is a released version. |
59 # A Tn.n version is a released field test version. | 76 # A Tn.n version is a released field test version. |
60 # A Xn.n version is an unreleased experimental baselevel. | 77 # A Xn.n version is an unreleased experimental baselevel. |
61 # 1.2 uses "1.2" for uname -r. | 78 # 1.2 uses "1.2" for uname -r. |
62 cat <<EOF >dummy.s | 79 cat <<EOF >$dummy.s |
63 .globl main | 80 .globl main |
64 .ent main | 81 .ent main |
65 main: | 82 main: |
66 .frame \$30,0,\$26,0 | 83 .frame \$30,0,\$26,0 |
67 .prologue 0 | 84 .prologue 0 |
74 addl \$1,\$0,\$0 | 91 addl \$1,\$0,\$0 |
75 addl \$2,\$0,\$0 | 92 addl \$2,\$0,\$0 |
76 ret \$31,(\$26),1 | 93 ret \$31,(\$26),1 |
77 .end main | 94 .end main |
78 EOF | 95 EOF |
79 ${CC-cc} dummy.s -o dummy 2>/dev/null | 96 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null |
80 if test "$?" = 0 ; then | 97 if test "$?" = 0 ; then |
81 ./dummy | 98 ./$dummy |
82 case "$?" in | 99 case "$?" in |
83 7) | 100 7) |
84 UNAME_MACHINE="alpha" | 101 UNAME_MACHINE="alpha" |
85 ;; | 102 ;; |
86 15) | 103 15) |
95 16) | 112 16) |
96 UNAME_MACHINE="alphaev6" | 113 UNAME_MACHINE="alphaev6" |
97 ;; | 114 ;; |
98 esac | 115 esac |
99 fi | 116 fi |
100 rm -f dummy.s dummy | 117 rm -f $dummy.s $dummy |
101 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` | 118 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
119 exit 0 ;; | |
120 Alpha\ *:Windows_NT*:*) | |
121 # How do we know it's Interix rather than the generic POSIX subsystem? | |
122 # Should we change UNAME_MACHINE based on the output of uname instead | |
123 # of the specific Alpha model? | |
124 echo alpha-pc-interix | |
102 exit 0 ;; | 125 exit 0 ;; |
103 21064:Windows_NT:50:3) | 126 21064:Windows_NT:50:3) |
104 echo alpha-dec-winnt3.5 | 127 echo alpha-dec-winnt3.5 |
105 exit 0 ;; | 128 exit 0 ;; |
106 Amiga*:UNIX_System_V:4.0:*) | 129 Amiga*:UNIX_System_V:4.0:*) |
131 echo mips-unknown-openbsd${UNAME_RELEASE} | 154 echo mips-unknown-openbsd${UNAME_RELEASE} |
132 exit 0 ;; | 155 exit 0 ;; |
133 wgrisc:OpenBSD:*:*) | 156 wgrisc:OpenBSD:*:*) |
134 echo mipsel-unknown-openbsd${UNAME_RELEASE} | 157 echo mipsel-unknown-openbsd${UNAME_RELEASE} |
135 exit 0 ;; | 158 exit 0 ;; |
159 *:OS/390:*:*) | |
160 echo i370-ibm-openedition | |
161 exit 0 ;; | |
136 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | 162 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
137 echo arm-acorn-riscix${UNAME_RELEASE} | 163 echo arm-acorn-riscix${UNAME_RELEASE} |
138 exit 0;; | 164 exit 0;; |
139 arm32:NetBSD:*:*) | 165 arm32:NetBSD:*:*) |
140 echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | 166 echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
141 exit 0 ;; | 167 exit 0 ;; |
142 SR2?01:HI-UX/MPP:*:*) | 168 SR2?01:HI-UX/MPP:*:*) |
143 echo hppa1.1-hitachi-hiuxmpp | 169 echo hppa1.1-hitachi-hiuxmpp |
144 exit 0;; | 170 exit 0;; |
145 Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) | 171 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
146 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. | 172 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. |
147 if test "`(/bin/universe) 2>/dev/null`" = att ; then | 173 if test "`(/bin/universe) 2>/dev/null`" = att ; then |
148 echo pyramid-pyramid-sysv3 | 174 echo pyramid-pyramid-sysv3 |
149 else | 175 else |
150 echo pyramid-pyramid-bsd | 176 echo pyramid-pyramid-bsd |
151 fi | 177 fi |
152 exit 0 ;; | 178 exit 0 ;; |
153 NILE:*:*:dcosx) | 179 NILE*:*:*:dcosx) |
154 echo pyramid-pyramid-svr4 | 180 echo pyramid-pyramid-svr4 |
155 exit 0 ;; | 181 exit 0 ;; |
156 sun4H:SunOS:5.*:*) | 182 sun4H:SunOS:5.*:*) |
157 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | 183 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
158 exit 0 ;; | 184 exit 0 ;; |
199 echo m68k-atari-netbsd${UNAME_RELEASE} | 225 echo m68k-atari-netbsd${UNAME_RELEASE} |
200 exit 0 ;; | 226 exit 0 ;; |
201 atari*:OpenBSD:*:*) | 227 atari*:OpenBSD:*:*) |
202 echo m68k-unknown-openbsd${UNAME_RELEASE} | 228 echo m68k-unknown-openbsd${UNAME_RELEASE} |
203 exit 0 ;; | 229 exit 0 ;; |
230 # The situation for MiNT is a little confusing. The machine name | |
231 # can be virtually everything (everything which is not | |
232 # "atarist" or "atariste" at least should have a processor | |
233 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" | |
234 # to the lowercase version "mint" (or "freemint"). Finally | |
235 # the system name "TOS" denotes a system which is actually not | |
236 # MiNT. But MiNT is downward compatible to TOS, so this should | |
237 # be no problem. | |
238 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) | |
239 echo m68k-atari-mint${UNAME_RELEASE} | |
240 exit 0 ;; | |
241 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) | |
242 echo m68k-atari-mint${UNAME_RELEASE} | |
243 exit 0 ;; | |
244 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) | |
245 echo m68k-atari-mint${UNAME_RELEASE} | |
246 exit 0 ;; | |
247 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) | |
248 echo m68k-milan-mint${UNAME_RELEASE} | |
249 exit 0 ;; | |
250 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) | |
251 echo m68k-hades-mint${UNAME_RELEASE} | |
252 exit 0 ;; | |
253 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) | |
254 echo m68k-unknown-mint${UNAME_RELEASE} | |
255 exit 0 ;; | |
204 sun3*:NetBSD:*:*) | 256 sun3*:NetBSD:*:*) |
205 echo m68k-sun-netbsd${UNAME_RELEASE} | 257 echo m68k-sun-netbsd${UNAME_RELEASE} |
206 exit 0 ;; | 258 exit 0 ;; |
207 sun3*:OpenBSD:*:*) | 259 sun3*:OpenBSD:*:*) |
208 echo m68k-unknown-openbsd${UNAME_RELEASE} | 260 echo m68k-unknown-openbsd${UNAME_RELEASE} |
232 echo mips-dec-ultrix${UNAME_RELEASE} | 284 echo mips-dec-ultrix${UNAME_RELEASE} |
233 exit 0 ;; | 285 exit 0 ;; |
234 VAX*:ULTRIX*:*:*) | 286 VAX*:ULTRIX*:*:*) |
235 echo vax-dec-ultrix${UNAME_RELEASE} | 287 echo vax-dec-ultrix${UNAME_RELEASE} |
236 exit 0 ;; | 288 exit 0 ;; |
237 2020:CLIX:*:*) | 289 2020:CLIX:*:* | 2430:CLIX:*:*) |
238 echo clipper-intergraph-clix${UNAME_RELEASE} | 290 echo clipper-intergraph-clix${UNAME_RELEASE} |
239 exit 0 ;; | 291 exit 0 ;; |
240 mips:*:*:UMIPS | mips:*:*:RISCos) | 292 mips:*:*:UMIPS | mips:*:*:RISCos) |
241 sed 's/^ //' << EOF >dummy.c | 293 sed 's/^ //' << EOF >$dummy.c |
242 int main (argc, argv) int argc; char **argv; { | 294 #ifdef __cplusplus |
295 int main (int argc, char *argv[]) { | |
296 #else | |
297 int main (argc, argv) int argc; char *argv[]; { | |
298 #endif | |
243 #if defined (host_mips) && defined (MIPSEB) | 299 #if defined (host_mips) && defined (MIPSEB) |
244 #if defined (SYSTYPE_SYSV) | 300 #if defined (SYSTYPE_SYSV) |
245 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); | 301 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); |
246 #endif | 302 #endif |
247 #if defined (SYSTYPE_SVR4) | 303 #if defined (SYSTYPE_SVR4) |
252 #endif | 308 #endif |
253 #endif | 309 #endif |
254 exit (-1); | 310 exit (-1); |
255 } | 311 } |
256 EOF | 312 EOF |
257 ${CC-cc} dummy.c -o dummy \ | 313 $CC_FOR_BUILD $dummy.c -o $dummy \ |
258 && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ | 314 && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ |
259 && rm dummy.c dummy && exit 0 | 315 && rm $dummy.c $dummy && exit 0 |
260 rm -f dummy.c dummy | 316 rm -f $dummy.c $dummy |
261 echo mips-mips-riscos${UNAME_RELEASE} | 317 echo mips-mips-riscos${UNAME_RELEASE} |
262 exit 0 ;; | 318 exit 0 ;; |
263 Night_Hawk:Power_UNIX:*:*) | 319 Night_Hawk:Power_UNIX:*:*) |
264 echo powerpc-harris-powerunix | 320 echo powerpc-harris-powerunix |
265 exit 0 ;; | 321 exit 0 ;; |
273 echo m88k-motorola-sysv3 | 329 echo m88k-motorola-sysv3 |
274 exit 0 ;; | 330 exit 0 ;; |
275 AViiON:dgux:*:*) | 331 AViiON:dgux:*:*) |
276 # DG/UX returns AViiON for all architectures | 332 # DG/UX returns AViiON for all architectures |
277 UNAME_PROCESSOR=`/usr/bin/uname -p` | 333 UNAME_PROCESSOR=`/usr/bin/uname -p` |
278 if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then | 334 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110] |
279 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ | 335 then |
280 -o ${TARGET_BINARY_INTERFACE}x = x ] ; then | 336 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ |
337 [ ${TARGET_BINARY_INTERFACE}x = x ] | |
338 then | |
281 echo m88k-dg-dgux${UNAME_RELEASE} | 339 echo m88k-dg-dgux${UNAME_RELEASE} |
340 else | |
341 echo m88k-dg-dguxbcs${UNAME_RELEASE} | |
342 fi | |
282 else | 343 else |
283 echo m88k-dg-dguxbcs${UNAME_RELEASE} | 344 echo i586-dg-dgux${UNAME_RELEASE} |
284 fi | 345 fi |
285 else echo i586-dg-dgux${UNAME_RELEASE} | |
286 fi | |
287 exit 0 ;; | 346 exit 0 ;; |
288 M88*:DolphinOS:*:*) # DolphinOS (SVR3) | 347 M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
289 echo m88k-dolphin-sysv3 | 348 echo m88k-dolphin-sysv3 |
290 exit 0 ;; | 349 exit 0 ;; |
291 M88*:*:R3*:*) | 350 M88*:*:R3*:*) |
307 i?86:AIX:*:*) | 366 i?86:AIX:*:*) |
308 echo i386-ibm-aix | 367 echo i386-ibm-aix |
309 exit 0 ;; | 368 exit 0 ;; |
310 *:AIX:2:3) | 369 *:AIX:2:3) |
311 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then | 370 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
312 sed 's/^ //' << EOF >dummy.c | 371 sed 's/^ //' << EOF >$dummy.c |
313 #include <sys/systemcfg.h> | 372 #include <sys/systemcfg.h> |
314 | 373 |
315 main() | 374 main() |
316 { | 375 { |
317 if (!__power_pc()) | 376 if (!__power_pc()) |
318 exit(1); | 377 exit(1); |
319 puts("powerpc-ibm-aix3.2.5"); | 378 puts("powerpc-ibm-aix3.2.5"); |
320 exit(0); | 379 exit(0); |
321 } | 380 } |
322 EOF | 381 EOF |
323 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 | 382 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 |
324 rm -f dummy.c dummy | 383 rm -f $dummy.c $dummy |
325 echo rs6000-ibm-aix3.2.5 | 384 echo rs6000-ibm-aix3.2.5 |
326 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then | 385 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
327 echo rs6000-ibm-aix3.2.4 | 386 echo rs6000-ibm-aix3.2.4 |
328 else | 387 else |
329 echo rs6000-ibm-aix3.2 | 388 echo rs6000-ibm-aix3.2 |
367 9000/[34678]??:HP-UX:*:*) | 426 9000/[34678]??:HP-UX:*:*) |
368 case "${UNAME_MACHINE}" in | 427 case "${UNAME_MACHINE}" in |
369 9000/31? ) HP_ARCH=m68000 ;; | 428 9000/31? ) HP_ARCH=m68000 ;; |
370 9000/[34]?? ) HP_ARCH=m68k ;; | 429 9000/[34]?? ) HP_ARCH=m68k ;; |
371 9000/[678][0-9][0-9]) | 430 9000/[678][0-9][0-9]) |
372 sed 's/^ //' << EOF >dummy.c | 431 sed 's/^ //' << EOF >$dummy.c |
373 #include <stdlib.h> | 432 #include <stdlib.h> |
374 #include <unistd.h> | 433 #include <unistd.h> |
375 | 434 |
376 int main () | 435 int main () |
377 { | 436 { |
378 #if defined(_SC_KERNEL_BITS) | 437 #if defined(_SC_KERNEL_BITS) |
379 long bits = sysconf(_SC_KERNEL_BITS); | 438 long bits = sysconf(_SC_KERNEL_BITS); |
380 #endif | 439 #endif |
381 long cpu = sysconf (_SC_CPU_VERSION); | 440 long cpu = sysconf (_SC_CPU_VERSION); |
382 | 441 |
383 switch (cpu) | 442 switch (cpu) |
384 { | 443 { |
385 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | 444 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; |
386 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | 445 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; |
387 case CPU_PA_RISC2_0: | 446 case CPU_PA_RISC2_0: |
388 #if defined(_SC_KERNEL_BITS) | 447 #if defined(_SC_KERNEL_BITS) |
389 switch (bits) | 448 switch (bits) |
390 { | 449 { |
391 case 64: puts ("hppa2.0w"); break; | 450 case 64: puts ("hppa2.0w"); break; |
392 case 32: puts ("hppa2.0n"); break; | 451 case 32: puts ("hppa2.0n"); break; |
393 default: puts ("hppa2.0"); break; | 452 default: puts ("hppa2.0"); break; |
394 } break; | 453 } break; |
395 #else /* !defined(_SC_KERNEL_BITS) */ | 454 #else /* !defined(_SC_KERNEL_BITS) */ |
396 puts ("hppa2.0"); break; | 455 puts ("hppa2.0"); break; |
397 #endif | 456 #endif |
398 default: puts ("hppa1.0"); break; | 457 default: puts ("hppa1.0"); break; |
399 } | 458 } |
400 exit (0); | 459 exit (0); |
401 } | 460 } |
402 EOF | 461 EOF |
403 ${CC-cc} dummy.c -o dummy && HP_ARCH=`./dummy` | 462 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` |
404 rm -f dummy.c dummy | 463 rm -f $dummy.c $dummy |
405 esac | 464 esac |
406 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | 465 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
407 echo ${HP_ARCH}-hp-hpux${HPUX_REV} | 466 echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
408 exit 0 ;; | 467 exit 0 ;; |
409 3050*:HI-UX:*:*) | 468 3050*:HI-UX:*:*) |
410 sed 's/^ //' << EOF >dummy.c | 469 sed 's/^ //' << EOF >$dummy.c |
411 #include <unistd.h> | 470 #include <unistd.h> |
412 int | 471 int |
413 main () | 472 main () |
414 { | 473 { |
415 long cpu = sysconf (_SC_CPU_VERSION); | 474 long cpu = sysconf (_SC_CPU_VERSION); |
430 puts ("m68k-hitachi-hiuxwe2"); | 489 puts ("m68k-hitachi-hiuxwe2"); |
431 else puts ("unknown-hitachi-hiuxwe2"); | 490 else puts ("unknown-hitachi-hiuxwe2"); |
432 exit (0); | 491 exit (0); |
433 } | 492 } |
434 EOF | 493 EOF |
435 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 | 494 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 |
436 rm -f dummy.c dummy | 495 rm -f $dummy.c $dummy |
437 echo unknown-hitachi-hiuxwe2 | 496 echo unknown-hitachi-hiuxwe2 |
438 exit 0 ;; | 497 exit 0 ;; |
439 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) | 498 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) |
440 echo hppa1.1-hp-bsd | 499 echo hppa1.1-hp-bsd |
441 exit 0 ;; | 500 exit 0 ;; |
442 9000/8??:4.3bsd:*:*) | 501 9000/8??:4.3bsd:*:*) |
443 echo hppa1.0-hp-bsd | 502 echo hppa1.0-hp-bsd |
503 exit 0 ;; | |
504 *9??*:MPE/iX:*:*) | |
505 echo hppa1.0-hp-mpeix | |
444 exit 0 ;; | 506 exit 0 ;; |
445 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) | 507 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) |
446 echo hppa1.1-hp-osf | 508 echo hppa1.1-hp-osf |
447 exit 0 ;; | 509 exit 0 ;; |
448 hp8??:OSF1:*:*) | 510 hp8??:OSF1:*:*) |
456 fi | 518 fi |
457 exit 0 ;; | 519 exit 0 ;; |
458 parisc*:Lites*:*:*) | 520 parisc*:Lites*:*:*) |
459 echo hppa1.1-hp-lites | 521 echo hppa1.1-hp-lites |
460 exit 0 ;; | 522 exit 0 ;; |
523 hppa*:OpenBSD:*:*) | |
524 echo hppa-unknown-openbsd | |
525 exit 0 ;; | |
461 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) | 526 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
462 echo c1-convex-bsd | 527 echo c1-convex-bsd |
463 exit 0 ;; | 528 exit 0 ;; |
464 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) | 529 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
465 if getsysinfo -f scalar_acc | 530 if getsysinfo -f scalar_acc |
488 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ | 553 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ |
489 exit 0 ;; | 554 exit 0 ;; |
490 CRAY*TS:*:*:*) | 555 CRAY*TS:*:*:*) |
491 echo t90-cray-unicos${UNAME_RELEASE} | 556 echo t90-cray-unicos${UNAME_RELEASE} |
492 exit 0 ;; | 557 exit 0 ;; |
558 CRAY*T3E:*:*:*) | |
559 echo alpha-cray-unicosmk${UNAME_RELEASE} | |
560 exit 0 ;; | |
493 CRAY-2:*:*:*) | 561 CRAY-2:*:*:*) |
494 echo cray2-cray-unicos | 562 echo cray2-cray-unicos |
495 exit 0 ;; | 563 exit 0 ;; |
496 F300:UNIX_System_V:*:*) | 564 F300:UNIX_System_V:*:*) |
497 FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` | 565 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
498 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | 566 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
499 echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 567 echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
500 exit 0 ;; | 568 exit 0 ;; |
501 F301:UNIX_System_V:*:*) | 569 F301:UNIX_System_V:*:*) |
502 echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` | 570 echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` |
505 echo m68k-hp-netbsd${UNAME_RELEASE} | 573 echo m68k-hp-netbsd${UNAME_RELEASE} |
506 exit 0 ;; | 574 exit 0 ;; |
507 hp300:OpenBSD:*:*) | 575 hp300:OpenBSD:*:*) |
508 echo m68k-unknown-openbsd${UNAME_RELEASE} | 576 echo m68k-unknown-openbsd${UNAME_RELEASE} |
509 exit 0 ;; | 577 exit 0 ;; |
578 i?86:BSD/386:*:* | i?86:BSD/OS:*:*) | |
579 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | |
580 exit 0 ;; | |
510 sparc*:BSD/OS:*:*) | 581 sparc*:BSD/OS:*:*) |
511 echo sparc-unknown-bsdi${UNAME_RELEASE} | 582 echo sparc-unknown-bsdi${UNAME_RELEASE} |
512 exit 0 ;; | 583 exit 0 ;; |
513 i?86:BSD/386:*:* | *:BSD/OS:*:*) | 584 *:BSD/OS:*:*) |
514 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | 585 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |
515 exit 0 ;; | 586 exit 0 ;; |
516 *:FreeBSD:*:*) | 587 *: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 | |
517 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | 594 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
518 exit 0 ;; | 595 exit 0 ;; |
519 *:NetBSD:*:*) | 596 *:NetBSD:*:*) |
520 echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | 597 echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` |
521 exit 0 ;; | 598 exit 0 ;; |
522 *:OpenBSD:*:*) | 599 *:OpenBSD:*:*) |
523 echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | 600 echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
524 exit 0 ;; | 601 exit 0 ;; |
525 i*:CYGWIN*:*) | 602 i*:CYGWIN*:*) |
526 echo ${UNAME_MACHINE}-pc-cygwin32 | 603 echo ${UNAME_MACHINE}-pc-cygwin |
527 exit 0 ;; | 604 exit 0 ;; |
528 i*:MINGW*:*) | 605 i*:MINGW*:*) |
529 echo ${UNAME_MACHINE}-pc-mingw32 | 606 echo ${UNAME_MACHINE}-pc-mingw32 |
530 exit 0 ;; | 607 exit 0 ;; |
608 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | |
609 # How do we know it's Interix rather than the generic POSIX subsystem? | |
610 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we | |
611 # UNAME_MACHINE based on the output of uname instead of i386? | |
612 echo i386-pc-interix | |
613 exit 0 ;; | |
614 i*:UWIN*:*) | |
615 echo ${UNAME_MACHINE}-pc-uwin | |
616 exit 0 ;; | |
531 p*:CYGWIN*:*) | 617 p*:CYGWIN*:*) |
532 echo powerpcle-unknown-cygwin32 | 618 echo powerpcle-unknown-cygwin |
533 exit 0 ;; | 619 exit 0 ;; |
534 prep*:SunOS:5.*:*) | 620 prep*:SunOS:5.*:*) |
535 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | 621 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
536 exit 0 ;; | 622 exit 0 ;; |
537 *:GNU:*:*) | 623 *:GNU:*:*) |
538 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | 624 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
539 exit 0 ;; | 625 exit 0 ;; |
540 *:Linux:*:*) | 626 *:Linux:*:*) |
541 # uname on the ARM produces all sorts of strangeness, and we need to | |
542 # filter it out. | |
543 case "$UNAME_MACHINE" in | |
544 arm* | sa110*) UNAME_MACHINE="arm" ;; | |
545 esac | |
546 | 627 |
547 # The BFD linker knows what the default object file format is, so | 628 # The BFD linker knows what the default object file format is, so |
548 # first see if it will tell us. | 629 # first see if it will tell us. cd to the root directory to prevent |
549 ld_help_string=`ld --help 2>&1` | 630 # problems with other programs or directories called `ld' in the path. |
631 ld_help_string=`cd /; ld --help 2>&1` | |
550 ld_supported_emulations=`echo $ld_help_string \ | 632 ld_supported_emulations=`echo $ld_help_string \ |
551 | sed -ne '/supported emulations:/!d | 633 | sed -ne '/supported emulations:/!d |
552 s/[ ][ ]*/ /g | 634 s/[ ][ ]*/ /g |
553 s/.*supported emulations: *// | 635 s/.*supported emulations: *// |
554 s/ .*// | 636 s/ .*// |
555 p'` | 637 p'` |
556 case "$ld_supported_emulations" in | 638 case "$ld_supported_emulations" in |
557 i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; | 639 *ia64) |
558 i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; | 640 echo "${UNAME_MACHINE}-unknown-linux" |
559 sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; | 641 exit 0 |
560 armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; | 642 ;; |
561 m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; | 643 i?86linux) |
562 elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; | 644 echo "${UNAME_MACHINE}-pc-linux-gnuaout" |
645 exit 0 | |
646 ;; | |
647 i?86coff) | |
648 echo "${UNAME_MACHINE}-pc-linux-gnucoff" | |
649 exit 0 | |
650 ;; | |
651 sparclinux) | |
652 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" | |
653 exit 0 | |
654 ;; | |
655 armlinux) | |
656 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" | |
657 exit 0 | |
658 ;; | |
659 elf32arm*) | |
660 echo "${UNAME_MACHINE}-unknown-linux-gnu" | |
661 exit 0 | |
662 ;; | |
663 armelf_linux*) | |
664 echo "${UNAME_MACHINE}-unknown-linux-gnu" | |
665 exit 0 | |
666 ;; | |
667 m68klinux) | |
668 echo "${UNAME_MACHINE}-unknown-linux-gnuaout" | |
669 exit 0 | |
670 ;; | |
671 elf32ppc) | |
672 # Determine Lib Version | |
673 cat >$dummy.c <<EOF | |
674 #include <features.h> | |
675 #if defined(__GLIBC__) | |
676 extern char __libc_version[]; | |
677 extern char __libc_release[]; | |
678 #endif | |
679 main(argc, argv) | |
680 int argc; | |
681 char *argv[]; | |
682 { | |
683 #if defined(__GLIBC__) | |
684 printf("%s %s\n", __libc_version, __libc_release); | |
685 #else | |
686 printf("unkown\n"); | |
687 #endif | |
688 return 0; | |
689 } | |
690 EOF | |
691 LIBC="" | |
692 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null | |
693 if test "$?" = 0 ; then | |
694 ./$dummy | grep 1\.99 > /dev/null | |
695 if test "$?" = 0 ; then | |
696 LIBC="libc1" | |
697 fi | |
698 fi | |
699 rm -f $dummy.c $dummy | |
700 echo powerpc-unknown-linux-gnu${LIBC} | |
701 exit 0 | |
702 ;; | |
563 esac | 703 esac |
564 | 704 |
565 if test "${UNAME_MACHINE}" = "alpha" ; then | 705 if test "${UNAME_MACHINE}" = "alpha" ; then |
566 sed 's/^ //' <<EOF >dummy.s | 706 sed 's/^ //' <<EOF >$dummy.s |
567 .globl main | 707 .globl main |
568 .ent main | 708 .ent main |
569 main: | 709 main: |
570 .frame \$30,0,\$26,0 | 710 .frame \$30,0,\$26,0 |
571 .prologue 0 | 711 .prologue 0 |
579 addl \$2,\$0,\$0 | 719 addl \$2,\$0,\$0 |
580 ret \$31,(\$26),1 | 720 ret \$31,(\$26),1 |
581 .end main | 721 .end main |
582 EOF | 722 EOF |
583 LIBC="" | 723 LIBC="" |
584 ${CC-cc} dummy.s -o dummy 2>/dev/null | 724 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null |
585 if test "$?" = 0 ; then | 725 if test "$?" = 0 ; then |
586 ./dummy | 726 ./$dummy |
587 case "$?" in | 727 case "$?" in |
588 7) | 728 7) |
589 UNAME_MACHINE="alpha" | 729 UNAME_MACHINE="alpha" |
590 ;; | 730 ;; |
591 15) | 731 15) |
598 UNAME_MACHINE="alphapca56" | 738 UNAME_MACHINE="alphapca56" |
599 ;; | 739 ;; |
600 16) | 740 16) |
601 UNAME_MACHINE="alphaev6" | 741 UNAME_MACHINE="alphaev6" |
602 ;; | 742 ;; |
603 esac | 743 esac |
604 | 744 |
605 objdump --private-headers dummy | \ | 745 objdump --private-headers $dummy | \ |
606 grep ld.so.1 > /dev/null | 746 grep ld.so.1 > /dev/null |
607 if test "$?" = 0 ; then | 747 if test "$?" = 0 ; then |
608 LIBC="libc1" | 748 LIBC="libc1" |
609 fi | 749 fi |
610 fi | 750 fi |
611 rm -f dummy.s dummy | 751 rm -f $dummy.s $dummy |
612 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 | 752 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 |
613 elif test "${UNAME_MACHINE}" = "mips" ; then | 753 elif test "${UNAME_MACHINE}" = "mips" ; then |
614 cat >dummy.c <<EOF | 754 cat >$dummy.c <<EOF |
615 main(argc, argv) | 755 #ifdef __cplusplus |
616 int argc; | 756 int main (int argc, char *argv[]) { |
617 char *argv[]; | 757 #else |
618 { | 758 int main (argc, argv) int argc; char *argv[]; { |
759 #endif | |
619 #ifdef __MIPSEB__ | 760 #ifdef __MIPSEB__ |
620 printf ("%s-unknown-linux-gnu\n", argv[1]); | 761 printf ("%s-unknown-linux-gnu\n", argv[1]); |
621 #endif | 762 #endif |
622 #ifdef __MIPSEL__ | 763 #ifdef __MIPSEL__ |
623 printf ("%sel-unknown-linux-gnu\n", argv[1]); | 764 printf ("%sel-unknown-linux-gnu\n", argv[1]); |
624 #endif | 765 #endif |
625 return 0; | 766 return 0; |
626 } | 767 } |
627 EOF | 768 EOF |
628 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 | 769 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 |
629 rm -f dummy.c dummy | 770 rm -f $dummy.c $dummy |
630 else | 771 else |
631 # Either a pre-BFD a.out linker (linux-gnuoldld) | 772 # Either a pre-BFD a.out linker (linux-gnuoldld) |
632 # or one that does not give us useful --help. | 773 # or one that does not give us useful --help. |
633 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. | 774 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. |
634 # If ld does not provide *any* "supported emulations:" | 775 # If ld does not provide *any* "supported emulations:" |
643 *) | 784 *) |
644 VENDOR=unknown; | 785 VENDOR=unknown; |
645 ;; | 786 ;; |
646 esac | 787 esac |
647 # Determine whether the default compiler is a.out or elf | 788 # Determine whether the default compiler is a.out or elf |
648 cat >dummy.c <<EOF | 789 cat >$dummy.c <<EOF |
649 #include <features.h> | 790 #include <features.h> |
650 main(argc, argv) | 791 #ifdef __cplusplus |
651 int argc; | 792 int main (int argc, char *argv[]) { |
652 char *argv[]; | 793 #else |
653 { | 794 int main (argc, argv) int argc; char *argv[]; { |
795 #endif | |
654 #ifdef __ELF__ | 796 #ifdef __ELF__ |
655 # ifdef __GLIBC__ | 797 # ifdef __GLIBC__ |
656 # if __GLIBC__ >= 2 | 798 # if __GLIBC__ >= 2 |
657 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); | 799 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); |
658 # else | 800 # else |
665 printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); | 807 printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); |
666 #endif | 808 #endif |
667 return 0; | 809 return 0; |
668 } | 810 } |
669 EOF | 811 EOF |
670 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 | 812 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 |
671 rm -f dummy.c dummy | 813 rm -f $dummy.c $dummy |
672 fi ;; | 814 fi ;; |
673 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions | 815 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions |
674 # are messed up and put the nodename in both sysname and nodename. | 816 # are messed up and put the nodename in both sysname and nodename. |
675 i?86:DYNIX/ptx:4*:*) | 817 i?86:DYNIX/ptx:4*:*) |
676 echo i386-sequent-sysv4 | 818 echo i386-sequent-sysv4 |
682 # I just have to hope. -- rms. | 824 # I just have to hope. -- rms. |
683 # Use sysv4.2uw... so that sysv4* matches it. | 825 # Use sysv4.2uw... so that sysv4* matches it. |
684 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | 826 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} |
685 exit 0 ;; | 827 exit 0 ;; |
686 i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) | 828 i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) |
829 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` | |
687 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then | 830 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
688 echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} | 831 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} |
689 else | 832 else |
690 echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} | 833 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} |
834 fi | |
835 exit 0 ;; | |
836 i?86:*:5:7*) | |
837 # Fixed at (any) Pentium or better | |
838 UNAME_MACHINE=i586 | |
839 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then | |
840 echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} | |
841 else | |
842 echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} | |
691 fi | 843 fi |
692 exit 0 ;; | 844 exit 0 ;; |
693 i?86:*:3.2:*) | 845 i?86:*:3.2:*) |
694 if test -f /usr/options/cb.name; then | 846 if test -f /usr/options/cb.name; then |
695 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` | 847 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
697 elif /bin/uname -X 2>/dev/null >/dev/null ; then | 849 elif /bin/uname -X 2>/dev/null >/dev/null ; then |
698 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` | 850 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` |
699 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 | 851 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 |
700 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ | 852 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ |
701 && UNAME_MACHINE=i586 | 853 && UNAME_MACHINE=i586 |
854 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ | |
855 && UNAME_MACHINE=i686 | |
856 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ | |
857 && UNAME_MACHINE=i686 | |
702 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | 858 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL |
703 else | 859 else |
704 echo ${UNAME_MACHINE}-pc-sysv32 | 860 echo ${UNAME_MACHINE}-pc-sysv32 |
705 fi | 861 fi |
706 exit 0 ;; | |
707 i?86:UnixWare:*:*) | |
708 if /bin/uname -X 2>/dev/null >/dev/null ; then | |
709 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ | |
710 && UNAME_MACHINE=i586 | |
711 fi | |
712 echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} | |
713 exit 0 ;; | 862 exit 0 ;; |
714 pc:*:*:*) | 863 pc:*:*:*) |
715 # uname -m prints for DJGPP always 'pc', but it prints nothing about | 864 # uname -m prints for DJGPP always 'pc', but it prints nothing about |
716 # the processor, so we play safe by assuming i386. | 865 # the processor, so we play safe by assuming i386. |
717 echo i386-pc-msdosdjgpp | 866 echo i386-pc-msdosdjgpp |
750 echo m68k-unknown-lynxos${UNAME_RELEASE} | 899 echo m68k-unknown-lynxos${UNAME_RELEASE} |
751 exit 0 ;; | 900 exit 0 ;; |
752 mc68030:UNIX_System_V:4.*:*) | 901 mc68030:UNIX_System_V:4.*:*) |
753 echo m68k-atari-sysv4 | 902 echo m68k-atari-sysv4 |
754 exit 0 ;; | 903 exit 0 ;; |
755 i?86:LynxOS:2.*:*) | 904 i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) |
756 echo i386-unknown-lynxos${UNAME_RELEASE} | 905 echo i386-unknown-lynxos${UNAME_RELEASE} |
757 exit 0 ;; | 906 exit 0 ;; |
758 TSUNAMI:LynxOS:2.*:*) | 907 TSUNAMI:LynxOS:2.*:*) |
759 echo sparc-unknown-lynxos${UNAME_RELEASE} | 908 echo sparc-unknown-lynxos${UNAME_RELEASE} |
760 exit 0 ;; | 909 exit 0 ;; |
761 rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) | 910 rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) |
762 echo rs6000-unknown-lynxos${UNAME_RELEASE} | 911 echo rs6000-unknown-lynxos${UNAME_RELEASE} |
763 exit 0 ;; | 912 exit 0 ;; |
764 SM[BE]S:UNIX_SV:*:*) | 913 SM[BE]S:UNIX_SV:*:*) |
765 echo mips-dde-sysv${UNAME_RELEASE} | 914 echo mips-dde-sysv${UNAME_RELEASE} |
915 exit 0 ;; | |
916 RM*:ReliantUNIX-*:*:*) | |
917 echo mips-sni-sysv4 | |
766 exit 0 ;; | 918 exit 0 ;; |
767 RM*:SINIX-*:*:*) | 919 RM*:SINIX-*:*:*) |
768 echo mips-sni-sysv4 | 920 echo mips-sni-sysv4 |
769 exit 0 ;; | 921 exit 0 ;; |
770 *:SINIX-*:*:*) | 922 *:SINIX-*:*:*) |
792 echo m68k-apple-aux${UNAME_RELEASE} | 944 echo m68k-apple-aux${UNAME_RELEASE} |
793 exit 0 ;; | 945 exit 0 ;; |
794 news*:NEWS-OS:*:6*) | 946 news*:NEWS-OS:*:6*) |
795 echo mips-sony-newsos6 | 947 echo mips-sony-newsos6 |
796 exit 0 ;; | 948 exit 0 ;; |
797 R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) | 949 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
798 if [ -d /usr/nec ]; then | 950 if [ -d /usr/nec ]; then |
799 echo mips-nec-sysv${UNAME_RELEASE} | 951 echo mips-nec-sysv${UNAME_RELEASE} |
800 else | 952 else |
801 echo mips-unknown-sysv${UNAME_RELEASE} | 953 echo mips-unknown-sysv${UNAME_RELEASE} |
802 fi | 954 fi |
808 echo powerpc-apple-beos | 960 echo powerpc-apple-beos |
809 exit 0 ;; | 961 exit 0 ;; |
810 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. | 962 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
811 echo i586-pc-beos | 963 echo i586-pc-beos |
812 exit 0 ;; | 964 exit 0 ;; |
965 SX-4:SUPER-UX:*:*) | |
966 echo sx4-nec-superux${UNAME_RELEASE} | |
967 exit 0 ;; | |
968 SX-5:SUPER-UX:*:*) | |
969 echo sx5-nec-superux${UNAME_RELEASE} | |
970 exit 0 ;; | |
971 Power*:Rhapsody:*:*) | |
972 echo powerpc-apple-rhapsody${UNAME_RELEASE} | |
973 exit 0 ;; | |
974 *:Rhapsody:*:*) | |
975 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | |
976 exit 0 ;; | |
977 *:QNX:*:4*) | |
978 echo i386-qnx-qnx${UNAME_VERSION} | |
979 exit 0 ;; | |
813 esac | 980 esac |
814 | 981 |
815 #echo '(No uname command or uname output not recognized.)' 1>&2 | 982 #echo '(No uname command or uname output not recognized.)' 1>&2 |
816 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 | 983 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 |
817 | 984 |
818 cat >dummy.c <<EOF | 985 cat >$dummy.c <<EOF |
819 #ifdef _SEQUENT_ | 986 #ifdef _SEQUENT_ |
820 # include <sys/types.h> | 987 # include <sys/types.h> |
821 # include <sys/utsname.h> | 988 # include <sys/utsname.h> |
822 #endif | 989 #endif |
823 main () | 990 main () |
851 #if !defined (__ARCHITECTURE__) | 1018 #if !defined (__ARCHITECTURE__) |
852 #define __ARCHITECTURE__ "m68k" | 1019 #define __ARCHITECTURE__ "m68k" |
853 #endif | 1020 #endif |
854 int version; | 1021 int version; |
855 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | 1022 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; |
856 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | 1023 if (version < 4) |
1024 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | |
1025 else | |
1026 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | |
857 exit (0); | 1027 exit (0); |
858 #endif | 1028 #endif |
859 | 1029 |
860 #if defined (MULTIMAX) || defined (n16) | 1030 #if defined (MULTIMAX) || defined (n16) |
861 #if defined (UMAXV) | 1031 #if defined (UMAXV) |
911 | 1081 |
912 exit (1); | 1082 exit (1); |
913 } | 1083 } |
914 EOF | 1084 EOF |
915 | 1085 |
916 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 | 1086 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 |
917 rm -f dummy.c dummy | 1087 rm -f $dummy.c $dummy |
918 | 1088 |
919 # Apollos put the system type in the environment. | 1089 # Apollos put the system type in the environment. |
920 | 1090 |
921 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } | 1091 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } |
922 | 1092 |