Changeset 2962
- Timestamp:
- 2002-02-12T14:10:34+13:00 (22 years ago)
- Location:
- trunk/gsdl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/config.guess
r2721 r2962 1 1 #! /bin/sh 2 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, 2001 4 4 # Free Software Foundation, Inc. 5 # 5 6 timestamp='2001-07-12' 7 6 8 # This file is free software; you can redistribute it and/or modify it 7 9 # under the terms of the GNU General Public License as published by … … 24 26 25 27 # Written by Per Bothner <[email protected]>. 26 # The master version of this file is at the FSF in /home/gd/gnu/lib. 27 # Please send patches to the Autoconf mailing list <[email protected]>. 28 # Please send patches to <[email protected]>. 28 29 # 29 30 # This script attempts to guess a canonical system name similar to … … 32 33 # 33 34 # The plan is that this can be called by configure scripts if you 34 # don't specify an explicit system type (host/target name). 35 # 36 # Only a few systems have been added to this list; please add others 37 # (but try to keep the structure clean). 38 # 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 35 # don't specify an explicit build system type. 36 37 me=`echo "$0" | sed -e 's,.*/,,'` 38 39 usage="\ 40 Usage: $0 [OPTION] 41 42 Output the configuration name of the system \`$me' is run on. 43 44 Operation modes: 45 -h, --help print this help, then exit 46 -t, --time-stamp print date of last modification, then exit 47 -v, --version print version number, then exit 48 49 Report bugs and patches to <[email protected]>." 50 51 version="\ 52 GNU config.guess ($timestamp) 53 54 Originally written by Per Bothner. 55 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 56 Free Software Foundation, Inc. 57 58 This is free software; see the source for copying conditions. There is NO 59 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 60 61 help=" 62 Try \`$me --help' for more information." 63 64 # Parse command line 65 while test $# -gt 0 ; do 66 case $1 in 67 --time-stamp | --time* | -t ) 68 echo "$timestamp" ; exit 0 ;; 69 --version | -v ) 70 echo "$version" ; exit 0 ;; 71 --help | --h* | -h ) 72 echo "$usage"; exit 0 ;; 73 -- ) # Stop option processing 74 shift; break ;; 75 - ) # Use stdin as input. 76 break ;; 77 -* ) 78 echo "$me: invalid option $1$help" >&2 79 exit 1 ;; 80 * ) 81 break ;; 82 esac 83 done 84 85 if test $# != 0; then 86 echo "$me: too many arguments$help" >&2 87 exit 1 51 88 fi 52 89 53 90 91 dummy=dummy-$$ 92 trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 93 94 # CC_FOR_BUILD -- compiler used by this script. 95 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 96 # use `HOST_CC' if defined, but it is deprecated. 97 98 set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in 99 ,,) echo "int dummy(){}" > $dummy.c ; 100 for c in cc gcc c89 ; do 101 ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; 102 if test $? = 0 ; then 103 CC_FOR_BUILD="$c"; break ; 104 fi ; 105 done ; 106 rm -f $dummy.c $dummy.o $dummy.rel ; 107 if test x"$CC_FOR_BUILD" = x ; then 108 CC_FOR_BUILD=no_compiler_found ; 109 fi 110 ;; 111 ,,*) CC_FOR_BUILD=$CC ;; 112 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 113 esac' 114 54 115 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 55 # ([email protected] 8/24/94.)116 # ([email protected] 1994-08-24) 56 117 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 57 118 PATH=$PATH:/.attbin ; export PATH … … 60 121 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 61 122 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 62 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown123 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 63 124 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 64 125 65 dummy=dummy-$$66 trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 1567 68 126 # Note: order is significant - the case branches are not exclusive. 69 127 70 128 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 129 *:NetBSD:*:*) 130 # Netbsd (nbsd) targets should (where applicable) match one or 131 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 132 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 133 # switched to ELF, *-*-netbsd* would select the old 134 # object file format. This provides both forward 135 # compatibility and a consistent mechanism for selecting the 136 # object file format. 137 # Determine the machine/vendor (is the vendor relevant). 138 case "${UNAME_MACHINE}" in 139 amiga) machine=m68k-unknown ;; 140 arm32) machine=arm-unknown ;; 141 atari*) machine=m68k-atari ;; 142 sun3*) machine=m68k-sun ;; 143 mac68k) machine=m68k-apple ;; 144 macppc) machine=powerpc-apple ;; 145 hp3[0-9][05]) machine=m68k-hp ;; 146 ibmrt|romp-ibm) machine=romp-ibm ;; 147 *) machine=${UNAME_MACHINE}-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}" in 152 i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) 153 eval $set_cc_for_build 154 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 155 | grep __ELF__ >/dev/null 156 then 157 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 158 # Return netbsd for either. FIX? 159 os=netbsd 160 else 161 os=netbsdelf 162 fi 163 ;; 164 *) 165 os=netbsd 166 ;; 167 esac 168 # The OS release 169 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 170 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 171 # contains redundant information, the shorter form: 172 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 173 echo "${machine}-${os}${release}" 174 exit 0 ;; 71 175 alpha:OSF1:*:*) 72 176 if test $UNAME_RELEASE = "V4.0"; then … … 78 182 # 1.2 uses "1.2" for uname -r. 79 183 cat <<EOF >$dummy.s 184 .data 185 \$Lformat: 186 .byte 37,100,45,37,120,10,0 # "%d-%x\n" 187 188 .text 80 189 .globl main 190 .align 4 81 191 .ent main 82 192 main: 83 .frame \$30,0,\$26,0 84 .prologue 0 85 .long 0x47e03d80 # implver $0 86 lda \$2,259 87 .long 0x47e20c21 # amask $2,$1 88 srl \$1,8,\$2 89 sll \$2,2,\$2 90 sll \$0,3,\$0 91 addl \$1,\$0,\$0 92 addl \$2,\$0,\$0 93 ret \$31,(\$26),1 193 .frame \$30,16,\$26,0 194 ldgp \$29,0(\$27) 195 .prologue 1 196 .long 0x47e03d80 # implver \$0 197 lda \$2,-1 198 .long 0x47e20c21 # amask \$2,\$1 199 lda \$16,\$Lformat 200 mov \$0,\$17 201 not \$1,\$18 202 jsr \$26,printf 203 ldgp \$29,0(\$26) 204 mov 0,\$16 205 jsr \$26,exit 94 206 .end main 95 207 EOF 208 eval $set_cc_for_build 96 209 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null 97 210 if test "$?" = 0 ; then 98 ./$dummy 99 case "$?" in 100 7) 211 case `./$dummy` in 212 0-0) 101 213 UNAME_MACHINE="alpha" 102 214 ;; 103 1 5)215 1-0) 104 216 UNAME_MACHINE="alphaev5" 105 217 ;; 106 1 4)218 1-1) 107 219 UNAME_MACHINE="alphaev56" 108 220 ;; 109 1 0)221 1-101) 110 222 UNAME_MACHINE="alphapca56" 111 223 ;; 112 16)224 2-303) 113 225 UNAME_MACHINE="alphaev6" 226 ;; 227 2-307) 228 UNAME_MACHINE="alphaev67" 114 229 ;; 115 230 esac … … 128 243 exit 0 ;; 129 244 Amiga*:UNIX_System_V:4.0:*) 130 echo m68k- cbm-sysv4245 echo m68k-unknown-sysv4 131 246 exit 0;; 132 amiga:NetBSD:*:*)133 echo m68k-cbm-netbsd${UNAME_RELEASE}134 exit 0 ;;135 247 amiga:OpenBSD:*:*) 136 248 echo m68k-unknown-openbsd${UNAME_RELEASE} … … 156 268 wgrisc:OpenBSD:*:*) 157 269 echo mipsel-unknown-openbsd${UNAME_RELEASE} 270 exit 0 ;; 271 *:OS/390:*:*) 272 echo i370-ibm-openedition 158 273 exit 0 ;; 159 274 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 160 275 echo arm-acorn-riscix${UNAME_RELEASE} 161 276 exit 0;; 162 arm32:NetBSD:*:*) 163 echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 164 exit 0 ;; 165 SR2?01:HI-UX/MPP:*:*) 277 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 166 278 echo hppa1.1-hitachi-hiuxmpp 167 279 exit 0;; … … 219 331 echo sparc-auspex-sunos${UNAME_RELEASE} 220 332 exit 0 ;; 221 atari*:NetBSD:*:*)222 echo m68k-atari-netbsd${UNAME_RELEASE}223 exit 0 ;;224 333 atari*:OpenBSD:*:*) 225 334 echo m68k-unknown-openbsd${UNAME_RELEASE} … … 227 336 # The situation for MiNT is a little confusing. The machine name 228 337 # can be virtually everything (everything which is not 229 # "atarist" or "atariste" at least should have a processor 338 # "atarist" or "atariste" at least should have a processor 230 339 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 231 340 # to the lowercase version "mint" (or "freemint"). Finally … … 251 360 echo m68k-unknown-mint${UNAME_RELEASE} 252 361 exit 0 ;; 253 sun3*:NetBSD:*:*)254 echo m68k-sun-netbsd${UNAME_RELEASE}255 exit 0 ;;256 362 sun3*:OpenBSD:*:*) 257 363 echo m68k-unknown-openbsd${UNAME_RELEASE} 258 364 exit 0 ;; 259 mac68k:NetBSD:*:*)260 echo m68k-apple-netbsd${UNAME_RELEASE}261 exit 0 ;;262 365 mac68k:OpenBSD:*:*) 263 366 echo m68k-unknown-openbsd${UNAME_RELEASE} … … 272 375 echo powerpc-apple-machten${UNAME_RELEASE} 273 376 exit 0 ;; 274 macppc:NetBSD:*:*)275 echo powerpc-apple-netbsd${UNAME_RELEASE}276 exit 0 ;;277 377 RISC*:Mach:*:*) 278 378 echo mips-dec-mach_bsd4.3 … … 290 390 sed 's/^ //' << EOF >$dummy.c 291 391 #ifdef __cplusplus 392 #include <stdio.h> /* for printf() prototype */ 292 393 int main (int argc, char *argv[]) { 293 394 #else … … 308 409 } 309 410 EOF 411 eval $set_cc_for_build 310 412 $CC_FOR_BUILD $dummy.c -o $dummy \ 311 413 && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 312 && rm $dummy.c $dummy && exit 0414 && rm -f $dummy.c $dummy && exit 0 313 415 rm -f $dummy.c $dummy 314 416 echo mips-mips-riscos${UNAME_RELEASE} 417 exit 0 ;; 418 Motorola:PowerMAX_OS:*:*) 419 echo powerpc-motorola-powermax 315 420 exit 0 ;; 316 421 Night_Hawk:Power_UNIX:*:*) … … 329 434 # DG/UX returns AViiON for all architectures 330 435 UNAME_PROCESSOR=`/usr/bin/uname -p` 331 if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then 332 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ 333 -o ${TARGET_BINARY_INTERFACE}x = x ] ; then 436 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 437 then 438 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 439 [ ${TARGET_BINARY_INTERFACE}x = x ] 440 then 334 441 echo m88k-dg-dgux${UNAME_RELEASE} 442 else 443 echo m88k-dg-dguxbcs${UNAME_RELEASE} 444 fi 335 445 else 336 echo m88k-dg-dguxbcs${UNAME_RELEASE} 337 fi 338 else echo i586-dg-dgux${UNAME_RELEASE} 339 fi 446 echo i586-dg-dgux${UNAME_RELEASE} 447 fi 340 448 exit 0 ;; 341 449 M88*:DolphinOS:*:*) # DolphinOS (SVR3) … … 358 466 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 359 467 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 360 i ?86:AIX:*:*)468 i*86:AIX:*:*) 361 469 echo i386-ibm-aix 470 exit 0 ;; 471 ia64:AIX:*:*) 472 if [ -x /usr/bin/oslevel ] ; then 473 IBM_REV=`/usr/bin/oslevel` 474 else 475 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 476 fi 477 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 362 478 exit 0 ;; 363 479 *:AIX:2:3) … … 374 490 } 375 491 EOF 376 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 492 eval $set_cc_for_build 493 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 377 494 rm -f $dummy.c $dummy 378 495 echo rs6000-ibm-aix3.2.5 … … 383 500 fi 384 501 exit 0 ;; 385 *:AIX:*: 4)502 *:AIX:*:[45]) 386 503 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` 387 if /usr/sbin/lsattr -E Hl ${IBM_CPU_ID} | grep POWER>/dev/null 2>&1; then504 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 388 505 IBM_ARCH=rs6000 389 506 else … … 393 510 IBM_REV=`/usr/bin/oslevel` 394 511 else 395 IBM_REV= 4.${UNAME_RELEASE}512 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 396 513 fi 397 514 echo ${IBM_ARCH}-ibm-aix${IBM_REV} … … 403 520 echo romp-ibm-bsd4.4 404 521 exit 0 ;; 405 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and522 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 406 523 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 407 524 exit 0 ;; # report: romp-ibm BSD 4.3 … … 419 536 exit 0 ;; 420 537 9000/[34678]??:HP-UX:*:*) 538 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 421 539 case "${UNAME_MACHINE}" in 422 540 9000/31? ) HP_ARCH=m68000 ;; 423 541 9000/[34]?? ) HP_ARCH=m68k ;; 424 542 9000/[678][0-9][0-9]) 543 case "${HPUX_REV}" in 544 11.[0-9][0-9]) 545 if [ -x /usr/bin/getconf ]; then 546 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 547 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 548 case "${sc_cpu_version}" in 549 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 550 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 551 532) # CPU_PA_RISC2_0 552 case "${sc_kernel_bits}" in 553 32) HP_ARCH="hppa2.0n" ;; 554 64) HP_ARCH="hppa2.0w" ;; 555 esac ;; 556 esac 557 fi ;; 558 esac 559 if [ "${HP_ARCH}" = "" ]; then 425 560 sed 's/^ //' << EOF >$dummy.c 561 562 #define _HPUX_SOURCE 426 563 #include <stdlib.h> 427 564 #include <unistd.h> … … 454 591 } 455 592 EOF 456 ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` 593 eval $set_cc_for_build 594 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` 595 if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi 457 596 rm -f $dummy.c $dummy 597 fi ;; 458 598 esac 599 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 600 exit 0 ;; 601 ia64:HP-UX:*:*) 459 602 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 460 echo ${HP_ARCH}-hp-hpux${HPUX_REV}603 echo ia64-hp-hpux${HPUX_REV} 461 604 exit 0 ;; 462 605 3050*:HI-UX:*:*) … … 486 629 } 487 630 EOF 488 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 631 eval $set_cc_for_build 632 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 489 633 rm -f $dummy.c $dummy 490 634 echo unknown-hitachi-hiuxwe2 … … 496 640 echo hppa1.0-hp-bsd 497 641 exit 0 ;; 498 *9??*:MPE/iX:*:* )642 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 499 643 echo hppa1.0-hp-mpeix 500 644 exit 0 ;; … … 505 649 echo hppa1.0-hp-osf 506 650 exit 0 ;; 507 i ?86:OSF1:*:*)651 i*86:OSF1:*:*) 508 652 if [ -x /usr/sbin/sysversion ] ; then 509 653 echo ${UNAME_MACHINE}-unknown-osf1mk … … 540 684 exit 0 ;; 541 685 CRAY*Y-MP:*:*:*) 542 echo ymp-cray-unicos${UNAME_RELEASE} 686 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 543 687 exit 0 ;; 544 688 CRAY*[A-Z]90:*:*:*) 545 689 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 546 690 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 547 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ 691 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 692 -e 's/\.[^.]*$/.X/' 548 693 exit 0 ;; 549 694 CRAY*TS:*:*:*) 550 echo t90-cray-unicos${UNAME_RELEASE} 695 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 696 exit 0 ;; 697 CRAY*T3D:*:*:*) 698 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 551 699 exit 0 ;; 552 700 CRAY*T3E:*:*:*) 553 echo alpha-cray-unicosmk${UNAME_RELEASE} 701 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 702 exit 0 ;; 703 CRAY*SV1:*:*:*) 704 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 554 705 exit 0 ;; 555 706 CRAY-2:*:*:*) 556 707 echo cray2-cray-unicos 557 708 exit 0 ;; 558 F300:UNIX_System_V:*:*) 709 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 710 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 559 711 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 560 712 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 561 echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 562 exit 0 ;; 563 F301:UNIX_System_V:*:*) 564 echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` 565 exit 0 ;; 566 hp3[0-9][05]:NetBSD:*:*) 567 echo m68k-hp-netbsd${UNAME_RELEASE} 568 exit 0 ;; 713 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 714 exit 0 ;; 569 715 hp300:OpenBSD:*:*) 570 716 echo m68k-unknown-openbsd${UNAME_RELEASE} 571 717 exit 0 ;; 572 i ?86:BSD/386:*:* | i?86:BSD/OS:*:*)718 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 573 719 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 574 720 exit 0 ;; … … 580 726 exit 0 ;; 581 727 *:FreeBSD:*:*) 582 if test -x /usr/bin/objformat; then583 if test "elf" = "`/usr/bin/objformat`"; then584 echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`585 exit 0586 fi587 fi588 728 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 589 exit 0 ;;590 *:NetBSD:*:*)591 echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`592 729 exit 0 ;; 593 730 *:OpenBSD:*:*) … … 599 736 i*:MINGW*:*) 600 737 echo ${UNAME_MACHINE}-pc-mingw32 738 exit 0 ;; 739 i*:PW*:*) 740 echo ${UNAME_MACHINE}-pc-pw32 601 741 exit 0 ;; 602 742 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) … … 618 758 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 619 759 exit 0 ;; 620 *:Linux:*:*) 621 # uname on the ARM produces all sorts of strangeness, and we need to 622 # filter it out. 623 case "$UNAME_MACHINE" in 624 armv*) UNAME_MACHINE=$UNAME_MACHINE ;; 625 arm* | sa110*) UNAME_MACHINE="arm" ;; 760 i*86:Minix:*:*) 761 echo ${UNAME_MACHINE}-pc-minix 762 exit 0 ;; 763 arm*:Linux:*:*) 764 echo ${UNAME_MACHINE}-unknown-linux-gnu 765 exit 0 ;; 766 ia64:Linux:*:*) 767 echo ${UNAME_MACHINE}-unknown-linux 768 exit 0 ;; 769 m68*:Linux:*:*) 770 echo ${UNAME_MACHINE}-unknown-linux-gnu 771 exit 0 ;; 772 mips:Linux:*:*) 773 case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in 774 big) echo mips-unknown-linux-gnu && exit 0 ;; 775 little) echo mipsel-unknown-linux-gnu && exit 0 ;; 626 776 esac 627 777 ;; 778 ppc:Linux:*:*) 779 echo powerpc-unknown-linux-gnu 780 exit 0 ;; 781 alpha:Linux:*:*) 782 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 783 EV5) UNAME_MACHINE=alphaev5 ;; 784 EV56) UNAME_MACHINE=alphaev56 ;; 785 PCA56) UNAME_MACHINE=alphapca56 ;; 786 PCA57) UNAME_MACHINE=alphapca56 ;; 787 EV6) UNAME_MACHINE=alphaev6 ;; 788 EV67) UNAME_MACHINE=alphaev67 ;; 789 EV68*) UNAME_MACHINE=alphaev67 ;; 790 esac 791 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 792 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 793 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 794 exit 0 ;; 795 parisc:Linux:*:* | hppa:Linux:*:*) 796 # Look for CPU level 797 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 798 PA7*) echo hppa1.1-unknown-linux-gnu ;; 799 PA8*) echo hppa2.0-unknown-linux-gnu ;; 800 *) echo hppa-unknown-linux-gnu ;; 801 esac 802 exit 0 ;; 803 parisc64:Linux:*:* | hppa64:Linux:*:*) 804 echo hppa64-unknown-linux-gnu 805 exit 0 ;; 806 s390:Linux:*:* | s390x:Linux:*:*) 807 echo ${UNAME_MACHINE}-ibm-linux 808 exit 0 ;; 809 sh*:Linux:*:*) 810 echo ${UNAME_MACHINE}-unknown-linux-gnu 811 exit 0 ;; 812 sparc:Linux:*:* | sparc64:Linux:*:*) 813 echo ${UNAME_MACHINE}-unknown-linux-gnu 814 exit 0 ;; 815 x86_64:Linux:*:*) 816 echo x86_64-unknown-linux-gnu 817 exit 0 ;; 818 i*86:Linux:*:*) 628 819 # The BFD linker knows what the default object file format is, so 629 820 # first see if it will tell us. cd to the root directory to prevent 630 821 # problems with other programs or directories called `ld' in the path. 631 ld_help_string=`cd /; ld --help 2>&1` 632 ld_supported_emulations=`echo $ld_help_string \ 633 | sed -ne '/supported emulations:/!d 822 ld_supported_targets=`cd /; ld --help 2>&1 \ 823 | sed -ne '/supported targets:/!d 634 824 s/[ ][ ]*/ /g 635 s/.*supported emulations: *//825 s/.*supported targets: *// 636 826 s/ .*// 637 827 p'` 638 case "$ld_supported_emulations" in 639 *ia64) echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 ;; 640 i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; 641 i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; 642 sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; 643 armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; 644 m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; 645 elf32ppc | elf32ppclinux) 646 # Determine Lib Version 647 cat >$dummy.c <<EOF 828 case "$ld_supported_targets" in 829 elf32-i386) 830 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 831 ;; 832 a.out-i386-linux) 833 echo "${UNAME_MACHINE}-pc-linux-gnuaout" 834 exit 0 ;; 835 coff-i386) 836 echo "${UNAME_MACHINE}-pc-linux-gnucoff" 837 exit 0 ;; 838 "") 839 # Either a pre-BFD a.out linker (linux-gnuoldld) or 840 # one that does not give us useful --help. 841 echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 842 exit 0 ;; 843 esac 844 # Determine whether the default compiler is a.out or elf 845 cat >$dummy.c <<EOF 648 846 #include <features.h> 649 #if defined(__GLIBC__) 650 extern char __libc_version[]; 651 extern char __libc_release[]; 652 #endif 653 main(argc, argv) 654 int argc; 655 char *argv[]; 656 { 657 #if defined(__GLIBC__) 658 printf("%s %s\n", __libc_version, __libc_release); 847 #ifdef __cplusplus 848 #include <stdio.h> /* for printf() prototype */ 849 int main (int argc, char *argv[]) { 659 850 #else 660 printf("unkown\n"); 851 int main (argc, argv) int argc; char *argv[]; { 852 #endif 853 #ifdef __ELF__ 854 # ifdef __GLIBC__ 855 # if __GLIBC__ >= 2 856 printf ("%s-pc-linux-gnu\n", argv[1]); 857 # else 858 printf ("%s-pc-linux-gnulibc1\n", argv[1]); 859 # endif 860 # else 861 printf ("%s-pc-linux-gnulibc1\n", argv[1]); 862 # endif 863 #else 864 printf ("%s-pc-linux-gnuaout\n", argv[1]); 661 865 #endif 662 866 return 0; 663 867 } 664 868 EOF 665 LIBC="" 666 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null 667 if test "$?" = 0 ; then 668 ./$dummy | grep 1\.99 > /dev/null 669 if test "$?" = 0 ; then 670 LIBC="libc1" 671 fi 672 fi 673 rm -f $dummy.c $dummy 674 echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;; 675 esac 676 677 if test "${UNAME_MACHINE}" = "alpha" ; then 678 sed 's/^ //' <<EOF >$dummy.s 679 .globl main 680 .ent main 681 main: 682 .frame \$30,0,\$26,0 683 .prologue 0 684 .long 0x47e03d80 # implver $0 685 lda \$2,259 686 .long 0x47e20c21 # amask $2,$1 687 srl \$1,8,\$2 688 sll \$2,2,\$2 689 sll \$0,3,\$0 690 addl \$1,\$0,\$0 691 addl \$2,\$0,\$0 692 ret \$31,(\$26),1 693 .end main 694 EOF 695 LIBC="" 696 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null 697 if test "$?" = 0 ; then 698 ./$dummy 699 case "$?" in 700 7) 701 UNAME_MACHINE="alpha" 702 ;; 703 15) 704 UNAME_MACHINE="alphaev5" 705 ;; 706 14) 707 UNAME_MACHINE="alphaev56" 708 ;; 709 10) 710 UNAME_MACHINE="alphapca56" 711 ;; 712 16) 713 UNAME_MACHINE="alphaev6" 714 ;; 715 esac 716 717 objdump --private-headers $dummy | \ 718 grep ld.so.1 > /dev/null 719 if test "$?" = 0 ; then 720 LIBC="libc1" 721 fi 722 fi 723 rm -f $dummy.s $dummy 724 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 725 elif test "${UNAME_MACHINE}" = "mips" ; then 726 cat >$dummy.c <<EOF 727 #ifdef __cplusplus 728 int main (int argc, char *argv[]) { 729 #else 730 int main (argc, argv) int argc; char *argv[]; { 731 #endif 732 #ifdef __MIPSEB__ 733 printf ("%s-unknown-linux-gnu\n", argv[1]); 734 #endif 735 #ifdef __MIPSEL__ 736 printf ("%sel-unknown-linux-gnu\n", argv[1]); 737 #endif 738 return 0; 739 } 740 EOF 741 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 742 rm -f $dummy.c $dummy 743 else 744 # Either a pre-BFD a.out linker (linux-gnuoldld) 745 # or one that does not give us useful --help. 746 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. 747 # If ld does not provide *any* "supported emulations:" 748 # that means it is gnuoldld. 749 echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" 750 test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 751 752 case "${UNAME_MACHINE}" in 753 i?86) 754 VENDOR=pc; 755 ;; 756 *) 757 VENDOR=unknown; 758 ;; 759 esac 760 # Determine whether the default compiler is a.out or elf 761 cat >$dummy.c <<EOF 762 #include <features.h> 763 #ifdef __cplusplus 764 int main (int argc, char *argv[]) { 765 #else 766 int main (argc, argv) int argc; char *argv[]; { 767 #endif 768 #ifdef __ELF__ 769 # ifdef __GLIBC__ 770 # if __GLIBC__ >= 2 771 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); 772 # else 773 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); 774 # endif 775 # else 776 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); 777 # endif 778 #else 779 printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); 780 #endif 781 return 0; 782 } 783 EOF 784 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 785 rm -f $dummy.c $dummy 786 fi ;; 787 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions 788 # are messed up and put the nodename in both sysname and nodename. 789 i?86:DYNIX/ptx:4*:*) 869 eval $set_cc_for_build 870 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 871 rm -f $dummy.c $dummy 872 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 873 ;; 874 i*86:DYNIX/ptx:4*:*) 875 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 876 # earlier versions are messed up and put the nodename in both 877 # sysname and nodename. 790 878 echo i386-sequent-sysv4 791 879 exit 0 ;; 792 i ?86:UNIX_SV:4.2MP:2.*)880 i*86:UNIX_SV:4.2MP:2.*) 793 881 # Unixware is an offshoot of SVR4, but it has its own version 794 882 # number series starting with 2... … … 798 886 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 799 887 exit 0 ;; 800 i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) 888 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 889 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 801 890 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 802 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL EASE}891 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 803 892 else 804 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL EASE}805 fi 806 exit 0 ;; 807 i ?86:*:5:7*)808 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`809 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486810 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586811 (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686812 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585813 echo ${UNAME_MACHINE}- ${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}814 exit 0 ;; 815 i ?86:*:3.2:*)893 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 894 fi 895 exit 0 ;; 896 i*86:*:5:[78]*) 897 case `/bin/uname -X | grep "^Machine"` in 898 *486*) UNAME_MACHINE=i486 ;; 899 *Pentium) UNAME_MACHINE=i586 ;; 900 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 901 esac 902 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 903 exit 0 ;; 904 i*86:*:3.2:*) 816 905 if test -f /usr/options/cb.name; then 817 906 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` … … 831 920 fi 832 921 exit 0 ;; 922 i*86:*DOS:*:*) 923 echo ${UNAME_MACHINE}-pc-msdosdjgpp 924 exit 0 ;; 833 925 pc:*:*:*) 926 # Left here for compatibility: 834 927 # uname -m prints for DJGPP always 'pc', but it prints nothing about 835 928 # the processor, so we play safe by assuming i386. … … 855 948 M68*:*:R3V[567]*:*) 856 949 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 857 3[34]??:*:4.0:3.0 | 3[34]?? ,*:*:4.0:3.0 | 4850:*:4.0:3.0)950 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) 858 951 OS_REL='' 859 952 test -r /etc/.relid \ … … 866 959 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 867 960 && echo i486-ncr-sysv4 && exit 0 ;; 868 m68*:LynxOS:2.*:* )961 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 869 962 echo m68k-unknown-lynxos${UNAME_RELEASE} 870 963 exit 0 ;; … … 872 965 echo m68k-atari-sysv4 873 966 exit 0 ;; 874 i ?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)967 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 875 968 echo i386-unknown-lynxos${UNAME_RELEASE} 876 969 exit 0 ;; … … 878 971 echo sparc-unknown-lynxos${UNAME_RELEASE} 879 972 exit 0 ;; 880 rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)973 rs6000:LynxOS:2.*:*) 881 974 echo rs6000-unknown-lynxos${UNAME_RELEASE} 975 exit 0 ;; 976 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 977 echo powerpc-unknown-lynxos${UNAME_RELEASE} 882 978 exit 0 ;; 883 979 SM[BE]S:UNIX_SV:*:*) … … 914 1010 echo m68k-apple-aux${UNAME_RELEASE} 915 1011 exit 0 ;; 916 news*:NEWS-OS: *:6*)1012 news*:NEWS-OS:6*:*) 917 1013 echo mips-sony-newsos6 918 1014 exit 0 ;; … … 944 1040 *:Rhapsody:*:*) 945 1041 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1042 exit 0 ;; 1043 *:Darwin:*:*) 1044 echo `uname -p`-apple-darwin${UNAME_RELEASE} 1045 exit 0 ;; 1046 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1047 if test "${UNAME_MACHINE}" = "x86pc"; then 1048 UNAME_MACHINE=pc 1049 fi 1050 echo `uname -p`-${UNAME_MACHINE}-nto-qnx 1051 exit 0 ;; 1052 *:QNX:*:4*) 1053 echo i386-pc-qnx 1054 exit 0 ;; 1055 NSR-[KW]:NONSTOP_KERNEL:*:*) 1056 echo nsr-tandem-nsk${UNAME_RELEASE} 1057 exit 0 ;; 1058 *:NonStop-UX:*:*) 1059 echo mips-compaq-nonstopux 1060 exit 0 ;; 1061 BS2000:POSIX*:*:*) 1062 echo bs2000-siemens-sysv 1063 exit 0 ;; 1064 DS/*:UNIX_System_V:*:*) 1065 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1066 exit 0 ;; 1067 *:Plan9:*:*) 1068 # "uname -m" is not consistent, so use $cputype instead. 386 1069 # is converted to i386 for consistency with other x86 1070 # operating systems. 1071 if test "$cputype" = "386"; then 1072 UNAME_MACHINE=i386 1073 else 1074 UNAME_MACHINE="$cputype" 1075 fi 1076 echo ${UNAME_MACHINE}-unknown-plan9 1077 exit 0 ;; 1078 i*86:OS/2:*:*) 1079 # If we were able to find `uname', then EMX Unix compatibility 1080 # is probably installed. 1081 echo ${UNAME_MACHINE}-pc-os2-emx 1082 exit 0 ;; 1083 *:TOPS-10:*:*) 1084 echo pdp10-unknown-tops10 1085 exit 0 ;; 1086 *:TENEX:*:*) 1087 echo pdp10-unknown-tenex 1088 exit 0 ;; 1089 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1090 echo pdp10-dec-tops20 1091 exit 0 ;; 1092 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1093 echo pdp10-xkl-tops20 1094 exit 0 ;; 1095 *:TOPS-20:*:*) 1096 echo pdp10-unknown-tops20 1097 exit 0 ;; 1098 *:ITS:*:*) 1099 echo pdp10-unknown-its 946 1100 exit 0 ;; 947 1101 esac … … 1036 1190 1037 1191 #if defined (vax) 1038 #if !defined (ultrix) 1039 printf ("vax-dec-bsd\n"); exit (0); 1040 #else 1041 printf ("vax-dec-ultrix\n"); exit (0); 1042 #endif 1192 # if !defined (ultrix) 1193 # include <sys/param.h> 1194 # if defined (BSD) 1195 # if BSD == 43 1196 printf ("vax-dec-bsd4.3\n"); exit (0); 1197 # else 1198 # if BSD == 199006 1199 printf ("vax-dec-bsd4.3reno\n"); exit (0); 1200 # else 1201 printf ("vax-dec-bsd\n"); exit (0); 1202 # endif 1203 # endif 1204 # else 1205 printf ("vax-dec-bsd\n"); exit (0); 1206 # endif 1207 # else 1208 printf ("vax-dec-ultrix\n"); exit (0); 1209 # endif 1043 1210 #endif 1044 1211 … … 1051 1218 EOF 1052 1219 1053 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 1220 eval $set_cc_for_build 1221 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 1054 1222 rm -f $dummy.c $dummy 1055 1223 … … 1084 1252 fi 1085 1253 1086 #echo '(Unable to guess system type)' 1>&2 1254 cat >&2 <<EOF 1255 $0: unable to guess system type 1256 1257 This script, last modified $timestamp, has failed to recognize 1258 the operating system you are using. It is advised that you 1259 download the most up to date version of the config scripts from 1260 1261 ftp://ftp.gnu.org/pub/gnu/config/ 1262 1263 If the version you run ($0) is already up to date, please 1264 send the following data and any information you think might be 1265 pertinent to <[email protected]> in order to provide the needed 1266 information to handle your system. 1267 1268 config.guess timestamp = $timestamp 1269 1270 uname -m = `(uname -m) 2>/dev/null || echo unknown` 1271 uname -r = `(uname -r) 2>/dev/null || echo unknown` 1272 uname -s = `(uname -s) 2>/dev/null || echo unknown` 1273 uname -v = `(uname -v) 2>/dev/null || echo unknown` 1274 1275 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1276 /bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1277 1278 hostinfo = `(hostinfo) 2>/dev/null` 1279 /bin/universe = `(/bin/universe) 2>/dev/null` 1280 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1281 /bin/arch = `(/bin/arch) 2>/dev/null` 1282 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1283 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1284 1285 UNAME_MACHINE = ${UNAME_MACHINE} 1286 UNAME_RELEASE = ${UNAME_RELEASE} 1287 UNAME_SYSTEM = ${UNAME_SYSTEM} 1288 UNAME_VERSION = ${UNAME_VERSION} 1289 EOF 1087 1290 1088 1291 exit 1 1292 1293 # Local variables: 1294 # eval: (add-hook 'write-file-hooks 'time-stamp) 1295 # time-stamp-start: "timestamp='" 1296 # time-stamp-format: "%:y-%02m-%02d" 1297 # time-stamp-end: "'" 1298 # End: -
trunk/gsdl/config.sub
r2721 r2962 1 1 #! /bin/sh 2 # Configuration validation subroutine script, version 1.1. 3 # Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc. 2 # Configuration validation subroutine script. 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 4 # Free Software Foundation, Inc. 5 6 timestamp='2001-06-08' 7 4 8 # This file is (in principle) common to ALL GNU software. 5 9 # The presence of a machine in this file suggests that SOME GNU software … … 26 30 # the same distribution terms that you use for the rest of that program. 27 31 32 # Please send patches to <[email protected]>. 33 # 28 34 # Configuration subroutine to validate and canonicalize a configuration type. 29 35 # Supply the specified configuration type as an argument. … … 46 52 # It is wrong to echo any other type of specification. 47 53 48 if [ x$1 = x ] 49 then 50 echo Configuration name missing. 1>&2 51 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 52 echo "or $0 ALIAS" 1>&2 53 echo where ALIAS is a recognized configuration type. 1>&2 54 exit 1 55 fi 56 57 # First pass through any local machine types. 58 case $1 in 59 *local*) 60 echo $1 61 exit 0 62 ;; 63 *) 64 ;; 54 me=`echo "$0" | sed -e 's,.*/,,'` 55 56 usage="\ 57 Usage: $0 [OPTION] CPU-MFR-OPSYS 58 $0 [OPTION] ALIAS 59 60 Canonicalize a configuration name. 61 62 Operation modes: 63 -h, --help print this help, then exit 64 -t, --time-stamp print date of last modification, then exit 65 -v, --version print version number, then exit 66 67 Report bugs and patches to <[email protected]>." 68 69 version="\ 70 GNU config.sub ($timestamp) 71 72 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 73 Free Software Foundation, Inc. 74 75 This is free software; see the source for copying conditions. There is NO 76 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 77 78 help=" 79 Try \`$me --help' for more information." 80 81 # Parse command line 82 while test $# -gt 0 ; do 83 case $1 in 84 --time-stamp | --time* | -t ) 85 echo "$timestamp" ; exit 0 ;; 86 --version | -v ) 87 echo "$version" ; exit 0 ;; 88 --help | --h* | -h ) 89 echo "$usage"; exit 0 ;; 90 -- ) # Stop option processing 91 shift; break ;; 92 - ) # Use stdin as input. 93 break ;; 94 -* ) 95 echo "$me: invalid option $1$help" 96 exit 1 ;; 97 98 *local*) 99 # First pass through any local machine types. 100 echo $1 101 exit 0;; 102 103 * ) 104 break ;; 105 esac 106 done 107 108 case $# in 109 0) echo "$me: missing argument$help" >&2 110 exit 1;; 111 1) ;; 112 *) echo "$me: too many arguments$help" >&2 113 exit 1;; 65 114 esac 66 115 … … 69 118 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 70 119 case $maybe_os in 71 linux-gnu*)120 nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) 72 121 os=-$maybe_os 73 122 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` … … 95 144 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 96 145 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 97 -apple )146 -apple | -axis) 98 147 os= 99 148 basic_machine=$1 … … 106 155 ;; 107 156 -wrs) 108 os= vxworks157 os=-vxworks 109 158 basic_machine=$1 110 159 ;; 160 -chorusos*) 161 os=-chorusos 162 basic_machine=$1 163 ;; 164 -chorusrdb) 165 os=-chorusrdb 166 basic_machine=$1 167 ;; 111 168 -hiux*) 112 169 os=-hiuxwe2 … … 156 213 -psos*) 157 214 os=-psos 215 ;; 216 -mint | -mint[0-9]*) 217 basic_machine=m68k-atari 218 os=-mint 158 219 ;; 159 220 esac … … 163 224 # Recognize the basic CPU types without company name. 164 225 # Some are omitted here because they have special meanings below. 165 tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ 166 | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ 226 tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ 227 | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ 228 | pyramid | mn10200 | mn10300 | tron | a29k \ 167 229 | 580 | i960 | h8300 \ 230 | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ 168 231 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ 169 | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ 170 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ 171 | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ 232 | hppa64 \ 233 | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ 234 | alphaev6[78] \ 235 | we32k | ns16k | clipper | i370 | sh | sh[34] \ 236 | powerpc | powerpcle \ 237 | 1750a | dsp16xx | pdp10 | pdp11 \ 238 | mips16 | mips64 | mipsel | mips64el \ 172 239 | mips64orion | mips64orionel | mipstx39 | mipstx39el \ 173 240 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ 174 | mips64vr5000 | miprs64vr5000el | mcore \ 175 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ 176 | thumb | d10v) 241 | mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \ 242 | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ 243 | v850 | c4x \ 244 | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ 245 | pj | pjl | h8500 | z8k) 177 246 basic_machine=$basic_machine-unknown 178 247 ;; 179 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65) 248 m6811 | m68hc11 | m6812 | m68hc12) 249 # Motorola 68HC11/12. 250 basic_machine=$basic_machine-unknown 251 os=-none 252 ;; 253 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 180 254 ;; 181 255 … … 183 257 # because (1) that's what they normally are, and 184 258 # (2) the word "unknown" tends to confuse beginning users. 185 i [34567]86)259 i*86 | x86_64) 186 260 basic_machine=$basic_machine-pc 187 261 ;; … … 193 267 # Recognize the basic CPU types with company name. 194 268 # FIXME: clean up the formatting here. 195 vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ 196 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ 269 vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ 270 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ 271 | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ 197 272 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ 198 273 | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ 199 274 | xmp-* | ymp-* \ 200 | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ 201 | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \ 275 | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ 276 | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ 277 | hppa2.0n-* | hppa64-* \ 278 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ 279 | alphaev6[78]-* \ 202 280 | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ 203 281 | clipper-* | orion-* \ 204 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ 205 | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ 282 | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \ 283 | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ 284 | mips16-* | mips64-* | mipsel-* \ 206 285 | mips64el-* | mips64orion-* | mips64orionel-* \ 207 286 | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ 208 287 | mipstx39-* | mipstx39el-* | mcore-* \ 209 | f301-* | armv*-* | t3e-* \ 288 | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ 289 | [cjt]90-* \ 210 290 | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ 211 | thumb-* | v850-* | d30v-* | tic30-* | c30-* ) 291 | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ 292 | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) 212 293 ;; 213 294 # Recognize the various machine names and aliases which stand … … 246 327 ;; 247 328 amiga | amiga-*) 248 basic_machine=m68k- cbm329 basic_machine=m68k-unknown 249 330 ;; 250 331 amigaos | amigados) 251 basic_machine=m68k- cbm332 basic_machine=m68k-unknown 252 333 os=-amigaos 253 334 ;; 254 335 amigaunix | amix) 255 basic_machine=m68k- cbm336 basic_machine=m68k-unknown 256 337 os=-sysv4 257 338 ;; … … 300 381 os=-unicos 301 382 ;; 302 [c tj]90-cray)303 basic_machine= c90-cray383 [cjt]90) 384 basic_machine=${basic_machine}-cray 304 385 os=-unicos 305 386 ;; 306 387 crds | unos) 307 388 basic_machine=m68k-crds 389 ;; 390 cris | cris-* | etrax*) 391 basic_machine=cris-axis 308 392 ;; 309 393 da30 | da30-*) … … 354 438 os=-sysv 355 439 ;; 440 go32) 441 basic_machine=i386-pc 442 os=-go32 443 ;; 356 444 h3050r* | hiux*) 357 445 basic_machine=hppa1.1-hitachi … … 427 515 i370-ibm* | ibm*) 428 516 basic_machine=i370-ibm 429 os=-mvs430 517 ;; 431 518 # I'm not sure what "Sysv32" means. Should this be sysv3.2? 432 i [34567]86v32)519 i*86v32) 433 520 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 434 521 os=-sysv32 435 522 ;; 436 i [34567]86v4*)523 i*86v4*) 437 524 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 438 525 os=-sysv4 439 526 ;; 440 i [34567]86v)527 i*86v) 441 528 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 442 529 os=-sysv 443 530 ;; 444 i [34567]86sol2)531 i*86sol2) 445 532 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 446 533 os=-solaris2 … … 453 540 basic_machine=i386-unknown 454 541 os=-vsta 455 ;;456 i386-go32 | go32)457 basic_machine=i386-unknown458 os=-go32459 ;;460 i386-mingw32 | mingw32)461 basic_machine=i386-unknown462 os=-mingw32463 542 ;; 464 543 iris | iris4d) … … 487 566 os=-sysv 488 567 ;; 568 mingw32) 569 basic_machine=i386-pc 570 os=-mingw32 571 ;; 489 572 miniframe) 490 573 basic_machine=m68000-convergent 491 574 ;; 492 *mint | *MiNT)575 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 493 576 basic_machine=m68k-atari 494 577 os=-mint … … 508 591 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 509 592 ;; 593 mmix*) 594 basic_machine=mmix-knuth 595 os=-mmixware 596 ;; 510 597 monitor) 511 598 basic_machine=m68k-rom68k … … 513 600 ;; 514 601 msdos) 515 basic_machine=i386- unknown602 basic_machine=i386-pc 516 603 os=-msdos 604 ;; 605 mvs) 606 basic_machine=i370-ibm 607 os=-mvs 517 608 ;; 518 609 ncr3000) … … 525 616 ;; 526 617 netwinder) 527 basic_machine=armv4l- corel618 basic_machine=armv4l-rebel 528 619 os=-linux 529 620 ;; … … 573 664 os=-mon960 574 665 ;; 666 nonstopux) 667 basic_machine=mips-compaq 668 os=-nonstopux 669 ;; 575 670 np1) 576 671 basic_machine=np1-gould 672 ;; 673 nsr-tandem) 674 basic_machine=nsr-tandem 577 675 ;; 578 676 op50n-* | op60c-*) … … 605 703 basic_machine=ns32k-pc532 606 704 ;; 607 pentium | p5 | k5 | k6 | nex en)705 pentium | p5 | k5 | k6 | nexgen) 608 706 basic_machine=i586-pc 609 707 ;; 610 pentiumpro | p6 | 6x86 )708 pentiumpro | p6 | 6x86 | athlon) 611 709 basic_machine=i686-pc 612 710 ;; 613 711 pentiumii | pentium2) 614 basic_machine=i 786-pc615 ;; 616 pentium-* | p5-* | k5-* | k6-* | nex en-*)712 basic_machine=i686-pc 713 ;; 714 pentium-* | p5-* | k5-* | k6-* | nexgen-*) 617 715 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 618 716 ;; 619 pentiumpro-* | p6-* | 6x86-* )717 pentiumpro-* | p6-* | 6x86-* | athlon-*) 620 718 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 621 719 ;; 622 720 pentiumii-* | pentium2-*) 623 basic_machine=i 786-`echo $basic_machine | sed 's/^[^-]*-//'`721 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 624 722 ;; 625 723 pn) 626 724 basic_machine=pn-gould 627 725 ;; 628 power) basic_machine= rs6000-ibm726 power) basic_machine=power-ibm 629 727 ;; 630 728 ppc) basic_machine=powerpc-unknown … … 641 739 basic_machine=i386-ibm 642 740 ;; 741 pw32) 742 basic_machine=i586-unknown 743 os=-pw32 744 ;; 643 745 rom68k) 644 746 basic_machine=m68k-rom68k … … 720 822 basic_machine=i386-sun 721 823 ;; 824 sv1) 825 basic_machine=sv1-cray 826 os=-unicos 827 ;; 722 828 symmetry) 723 829 basic_machine=i386-sequent … … 727 833 basic_machine=t3e-cray 728 834 os=-unicos 835 ;; 836 tic54x | c54x*) 837 basic_machine=tic54x-unknown 838 os=-coff 729 839 ;; 730 840 tx39) … … 780 890 os=-proelf 781 891 ;; 892 windows32) 893 basic_machine=i386-pc 894 os=-windows32-msvcrt 895 ;; 782 896 xmp) 783 897 basic_machine=xmp-cray … … 823 937 basic_machine=vax-dec 824 938 ;; 939 pdp10) 940 # there are many clones, so DEC is not a safe bet 941 basic_machine=pdp10-unknown 942 ;; 825 943 pdp11) 826 944 basic_machine=pdp11-dec … … 829 947 basic_machine=we32k-att 830 948 ;; 831 sparc | sparcv9) 949 sh3 | sh4) 950 basic_machine=sh-unknown 951 ;; 952 sparc | sparcv9 | sparcv9b) 832 953 basic_machine=sparc-sun 833 954 ;; … … 850 971 basic_machine=c4x-none 851 972 os=-coff 973 ;; 974 *-unknown) 975 # Make sure to match an already-canonicalized machine name. 852 976 ;; 853 977 *) … … 907 1031 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 908 1032 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1033 | -chorusos* | -chorusrdb* \ 909 1034 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 910 1035 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ 911 | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*) 1036 | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ 1037 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1038 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) 912 1039 # Remember, each alternative MUST END IN *, to match a version number. 1040 ;; 1041 -qnx*) 1042 case $basic_machine in 1043 x86-* | i*86-*) 1044 ;; 1045 *) 1046 os=-nto$os 1047 ;; 1048 esac 1049 ;; 1050 -nto*) 1051 os=-nto-qnx 913 1052 ;; 914 1053 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 915 1054 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ 916 | -macos* | -mpw* | -magic* | -m on960* | -lnews*)1055 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 917 1056 ;; 918 1057 -mac*) … … 928 1067 os=`echo $os | sed -e 's|sunos6|solaris3|'` 929 1068 ;; 1069 -opened*) 1070 os=-openedition 1071 ;; 1072 -wince*) 1073 os=-wince 1074 ;; 930 1075 -osfrose*) 931 1076 os=-osfrose … … 951 1096 -ns2 ) 952 1097 os=-nextstep2 1098 ;; 1099 -nsk*) 1100 os=-nsk 953 1101 ;; 954 1102 # Preserve the version number of sinix5. … … 986 1134 os=-xenix 987 1135 ;; 988 -*mint | - *MiNT)1136 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 989 1137 os=-mint 990 1138 ;; … … 1014 1162 os=-riscix1.2 1015 1163 ;; 1016 arm*- corel)1164 arm*-rebel) 1017 1165 os=-linux 1018 1166 ;; 1019 1167 arm*-semi) 1020 1168 os=-aout 1169 ;; 1170 pdp10-*) 1171 os=-tops20 1021 1172 ;; 1022 1173 pdp11-*) … … 1128 1279 os=-rtu 1129 1280 ;; 1130 f30 1-fujitsu)1281 f30[01]-fujitsu | f700-fujitsu) 1131 1282 os=-uxpv 1132 1283 ;; … … 1188 1339 vendor=ns 1189 1340 ;; 1190 -mvs* )1341 -mvs* | -opened*) 1191 1342 vendor=ibm 1192 1343 ;; … … 1206 1357 vendor=apple 1207 1358 ;; 1208 -*mint | - *MiNT)1359 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1209 1360 vendor=atari 1210 1361 ;; … … 1215 1366 1216 1367 echo $basic_machine$os 1368 exit 0 1369 1370 # Local variables: 1371 # eval: (add-hook 'write-file-hooks 'time-stamp) 1372 # time-stamp-start: "timestamp='" 1373 # time-stamp-format: "%:y-%02m-%02d" 1374 # time-stamp-end: "'" 1375 # End:
Note:
See TracChangeset
for help on using the changeset viewer.