config.guess (98937) | config.guess (106121) |
---|---|
1#! /bin/sh 2# Attempt to guess a canonical system name. 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4# 2000, 2001, 2002 Free Software Foundation, Inc. 5 | 1#! /bin/sh 2# Attempt to guess a canonical system name. 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4# 2000, 2001, 2002 Free Software Foundation, Inc. 5 |
6timestamp='2002-01-30' | 6timestamp='2002-07-23' |
7 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 10# the Free Software Foundation; either version 2 of the License, or 11# (at your option) any later version. 12# 13# This program is distributed in the hope that it will be useful, but 14# WITHOUT ANY WARRANTY; without even the implied warranty of --- 68 unchanged lines hidden (view full) --- 83 esac 84done 85 86if test $# != 0; then 87 echo "$me: too many arguments$help" >&2 88 exit 1 89fi 90 | 7 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 10# the Free Software Foundation; either version 2 of the License, or 11# (at your option) any later version. 12# 13# This program is distributed in the hope that it will be useful, but 14# WITHOUT ANY WARRANTY; without even the implied warranty of --- 68 unchanged lines hidden (view full) --- 83 esac 84done 85 86if test $# != 0; then 87 echo "$me: too many arguments$help" >&2 88 exit 1 89fi 90 |
91trap 'exit 1' 1 2 15 |
|
91 | 92 |
92dummy=dummy-$$ 93trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 | 93# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 94# compiler to aid in system detection is discouraged as it requires 95# temporary files to be created and, as you can see below, it is a 96# headache to deal with in a portable fashion. |
94 | 97 |
95# CC_FOR_BUILD -- compiler used by this script. | |
96# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 97# use `HOST_CC' if defined, but it is deprecated. 98 | 98# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 99# use `HOST_CC' if defined, but it is deprecated. 100 |
99set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in 100 ,,) echo "int dummy(){}" > $dummy.c ; 101 for c in cc gcc c89 ; do 102 ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; 103 if test $? = 0 ; then | 101# This shell variable is my proudest work .. or something. --bje 102 103set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; 104(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) 105 || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; 106dummy=$tmpdir/dummy ; 107files="$dummy.c $dummy.o $dummy.rel $dummy" ; 108trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; 109case $CC_FOR_BUILD,$HOST_CC,$CC in 110 ,,) echo "int x;" > $dummy.c ; 111 for c in cc gcc c89 c99 ; do 112 if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then |
104 CC_FOR_BUILD="$c"; break ; 105 fi ; 106 done ; | 113 CC_FOR_BUILD="$c"; break ; 114 fi ; 115 done ; |
107 rm -f $dummy.c $dummy.o $dummy.rel ; | 116 rm -f $files ; |
108 if test x"$CC_FOR_BUILD" = x ; then 109 CC_FOR_BUILD=no_compiler_found ; 110 fi 111 ;; 112 ,,*) CC_FOR_BUILD=$CC ;; 113 ,*,*) CC_FOR_BUILD=$HOST_CC ;; | 117 if test x"$CC_FOR_BUILD" = x ; then 118 CC_FOR_BUILD=no_compiler_found ; 119 fi 120 ;; 121 ,,*) CC_FOR_BUILD=$CC ;; 122 ,*,*) CC_FOR_BUILD=$HOST_CC ;; |
114esac' | 123esac ; 124unset files' |
115 116# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 117# (ghazi@noc.rutgers.edu 1994-08-24) 118if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 119 PATH=$PATH:/.attbin ; export PATH 120fi 121 122UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown --- 10 unchanged lines hidden (view full) --- 133 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 134 # switched to ELF, *-*-netbsd* would select the old 135 # object file format. This provides both forward 136 # compatibility and a consistent mechanism for selecting the 137 # object file format. 138 # 139 # Note: NetBSD doesn't particularly care about the vendor 140 # portion of the name. We always set it to "unknown". | 125 126# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 127# (ghazi@noc.rutgers.edu 1994-08-24) 128if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 129 PATH=$PATH:/.attbin ; export PATH 130fi 131 132UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown --- 10 unchanged lines hidden (view full) --- 143 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 144 # switched to ELF, *-*-netbsd* would select the old 145 # object file format. This provides both forward 146 # compatibility and a consistent mechanism for selecting the 147 # object file format. 148 # 149 # Note: NetBSD doesn't particularly care about the vendor 150 # portion of the name. We always set it to "unknown". |
141 UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \ 142 UNAME_MACHINE_ARCH=unknown | 151 sysctl="sysctl -n hw.machine_arch" 152 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 153 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` |
143 case "${UNAME_MACHINE_ARCH}" in | 154 case "${UNAME_MACHINE_ARCH}" in |
155 armeb) machine=armeb-unknown ;; |
|
144 arm*) machine=arm-unknown ;; 145 sh3el) machine=shl-unknown ;; 146 sh3eb) machine=sh-unknown ;; 147 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 148 esac 149 # The Operating System including object format, if it has switched 150 # to ELF recently, or will in the future. 151 case "${UNAME_MACHINE_ARCH}" in --- 62 unchanged lines hidden (view full) --- 214 alpha:OSF1:*:*) 215 if test $UNAME_RELEASE = "V4.0"; then 216 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 217 fi 218 # A Vn.n version is a released version. 219 # A Tn.n version is a released field test version. 220 # A Xn.n version is an unreleased experimental baselevel. 221 # 1.2 uses "1.2" for uname -r. | 156 arm*) machine=arm-unknown ;; 157 sh3el) machine=shl-unknown ;; 158 sh3eb) machine=sh-unknown ;; 159 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 160 esac 161 # The Operating System including object format, if it has switched 162 # to ELF recently, or will in the future. 163 case "${UNAME_MACHINE_ARCH}" in --- 62 unchanged lines hidden (view full) --- 226 alpha:OSF1:*:*) 227 if test $UNAME_RELEASE = "V4.0"; then 228 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 229 fi 230 # A Vn.n version is a released version. 231 # A Tn.n version is a released field test version. 232 # A Xn.n version is an unreleased experimental baselevel. 233 # 1.2 uses "1.2" for uname -r. |
234 eval $set_cc_for_build |
|
222 cat <<EOF >$dummy.s 223 .data 224\$Lformat: 225 .byte 37,100,45,37,120,10,0 # "%d-%x\n" 226 227 .text 228 .globl main 229 .align 4 --- 9 unchanged lines hidden (view full) --- 239 mov \$0,\$17 240 not \$1,\$18 241 jsr \$26,printf 242 ldgp \$29,0(\$26) 243 mov 0,\$16 244 jsr \$26,exit 245 .end main 246EOF | 235 cat <<EOF >$dummy.s 236 .data 237\$Lformat: 238 .byte 37,100,45,37,120,10,0 # "%d-%x\n" 239 240 .text 241 .globl main 242 .align 4 --- 9 unchanged lines hidden (view full) --- 252 mov \$0,\$17 253 not \$1,\$18 254 jsr \$26,printf 255 ldgp \$29,0(\$26) 256 mov 0,\$16 257 jsr \$26,exit 258 .end main 259EOF |
247 eval $set_cc_for_build | |
248 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null 249 if test "$?" = 0 ; then | 260 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null 261 if test "$?" = 0 ; then |
250 case `./$dummy` in | 262 case `$dummy` in |
251 0-0) 252 UNAME_MACHINE="alpha" 253 ;; 254 1-0) 255 UNAME_MACHINE="alphaev5" 256 ;; 257 1-1) 258 UNAME_MACHINE="alphaev56" --- 5 unchanged lines hidden (view full) --- 264 UNAME_MACHINE="alphaev6" 265 ;; 266 2-307) 267 UNAME_MACHINE="alphaev67" 268 ;; 269 2-1307) 270 UNAME_MACHINE="alphaev68" 271 ;; | 263 0-0) 264 UNAME_MACHINE="alpha" 265 ;; 266 1-0) 267 UNAME_MACHINE="alphaev5" 268 ;; 269 1-1) 270 UNAME_MACHINE="alphaev56" --- 5 unchanged lines hidden (view full) --- 276 UNAME_MACHINE="alphaev6" 277 ;; 278 2-307) 279 UNAME_MACHINE="alphaev67" 280 ;; 281 2-1307) 282 UNAME_MACHINE="alphaev68" 283 ;; |
284 3-1307) 285 UNAME_MACHINE="alphaev7" 286 ;; |
|
272 esac 273 fi | 287 esac 288 fi |
274 rm -f $dummy.s $dummy | 289 rm -f $dummy.s $dummy && rmdir $tmpdir |
275 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 276 exit 0 ;; 277 Alpha\ *:Windows_NT*:*) 278 # How do we know it's Interix rather than the generic POSIX subsystem? 279 # Should we change UNAME_MACHINE based on the output of uname instead 280 # of the specific Alpha model? 281 echo alpha-pc-interix 282 exit 0 ;; --- 24 unchanged lines hidden (view full) --- 307 echo pyramid-pyramid-sysv3 308 else 309 echo pyramid-pyramid-bsd 310 fi 311 exit 0 ;; 312 NILE*:*:*:dcosx) 313 echo pyramid-pyramid-svr4 314 exit 0 ;; | 290 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 291 exit 0 ;; 292 Alpha\ *:Windows_NT*:*) 293 # How do we know it's Interix rather than the generic POSIX subsystem? 294 # Should we change UNAME_MACHINE based on the output of uname instead 295 # of the specific Alpha model? 296 echo alpha-pc-interix 297 exit 0 ;; --- 24 unchanged lines hidden (view full) --- 322 echo pyramid-pyramid-sysv3 323 else 324 echo pyramid-pyramid-bsd 325 fi 326 exit 0 ;; 327 NILE*:*:*:dcosx) 328 echo pyramid-pyramid-svr4 329 exit 0 ;; |
330 DRS?6000:UNIX_SV:4.2*:7*) 331 case `/usr/bin/uname -p` in 332 sparc) echo sparc-icl-nx7 && exit 0 ;; 333 esac ;; |
|
315 sun4H:SunOS:5.*:*) 316 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 317 exit 0 ;; 318 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 319 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 320 exit 0 ;; 321 i86pc:SunOS:5.*:*) 322 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` --- 12 unchanged lines hidden (view full) --- 335 esac 336 # Japanese Language versions have a version number like `4.1.3-JL'. 337 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 338 exit 0 ;; 339 sun3*:SunOS:*:*) 340 echo m68k-sun-sunos${UNAME_RELEASE} 341 exit 0 ;; 342 sun*:*:4.2BSD:*) | 334 sun4H:SunOS:5.*:*) 335 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 336 exit 0 ;; 337 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 338 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 339 exit 0 ;; 340 i86pc:SunOS:5.*:*) 341 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` --- 12 unchanged lines hidden (view full) --- 354 esac 355 # Japanese Language versions have a version number like `4.1.3-JL'. 356 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 357 exit 0 ;; 358 sun3*:SunOS:*:*) 359 echo m68k-sun-sunos${UNAME_RELEASE} 360 exit 0 ;; 361 sun*:*:4.2BSD:*) |
343 UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` | 362 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
344 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 345 case "`/bin/arch`" in 346 sun3) 347 echo m68k-sun-sunos${UNAME_RELEASE} 348 ;; 349 sun4) 350 echo sparc-sun-sunos${UNAME_RELEASE} 351 ;; --- 62 unchanged lines hidden (view full) --- 414 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 415 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 416 #endif 417 #endif 418 exit (-1); 419 } 420EOF 421 $CC_FOR_BUILD $dummy.c -o $dummy \ | 363 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 364 case "`/bin/arch`" in 365 sun3) 366 echo m68k-sun-sunos${UNAME_RELEASE} 367 ;; 368 sun4) 369 echo sparc-sun-sunos${UNAME_RELEASE} 370 ;; --- 62 unchanged lines hidden (view full) --- 433 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 434 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 435 #endif 436 #endif 437 exit (-1); 438 } 439EOF 440 $CC_FOR_BUILD $dummy.c -o $dummy \ |
422 && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 423 && rm -f $dummy.c $dummy && exit 0 424 rm -f $dummy.c $dummy | 441 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 442 && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 443 rm -f $dummy.c $dummy && rmdir $tmpdir |
425 echo mips-mips-riscos${UNAME_RELEASE} 426 exit 0 ;; 427 Motorola:PowerMAX_OS:*:*) 428 echo powerpc-motorola-powermax 429 exit 0 ;; | 444 echo mips-mips-riscos${UNAME_RELEASE} 445 exit 0 ;; 446 Motorola:PowerMAX_OS:*:*) 447 echo powerpc-motorola-powermax 448 exit 0 ;; |
449 Night_Hawk:*:*:PowerMAX_OS) 450 echo powerpc-harris-powermax 451 exit 0 ;; |
|
430 Night_Hawk:Power_UNIX:*:*) 431 echo powerpc-harris-powerunix 432 exit 0 ;; 433 m88k:CX/UX:7*:*) 434 echo m88k-harris-cxux7 435 exit 0 ;; 436 m88k:*:4*:R4*) 437 echo m88k-motorola-sysv4 --- 56 unchanged lines hidden (view full) --- 494 main() 495 { 496 if (!__power_pc()) 497 exit(1); 498 puts("powerpc-ibm-aix3.2.5"); 499 exit(0); 500 } 501EOF | 452 Night_Hawk:Power_UNIX:*:*) 453 echo powerpc-harris-powerunix 454 exit 0 ;; 455 m88k:CX/UX:7*:*) 456 echo m88k-harris-cxux7 457 exit 0 ;; 458 m88k:*:4*:R4*) 459 echo m88k-motorola-sysv4 --- 56 unchanged lines hidden (view full) --- 516 main() 517 { 518 if (!__power_pc()) 519 exit(1); 520 puts("powerpc-ibm-aix3.2.5"); 521 exit(0); 522 } 523EOF |
502 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 503 rm -f $dummy.c $dummy | 524 $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 525 rm -f $dummy.c $dummy && rmdir $tmpdir |
504 echo rs6000-ibm-aix3.2.5 505 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 506 echo rs6000-ibm-aix3.2.4 507 else 508 echo rs6000-ibm-aix3.2 509 fi 510 exit 0 ;; 511 *:AIX:*:[45]) | 526 echo rs6000-ibm-aix3.2.5 527 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 528 echo rs6000-ibm-aix3.2.4 529 else 530 echo rs6000-ibm-aix3.2 531 fi 532 exit 0 ;; 533 *:AIX:*:[45]) |
512 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` | 534 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
513 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 514 IBM_ARCH=rs6000 515 else 516 IBM_ARCH=powerpc 517 fi 518 if [ -x /usr/bin/oslevel ] ; then 519 IBM_REV=`/usr/bin/oslevel` 520 else --- 72 unchanged lines hidden (view full) --- 593 #else /* !defined(_SC_KERNEL_BITS) */ 594 puts ("hppa2.0"); break; 595 #endif 596 default: puts ("hppa1.0"); break; 597 } 598 exit (0); 599 } 600EOF | 535 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 536 IBM_ARCH=rs6000 537 else 538 IBM_ARCH=powerpc 539 fi 540 if [ -x /usr/bin/oslevel ] ; then 541 IBM_REV=`/usr/bin/oslevel` 542 else --- 72 unchanged lines hidden (view full) --- 615 #else /* !defined(_SC_KERNEL_BITS) */ 616 puts ("hppa2.0"); break; 617 #endif 618 default: puts ("hppa1.0"); break; 619 } 620 exit (0); 621 } 622EOF |
601 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` | 623 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy` |
602 if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi | 624 if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi |
603 rm -f $dummy.c $dummy | 625 rm -f $dummy.c $dummy && rmdir $tmpdir |
604 fi ;; 605 esac 606 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 607 exit 0 ;; 608 ia64:HP-UX:*:*) 609 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 610 echo ia64-hp-hpux${HPUX_REV} 611 exit 0 ;; --- 19 unchanged lines hidden (view full) --- 631 } 632 } 633 else if (CPU_IS_HP_MC68K (cpu)) 634 puts ("m68k-hitachi-hiuxwe2"); 635 else puts ("unknown-hitachi-hiuxwe2"); 636 exit (0); 637 } 638EOF | 626 fi ;; 627 esac 628 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 629 exit 0 ;; 630 ia64:HP-UX:*:*) 631 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 632 echo ia64-hp-hpux${HPUX_REV} 633 exit 0 ;; --- 19 unchanged lines hidden (view full) --- 653 } 654 } 655 else if (CPU_IS_HP_MC68K (cpu)) 656 puts ("m68k-hitachi-hiuxwe2"); 657 else puts ("unknown-hitachi-hiuxwe2"); 658 exit (0); 659 } 660EOF |
639 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 640 rm -f $dummy.c $dummy | 661 $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 662 rm -f $dummy.c $dummy && rmdir $tmpdir |
641 echo unknown-hitachi-hiuxwe2 642 exit 0 ;; 643 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 644 echo hppa1.1-hp-bsd 645 exit 0 ;; 646 9000/8??:4.3bsd:*:*) 647 echo hppa1.0-hp-bsd 648 exit 0 ;; --- 29 unchanged lines hidden (view full) --- 678 echo c34-convex-bsd 679 exit 0 ;; 680 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 681 echo c38-convex-bsd 682 exit 0 ;; 683 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 684 echo c4-convex-bsd 685 exit 0 ;; | 663 echo unknown-hitachi-hiuxwe2 664 exit 0 ;; 665 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 666 echo hppa1.1-hp-bsd 667 exit 0 ;; 668 9000/8??:4.3bsd:*:*) 669 echo hppa1.0-hp-bsd 670 exit 0 ;; --- 29 unchanged lines hidden (view full) --- 700 echo c34-convex-bsd 701 exit 0 ;; 702 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 703 echo c38-convex-bsd 704 exit 0 ;; 705 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 706 echo c4-convex-bsd 707 exit 0 ;; |
686 CRAY*X-MP:*:*:*) 687 echo xmp-cray-unicos 688 exit 0 ;; | |
689 CRAY*Y-MP:*:*:*) 690 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 691 exit 0 ;; 692 CRAY*[A-Z]90:*:*:*) 693 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 694 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 695 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 696 -e 's/\.[^.]*$/.X/' --- 5 unchanged lines hidden (view full) --- 702 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 703 exit 0 ;; 704 CRAY*T3E:*:*:*) 705 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 706 exit 0 ;; 707 CRAY*SV1:*:*:*) 708 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 709 exit 0 ;; | 708 CRAY*Y-MP:*:*:*) 709 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 710 exit 0 ;; 711 CRAY*[A-Z]90:*:*:*) 712 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 713 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 714 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 715 -e 's/\.[^.]*$/.X/' --- 5 unchanged lines hidden (view full) --- 721 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 722 exit 0 ;; 723 CRAY*T3E:*:*:*) 724 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 725 exit 0 ;; 726 CRAY*SV1:*:*:*) 727 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 728 exit 0 ;; |
710 CRAY-2:*:*:*) 711 echo cray2-cray-unicos 712 exit 0 ;; | |
713 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 714 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 715 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 716 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 717 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 718 exit 0 ;; 719 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 720 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 721 exit 0 ;; 722 sparc*:BSD/OS:*:*) 723 echo sparc-unknown-bsdi${UNAME_RELEASE} 724 exit 0 ;; 725 *:BSD/OS:*:*) 726 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 727 exit 0 ;; 728 *:FreeBSD:*:*) | 729 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 730 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 731 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 732 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 733 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 734 exit 0 ;; 735 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 736 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 737 exit 0 ;; 738 sparc*:BSD/OS:*:*) 739 echo sparc-unknown-bsdi${UNAME_RELEASE} 740 exit 0 ;; 741 *:BSD/OS:*:*) 742 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 743 exit 0 ;; 744 *:FreeBSD:*:*) |
729 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | 745 # Determine whether the default compiler uses glibc. 746 eval $set_cc_for_build 747 sed 's/^ //' << EOF >$dummy.c 748 #include <features.h> 749 #if __GLIBC__ >= 2 750 LIBC=gnu 751 #else 752 LIBC= 753 #endif 754EOF 755 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 756 rm -f $dummy.c && rmdir $tmpdir 757 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} |
730 exit 0 ;; 731 i*:CYGWIN*:*) 732 echo ${UNAME_MACHINE}-pc-cygwin 733 exit 0 ;; 734 i*:MINGW*:*) 735 echo ${UNAME_MACHINE}-pc-mingw32 736 exit 0 ;; 737 i*:PW*:*) --- 22 unchanged lines hidden (view full) --- 760 exit 0 ;; 761 i*86:Minix:*:*) 762 echo ${UNAME_MACHINE}-pc-minix 763 exit 0 ;; 764 arm*:Linux:*:*) 765 echo ${UNAME_MACHINE}-unknown-linux-gnu 766 exit 0 ;; 767 ia64:Linux:*:*) | 758 exit 0 ;; 759 i*:CYGWIN*:*) 760 echo ${UNAME_MACHINE}-pc-cygwin 761 exit 0 ;; 762 i*:MINGW*:*) 763 echo ${UNAME_MACHINE}-pc-mingw32 764 exit 0 ;; 765 i*:PW*:*) --- 22 unchanged lines hidden (view full) --- 788 exit 0 ;; 789 i*86:Minix:*:*) 790 echo ${UNAME_MACHINE}-pc-minix 791 exit 0 ;; 792 arm*:Linux:*:*) 793 echo ${UNAME_MACHINE}-unknown-linux-gnu 794 exit 0 ;; 795 ia64:Linux:*:*) |
768 echo ${UNAME_MACHINE}-unknown-linux | 796 echo ${UNAME_MACHINE}-unknown-linux-gnu |
769 exit 0 ;; 770 m68*:Linux:*:*) 771 echo ${UNAME_MACHINE}-unknown-linux-gnu 772 exit 0 ;; 773 mips:Linux:*:*) 774 eval $set_cc_for_build 775 sed 's/^ //' << EOF >$dummy.c 776 #undef CPU 777 #undef mips 778 #undef mipsel | 797 exit 0 ;; 798 m68*:Linux:*:*) 799 echo ${UNAME_MACHINE}-unknown-linux-gnu 800 exit 0 ;; 801 mips:Linux:*:*) 802 eval $set_cc_for_build 803 sed 's/^ //' << EOF >$dummy.c 804 #undef CPU 805 #undef mips 806 #undef mipsel |
779 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 780 CPU=mipsel | 807 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 808 CPU=mipsel |
781 #else | 809 #else |
782 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | 810 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
783 CPU=mips 784 #else 785 CPU= 786 #endif | 811 CPU=mips 812 #else 813 CPU= 814 #endif |
787 #endif | 815 #endif |
788EOF 789 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` | 816EOF 817 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` |
790 rm -f $dummy.c | 818 rm -f $dummy.c && rmdir $tmpdir |
791 test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 792 ;; 793 ppc:Linux:*:*) 794 echo powerpc-unknown-linux-gnu 795 exit 0 ;; 796 ppc64:Linux:*:*) 797 echo powerpc64-unknown-linux-gnu 798 exit 0 ;; --- 33 unchanged lines hidden (view full) --- 832 exit 0 ;; 833 x86_64:Linux:*:*) 834 echo x86_64-unknown-linux-gnu 835 exit 0 ;; 836 i*86:Linux:*:*) 837 # The BFD linker knows what the default object file format is, so 838 # first see if it will tell us. cd to the root directory to prevent 839 # problems with other programs or directories called `ld' in the path. | 819 test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 820 ;; 821 ppc:Linux:*:*) 822 echo powerpc-unknown-linux-gnu 823 exit 0 ;; 824 ppc64:Linux:*:*) 825 echo powerpc64-unknown-linux-gnu 826 exit 0 ;; --- 33 unchanged lines hidden (view full) --- 860 exit 0 ;; 861 x86_64:Linux:*:*) 862 echo x86_64-unknown-linux-gnu 863 exit 0 ;; 864 i*86:Linux:*:*) 865 # The BFD linker knows what the default object file format is, so 866 # first see if it will tell us. cd to the root directory to prevent 867 # problems with other programs or directories called `ld' in the path. |
840 # Export LANG=C to prevent ld from outputting information in other 841 # languages. 842 ld_supported_targets=`LANG=C; export LANG; cd /; ld --help 2>&1 \ | 868 # Set LC_ALL=C to ensure ld outputs messages in English. 869 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ |
843 | sed -ne '/supported targets:/!d 844 s/[ ][ ]*/ /g 845 s/.*supported targets: *// 846 s/ .*// 847 p'` 848 case "$ld_supported_targets" in 849 elf32-i386) 850 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 851 ;; 852 a.out-i386-linux) 853 echo "${UNAME_MACHINE}-pc-linux-gnuaout" | 870 | sed -ne '/supported targets:/!d 871 s/[ ][ ]*/ /g 872 s/.*supported targets: *// 873 s/ .*// 874 p'` 875 case "$ld_supported_targets" in 876 elf32-i386) 877 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 878 ;; 879 a.out-i386-linux) 880 echo "${UNAME_MACHINE}-pc-linux-gnuaout" |
854 exit 0 ;; | 881 exit 0 ;; |
855 coff-i386) 856 echo "${UNAME_MACHINE}-pc-linux-gnucoff" 857 exit 0 ;; 858 "") 859 # Either a pre-BFD a.out linker (linux-gnuoldld) or 860 # one that does not give us useful --help. 861 echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 862 exit 0 ;; --- 16 unchanged lines hidden (view full) --- 879 #ifdef __INTEL_COMPILER 880 LIBC=gnu 881 #else 882 LIBC=gnuaout 883 #endif 884 #endif 885EOF 886 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` | 882 coff-i386) 883 echo "${UNAME_MACHINE}-pc-linux-gnucoff" 884 exit 0 ;; 885 "") 886 # Either a pre-BFD a.out linker (linux-gnuoldld) or 887 # one that does not give us useful --help. 888 echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 889 exit 0 ;; --- 16 unchanged lines hidden (view full) --- 906 #ifdef __INTEL_COMPILER 907 LIBC=gnu 908 #else 909 LIBC=gnuaout 910 #endif 911 #endif 912EOF 913 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` |
887 rm -f $dummy.c | 914 rm -f $dummy.c && rmdir $tmpdir |
888 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 889 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 890 ;; 891 i*86:DYNIX/ptx:4*:*) 892 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 893 # earlier versions are messed up and put the nodename in both 894 # sysname and nodename. 895 echo i386-sequent-sysv4 --- 22 unchanged lines hidden (view full) --- 918 esac 919 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 920 exit 0 ;; 921 i*86:*:3.2:*) 922 if test -f /usr/options/cb.name; then 923 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 924 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 925 elif /bin/uname -X 2>/dev/null >/dev/null ; then | 915 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 916 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 917 ;; 918 i*86:DYNIX/ptx:4*:*) 919 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 920 # earlier versions are messed up and put the nodename in both 921 # sysname and nodename. 922 echo i386-sequent-sysv4 --- 22 unchanged lines hidden (view full) --- 945 esac 946 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 947 exit 0 ;; 948 i*86:*:3.2:*) 949 if test -f /usr/options/cb.name; then 950 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 951 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 952 elif /bin/uname -X 2>/dev/null >/dev/null ; then |
926 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` 927 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 928 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ | 953 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 954 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 955 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ |
929 && UNAME_MACHINE=i586 | 956 && UNAME_MACHINE=i586 |
930 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ | 957 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ |
931 && UNAME_MACHINE=i686 | 958 && UNAME_MACHINE=i686 |
932 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ | 959 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
933 && UNAME_MACHINE=i686 934 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 935 else 936 echo ${UNAME_MACHINE}-pc-sysv32 937 fi 938 exit 0 ;; 939 i*86:*DOS:*:*) 940 echo ${UNAME_MACHINE}-pc-msdosdjgpp --- 18 unchanged lines hidden (view full) --- 959 fi 960 exit 0 ;; 961 mini*:CTIX:SYS*5:*) 962 # "miniframe" 963 echo m68010-convergent-sysv 964 exit 0 ;; 965 M68*:*:R3V[567]*:*) 966 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; | 960 && UNAME_MACHINE=i686 961 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 962 else 963 echo ${UNAME_MACHINE}-pc-sysv32 964 fi 965 exit 0 ;; 966 i*86:*DOS:*:*) 967 echo ${UNAME_MACHINE}-pc-msdosdjgpp --- 18 unchanged lines hidden (view full) --- 986 fi 987 exit 0 ;; 988 mini*:CTIX:SYS*5:*) 989 # "miniframe" 990 echo m68010-convergent-sysv 991 exit 0 ;; 992 M68*:*:R3V[567]*:*) 993 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; |
967 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) | 994 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) |
968 OS_REL='' 969 test -r /etc/.relid \ 970 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 971 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 972 && echo i486-ncr-sysv4.3${OS_REL} && exit 0 973 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 974 && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 975 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) --- 84 unchanged lines hidden (view full) --- 1060 exit 0 ;; 1061 *:Rhapsody:*:*) 1062 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1063 exit 0 ;; 1064 *:Darwin:*:*) 1065 echo `uname -p`-apple-darwin${UNAME_RELEASE} 1066 exit 0 ;; 1067 *:procnto*:*:* | *:QNX:[0123456789]*:*) | 995 OS_REL='' 996 test -r /etc/.relid \ 997 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 998 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 999 && echo i486-ncr-sysv4.3${OS_REL} && exit 0 1000 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1001 && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 1002 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) --- 84 unchanged lines hidden (view full) --- 1087 exit 0 ;; 1088 *:Rhapsody:*:*) 1089 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1090 exit 0 ;; 1091 *:Darwin:*:*) 1092 echo `uname -p`-apple-darwin${UNAME_RELEASE} 1093 exit 0 ;; 1094 *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1068 if test "${UNAME_MACHINE}" = "x86pc"; then | 1095 UNAME_PROCESSOR=`uname -p` 1096 if test "$UNAME_PROCESSOR" = "x86"; then 1097 UNAME_PROCESSOR=i386 |
1069 UNAME_MACHINE=pc | 1098 UNAME_MACHINE=pc |
1070 echo i386-${UNAME_MACHINE}-nto-qnx 1071 else 1072 echo `uname -p`-${UNAME_MACHINE}-nto-qnx | |
1073 fi | 1099 fi |
1100 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} |
|
1074 exit 0 ;; 1075 *:QNX:*:4*) 1076 echo i386-pc-qnx 1077 exit 0 ;; 1078 NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) 1079 echo nsr-tandem-nsk${UNAME_RELEASE} 1080 exit 0 ;; 1081 *:NonStop-UX:*:*) --- 160 unchanged lines hidden (view full) --- 1242#if defined (alliant) && defined (i860) 1243 printf ("i860-alliant-bsd\n"); exit (0); 1244#endif 1245 1246 exit (1); 1247} 1248EOF 1249 | 1101 exit 0 ;; 1102 *:QNX:*:4*) 1103 echo i386-pc-qnx 1104 exit 0 ;; 1105 NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) 1106 echo nsr-tandem-nsk${UNAME_RELEASE} 1107 exit 0 ;; 1108 *:NonStop-UX:*:*) --- 160 unchanged lines hidden (view full) --- 1269#if defined (alliant) && defined (i860) 1270 printf ("i860-alliant-bsd\n"); exit (0); 1271#endif 1272 1273 exit (1); 1274} 1275EOF 1276 |
1250$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 1251rm -f $dummy.c $dummy | 1277$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 1278rm -f $dummy.c $dummy && rmdir $tmpdir |
1252 1253# Apollos put the system type in the environment. 1254 1255test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } 1256 1257# Convex versions that predate uname can use getsysinfo(1) 1258 1259if [ -x /usr/convex/getsysinfo ] --- 68 unchanged lines hidden --- | 1279 1280# Apollos put the system type in the environment. 1281 1282test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } 1283 1284# Convex versions that predate uname can use getsysinfo(1) 1285 1286if [ -x /usr/convex/getsysinfo ] --- 68 unchanged lines hidden --- |