source:
freewrt/package/jpeg/patches/jpeg-6b-config_guess.patch@
9df7618
| Last change on this file since 9df7618 was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 75.3 KB | |
-
config.guess
diff -urN jpeg.old/config.guess jpeg.dev/config.guess
old new 1 1 #! /bin/sh 2 2 # Attempt to guess a canonical system name. 3 # Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. 4 # 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 5 6 timestamp='2004-11-12' 7 5 8 # This file is free software; you can redistribute it and/or modify it 6 9 # under the terms of the GNU General Public License as published by 7 10 # the Free Software Foundation; either version 2 of the License, or … … 21 24 # configuration script generated by Autoconf, you may include it under 22 25 # the same distribution terms that you use for the rest of that program. 23 26 24 # Written by Per Bothner <bothner@cygnus.com>. 25 # The master version of this file is at the FSF in /home/gd/gnu/lib. 27 # Originally written by Per Bothner <per@bothner.com>. 28 # Please send patches to <config-patches@gnu.org>. Submit a context 29 # diff and a properly formatted ChangeLog entry. 26 30 # 27 31 # This script attempts to guess a canonical system name similar to 28 32 # config.sub. If it succeeds, it prints the system name on stdout, and 29 33 # exits with 0. Otherwise, it exits with 1. 30 34 # 31 35 # The plan is that this can be called by configure scripts if you 32 # don't specify an explicit system type (host/target name). 33 # 34 # Only a few systems have been added to this list; please add others 35 # (but try to keep the structure clean). 36 # 36 # don't specify an explicit build system type. 37 38 me=`echo "$0" | sed -e 's,.*/,,'` 39 40 usage="\ 41 Usage: $0 [OPTION] 42 43 Output the configuration name of the system \`$me' is run on. 44 45 Operation modes: 46 -h, --help print this help, then exit 47 -t, --time-stamp print date of last modification, then exit 48 -v, --version print version number, then exit 49 50 Report bugs and patches to <config-patches@gnu.org>." 51 52 version="\ 53 GNU config.guess ($timestamp) 54 55 Originally written by Per Bothner. 56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 57 Free Software Foundation, Inc. 58 59 This is free software; see the source for copying conditions. There is NO 60 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 61 62 help=" 63 Try \`$me --help' for more information." 64 65 # Parse command line 66 while test $# -gt 0 ; do 67 case $1 in 68 --time-stamp | --time* | -t ) 69 echo "$timestamp" ; exit 0 ;; 70 --version | -v ) 71 echo "$version" ; exit 0 ;; 72 --help | --h* | -h ) 73 echo "$usage"; exit 0 ;; 74 -- ) # Stop option processing 75 shift; break ;; 76 - ) # Use stdin as input. 77 break ;; 78 -* ) 79 echo "$me: invalid option $1$help" >&2 80 exit 1 ;; 81 * ) 82 break ;; 83 esac 84 done 85 86 if test $# != 0; then 87 echo "$me: too many arguments$help" >&2 88 exit 1 89 fi 90 91 trap 'exit 1' 1 2 15 92 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. 97 98 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 99 # use `HOST_CC' if defined, but it is deprecated. 100 101 # Portable tmp directory creation inspired by the Autoconf team. 102 103 set_cc_for_build=' 104 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 105 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 106 : ${TMPDIR=/tmp} ; 107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 109 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 110 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 111 dummy=$tmp/dummy ; 112 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 113 case $CC_FOR_BUILD,$HOST_CC,$CC in 114 ,,) echo "int x;" > $dummy.c ; 115 for c in cc gcc c89 c99 ; do 116 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 117 CC_FOR_BUILD="$c"; break ; 118 fi ; 119 done ; 120 if test x"$CC_FOR_BUILD" = x ; then 121 CC_FOR_BUILD=no_compiler_found ; 122 fi 123 ;; 124 ,,*) CC_FOR_BUILD=$CC ;; 125 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 126 esac ;' 37 127 38 128 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 39 # (ghazi@noc.rutgers.edu 8/24/94.)129 # (ghazi@noc.rutgers.edu 1994-08-24) 40 130 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 41 131 PATH=$PATH:/.attbin ; export PATH 42 132 fi 43 133 44 134 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 45 135 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 46 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown136 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 47 137 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 48 138 49 trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 1550 51 139 # Note: order is significant - the case branches are not exclusive. 52 140 53 141 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 142 *:NetBSD:*:*) 143 # NetBSD (nbsd) targets should (where applicable) match one or 144 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 145 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 146 # switched to ELF, *-*-netbsd* would select the old 147 # object file format. This provides both forward 148 # compatibility and a consistent mechanism for selecting the 149 # object file format. 150 # 151 # Note: NetBSD doesn't particularly care about the vendor 152 # portion of the name. We always set it to "unknown". 153 sysctl="sysctl -n hw.machine_arch" 154 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 155 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 156 case "${UNAME_MACHINE_ARCH}" in 157 armeb) machine=armeb-unknown ;; 158 arm*) machine=arm-unknown ;; 159 sh3el) machine=shl-unknown ;; 160 sh3eb) machine=sh-unknown ;; 161 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 162 esac 163 # The Operating System including object format, if it has switched 164 # to ELF recently, or will in the future. 165 case "${UNAME_MACHINE_ARCH}" in 166 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 167 eval $set_cc_for_build 168 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 169 | grep __ELF__ >/dev/null 170 then 171 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 172 # Return netbsd for either. FIX? 173 os=netbsd 174 else 175 os=netbsdelf 176 fi 177 ;; 178 *) 179 os=netbsd 180 ;; 181 esac 182 # The OS release 183 # Debian GNU/NetBSD machines have a different userland, and 184 # thus, need a distinct triplet. However, they do not need 185 # kernel version information, so it can be replaced with a 186 # suitable tag, in the style of linux-gnu. 187 case "${UNAME_VERSION}" in 188 Debian*) 189 release='-gnu' 190 ;; 191 *) 192 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 193 ;; 194 esac 195 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 196 # contains redundant information, the shorter form: 197 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 198 echo "${machine}-${os}${release}" 199 exit 0 ;; 200 amd64:OpenBSD:*:*) 201 echo x86_64-unknown-openbsd${UNAME_RELEASE} 202 exit 0 ;; 203 amiga:OpenBSD:*:*) 204 echo m68k-unknown-openbsd${UNAME_RELEASE} 205 exit 0 ;; 206 cats:OpenBSD:*:*) 207 echo arm-unknown-openbsd${UNAME_RELEASE} 208 exit 0 ;; 209 hp300:OpenBSD:*:*) 210 echo m68k-unknown-openbsd${UNAME_RELEASE} 211 exit 0 ;; 212 luna88k:OpenBSD:*:*) 213 echo m88k-unknown-openbsd${UNAME_RELEASE} 214 exit 0 ;; 215 mac68k:OpenBSD:*:*) 216 echo m68k-unknown-openbsd${UNAME_RELEASE} 217 exit 0 ;; 218 macppc:OpenBSD:*:*) 219 echo powerpc-unknown-openbsd${UNAME_RELEASE} 220 exit 0 ;; 221 mvme68k:OpenBSD:*:*) 222 echo m68k-unknown-openbsd${UNAME_RELEASE} 223 exit 0 ;; 224 mvme88k:OpenBSD:*:*) 225 echo m88k-unknown-openbsd${UNAME_RELEASE} 226 exit 0 ;; 227 mvmeppc:OpenBSD:*:*) 228 echo powerpc-unknown-openbsd${UNAME_RELEASE} 229 exit 0 ;; 230 sgi:OpenBSD:*:*) 231 echo mips64-unknown-openbsd${UNAME_RELEASE} 232 exit 0 ;; 233 sun3:OpenBSD:*:*) 234 echo m68k-unknown-openbsd${UNAME_RELEASE} 235 exit 0 ;; 236 *:OpenBSD:*:*) 237 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} 238 exit 0 ;; 239 *:ekkoBSD:*:*) 240 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 241 exit 0 ;; 242 macppc:MirBSD:*:*) 243 echo powerppc-unknown-mirbsd${UNAME_RELEASE} 244 exit 0 ;; 245 *:MirBSD:*:*) 246 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 247 exit 0 ;; 54 248 alpha:OSF1:*:*) 55 if test $UNAME_RELEASE = "V4.0"; then 249 case $UNAME_RELEASE in 250 *4.0) 56 251 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 57 fi 252 ;; 253 *5.*) 254 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 255 ;; 256 esac 257 # According to Compaq, /usr/sbin/psrinfo has been available on 258 # OSF/1 and Tru64 systems produced since 1995. I hope that 259 # covers most systems running today. This code pipes the CPU 260 # types through head -n 1, so we only detect the type of CPU 0. 261 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 262 case "$ALPHA_CPU_TYPE" in 263 "EV4 (21064)") 264 UNAME_MACHINE="alpha" ;; 265 "EV4.5 (21064)") 266 UNAME_MACHINE="alpha" ;; 267 "LCA4 (21066/21068)") 268 UNAME_MACHINE="alpha" ;; 269 "EV5 (21164)") 270 UNAME_MACHINE="alphaev5" ;; 271 "EV5.6 (21164A)") 272 UNAME_MACHINE="alphaev56" ;; 273 "EV5.6 (21164PC)") 274 UNAME_MACHINE="alphapca56" ;; 275 "EV5.7 (21164PC)") 276 UNAME_MACHINE="alphapca57" ;; 277 "EV6 (21264)") 278 UNAME_MACHINE="alphaev6" ;; 279 "EV6.7 (21264A)") 280 UNAME_MACHINE="alphaev67" ;; 281 "EV6.8CB (21264C)") 282 UNAME_MACHINE="alphaev68" ;; 283 "EV6.8AL (21264B)") 284 UNAME_MACHINE="alphaev68" ;; 285 "EV6.8CX (21264D)") 286 UNAME_MACHINE="alphaev68" ;; 287 "EV6.9A (21264/EV69A)") 288 UNAME_MACHINE="alphaev69" ;; 289 "EV7 (21364)") 290 UNAME_MACHINE="alphaev7" ;; 291 "EV7.9 (21364A)") 292 UNAME_MACHINE="alphaev79" ;; 293 esac 294 # A Pn.n version is a patched version. 58 295 # A Vn.n version is a released version. 59 296 # A Tn.n version is a released field test version. 60 297 # A Xn.n version is an unreleased experimental baselevel. 61 298 # 1.2 uses "1.2" for uname -r. 62 cat <<EOF >dummy.s 63 .globl main 64 .ent main 65 main: 66 .frame \$30,0,\$26,0 67 .prologue 0 68 .long 0x47e03d80 # implver $0 69 lda \$2,259 70 .long 0x47e20c21 # amask $2,$1 71 srl \$1,8,\$2 72 sll \$2,2,\$2 73 sll \$0,3,\$0 74 addl \$1,\$0,\$0 75 addl \$2,\$0,\$0 76 ret \$31,(\$26),1 77 .end main 78 EOF 79 ${CC-cc} dummy.s -o dummy 2>/dev/null 80 if test "$?" = 0 ; then 81 ./dummy 82 case "$?" in 83 7) 84 UNAME_MACHINE="alpha" 85 ;; 86 15) 87 UNAME_MACHINE="alphaev5" 88 ;; 89 14) 90 UNAME_MACHINE="alphaev56" 91 ;; 92 10) 93 UNAME_MACHINE="alphapca56" 94 ;; 95 16) 96 UNAME_MACHINE="alphaev6" 97 ;; 98 esac 99 fi 100 rm -f dummy.s dummy 101 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` 299 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 300 exit 0 ;; 301 Alpha\ *:Windows_NT*:*) 302 # How do we know it's Interix rather than the generic POSIX subsystem? 303 # Should we change UNAME_MACHINE based on the output of uname instead 304 # of the specific Alpha model? 305 echo alpha-pc-interix 102 306 exit 0 ;; 103 307 21064:Windows_NT:50:3) 104 308 echo alpha-dec-winnt3.5 105 309 exit 0 ;; 106 310 Amiga*:UNIX_System_V:4.0:*) 107 echo m68k- cbm-sysv4311 echo m68k-unknown-sysv4 108 312 exit 0;; 109 amiga:NetBSD:*:*) 110 echo m68k-cbm-netbsd${UNAME_RELEASE} 111 exit 0 ;; 112 amiga:OpenBSD:*:*) 113 echo m68k-unknown-openbsd${UNAME_RELEASE} 114 exit 0 ;; 115 arc64:OpenBSD:*:*) 116 echo mips64el-unknown-openbsd${UNAME_RELEASE} 313 *:[Aa]miga[Oo][Ss]:*:*) 314 echo ${UNAME_MACHINE}-unknown-amigaos 117 315 exit 0 ;; 118 arc:OpenBSD:*:*)119 echo mipsel-unknown-openbsd${UNAME_RELEASE}316 *:[Mm]orph[Oo][Ss]:*:*) 317 echo ${UNAME_MACHINE}-unknown-morphos 120 318 exit 0 ;; 121 hkmips:OpenBSD:*:*)122 echo mips-unknown-openbsd${UNAME_RELEASE}319 *:OS/390:*:*) 320 echo i370-ibm-openedition 123 321 exit 0 ;; 124 pmax:OpenBSD:*:*) 125 echo mipsel-unknown-openbsd${UNAME_RELEASE} 126 exit 0 ;; 127 sgi:OpenBSD:*:*) 128 echo mips-unknown-openbsd${UNAME_RELEASE} 322 *:z/VM:*:*) 323 echo s390-ibm-zvmoe 129 324 exit 0 ;; 130 wgrisc:OpenBSD:*:*)131 echo mipsel-unknown-openbsd${UNAME_RELEASE} 325 *:OS400:*:*) 326 echo powerpc-ibm-os400 132 327 exit 0 ;; 133 328 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 134 329 echo arm-acorn-riscix${UNAME_RELEASE} 135 330 exit 0;; 136 arm32:NetBSD:*:*) 137 echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 138 exit 0 ;; 139 SR2?01:HI-UX/MPP:*:*) 331 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 140 332 echo hppa1.1-hitachi-hiuxmpp 141 333 exit 0;; 142 Pyramid*:OSx*:*:* |MIS*:OSx*:*:*)334 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 143 335 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 144 336 if test "`(/bin/universe) 2>/dev/null`" = att ; then 145 337 echo pyramid-pyramid-sysv3 … … 147 339 echo pyramid-pyramid-bsd 148 340 fi 149 341 exit 0 ;; 150 NILE :*:*:dcosx)342 NILE*:*:*:dcosx) 151 343 echo pyramid-pyramid-svr4 152 344 exit 0 ;; 345 DRS?6000:unix:4.0:6*) 346 echo sparc-icl-nx6 347 exit 0 ;; 348 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 349 case `/usr/bin/uname -p` in 350 sparc) echo sparc-icl-nx7 && exit 0 ;; 351 esac ;; 352 sun4H:SunOS:5.*:*) 353 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 354 exit 0 ;; 153 355 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 154 356 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 155 357 exit 0 ;; … … 175 377 echo m68k-sun-sunos${UNAME_RELEASE} 176 378 exit 0 ;; 177 379 sun*:*:4.2BSD:*) 178 UNAME_RELEASE=`( head -1/etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`380 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 179 381 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 180 382 case "`/bin/arch`" in 181 383 sun3) … … 189 391 aushp:SunOS:*:*) 190 392 echo sparc-auspex-sunos${UNAME_RELEASE} 191 393 exit 0 ;; 192 atari*:NetBSD:*:*) 193 echo m68k-atari-netbsd${UNAME_RELEASE} 394 # The situation for MiNT is a little confusing. The machine name 395 # can be virtually everything (everything which is not 396 # "atarist" or "atariste" at least should have a processor 397 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 398 # to the lowercase version "mint" (or "freemint"). Finally 399 # the system name "TOS" denotes a system which is actually not 400 # MiNT. But MiNT is downward compatible to TOS, so this should 401 # be no problem. 402 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 403 echo m68k-atari-mint${UNAME_RELEASE} 194 404 exit 0 ;; 195 atari*:OpenBSD:*:*) 196 echo m68k-unknown-openbsd${UNAME_RELEASE} 197 exit 0 ;; 198 sun3*:NetBSD:*:*) 199 echo m68k-sun-netbsd${UNAME_RELEASE} 200 exit 0 ;; 201 sun3*:OpenBSD:*:*) 202 echo m68k-unknown-openbsd${UNAME_RELEASE} 203 exit 0 ;; 204 mac68k:NetBSD:*:*) 205 echo m68k-apple-netbsd${UNAME_RELEASE} 206 exit 0 ;; 207 mac68k:OpenBSD:*:*) 208 echo m68k-unknown-openbsd${UNAME_RELEASE} 209 exit 0 ;; 210 mvme68k:OpenBSD:*:*) 211 echo m68k-unknown-openbsd${UNAME_RELEASE} 405 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 406 echo m68k-atari-mint${UNAME_RELEASE} 407 exit 0 ;; 408 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 409 echo m68k-atari-mint${UNAME_RELEASE} 212 410 exit 0 ;; 213 mvme88k:OpenBSD:*:*) 214 echo m88k-unknown-openbsd${UNAME_RELEASE} 411 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 412 echo m68k-milan-mint${UNAME_RELEASE} 413 exit 0 ;; 414 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 415 echo m68k-hades-mint${UNAME_RELEASE} 416 exit 0 ;; 417 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 418 echo m68k-unknown-mint${UNAME_RELEASE} 419 exit 0 ;; 420 m68k:machten:*:*) 421 echo m68k-apple-machten${UNAME_RELEASE} 215 422 exit 0 ;; 216 423 powerpc:machten:*:*) 217 424 echo powerpc-apple-machten${UNAME_RELEASE} … … 225 432 VAX*:ULTRIX*:*:*) 226 433 echo vax-dec-ultrix${UNAME_RELEASE} 227 434 exit 0 ;; 228 2020:CLIX:*:* )435 2020:CLIX:*:* | 2430:CLIX:*:*) 229 436 echo clipper-intergraph-clix${UNAME_RELEASE} 230 437 exit 0 ;; 231 438 mips:*:*:UMIPS | mips:*:*:RISCos) 232 sed 's/^ //' << EOF >dummy.c 233 int main (argc, argv) int argc; char **argv; { 439 eval $set_cc_for_build 440 sed 's/^ //' << EOF >$dummy.c 441 #ifdef __cplusplus 442 #include <stdio.h> /* for printf() prototype */ 443 int main (int argc, char *argv[]) { 444 #else 445 int main (argc, argv) int argc; char *argv[]; { 446 #endif 234 447 #if defined (host_mips) && defined (MIPSEB) 235 448 #if defined (SYSTYPE_SYSV) 236 449 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); … … 245 458 exit (-1); 246 459 } 247 460 EOF 248 ${CC-cc} dummy.c -o dummy \ 249 && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 250 && rm dummy.c dummy && exit 0 251 rm -f dummy.c dummy 461 $CC_FOR_BUILD -o $dummy $dummy.c \ 462 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 463 && exit 0 252 464 echo mips-mips-riscos${UNAME_RELEASE} 253 465 exit 0 ;; 466 Motorola:PowerMAX_OS:*:*) 467 echo powerpc-motorola-powermax 468 exit 0 ;; 469 Motorola:*:4.3:PL8-*) 470 echo powerpc-harris-powermax 471 exit 0 ;; 472 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 473 echo powerpc-harris-powermax 474 exit 0 ;; 254 475 Night_Hawk:Power_UNIX:*:*) 255 476 echo powerpc-harris-powerunix 256 477 exit 0 ;; … … 266 487 AViiON:dgux:*:*) 267 488 # DG/UX returns AViiON for all architectures 268 489 UNAME_PROCESSOR=`/usr/bin/uname -p` 269 if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then 270 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ 271 -o ${TARGET_BINARY_INTERFACE}x = x ] ; then 490 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 491 then 492 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 493 [ ${TARGET_BINARY_INTERFACE}x = x ] 494 then 272 495 echo m88k-dg-dgux${UNAME_RELEASE} 273 else496 else 274 497 echo m88k-dg-dguxbcs${UNAME_RELEASE} 498 fi 499 else 500 echo i586-dg-dgux${UNAME_RELEASE} 275 501 fi 276 else echo i586-dg-dgux${UNAME_RELEASE}277 fi278 502 exit 0 ;; 279 503 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 280 504 echo m88k-dolphin-sysv3 … … 295 519 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 296 520 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 297 521 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 298 i ?86:AIX:*:*)522 i*86:AIX:*:*) 299 523 echo i386-ibm-aix 300 524 exit 0 ;; 525 ia64:AIX:*:*) 526 if [ -x /usr/bin/oslevel ] ; then 527 IBM_REV=`/usr/bin/oslevel` 528 else 529 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 530 fi 531 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 532 exit 0 ;; 301 533 *:AIX:2:3) 302 534 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 303 sed 's/^ //' << EOF >dummy.c 535 eval $set_cc_for_build 536 sed 's/^ //' << EOF >$dummy.c 304 537 #include <sys/systemcfg.h> 305 538 306 539 main() … … 311 544 exit(0); 312 545 } 313 546 EOF 314 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 315 rm -f dummy.c dummy 547 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 316 548 echo rs6000-ibm-aix3.2.5 317 549 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 318 550 echo rs6000-ibm-aix3.2.4 … … 320 552 echo rs6000-ibm-aix3.2 321 553 fi 322 554 exit 0 ;; 323 *:AIX:*:4) 324 if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then 555 *:AIX:*:[45]) 556 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 557 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 325 558 IBM_ARCH=rs6000 326 559 else 327 560 IBM_ARCH=powerpc … … 329 562 if [ -x /usr/bin/oslevel ] ; then 330 563 IBM_REV=`/usr/bin/oslevel` 331 564 else 332 IBM_REV= 4.${UNAME_RELEASE}565 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 333 566 fi 334 567 echo ${IBM_ARCH}-ibm-aix${IBM_REV} 335 568 exit 0 ;; … … 339 572 ibmrt:4.4BSD:*|romp-ibm:BSD:*) 340 573 echo romp-ibm-bsd4.4 341 574 exit 0 ;; 342 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and575 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 343 576 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 344 577 exit 0 ;; # report: romp-ibm BSD 4.3 345 578 *:BOSX:*:*) … … 354 587 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 355 588 echo m68k-hp-bsd4.4 356 589 exit 0 ;; 357 9000/[3478]??:HP-UX:*:*) 590 9000/[34678]??:HP-UX:*:*) 591 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 358 592 case "${UNAME_MACHINE}" in 359 593 9000/31? ) HP_ARCH=m68000 ;; 360 594 9000/[34]?? ) HP_ARCH=m68k ;; 361 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; 362 9000/8?? ) HP_ARCH=hppa1.0 ;; 595 9000/[678][0-9][0-9]) 596 if [ -x /usr/bin/getconf ]; then 597 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 598 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 599 case "${sc_cpu_version}" in 600 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 601 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 602 532) # CPU_PA_RISC2_0 603 case "${sc_kernel_bits}" in 604 32) HP_ARCH="hppa2.0n" ;; 605 64) HP_ARCH="hppa2.0w" ;; 606 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 607 esac ;; 608 esac 609 fi 610 if [ "${HP_ARCH}" = "" ]; then 611 eval $set_cc_for_build 612 sed 's/^ //' << EOF >$dummy.c 613 614 #define _HPUX_SOURCE 615 #include <stdlib.h> 616 #include <unistd.h> 617 618 int main () 619 { 620 #if defined(_SC_KERNEL_BITS) 621 long bits = sysconf(_SC_KERNEL_BITS); 622 #endif 623 long cpu = sysconf (_SC_CPU_VERSION); 624 625 switch (cpu) 626 { 627 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 628 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 629 case CPU_PA_RISC2_0: 630 #if defined(_SC_KERNEL_BITS) 631 switch (bits) 632 { 633 case 64: puts ("hppa2.0w"); break; 634 case 32: puts ("hppa2.0n"); break; 635 default: puts ("hppa2.0"); break; 636 } break; 637 #else /* !defined(_SC_KERNEL_BITS) */ 638 puts ("hppa2.0"); break; 639 #endif 640 default: puts ("hppa1.0"); break; 641 } 642 exit (0); 643 } 644 EOF 645 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 646 test -z "$HP_ARCH" && HP_ARCH=hppa 647 fi ;; 363 648 esac 364 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 649 if [ ${HP_ARCH} = "hppa2.0w" ] 650 then 651 # avoid double evaluation of $set_cc_for_build 652 test -n "$CC_FOR_BUILD" || eval $set_cc_for_build 653 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null 654 then 655 HP_ARCH="hppa2.0w" 656 else 657 HP_ARCH="hppa64" 658 fi 659 fi 365 660 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 366 661 exit 0 ;; 662 ia64:HP-UX:*:*) 663 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 664 echo ia64-hp-hpux${HPUX_REV} 665 exit 0 ;; 367 666 3050*:HI-UX:*:*) 368 sed 's/^ //' << EOF >dummy.c 667 eval $set_cc_for_build 668 sed 's/^ //' << EOF >$dummy.c 369 669 #include <unistd.h> 370 670 int 371 671 main () … … 390 690 exit (0); 391 691 } 392 692 EOF 393 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 394 rm -f dummy.c dummy 693 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 395 694 echo unknown-hitachi-hiuxwe2 396 695 exit 0 ;; 397 696 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) … … 400 699 9000/8??:4.3bsd:*:*) 401 700 echo hppa1.0-hp-bsd 402 701 exit 0 ;; 702 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 703 echo hppa1.0-hp-mpeix 704 exit 0 ;; 403 705 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 404 706 echo hppa1.1-hp-osf 405 707 exit 0 ;; 406 708 hp8??:OSF1:*:*) 407 709 echo hppa1.0-hp-osf 408 710 exit 0 ;; 409 i ?86:OSF1:*:*)711 i*86:OSF1:*:*) 410 712 if [ -x /usr/sbin/sysversion ] ; then 411 713 echo ${UNAME_MACHINE}-unknown-osf1mk 412 714 else … … 434 736 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 435 737 echo c4-convex-bsd 436 738 exit 0 ;; 437 CRAY*X-MP:*:*:*)438 echo xmp-cray-unicos439 exit 0 ;;440 739 CRAY*Y-MP:*:*:*) 441 echo ymp-cray-unicos${UNAME_RELEASE} 740 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 442 741 exit 0 ;; 443 742 CRAY*[A-Z]90:*:*:*) 444 743 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 445 744 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 446 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ 745 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 746 -e 's/\.[^.]*$/.X/' 447 747 exit 0 ;; 448 748 CRAY*TS:*:*:*) 449 echo t90-cray-unicos${UNAME_RELEASE} 749 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 450 750 exit 0 ;; 451 CRAY-2:*:*:*) 452 echo cray2-cray-unicos 453 exit 0 ;; 454 F300:UNIX_System_V:*:*) 455 FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` 751 CRAY*T3E:*:*:*) 752 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 753 exit 0 ;; 754 CRAY*SV1:*:*:*) 755 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 756 exit 0 ;; 757 *:UNICOS/mp:*:*) 758 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 759 exit 0 ;; 760 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 761 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 762 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 456 763 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 457 echo " f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"764 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 458 765 exit 0 ;; 459 F301:UNIX_System_V:*:*) 460 echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` 461 exit 0 ;; 462 hp3[0-9][05]:NetBSD:*:*) 463 echo m68k-hp-netbsd${UNAME_RELEASE} 766 5000:UNIX_System_V:4.*:*) 767 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 768 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 769 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 464 770 exit 0 ;; 465 hp300:OpenBSD:*:*) 466 echo m68k-unknown-openbsd${UNAME_RELEASE} 467 exit 0 ;; 468 i?86:BSD/386:*:* | *:BSD/OS:*:*) 771 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 469 772 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 470 773 exit 0 ;; 471 *:FreeBSD:*:*)472 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`774 sparc*:BSD/OS:*:*) 775 echo sparc-unknown-bsdi${UNAME_RELEASE} 473 776 exit 0 ;; 474 *: NetBSD:*:*)475 echo ${UNAME_MACHINE}-unknown- netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`777 *:BSD/OS:*:*) 778 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 476 779 exit 0 ;; 477 *: OpenBSD:*:*)478 echo ${UNAME_MACHINE}-unknown- openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`780 *:FreeBSD:*:*) 781 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 479 782 exit 0 ;; 480 783 i*:CYGWIN*:*) 481 echo i386-pc-cygwin32784 echo ${UNAME_MACHINE}-pc-cygwin 482 785 exit 0 ;; 483 786 i*:MINGW*:*) 484 echo i386-pc-mingw32 787 echo ${UNAME_MACHINE}-pc-mingw32 788 exit 0 ;; 789 i*:PW*:*) 790 echo ${UNAME_MACHINE}-pc-pw32 791 exit 0 ;; 792 x86:Interix*:[34]*) 793 echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' 794 exit 0 ;; 795 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 796 echo i${UNAME_MACHINE}-pc-mks 797 exit 0 ;; 798 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 799 # How do we know it's Interix rather than the generic POSIX subsystem? 800 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 801 # UNAME_MACHINE based on the output of uname instead of i386? 802 echo i586-pc-interix 803 exit 0 ;; 804 i*:UWIN*:*) 805 echo ${UNAME_MACHINE}-pc-uwin 485 806 exit 0 ;; 486 807 p*:CYGWIN*:*) 487 echo powerpcle-unknown-cygwin 32808 echo powerpcle-unknown-cygwin 488 809 exit 0 ;; 489 810 prep*:SunOS:5.*:*) 490 811 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 491 812 exit 0 ;; 492 813 *:GNU:*:*) 814 # the GNU system 493 815 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 494 816 exit 0 ;; 495 *:Linux:*:*) 817 *:GNU/*:*:*) 818 # other systems with GNU libc and userland 819 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 820 exit 0 ;; 821 i*86:Minix:*:*) 822 echo ${UNAME_MACHINE}-pc-minix 823 exit 0 ;; 824 arm*:Linux:*:*) 825 echo ${UNAME_MACHINE}-unknown-linux-gnu 826 exit 0 ;; 827 cris:Linux:*:*) 828 echo cris-axis-linux-gnu 829 exit 0 ;; 830 crisv32:Linux:*:*) 831 echo crisv32-axis-linux-gnu 832 exit 0 ;; 833 frv:Linux:*:*) 834 echo frv-unknown-linux-gnu 835 exit 0 ;; 836 ia64:Linux:*:*) 837 echo ${UNAME_MACHINE}-unknown-linux-gnu 838 exit 0 ;; 839 m32r*:Linux:*:*) 840 echo ${UNAME_MACHINE}-unknown-linux-gnu 841 exit 0 ;; 842 m68*:Linux:*:*) 843 echo ${UNAME_MACHINE}-unknown-linux-gnu 844 exit 0 ;; 845 mips:Linux:*:*) 846 eval $set_cc_for_build 847 sed 's/^ //' << EOF >$dummy.c 848 #undef CPU 849 #undef mips 850 #undef mipsel 851 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 852 CPU=mipsel 853 #else 854 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 855 CPU=mips 856 #else 857 CPU= 858 #endif 859 #endif 860 EOF 861 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 862 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 863 ;; 864 mips64:Linux:*:*) 865 eval $set_cc_for_build 866 sed 's/^ //' << EOF >$dummy.c 867 #undef CPU 868 #undef mips64 869 #undef mips64el 870 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 871 CPU=mips64el 872 #else 873 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 874 CPU=mips64 875 #else 876 CPU= 877 #endif 878 #endif 879 EOF 880 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 881 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 882 ;; 883 ppc:Linux:*:*) 884 echo powerpc-unknown-linux-gnu 885 exit 0 ;; 886 ppc64:Linux:*:*) 887 echo powerpc64-unknown-linux-gnu 888 exit 0 ;; 889 alpha:Linux:*:*) 890 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 891 EV5) UNAME_MACHINE=alphaev5 ;; 892 EV56) UNAME_MACHINE=alphaev56 ;; 893 PCA56) UNAME_MACHINE=alphapca56 ;; 894 PCA57) UNAME_MACHINE=alphapca56 ;; 895 EV6) UNAME_MACHINE=alphaev6 ;; 896 EV67) UNAME_MACHINE=alphaev67 ;; 897 EV68*) UNAME_MACHINE=alphaev68 ;; 898 esac 899 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 900 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 901 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 902 exit 0 ;; 903 parisc:Linux:*:* | hppa:Linux:*:*) 904 # Look for CPU level 905 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 906 PA7*) echo hppa1.1-unknown-linux-gnu ;; 907 PA8*) echo hppa2.0-unknown-linux-gnu ;; 908 *) echo hppa-unknown-linux-gnu ;; 909 esac 910 exit 0 ;; 911 parisc64:Linux:*:* | hppa64:Linux:*:*) 912 echo hppa64-unknown-linux-gnu 913 exit 0 ;; 914 s390:Linux:*:* | s390x:Linux:*:*) 915 echo ${UNAME_MACHINE}-ibm-linux 916 exit 0 ;; 917 sh64*:Linux:*:*) 918 echo ${UNAME_MACHINE}-unknown-linux-gnu 919 exit 0 ;; 920 sh*:Linux:*:*) 921 echo ${UNAME_MACHINE}-unknown-linux-gnu 922 exit 0 ;; 923 sparc:Linux:*:* | sparc64:Linux:*:*) 924 echo ${UNAME_MACHINE}-unknown-linux-gnu 925 exit 0 ;; 926 x86_64:Linux:*:*) 927 echo x86_64-unknown-linux-gnu 928 exit 0 ;; 929 i*86:Linux:*:*) 496 930 # The BFD linker knows what the default object file format is, so 497 # first see if it will tell us. 498 ld_help_string=`ld --help 2>&1` 499 ld_supported_emulations=`echo $ld_help_string \ 500 | sed -ne '/supported emulations:/!d 931 # first see if it will tell us. cd to the root directory to prevent 932 # problems with other programs or directories called `ld' in the path. 933 # Set LC_ALL=C to ensure ld outputs messages in English. 934 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 935 | sed -ne '/supported targets:/!d 501 936 s/[ ][ ]*/ /g 502 s/.*supported emulations: *//937 s/.*supported targets: *// 503 938 s/ .*// 504 939 p'` 505 case "$ld_supported_emulations" in 506 i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; 507 i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; 508 sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; 509 m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; 510 elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; 511 esac 512 513 if test "${UNAME_MACHINE}" = "alpha" ; then 514 sed 's/^ //' <<EOF >dummy.s 515 .globl main 516 .ent main 517 main: 518 .frame \$30,0,\$26,0 519 .prologue 0 520 .long 0x47e03d80 # implver $0 521 lda \$2,259 522 .long 0x47e20c21 # amask $2,$1 523 srl \$1,8,\$2 524 sll \$2,2,\$2 525 sll \$0,3,\$0 526 addl \$1,\$0,\$0 527 addl \$2,\$0,\$0 528 ret \$31,(\$26),1 529 .end main 530 EOF 531 LIBC="" 532 ${CC-cc} dummy.s -o dummy 2>/dev/null 533 if test "$?" = 0 ; then 534 ./dummy 535 case "$?" in 536 7) 537 UNAME_MACHINE="alpha" 538 ;; 539 15) 540 UNAME_MACHINE="alphaev5" 541 ;; 542 14) 543 UNAME_MACHINE="alphaev56" 544 ;; 545 10) 546 UNAME_MACHINE="alphapca56" 547 ;; 548 16) 549 UNAME_MACHINE="alphaev6" 550 ;; 551 esac 552 553 objdump --private-headers dummy | \ 554 grep ld.so.1 > /dev/null 555 if test "$?" = 0 ; then 556 LIBC="libc1" 557 fi 558 fi 559 rm -f dummy.s dummy 560 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 561 elif test "${UNAME_MACHINE}" = "mips" ; then 562 cat >dummy.c <<EOF 563 main(argc, argv) 564 int argc; 565 char *argv[]; 566 { 567 #ifdef __MIPSEB__ 568 printf ("%s-unknown-linux-gnu\n", argv[1]); 569 #endif 570 #ifdef __MIPSEL__ 571 printf ("%sel-unknown-linux-gnu\n", argv[1]); 572 #endif 573 return 0; 574 } 575 EOF 576 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 577 rm -f dummy.c dummy 578 else 579 # Either a pre-BFD a.out linker (linux-gnuoldld) 580 # or one that does not give us useful --help. 581 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. 582 # If ld does not provide *any* "supported emulations:" 583 # that means it is gnuoldld. 584 echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" 585 test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 586 587 case "${UNAME_MACHINE}" in 588 i?86) 589 VENDOR=pc; 590 ;; 591 *) 592 VENDOR=unknown; 593 ;; 594 esac 595 # Determine whether the default compiler is a.out or elf 596 cat >dummy.c <<EOF 597 #include <features.h> 598 main(argc, argv) 599 int argc; 600 char *argv[]; 601 { 602 #ifdef __ELF__ 603 # ifdef __GLIBC__ 604 # if __GLIBC__ >= 2 605 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); 606 # else 607 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); 608 # endif 609 # else 610 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); 611 # endif 612 #else 613 printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); 614 #endif 615 return 0; 616 } 940 case "$ld_supported_targets" in 941 elf32-i386) 942 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 943 ;; 944 a.out-i386-linux) 945 echo "${UNAME_MACHINE}-pc-linux-gnuaout" 946 exit 0 ;; 947 coff-i386) 948 echo "${UNAME_MACHINE}-pc-linux-gnucoff" 949 exit 0 ;; 950 "") 951 # Either a pre-BFD a.out linker (linux-gnuoldld) or 952 # one that does not give us useful --help. 953 echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 954 exit 0 ;; 955 esac 956 # Determine whether the default compiler is a.out or elf 957 eval $set_cc_for_build 958 sed 's/^ //' << EOF >$dummy.c 959 #include <features.h> 960 #ifdef __ELF__ 961 # ifdef __GLIBC__ 962 # if __GLIBC__ >= 2 963 LIBC=gnu 964 # else 965 LIBC=gnulibc1 966 # endif 967 # else 968 LIBC=gnulibc1 969 # endif 970 #else 971 #ifdef __INTEL_COMPILER 972 LIBC=gnu 973 #else 974 LIBC=gnuaout 975 #endif 976 #endif 977 #ifdef __dietlibc__ 978 LIBC=dietlibc 979 #endif 617 980 EOF 618 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 619 rm -f dummy.c dummy 620 fi ;; 621 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions 622 # are messed up and put the nodename in both sysname and nodename. 623 i?86:DYNIX/ptx:4*:*) 981 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 982 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 983 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 984 ;; 985 i*86:DYNIX/ptx:4*:*) 986 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 987 # earlier versions are messed up and put the nodename in both 988 # sysname and nodename. 624 989 echo i386-sequent-sysv4 625 990 exit 0 ;; 626 i ?86:UNIX_SV:4.2MP:2.*)991 i*86:UNIX_SV:4.2MP:2.*) 627 992 # Unixware is an offshoot of SVR4, but it has its own version 628 993 # number series starting with 2... 629 994 # I am not positive that other SVR4 systems won't match this, … … 631 996 # Use sysv4.2uw... so that sysv4* matches it. 632 997 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 633 998 exit 0 ;; 634 i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) 999 i*86:OS/2:*:*) 1000 # If we were able to find `uname', then EMX Unix compatibility 1001 # is probably installed. 1002 echo ${UNAME_MACHINE}-pc-os2-emx 1003 exit 0 ;; 1004 i*86:XTS-300:*:STOP) 1005 echo ${UNAME_MACHINE}-unknown-stop 1006 exit 0 ;; 1007 i*86:atheos:*:*) 1008 echo ${UNAME_MACHINE}-unknown-atheos 1009 exit 0 ;; 1010 i*86:syllable:*:*) 1011 echo ${UNAME_MACHINE}-pc-syllable 1012 exit 0 ;; 1013 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1014 echo i386-unknown-lynxos${UNAME_RELEASE} 1015 exit 0 ;; 1016 i*86:*DOS:*:*) 1017 echo ${UNAME_MACHINE}-pc-msdosdjgpp 1018 exit 0 ;; 1019 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1020 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 635 1021 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 636 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL EASE}1022 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 637 1023 else 638 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL EASE}1024 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 639 1025 fi 640 1026 exit 0 ;; 641 i?86:*:3.2:*) 1027 i*86:*:5:[78]*) 1028 case `/bin/uname -X | grep "^Machine"` in 1029 *486*) UNAME_MACHINE=i486 ;; 1030 *Pentium) UNAME_MACHINE=i586 ;; 1031 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1032 esac 1033 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1034 exit 0 ;; 1035 i*86:*:3.2:*) 642 1036 if test -f /usr/options/cb.name; then 643 1037 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 644 1038 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 645 1039 elif /bin/uname -X 2>/dev/null >/dev/null ; then 646 UNAME_REL=`(/bin/uname -X| egrep Release|sed -e 's/.*= //')`647 (/bin/uname -X| egrep i80486 >/dev/null) && UNAME_MACHINE=i486648 (/bin/uname -X| egrep '^Machine.*Pentium' >/dev/null) \1040 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1041 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1042 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 649 1043 && UNAME_MACHINE=i586 1044 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1045 && UNAME_MACHINE=i686 1046 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1047 && UNAME_MACHINE=i686 650 1048 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 651 1049 else 652 1050 echo ${UNAME_MACHINE}-pc-sysv32 653 1051 fi 654 1052 exit 0 ;; 655 1053 pc:*:*:*) 1054 # Left here for compatibility: 656 1055 # uname -m prints for DJGPP always 'pc', but it prints nothing about 657 1056 # the processor, so we play safe by assuming i386. 658 1057 echo i386-pc-msdosdjgpp … … 674 1073 # "miniframe" 675 1074 echo m68010-convergent-sysv 676 1075 exit 0 ;; 677 M68*:*:R3V[567]*:*) 1076 mc68k:UNIX:SYSTEM5:3.51m) 1077 echo m68k-convergent-sysv 1078 exit 0 ;; 1079 M680?0:D-NIX:5.3:*) 1080 echo m68k-diab-dnix 1081 exit 0 ;; 1082 M68*:*:R3V[5678]*:*) 678 1083 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 679 3[34 ]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)1084 3[345]??:*: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 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) 680 1085 OS_REL='' 681 1086 test -r /etc/.relid \ 682 1087 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` … … 687 1092 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 688 1093 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 689 1094 && echo i486-ncr-sysv4 && exit 0 ;; 690 m68*:LynxOS:2.*:* )1095 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 691 1096 echo m68k-unknown-lynxos${UNAME_RELEASE} 692 1097 exit 0 ;; 693 1098 mc68030:UNIX_System_V:4.*:*) 694 1099 echo m68k-atari-sysv4 695 1100 exit 0 ;; 696 i?86:LynxOS:2.*:*)697 echo i386-unknown-lynxos${UNAME_RELEASE}698 exit 0 ;;699 1101 TSUNAMI:LynxOS:2.*:*) 700 1102 echo sparc-unknown-lynxos${UNAME_RELEASE} 701 1103 exit 0 ;; 702 rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)1104 rs6000:LynxOS:2.*:*) 703 1105 echo rs6000-unknown-lynxos${UNAME_RELEASE} 704 1106 exit 0 ;; 1107 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1108 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1109 exit 0 ;; 705 1110 SM[BE]S:UNIX_SV:*:*) 706 1111 echo mips-dde-sysv${UNAME_RELEASE} 707 1112 exit 0 ;; 1113 RM*:ReliantUNIX-*:*:*) 1114 echo mips-sni-sysv4 1115 exit 0 ;; 708 1116 RM*:SINIX-*:*:*) 709 1117 echo mips-sni-sysv4 710 1118 exit 0 ;; … … 716 1124 echo ns32k-sni-sysv 717 1125 fi 718 1126 exit 0 ;; 719 PENTIUM: CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort720 # says <Richard.M.Bartel@ccMail.Census.GOV>1127 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1128 # says <Richard.M.Bartel@ccMail.Census.GOV> 721 1129 echo i586-unisys-sysv4 722 1130 exit 0 ;; 723 1131 *:UNIX_System_V:4*:FTX*) … … 729 1137 # From seanf@swdc.stratus.com. 730 1138 echo i860-stratus-sysv4 731 1139 exit 0 ;; 1140 *:VOS:*:*) 1141 # From Paul.Green@stratus.com. 1142 echo hppa1.1-stratus-vos 1143 exit 0 ;; 732 1144 mc68*:A/UX:*:*) 733 1145 echo m68k-apple-aux${UNAME_RELEASE} 734 1146 exit 0 ;; 735 news*:NEWS-OS: *:6*)1147 news*:NEWS-OS:6*:*) 736 1148 echo mips-sony-newsos6 737 1149 exit 0 ;; 738 R 3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)1150 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 739 1151 if [ -d /usr/nec ]; then 740 1152 echo mips-nec-sysv${UNAME_RELEASE} 741 1153 else 742 1154 echo mips-unknown-sysv${UNAME_RELEASE} 743 1155 fi 744 1156 exit 0 ;; 1157 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1158 echo powerpc-be-beos 1159 exit 0 ;; 1160 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1161 echo powerpc-apple-beos 1162 exit 0 ;; 1163 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1164 echo i586-pc-beos 1165 exit 0 ;; 1166 SX-4:SUPER-UX:*:*) 1167 echo sx4-nec-superux${UNAME_RELEASE} 1168 exit 0 ;; 1169 SX-5:SUPER-UX:*:*) 1170 echo sx5-nec-superux${UNAME_RELEASE} 1171 exit 0 ;; 1172 SX-6:SUPER-UX:*:*) 1173 echo sx6-nec-superux${UNAME_RELEASE} 1174 exit 0 ;; 1175 Power*:Rhapsody:*:*) 1176 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1177 exit 0 ;; 1178 *:Rhapsody:*:*) 1179 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1180 exit 0 ;; 1181 *:Darwin:*:*) 1182 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1183 case $UNAME_PROCESSOR in 1184 *86) UNAME_PROCESSOR=i686 ;; 1185 unknown) UNAME_PROCESSOR=powerpc ;; 1186 esac 1187 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1188 exit 0 ;; 1189 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1190 UNAME_PROCESSOR=`uname -p` 1191 if test "$UNAME_PROCESSOR" = "x86"; then 1192 UNAME_PROCESSOR=i386 1193 UNAME_MACHINE=pc 1194 fi 1195 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1196 exit 0 ;; 1197 *:QNX:*:4*) 1198 echo i386-pc-qnx 1199 exit 0 ;; 1200 NSR-?:NONSTOP_KERNEL:*:*) 1201 echo nsr-tandem-nsk${UNAME_RELEASE} 1202 exit 0 ;; 1203 *:NonStop-UX:*:*) 1204 echo mips-compaq-nonstopux 1205 exit 0 ;; 1206 BS2000:POSIX*:*:*) 1207 echo bs2000-siemens-sysv 1208 exit 0 ;; 1209 DS/*:UNIX_System_V:*:*) 1210 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1211 exit 0 ;; 1212 *:Plan9:*:*) 1213 # "uname -m" is not consistent, so use $cputype instead. 386 1214 # is converted to i386 for consistency with other x86 1215 # operating systems. 1216 if test "$cputype" = "386"; then 1217 UNAME_MACHINE=i386 1218 else 1219 UNAME_MACHINE="$cputype" 1220 fi 1221 echo ${UNAME_MACHINE}-unknown-plan9 1222 exit 0 ;; 1223 *:TOPS-10:*:*) 1224 echo pdp10-unknown-tops10 1225 exit 0 ;; 1226 *:TENEX:*:*) 1227 echo pdp10-unknown-tenex 1228 exit 0 ;; 1229 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1230 echo pdp10-dec-tops20 1231 exit 0 ;; 1232 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1233 echo pdp10-xkl-tops20 1234 exit 0 ;; 1235 *:TOPS-20:*:*) 1236 echo pdp10-unknown-tops20 1237 exit 0 ;; 1238 *:ITS:*:*) 1239 echo pdp10-unknown-its 1240 exit 0 ;; 1241 SEI:*:*:SEIUX) 1242 echo mips-sei-seiux${UNAME_RELEASE} 1243 exit 0 ;; 1244 *:DragonFly:*:*) 1245 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1246 exit 0 ;; 1247 *:*VMS:*:*) 1248 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1249 case "${UNAME_MACHINE}" in 1250 A*) echo alpha-dec-vms && exit 0 ;; 1251 I*) echo ia64-dec-vms && exit 0 ;; 1252 V*) echo vax-dec-vms && exit 0 ;; 1253 esac ;; 1254 *:XENIX:*:SysV) 1255 echo i386-pc-xenix 1256 exit 0 ;; 745 1257 esac 746 1258 747 1259 #echo '(No uname command or uname output not recognized.)' 1>&2 748 1260 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 749 1261 750 cat >dummy.c <<EOF 1262 eval $set_cc_for_build 1263 cat >$dummy.c <<EOF 751 1264 #ifdef _SEQUENT_ 752 1265 # include <sys/types.h> 753 1266 # include <sys/utsname.h> … … 785 1298 #endif 786 1299 int version; 787 1300 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 788 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1301 if (version < 4) 1302 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1303 else 1304 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 789 1305 exit (0); 790 1306 #endif 791 1307 … … 830 1346 #endif 831 1347 832 1348 #if defined (vax) 833 #if !defined (ultrix) 834 printf ("vax-dec-bsd\n"); exit (0); 835 #else 836 printf ("vax-dec-ultrix\n"); exit (0); 837 #endif 1349 # if !defined (ultrix) 1350 # include <sys/param.h> 1351 # if defined (BSD) 1352 # if BSD == 43 1353 printf ("vax-dec-bsd4.3\n"); exit (0); 1354 # else 1355 # if BSD == 199006 1356 printf ("vax-dec-bsd4.3reno\n"); exit (0); 1357 # else 1358 printf ("vax-dec-bsd\n"); exit (0); 1359 # endif 1360 # endif 1361 # else 1362 printf ("vax-dec-bsd\n"); exit (0); 1363 # endif 1364 # else 1365 printf ("vax-dec-ultrix\n"); exit (0); 1366 # endif 838 1367 #endif 839 1368 840 1369 #if defined (alliant) && defined (i860) … … 845 1374 } 846 1375 EOF 847 1376 848 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 849 rm -f dummy.c dummy 1377 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 850 1378 851 1379 # Apollos put the system type in the environment. 852 1380 … … 878 1406 esac 879 1407 fi 880 1408 881 #echo '(Unable to guess system type)' 1>&2 1409 cat >&2 <<EOF 1410 $0: unable to guess system type 1411 1412 This script, last modified $timestamp, has failed to recognize 1413 the operating system you are using. It is advised that you 1414 download the most up to date version of the config scripts from 1415 1416 ftp://ftp.gnu.org/pub/gnu/config/ 1417 1418 If the version you run ($0) is already up to date, please 1419 send the following data and any information you think might be 1420 pertinent to <config-patches@gnu.org> in order to provide the needed 1421 information to handle your system. 1422 1423 config.guess timestamp = $timestamp 1424 1425 uname -m = `(uname -m) 2>/dev/null || echo unknown` 1426 uname -r = `(uname -r) 2>/dev/null || echo unknown` 1427 uname -s = `(uname -s) 2>/dev/null || echo unknown` 1428 uname -v = `(uname -v) 2>/dev/null || echo unknown` 1429 1430 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1431 /bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1432 1433 hostinfo = `(hostinfo) 2>/dev/null` 1434 /bin/universe = `(/bin/universe) 2>/dev/null` 1435 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1436 /bin/arch = `(/bin/arch) 2>/dev/null` 1437 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1438 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1439 1440 UNAME_MACHINE = ${UNAME_MACHINE} 1441 UNAME_RELEASE = ${UNAME_RELEASE} 1442 UNAME_SYSTEM = ${UNAME_SYSTEM} 1443 UNAME_VERSION = ${UNAME_VERSION} 1444 EOF 882 1445 883 1446 exit 1 1447 1448 # Local variables: 1449 # eval: (add-hook 'write-file-hooks 'time-stamp) 1450 # time-stamp-start: "timestamp='" 1451 # time-stamp-format: "%:y-%02m-%02d" 1452 # time-stamp-end: "'" 1453 # End: -
config.sub
diff -urN jpeg.old/config.sub jpeg.dev/config.sub
old new 1 1 #! /bin/sh 2 # Configuration validation subroutine script, version 1.1. 3 # Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. 2 # Configuration validation subroutine script. 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 5 6 timestamp='2004-11-30' 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 6 10 # can handle that machine. It does not imply ALL GNU software can. … … 25 29 # configuration script generated by Autoconf, you may include it under 26 30 # the same distribution terms that you use for the rest of that program. 27 31 32 # Please send patches to <config-patches@gnu.org>. Submit a context 33 # diff and a properly formatted ChangeLog entry. 34 # 28 35 # Configuration subroutine to validate and canonicalize a configuration type. 29 36 # Supply the specified configuration type as an argument. 30 37 # If it is invalid, we print an error message on stderr and exit with code 1. … … 45 52 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 46 53 # It is wrong to echo any other type of specification. 47 54 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 55 me=`echo "$0" | sed -e 's,.*/,,'` 56 56 57 # First pass through any local machine types. 58 case $1 in 59 *local*) 60 echo $1 61 exit 0 62 ;; 63 *) 64 ;; 57 usage="\ 58 Usage: $0 [OPTION] CPU-MFR-OPSYS 59 $0 [OPTION] ALIAS 60 61 Canonicalize a configuration name. 62 63 Operation modes: 64 -h, --help print this help, then exit 65 -t, --time-stamp print date of last modification, then exit 66 -v, --version print version number, then exit 67 68 Report bugs and patches to <config-patches@gnu.org>." 69 70 version="\ 71 GNU config.sub ($timestamp) 72 73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 74 Free Software Foundation, Inc. 75 76 This is free software; see the source for copying conditions. There is NO 77 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 78 79 help=" 80 Try \`$me --help' for more information." 81 82 # Parse command line 83 while test $# -gt 0 ; do 84 case $1 in 85 --time-stamp | --time* | -t ) 86 echo "$timestamp" ; exit 0 ;; 87 --version | -v ) 88 echo "$version" ; exit 0 ;; 89 --help | --h* | -h ) 90 echo "$usage"; exit 0 ;; 91 -- ) # Stop option processing 92 shift; break ;; 93 - ) # Use stdin as input. 94 break ;; 95 -* ) 96 echo "$me: invalid option $1$help" 97 exit 1 ;; 98 99 *local*) 100 # First pass through any local machine types. 101 echo $1 102 exit 0;; 103 104 * ) 105 break ;; 106 esac 107 done 108 109 case $# in 110 0) echo "$me: missing argument$help" >&2 111 exit 1;; 112 1) ;; 113 *) echo "$me: too many arguments$help" >&2 114 exit 1;; 65 115 esac 66 116 67 117 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 68 118 # Here we must recognize all the valid KERNEL-OS combinations. 69 119 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 70 120 case $maybe_os in 71 linux-gnu*) 121 nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ 122 kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) 72 123 os=-$maybe_os 73 124 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 74 125 ;; … … 94 145 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 95 146 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 96 147 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 97 -apple )148 -apple | -axis | -knuth | -cray) 98 149 os= 99 150 basic_machine=$1 100 151 ;; 152 -sim | -cisco | -oki | -wec | -winbond) 153 os= 154 basic_machine=$1 155 ;; 156 -scout) 157 ;; 158 -wrs) 159 os=-vxworks 160 basic_machine=$1 161 ;; 162 -chorusos*) 163 os=-chorusos 164 basic_machine=$1 165 ;; 166 -chorusrdb) 167 os=-chorusrdb 168 basic_machine=$1 169 ;; 101 170 -hiux*) 102 171 os=-hiuxwe2 103 172 ;; 104 173 -sco5) 105 os= sco3.2v5174 os=-sco3.2v5 106 175 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 107 176 ;; 108 177 -sco4) … … 121 190 os=-sco3.2v2 122 191 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 123 192 ;; 193 -udk*) 194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 195 ;; 124 196 -isc) 125 197 os=-isc2.2 126 198 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` … … 143 215 -psos*) 144 216 os=-psos 145 217 ;; 218 -mint | -mint[0-9]*) 219 basic_machine=m68k-atari 220 os=-mint 221 ;; 146 222 esac 147 223 148 224 # Decode aliases for certain CPU-COMPANY combinations. 149 225 case $basic_machine in 150 226 # Recognize the basic CPU types without company name. 151 227 # Some are omitted here because they have special meanings below. 152 tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ 153 | arme[lb] | pyramid | mn10200 | mn10300 \ 154 | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ 155 | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ 156 | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ 157 | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ 158 | mipstx39 | mipstx39el \ 159 | sparc | sparclet | sparclite | sparc64 | v850) 228 1750a | 580 \ 229 | a29k \ 230 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 231 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 232 | am33_2.0 \ 233 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ 234 | c4x | clipper \ 235 | d10v | d30v | dlx | dsp16xx \ 236 | fr30 | frv \ 237 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 238 | i370 | i860 | i960 | ia64 \ 239 | ip2k | iq2000 \ 240 | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ 241 | mips | mipsbe | mipseb | mipsel | mipsle \ 242 | mips16 \ 243 | mips64 | mips64el \ 244 | mips64vr | mips64vrel \ 245 | mips64orion | mips64orionel \ 246 | mips64vr4100 | mips64vr4100el \ 247 | mips64vr4300 | mips64vr4300el \ 248 | mips64vr5000 | mips64vr5000el \ 249 | mipsisa32 | mipsisa32el \ 250 | mipsisa32r2 | mipsisa32r2el \ 251 | mipsisa64 | mipsisa64el \ 252 | mipsisa64r2 | mipsisa64r2el \ 253 | mipsisa64sb1 | mipsisa64sb1el \ 254 | mipsisa64sr71k | mipsisa64sr71kel \ 255 | mipstx39 | mipstx39el \ 256 | mn10200 | mn10300 \ 257 | msp430 \ 258 | ns16k | ns32k \ 259 | openrisc | or32 \ 260 | pdp10 | pdp11 | pj | pjl \ 261 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 262 | pyramid \ 263 | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ 264 | sh64 | sh64le \ 265 | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ 266 | strongarm \ 267 | tahoe | thumb | tic4x | tic80 | tron \ 268 | v850 | v850e \ 269 | we32k \ 270 | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ 271 | z8k) 160 272 basic_machine=$basic_machine-unknown 161 273 ;; 274 m6811 | m68hc11 | m6812 | m68hc12) 275 # Motorola 68HC11/12. 276 basic_machine=$basic_machine-unknown 277 os=-none 278 ;; 279 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 280 ;; 281 162 282 # We use `pc' rather than `unknown' 163 283 # because (1) that's what they normally are, and 164 284 # (2) the word "unknown" tends to confuse beginning users. 165 i [3456]86)285 i*86 | x86_64) 166 286 basic_machine=$basic_machine-pc 167 287 ;; 168 288 # Object if more than one company name word. … … 171 291 exit 1 172 292 ;; 173 293 # Recognize the basic CPU types with company name. 174 vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \ 175 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ 176 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ 177 | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ 178 | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ 179 | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ 180 | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ 181 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ 182 | sparc64-* | mips64-* | mipsel-* \ 183 | mips64el-* | mips64orion-* | mips64orionel-* \ 184 | mipstx39-* | mipstx39el-* \ 185 | f301-*) 294 580-* \ 295 | a29k-* \ 296 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 297 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 298 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 299 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 300 | avr-* \ 301 | bs2000-* \ 302 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 303 | clipper-* | craynv-* | cydra-* \ 304 | d10v-* | d30v-* | dlx-* \ 305 | elxsi-* \ 306 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ 307 | h8300-* | h8500-* \ 308 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 309 | i*86-* | i860-* | i960-* | ia64-* \ 310 | ip2k-* | iq2000-* \ 311 | m32r-* | m32rle-* \ 312 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 313 | m88110-* | m88k-* | maxq-* | mcore-* \ 314 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 315 | mips16-* \ 316 | mips64-* | mips64el-* \ 317 | mips64vr-* | mips64vrel-* \ 318 | mips64orion-* | mips64orionel-* \ 319 | mips64vr4100-* | mips64vr4100el-* \ 320 | mips64vr4300-* | mips64vr4300el-* \ 321 | mips64vr5000-* | mips64vr5000el-* \ 322 | mipsisa32-* | mipsisa32el-* \ 323 | mipsisa32r2-* | mipsisa32r2el-* \ 324 | mipsisa64-* | mipsisa64el-* \ 325 | mipsisa64r2-* | mipsisa64r2el-* \ 326 | mipsisa64sb1-* | mipsisa64sb1el-* \ 327 | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 328 | mipstx39-* | mipstx39el-* \ 329 | mmix-* \ 330 | msp430-* \ 331 | none-* | np1-* | ns16k-* | ns32k-* \ 332 | orion-* \ 333 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 334 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 335 | pyramid-* \ 336 | romp-* | rs6000-* \ 337 | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ 338 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 339 | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ 340 | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ 341 | tahoe-* | thumb-* \ 342 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 343 | tron-* \ 344 | v850-* | v850e-* | vax-* \ 345 | we32k-* \ 346 | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ 347 | xstormy16-* | xtensa-* \ 348 | ymp-* \ 349 | z8k-*) 186 350 ;; 187 351 # Recognize the various machine names and aliases which stand 188 352 # for a CPU type and a company and sometimes even an OS. 353 386bsd) 354 basic_machine=i386-unknown 355 os=-bsd 356 ;; 189 357 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 190 358 basic_machine=m68000-att 191 359 ;; 192 360 3b*) 193 361 basic_machine=we32k-att 194 362 ;; 363 a29khif) 364 basic_machine=a29k-amd 365 os=-udi 366 ;; 367 abacus) 368 basic_machine=abacus-unknown 369 ;; 370 adobe68k) 371 basic_machine=m68010-adobe 372 os=-scout 373 ;; 195 374 alliant | fx80) 196 375 basic_machine=fx80-alliant 197 376 ;; … … 202 381 basic_machine=a29k-none 203 382 os=-bsd 204 383 ;; 384 amd64) 385 basic_machine=x86_64-pc 386 ;; 387 amd64-*) 388 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 389 ;; 205 390 amdahl) 206 391 basic_machine=580-amdahl 207 392 os=-sysv 208 393 ;; 209 394 amiga | amiga-*) 210 basic_machine=m68k- cbm395 basic_machine=m68k-unknown 211 396 ;; 212 397 amigaos | amigados) 213 basic_machine=m68k- cbm398 basic_machine=m68k-unknown 214 399 os=-amigaos 215 400 ;; 216 401 amigaunix | amix) 217 basic_machine=m68k- cbm402 basic_machine=m68k-unknown 218 403 os=-sysv4 219 404 ;; 220 405 apollo68) 221 406 basic_machine=m68k-apollo 222 407 os=-sysv 223 408 ;; 409 apollo68bsd) 410 basic_machine=m68k-apollo 411 os=-bsd 412 ;; 224 413 aux) 225 414 basic_machine=m68k-apple 226 415 os=-aux … … 229 418 basic_machine=ns32k-sequent 230 419 os=-dynix 231 420 ;; 421 c90) 422 basic_machine=c90-cray 423 os=-unicos 424 ;; 232 425 convex-c1) 233 426 basic_machine=c1-convex 234 427 os=-bsd … … 249 442 basic_machine=c38-convex 250 443 os=-bsd 251 444 ;; 252 cray | ymp) 253 basic_machine=ymp-cray 254 os=-unicos 255 ;; 256 cray2) 257 basic_machine=cray2-cray 445 cray | j90) 446 basic_machine=j90-cray 258 447 os=-unicos 259 448 ;; 260 [ctj]90-cray) 261 basic_machine=c90-cray 262 os=-unicos 449 craynv) 450 basic_machine=craynv-cray 451 os=-unicosmp 452 ;; 453 cr16c) 454 basic_machine=cr16c-unknown 455 os=-elf 263 456 ;; 264 457 crds | unos) 265 458 basic_machine=m68k-crds 266 459 ;; 460 crisv32 | crisv32-* | etraxfs*) 461 basic_machine=crisv32-axis 462 ;; 463 cris | cris-* | etrax*) 464 basic_machine=cris-axis 465 ;; 466 crx) 467 basic_machine=crx-unknown 468 os=-elf 469 ;; 267 470 da30 | da30-*) 268 471 basic_machine=m68k-da30 269 472 ;; 270 473 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 271 474 basic_machine=mips-dec 272 475 ;; 476 decsystem10* | dec10*) 477 basic_machine=pdp10-dec 478 os=-tops10 479 ;; 480 decsystem20* | dec20*) 481 basic_machine=pdp10-dec 482 os=-tops20 483 ;; 273 484 delta | 3300 | motorola-3300 | motorola-delta \ 274 485 | 3300-motorola | delta-motorola) 275 486 basic_machine=m68k-motorola … … 278 489 basic_machine=m88k-motorola 279 490 os=-sysv3 280 491 ;; 492 djgpp) 493 basic_machine=i586-pc 494 os=-msdosdjgpp 495 ;; 281 496 dpx20 | dpx20-*) 282 497 basic_machine=rs6000-bull 283 498 os=-bosx … … 297 512 encore | umax | mmax) 298 513 basic_machine=ns32k-encore 299 514 ;; 515 es1800 | OSE68k | ose68k | ose | OSE) 516 basic_machine=m68k-ericsson 517 os=-ose 518 ;; 300 519 fx2800) 301 520 basic_machine=i860-alliant 302 521 ;; … … 307 526 basic_machine=tron-gmicro 308 527 os=-sysv 309 528 ;; 529 go32) 530 basic_machine=i386-pc 531 os=-go32 532 ;; 310 533 h3050r* | hiux*) 311 534 basic_machine=hppa1.1-hitachi 312 535 os=-hiuxwe2 … … 315 538 basic_machine=h8300-hitachi 316 539 os=-hms 317 540 ;; 541 h8300xray) 542 basic_machine=h8300-hitachi 543 os=-xray 544 ;; 545 h8500hms) 546 basic_machine=h8500-hitachi 547 os=-hms 548 ;; 318 549 harris) 319 550 basic_machine=m88k-harris 320 551 os=-sysv3 … … 330 561 basic_machine=m68k-hp 331 562 os=-hpux 332 563 ;; 564 hp3k9[0-9][0-9] | hp9[0-9][0-9]) 565 basic_machine=hppa1.0-hp 566 ;; 333 567 hp9k2[0-9][0-9] | hp9k31[0-9]) 334 568 basic_machine=m68000-hp 335 569 ;; 336 570 hp9k3[2-9][0-9]) 337 571 basic_machine=m68k-hp 338 572 ;; 339 hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) 573 hp9k6[0-9][0-9] | hp6[0-9][0-9]) 574 basic_machine=hppa1.0-hp 575 ;; 576 hp9k7[0-79][0-9] | hp7[0-79][0-9]) 577 basic_machine=hppa1.1-hp 578 ;; 579 hp9k78[0-9] | hp78[0-9]) 580 # FIXME: really hppa2.0-hp 581 basic_machine=hppa1.1-hp 582 ;; 583 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 584 # FIXME: really hppa2.0-hp 585 basic_machine=hppa1.1-hp 586 ;; 587 hp9k8[0-9][13679] | hp8[0-9][13679]) 340 588 basic_machine=hppa1.1-hp 341 589 ;; 342 590 hp9k8[0-9][0-9] | hp8[0-9][0-9]) … … 345 593 hppa-next) 346 594 os=-nextstep3 347 595 ;; 596 hppaosf) 597 basic_machine=hppa1.1-hp 598 os=-osf 599 ;; 600 hppro) 601 basic_machine=hppa1.1-hp 602 os=-proelf 603 ;; 348 604 i370-ibm* | ibm*) 349 605 basic_machine=i370-ibm 350 os=-mvs351 606 ;; 352 607 # I'm not sure what "Sysv32" means. Should this be sysv3.2? 353 i [3456]86v32)608 i*86v32) 354 609 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 355 610 os=-sysv32 356 611 ;; 357 i [3456]86v4*)612 i*86v4*) 358 613 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 359 614 os=-sysv4 360 615 ;; 361 i [3456]86v)616 i*86v) 362 617 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 363 618 os=-sysv 364 619 ;; 365 i [3456]86sol2)620 i*86sol2) 366 621 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 367 622 os=-solaris2 368 623 ;; 624 i386mach) 625 basic_machine=i386-mach 626 os=-mach 627 ;; 628 i386-vsta | vsta) 629 basic_machine=i386-unknown 630 os=-vsta 631 ;; 369 632 iris | iris4d) 370 633 basic_machine=mips-sgi 371 634 case $os in … … 391 654 basic_machine=ns32k-utek 392 655 os=-sysv 393 656 ;; 657 mingw32) 658 basic_machine=i386-pc 659 os=-mingw32 660 ;; 394 661 miniframe) 395 662 basic_machine=m68000-convergent 396 663 ;; 397 mipsel*-linux*) 398 basic_machine=mipsel-unknown 399 os=-linux-gnu 400 ;; 401 mips*-linux*) 402 basic_machine=mips-unknown 403 os=-linux-gnu 664 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 665 basic_machine=m68k-atari 666 os=-mint 404 667 ;; 405 668 mips3*-*) 406 669 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` … … 408 671 mips3*) 409 672 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 410 673 ;; 674 monitor) 675 basic_machine=m68k-rom68k 676 os=-coff 677 ;; 678 morphos) 679 basic_machine=powerpc-unknown 680 os=-morphos 681 ;; 682 msdos) 683 basic_machine=i386-pc 684 os=-msdos 685 ;; 686 mvs) 687 basic_machine=i370-ibm 688 os=-mvs 689 ;; 411 690 ncr3000) 412 691 basic_machine=i486-ncr 413 692 os=-sysv4 414 693 ;; 694 netbsd386) 695 basic_machine=i386-unknown 696 os=-netbsd 697 ;; 698 netwinder) 699 basic_machine=armv4l-rebel 700 os=-linux 701 ;; 415 702 news | news700 | news800 | news900) 416 703 basic_machine=m68k-sony 417 704 os=-newsos … … 424 711 basic_machine=mips-sony 425 712 os=-newsos 426 713 ;; 714 necv70) 715 basic_machine=v70-nec 716 os=-sysv 717 ;; 427 718 next | m*-next ) 428 719 basic_machine=m68k-next 429 720 case $os in … … 449 740 basic_machine=i960-intel 450 741 os=-nindy 451 742 ;; 743 mon960) 744 basic_machine=i960-intel 745 os=-mon960 746 ;; 747 nonstopux) 748 basic_machine=mips-compaq 749 os=-nonstopux 750 ;; 452 751 np1) 453 752 basic_machine=np1-gould 454 753 ;; 754 nsr-tandem) 755 basic_machine=nsr-tandem 756 ;; 757 op50n-* | op60c-*) 758 basic_machine=hppa1.1-oki 759 os=-proelf 760 ;; 761 or32 | or32-*) 762 basic_machine=or32-unknown 763 os=-coff 764 ;; 765 os400) 766 basic_machine=powerpc-ibm 767 os=-os400 768 ;; 769 OSE68000 | ose68000) 770 basic_machine=m68000-ericsson 771 os=-ose 772 ;; 773 os68k) 774 basic_machine=m68k-none 775 os=-os68k 776 ;; 455 777 pa-hitachi) 456 778 basic_machine=hppa1.1-hitachi 457 779 os=-hiuxwe2 … … 466 788 pbb) 467 789 basic_machine=m68k-tti 468 790 ;; 469 pc532 | pc532-*)791 pc532 | pc532-*) 470 792 basic_machine=ns32k-pc532 471 793 ;; 472 pentium | p5) 473 basic_machine=i586-intel 794 pentium | p5 | k5 | k6 | nexgen | viac3) 795 basic_machine=i586-pc 796 ;; 797 pentiumpro | p6 | 6x86 | athlon | athlon_*) 798 basic_machine=i686-pc 474 799 ;; 475 pentium pro | p6)476 basic_machine=i686- intel800 pentiumii | pentium2 | pentiumiii | pentium3) 801 basic_machine=i686-pc 477 802 ;; 478 pentium-* | p5-*) 803 pentium4) 804 basic_machine=i786-pc 805 ;; 806 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 479 807 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 480 808 ;; 481 pentiumpro-* | p6-*) 809 pentiumpro-* | p6-* | 6x86-* | athlon-*) 810 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 811 ;; 812 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 482 813 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 483 814 ;; 484 k5) 485 # We don't have specific support for AMD's K5 yet, so just call it a Pentium 486 basic_machine=i586-amd 487 ;; 488 nexen) 489 # We don't have specific support for Nexgen yet, so just call it a Pentium 490 basic_machine=i586-nexgen 815 pentium4-*) 816 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 491 817 ;; 492 818 pn) 493 819 basic_machine=pn-gould 494 820 ;; 495 power) basic_machine= rs6000-ibm821 power) basic_machine=power-ibm 496 822 ;; 497 823 ppc) basic_machine=powerpc-unknown 498 ;;824 ;; 499 825 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 500 826 ;; 501 827 ppcle | powerpclittle | ppc-le | powerpc-little) 502 828 basic_machine=powerpcle-unknown 503 ;;829 ;; 504 830 ppcle-* | powerpclittle-*) 505 831 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 506 832 ;; 833 ppc64) basic_machine=powerpc64-unknown 834 ;; 835 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 836 ;; 837 ppc64le | powerpc64little | ppc64-le | powerpc64-little) 838 basic_machine=powerpc64le-unknown 839 ;; 840 ppc64le-* | powerpc64little-*) 841 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 842 ;; 507 843 ps2) 508 844 basic_machine=i386-ibm 509 845 ;; 846 pw32) 847 basic_machine=i586-unknown 848 os=-pw32 849 ;; 850 rom68k) 851 basic_machine=m68k-rom68k 852 os=-coff 853 ;; 510 854 rm[46]00) 511 855 basic_machine=mips-siemens 512 856 ;; 513 857 rtpc | rtpc-*) 514 858 basic_machine=romp-ibm 515 859 ;; 860 s390 | s390-*) 861 basic_machine=s390-ibm 862 ;; 863 s390x | s390x-*) 864 basic_machine=s390x-ibm 865 ;; 866 sa29200) 867 basic_machine=a29k-amd 868 os=-udi 869 ;; 870 sb1) 871 basic_machine=mipsisa64sb1-unknown 872 ;; 873 sb1el) 874 basic_machine=mipsisa64sb1el-unknown 875 ;; 876 sei) 877 basic_machine=mips-sei 878 os=-seiux 879 ;; 516 880 sequent) 517 881 basic_machine=i386-sequent 518 882 ;; … … 520 884 basic_machine=sh-hitachi 521 885 os=-hms 522 886 ;; 887 sh64) 888 basic_machine=sh64-unknown 889 ;; 890 sparclite-wrs | simso-wrs) 891 basic_machine=sparclite-wrs 892 os=-vxworks 893 ;; 523 894 sps7) 524 895 basic_machine=m68k-bull 525 896 os=-sysv2 … … 527 898 spur) 528 899 basic_machine=spur-unknown 529 900 ;; 901 st2000) 902 basic_machine=m68k-tandem 903 ;; 904 stratus) 905 basic_machine=i860-stratus 906 os=-sysv4 907 ;; 530 908 sun2) 531 909 basic_machine=m68000-sun 532 910 ;; … … 567 945 sun386 | sun386i | roadrunner) 568 946 basic_machine=i386-sun 569 947 ;; 948 sv1) 949 basic_machine=sv1-cray 950 os=-unicos 951 ;; 570 952 symmetry) 571 953 basic_machine=i386-sequent 572 954 os=-dynix 573 955 ;; 956 t3e) 957 basic_machine=alphaev5-cray 958 os=-unicos 959 ;; 960 t90) 961 basic_machine=t90-cray 962 os=-unicos 963 ;; 964 tic54x | c54x*) 965 basic_machine=tic54x-unknown 966 os=-coff 967 ;; 968 tic55x | c55x*) 969 basic_machine=tic55x-unknown 970 os=-coff 971 ;; 972 tic6x | c6x*) 973 basic_machine=tic6x-unknown 974 os=-coff 975 ;; 574 976 tx39) 575 977 basic_machine=mipstx39-unknown 576 978 ;; 577 979 tx39el) 578 980 basic_machine=mipstx39el-unknown 579 981 ;; 982 toad1) 983 basic_machine=pdp10-xkl 984 os=-tops20 985 ;; 580 986 tower | tower-32) 581 987 basic_machine=m68k-ncr 582 988 ;; 989 tpf) 990 basic_machine=s390x-ibm 991 os=-tpf 992 ;; 583 993 udi29k) 584 994 basic_machine=a29k-amd 585 995 os=-udi … … 588 998 basic_machine=a29k-nyu 589 999 os=-sym1 590 1000 ;; 1001 v810 | necv810) 1002 basic_machine=v810-nec 1003 os=-none 1004 ;; 591 1005 vaxv) 592 1006 basic_machine=vax-dec 593 1007 os=-sysv … … 597 1011 os=-vms 598 1012 ;; 599 1013 vpp*|vx|vx-*) 600 basic_machine=f301-fujitsu601 ;;1014 basic_machine=f301-fujitsu 1015 ;; 602 1016 vxworks960) 603 1017 basic_machine=i960-wrs 604 1018 os=-vxworks … … 611 1025 basic_machine=a29k-wrs 612 1026 os=-vxworks 613 1027 ;; 614 xmp) 615 basic_machine=xmp-cray 616 os=-unicos 1028 w65*) 1029 basic_machine=w65-wdc 1030 os=-none 1031 ;; 1032 w89k-*) 1033 basic_machine=hppa1.1-winbond 1034 os=-proelf 1035 ;; 1036 xbox) 1037 basic_machine=i686-pc 1038 os=-mingw32 617 1039 ;; 618 xps | xps100)1040 xps | xps100) 619 1041 basic_machine=xps100-honeywell 620 1042 ;; 1043 ymp) 1044 basic_machine=ymp-cray 1045 os=-unicos 1046 ;; 1047 z8k-*-coff) 1048 basic_machine=z8k-unknown 1049 os=-sim 1050 ;; 621 1051 none) 622 1052 basic_machine=none-none 623 1053 os=-none … … 625 1055 626 1056 # Here we handle the default manufacturer of certain CPU types. It is in 627 1057 # some cases the only manufacturer, in others, it is the most popular. 628 mips) 629 if [ x$os = x-linux-gnu ]; then 630 basic_machine=mips-unknown 631 else 632 basic_machine=mips-mips 633 fi 1058 w89k) 1059 basic_machine=hppa1.1-winbond 1060 ;; 1061 op50n) 1062 basic_machine=hppa1.1-oki 1063 ;; 1064 op60c) 1065 basic_machine=hppa1.1-oki 634 1066 ;; 635 1067 romp) 636 1068 basic_machine=romp-ibm 637 1069 ;; 1070 mmix) 1071 basic_machine=mmix-knuth 1072 ;; 638 1073 rs6000) 639 1074 basic_machine=rs6000-ibm 640 1075 ;; 641 1076 vax) 642 1077 basic_machine=vax-dec 643 1078 ;; 1079 pdp10) 1080 # there are many clones, so DEC is not a safe bet 1081 basic_machine=pdp10-unknown 1082 ;; 644 1083 pdp11) 645 1084 basic_machine=pdp11-dec 646 1085 ;; 647 1086 we32k) 648 1087 basic_machine=we32k-att 649 1088 ;; 650 sparc) 1089 sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) 1090 basic_machine=sh-unknown 1091 ;; 1092 sh64) 1093 basic_machine=sh64-unknown 1094 ;; 1095 sparc | sparcv8 | sparcv9 | sparcv9b) 651 1096 basic_machine=sparc-sun 652 1097 ;; 653 cydra)1098 cydra) 654 1099 basic_machine=cydra-cydrome 655 1100 ;; 656 1101 orion) … … 659 1104 orion105) 660 1105 basic_machine=clipper-highlevel 661 1106 ;; 1107 mac | mpw | mac-mpw) 1108 basic_machine=m68k-apple 1109 ;; 1110 pmac | pmac-mpw) 1111 basic_machine=powerpc-apple 1112 ;; 1113 *-unknown) 1114 # Make sure to match an already-canonicalized machine name. 1115 ;; 662 1116 *) 663 1117 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 664 1118 exit 1 … … 711 1165 | -aos* \ 712 1166 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 713 1167 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 714 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ 715 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ 1168 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ 1169 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1170 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 716 1171 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 717 1172 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 718 | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 719 | -mingw32* | -linux-gnu* | -uxpv*) 1173 | -chorusos* | -chorusrdb* \ 1174 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1175 | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ 1176 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1177 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1178 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1179 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1180 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1181 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) 720 1182 # Remember, each alternative MUST END IN *, to match a version number. 721 1183 ;; 1184 -qnx*) 1185 case $basic_machine in 1186 x86-* | i*86-*) 1187 ;; 1188 *) 1189 os=-nto$os 1190 ;; 1191 esac 1192 ;; 1193 -nto-qnx*) 1194 ;; 1195 -nto*) 1196 os=`echo $os | sed -e 's|nto|nto-qnx|'` 1197 ;; 1198 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1199 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ 1200 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1201 ;; 1202 -mac*) 1203 os=`echo $os | sed -e 's|mac|macos|'` 1204 ;; 1205 -linux-dietlibc) 1206 os=-linux-dietlibc 1207 ;; 722 1208 -linux*) 723 1209 os=`echo $os | sed -e 's|linux|linux-gnu|'` 724 1210 ;; … … 728 1214 -sunos6*) 729 1215 os=`echo $os | sed -e 's|sunos6|solaris3|'` 730 1216 ;; 1217 -opened*) 1218 os=-openedition 1219 ;; 1220 -os400*) 1221 os=-os400 1222 ;; 1223 -wince*) 1224 os=-wince 1225 ;; 731 1226 -osfrose*) 732 1227 os=-osfrose 733 1228 ;; … … 743 1238 -acis*) 744 1239 os=-aos 745 1240 ;; 1241 -atheos*) 1242 os=-atheos 1243 ;; 1244 -syllable*) 1245 os=-syllable 1246 ;; 1247 -386bsd) 1248 os=-bsd 1249 ;; 746 1250 -ctix* | -uts*) 747 1251 os=-sysv 748 1252 ;; 1253 -nova*) 1254 os=-rtmk-nova 1255 ;; 749 1256 -ns2 ) 750 os=-nextstep2 1257 os=-nextstep2 1258 ;; 1259 -nsk*) 1260 os=-nsk 751 1261 ;; 752 1262 # Preserve the version number of sinix5. 753 1263 -sinix5.*) … … 756 1266 -sinix*) 757 1267 os=-sysv4 758 1268 ;; 1269 -tpf*) 1270 os=-tpf 1271 ;; 759 1272 -triton*) 760 1273 os=-sysv3 761 1274 ;; … … 774 1287 # This must come after -sysvr4. 775 1288 -sysv*) 776 1289 ;; 1290 -ose*) 1291 os=-ose 1292 ;; 1293 -es1800*) 1294 os=-ose 1295 ;; 777 1296 -xenix) 778 1297 os=-xenix 779 1298 ;; 1299 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1300 os=-mint 1301 ;; 1302 -aros*) 1303 os=-aros 1304 ;; 1305 -kaos*) 1306 os=-kaos 1307 ;; 1308 -zvmoe) 1309 os=-zvmoe 1310 ;; 780 1311 -none) 781 1312 ;; 782 1313 *) … … 802 1333 *-acorn) 803 1334 os=-riscix1.2 804 1335 ;; 1336 arm*-rebel) 1337 os=-linux 1338 ;; 805 1339 arm*-semi) 806 1340 os=-aout 807 1341 ;; 808 pdp11-*) 1342 c4x-* | tic4x-*) 1343 os=-coff 1344 ;; 1345 # This must come before the *-dec entry. 1346 pdp10-*) 1347 os=-tops20 1348 ;; 1349 pdp11-*) 809 1350 os=-none 810 1351 ;; 811 1352 *-dec | vax-*) … … 823 1364 # default. 824 1365 # os=-sunos4 825 1366 ;; 1367 m68*-cisco) 1368 os=-aout 1369 ;; 1370 mips*-cisco) 1371 os=-elf 1372 ;; 1373 mips*-*) 1374 os=-elf 1375 ;; 1376 or32-*) 1377 os=-coff 1378 ;; 826 1379 *-tti) # must be before sparc entry or we get the wrong os. 827 1380 os=-sysv3 828 1381 ;; 829 1382 sparc-* | *-sun) 830 1383 os=-sunos4.1.1 831 1384 ;; 1385 *-be) 1386 os=-beos 1387 ;; 832 1388 *-ibm) 833 1389 os=-aix 834 1390 ;; 1391 *-knuth) 1392 os=-mmixware 1393 ;; 1394 *-wec) 1395 os=-proelf 1396 ;; 1397 *-winbond) 1398 os=-proelf 1399 ;; 1400 *-oki) 1401 os=-proelf 1402 ;; 835 1403 *-hp) 836 1404 os=-hpux 837 1405 ;; … … 874 1442 *-next) 875 1443 os=-nextstep3 876 1444 ;; 877 *-gould)1445 *-gould) 878 1446 os=-sysv 879 1447 ;; 880 *-highlevel)1448 *-highlevel) 881 1449 os=-bsd 882 1450 ;; 883 1451 *-encore) 884 1452 os=-bsd 885 1453 ;; 886 *-sgi)1454 *-sgi) 887 1455 os=-irix 888 1456 ;; 889 *-siemens)1457 *-siemens) 890 1458 os=-sysv4 891 1459 ;; 892 1460 *-masscomp) 893 1461 os=-rtu 894 1462 ;; 895 f30 1-fujitsu)1463 f30[01]-fujitsu | f700-fujitsu) 896 1464 os=-uxpv 897 1465 ;; 1466 *-rom68k) 1467 os=-coff 1468 ;; 1469 *-*bug) 1470 os=-coff 1471 ;; 1472 *-apple) 1473 os=-macos 1474 ;; 1475 *-atari*) 1476 os=-mint 1477 ;; 898 1478 *) 899 1479 os=-none 900 1480 ;; … … 916 1496 -aix*) 917 1497 vendor=ibm 918 1498 ;; 1499 -beos*) 1500 vendor=be 1501 ;; 919 1502 -hpux*) 920 1503 vendor=hp 921 1504 ;; 1505 -mpeix*) 1506 vendor=hp 1507 ;; 922 1508 -hiux*) 923 1509 vendor=hitachi 924 1510 ;; … … 934 1520 -genix*) 935 1521 vendor=ns 936 1522 ;; 937 -mvs*) 1523 -mvs* | -opened*) 1524 vendor=ibm 1525 ;; 1526 -os400*) 938 1527 vendor=ibm 939 1528 ;; 940 1529 -ptx*) 941 1530 vendor=sequent 942 1531 ;; 943 -vxsim* | -vxworks*) 1532 -tpf*) 1533 vendor=ibm 1534 ;; 1535 -vxsim* | -vxworks* | -windiss*) 944 1536 vendor=wrs 945 1537 ;; 946 1538 -aux*) 947 1539 vendor=apple 948 1540 ;; 1541 -hms*) 1542 vendor=hitachi 1543 ;; 1544 -mpw* | -macos*) 1545 vendor=apple 1546 ;; 1547 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1548 vendor=atari 1549 ;; 1550 -vos*) 1551 vendor=stratus 1552 ;; 949 1553 esac 950 1554 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 951 1555 ;; 952 1556 esac 953 1557 954 1558 echo $basic_machine$os 1559 exit 0 1560 1561 # Local variables: 1562 # eval: (add-hook 'write-file-hooks 'time-stamp) 1563 # time-stamp-start: "timestamp='" 1564 # time-stamp-format: "%:y-%02m-%02d" 1565 # time-stamp-end: "'" 1566 # End:
Note:
See TracBrowser
for help on using the repository browser.
