annotate config.guess @ 0:33bf7ee17644

Initial import from some old code
author Adam Chlipala <adam@chlipala.net>
date Sat, 03 Mar 2012 14:59:04 -0500
parents
children
rev   line source
adam@0 1 #! /bin/sh
adam@0 2 # Attempt to guess a canonical system name.
adam@0 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
adam@0 4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
adam@0 5 # 2011 Free Software Foundation, Inc.
adam@0 6
adam@0 7 timestamp='2011-05-11'
adam@0 8
adam@0 9 # This file is free software; you can redistribute it and/or modify it
adam@0 10 # under the terms of the GNU General Public License as published by
adam@0 11 # the Free Software Foundation; either version 2 of the License, or
adam@0 12 # (at your option) any later version.
adam@0 13 #
adam@0 14 # This program is distributed in the hope that it will be useful, but
adam@0 15 # WITHOUT ANY WARRANTY; without even the implied warranty of
adam@0 16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
adam@0 17 # General Public License for more details.
adam@0 18 #
adam@0 19 # You should have received a copy of the GNU General Public License
adam@0 20 # along with this program; if not, write to the Free Software
adam@0 21 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
adam@0 22 # 02110-1301, USA.
adam@0 23 #
adam@0 24 # As a special exception to the GNU General Public License, if you
adam@0 25 # distribute this file as part of a program that contains a
adam@0 26 # configuration script generated by Autoconf, you may include it under
adam@0 27 # the same distribution terms that you use for the rest of that program.
adam@0 28
adam@0 29
adam@0 30 # Originally written by Per Bothner. Please send patches (context
adam@0 31 # diff format) to <config-patches@gnu.org> and include a ChangeLog
adam@0 32 # entry.
adam@0 33 #
adam@0 34 # This script attempts to guess a canonical system name similar to
adam@0 35 # config.sub. If it succeeds, it prints the system name on stdout, and
adam@0 36 # exits with 0. Otherwise, it exits with 1.
adam@0 37 #
adam@0 38 # You can get the latest version of this script from:
adam@0 39 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
adam@0 40
adam@0 41 me=`echo "$0" | sed -e 's,.*/,,'`
adam@0 42
adam@0 43 usage="\
adam@0 44 Usage: $0 [OPTION]
adam@0 45
adam@0 46 Output the configuration name of the system \`$me' is run on.
adam@0 47
adam@0 48 Operation modes:
adam@0 49 -h, --help print this help, then exit
adam@0 50 -t, --time-stamp print date of last modification, then exit
adam@0 51 -v, --version print version number, then exit
adam@0 52
adam@0 53 Report bugs and patches to <config-patches@gnu.org>."
adam@0 54
adam@0 55 version="\
adam@0 56 GNU config.guess ($timestamp)
adam@0 57
adam@0 58 Originally written by Per Bothner.
adam@0 59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
adam@0 60 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
adam@0 61 Software Foundation, Inc.
adam@0 62
adam@0 63 This is free software; see the source for copying conditions. There is NO
adam@0 64 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
adam@0 65
adam@0 66 help="
adam@0 67 Try \`$me --help' for more information."
adam@0 68
adam@0 69 # Parse command line
adam@0 70 while test $# -gt 0 ; do
adam@0 71 case $1 in
adam@0 72 --time-stamp | --time* | -t )
adam@0 73 echo "$timestamp" ; exit ;;
adam@0 74 --version | -v )
adam@0 75 echo "$version" ; exit ;;
adam@0 76 --help | --h* | -h )
adam@0 77 echo "$usage"; exit ;;
adam@0 78 -- ) # Stop option processing
adam@0 79 shift; break ;;
adam@0 80 - ) # Use stdin as input.
adam@0 81 break ;;
adam@0 82 -* )
adam@0 83 echo "$me: invalid option $1$help" >&2
adam@0 84 exit 1 ;;
adam@0 85 * )
adam@0 86 break ;;
adam@0 87 esac
adam@0 88 done
adam@0 89
adam@0 90 if test $# != 0; then
adam@0 91 echo "$me: too many arguments$help" >&2
adam@0 92 exit 1
adam@0 93 fi
adam@0 94
adam@0 95 trap 'exit 1' 1 2 15
adam@0 96
adam@0 97 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
adam@0 98 # compiler to aid in system detection is discouraged as it requires
adam@0 99 # temporary files to be created and, as you can see below, it is a
adam@0 100 # headache to deal with in a portable fashion.
adam@0 101
adam@0 102 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
adam@0 103 # use `HOST_CC' if defined, but it is deprecated.
adam@0 104
adam@0 105 # Portable tmp directory creation inspired by the Autoconf team.
adam@0 106
adam@0 107 set_cc_for_build='
adam@0 108 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
adam@0 109 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
adam@0 110 : ${TMPDIR=/tmp} ;
adam@0 111 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
adam@0 112 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
adam@0 113 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
adam@0 114 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
adam@0 115 dummy=$tmp/dummy ;
adam@0 116 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
adam@0 117 case $CC_FOR_BUILD,$HOST_CC,$CC in
adam@0 118 ,,) echo "int x;" > $dummy.c ;
adam@0 119 for c in cc gcc c89 c99 ; do
adam@0 120 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
adam@0 121 CC_FOR_BUILD="$c"; break ;
adam@0 122 fi ;
adam@0 123 done ;
adam@0 124 if test x"$CC_FOR_BUILD" = x ; then
adam@0 125 CC_FOR_BUILD=no_compiler_found ;
adam@0 126 fi
adam@0 127 ;;
adam@0 128 ,,*) CC_FOR_BUILD=$CC ;;
adam@0 129 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
adam@0 130 esac ; set_cc_for_build= ;'
adam@0 131
adam@0 132 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
adam@0 133 # (ghazi@noc.rutgers.edu 1994-08-24)
adam@0 134 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
adam@0 135 PATH=$PATH:/.attbin ; export PATH
adam@0 136 fi
adam@0 137
adam@0 138 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
adam@0 139 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
adam@0 140 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
adam@0 141 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
adam@0 142
adam@0 143 # Note: order is significant - the case branches are not exclusive.
adam@0 144
adam@0 145 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
adam@0 146 *:NetBSD:*:*)
adam@0 147 # NetBSD (nbsd) targets should (where applicable) match one or
adam@0 148 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
adam@0 149 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
adam@0 150 # switched to ELF, *-*-netbsd* would select the old
adam@0 151 # object file format. This provides both forward
adam@0 152 # compatibility and a consistent mechanism for selecting the
adam@0 153 # object file format.
adam@0 154 #
adam@0 155 # Note: NetBSD doesn't particularly care about the vendor
adam@0 156 # portion of the name. We always set it to "unknown".
adam@0 157 sysctl="sysctl -n hw.machine_arch"
adam@0 158 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
adam@0 159 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
adam@0 160 case "${UNAME_MACHINE_ARCH}" in
adam@0 161 armeb) machine=armeb-unknown ;;
adam@0 162 arm*) machine=arm-unknown ;;
adam@0 163 sh3el) machine=shl-unknown ;;
adam@0 164 sh3eb) machine=sh-unknown ;;
adam@0 165 sh5el) machine=sh5le-unknown ;;
adam@0 166 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
adam@0 167 esac
adam@0 168 # The Operating System including object format, if it has switched
adam@0 169 # to ELF recently, or will in the future.
adam@0 170 case "${UNAME_MACHINE_ARCH}" in
adam@0 171 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
adam@0 172 eval $set_cc_for_build
adam@0 173 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
adam@0 174 | grep -q __ELF__
adam@0 175 then
adam@0 176 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
adam@0 177 # Return netbsd for either. FIX?
adam@0 178 os=netbsd
adam@0 179 else
adam@0 180 os=netbsdelf
adam@0 181 fi
adam@0 182 ;;
adam@0 183 *)
adam@0 184 os=netbsd
adam@0 185 ;;
adam@0 186 esac
adam@0 187 # The OS release
adam@0 188 # Debian GNU/NetBSD machines have a different userland, and
adam@0 189 # thus, need a distinct triplet. However, they do not need
adam@0 190 # kernel version information, so it can be replaced with a
adam@0 191 # suitable tag, in the style of linux-gnu.
adam@0 192 case "${UNAME_VERSION}" in
adam@0 193 Debian*)
adam@0 194 release='-gnu'
adam@0 195 ;;
adam@0 196 *)
adam@0 197 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
adam@0 198 ;;
adam@0 199 esac
adam@0 200 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
adam@0 201 # contains redundant information, the shorter form:
adam@0 202 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
adam@0 203 echo "${machine}-${os}${release}"
adam@0 204 exit ;;
adam@0 205 *:OpenBSD:*:*)
adam@0 206 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
adam@0 207 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
adam@0 208 exit ;;
adam@0 209 *:ekkoBSD:*:*)
adam@0 210 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
adam@0 211 exit ;;
adam@0 212 *:SolidBSD:*:*)
adam@0 213 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
adam@0 214 exit ;;
adam@0 215 macppc:MirBSD:*:*)
adam@0 216 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
adam@0 217 exit ;;
adam@0 218 *:MirBSD:*:*)
adam@0 219 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
adam@0 220 exit ;;
adam@0 221 alpha:OSF1:*:*)
adam@0 222 case $UNAME_RELEASE in
adam@0 223 *4.0)
adam@0 224 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
adam@0 225 ;;
adam@0 226 *5.*)
adam@0 227 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
adam@0 228 ;;
adam@0 229 esac
adam@0 230 # According to Compaq, /usr/sbin/psrinfo has been available on
adam@0 231 # OSF/1 and Tru64 systems produced since 1995. I hope that
adam@0 232 # covers most systems running today. This code pipes the CPU
adam@0 233 # types through head -n 1, so we only detect the type of CPU 0.
adam@0 234 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
adam@0 235 case "$ALPHA_CPU_TYPE" in
adam@0 236 "EV4 (21064)")
adam@0 237 UNAME_MACHINE="alpha" ;;
adam@0 238 "EV4.5 (21064)")
adam@0 239 UNAME_MACHINE="alpha" ;;
adam@0 240 "LCA4 (21066/21068)")
adam@0 241 UNAME_MACHINE="alpha" ;;
adam@0 242 "EV5 (21164)")
adam@0 243 UNAME_MACHINE="alphaev5" ;;
adam@0 244 "EV5.6 (21164A)")
adam@0 245 UNAME_MACHINE="alphaev56" ;;
adam@0 246 "EV5.6 (21164PC)")
adam@0 247 UNAME_MACHINE="alphapca56" ;;
adam@0 248 "EV5.7 (21164PC)")
adam@0 249 UNAME_MACHINE="alphapca57" ;;
adam@0 250 "EV6 (21264)")
adam@0 251 UNAME_MACHINE="alphaev6" ;;
adam@0 252 "EV6.7 (21264A)")
adam@0 253 UNAME_MACHINE="alphaev67" ;;
adam@0 254 "EV6.8CB (21264C)")
adam@0 255 UNAME_MACHINE="alphaev68" ;;
adam@0 256 "EV6.8AL (21264B)")
adam@0 257 UNAME_MACHINE="alphaev68" ;;
adam@0 258 "EV6.8CX (21264D)")
adam@0 259 UNAME_MACHINE="alphaev68" ;;
adam@0 260 "EV6.9A (21264/EV69A)")
adam@0 261 UNAME_MACHINE="alphaev69" ;;
adam@0 262 "EV7 (21364)")
adam@0 263 UNAME_MACHINE="alphaev7" ;;
adam@0 264 "EV7.9 (21364A)")
adam@0 265 UNAME_MACHINE="alphaev79" ;;
adam@0 266 esac
adam@0 267 # A Pn.n version is a patched version.
adam@0 268 # A Vn.n version is a released version.
adam@0 269 # A Tn.n version is a released field test version.
adam@0 270 # A Xn.n version is an unreleased experimental baselevel.
adam@0 271 # 1.2 uses "1.2" for uname -r.
adam@0 272 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
adam@0 273 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
adam@0 274 exitcode=$?
adam@0 275 trap '' 0
adam@0 276 exit $exitcode ;;
adam@0 277 Alpha\ *:Windows_NT*:*)
adam@0 278 # How do we know it's Interix rather than the generic POSIX subsystem?
adam@0 279 # Should we change UNAME_MACHINE based on the output of uname instead
adam@0 280 # of the specific Alpha model?
adam@0 281 echo alpha-pc-interix
adam@0 282 exit ;;
adam@0 283 21064:Windows_NT:50:3)
adam@0 284 echo alpha-dec-winnt3.5
adam@0 285 exit ;;
adam@0 286 Amiga*:UNIX_System_V:4.0:*)
adam@0 287 echo m68k-unknown-sysv4
adam@0 288 exit ;;
adam@0 289 *:[Aa]miga[Oo][Ss]:*:*)
adam@0 290 echo ${UNAME_MACHINE}-unknown-amigaos
adam@0 291 exit ;;
adam@0 292 *:[Mm]orph[Oo][Ss]:*:*)
adam@0 293 echo ${UNAME_MACHINE}-unknown-morphos
adam@0 294 exit ;;
adam@0 295 *:OS/390:*:*)
adam@0 296 echo i370-ibm-openedition
adam@0 297 exit ;;
adam@0 298 *:z/VM:*:*)
adam@0 299 echo s390-ibm-zvmoe
adam@0 300 exit ;;
adam@0 301 *:OS400:*:*)
adam@0 302 echo powerpc-ibm-os400
adam@0 303 exit ;;
adam@0 304 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
adam@0 305 echo arm-acorn-riscix${UNAME_RELEASE}
adam@0 306 exit ;;
adam@0 307 arm:riscos:*:*|arm:RISCOS:*:*)
adam@0 308 echo arm-unknown-riscos
adam@0 309 exit ;;
adam@0 310 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
adam@0 311 echo hppa1.1-hitachi-hiuxmpp
adam@0 312 exit ;;
adam@0 313 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
adam@0 314 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
adam@0 315 if test "`(/bin/universe) 2>/dev/null`" = att ; then
adam@0 316 echo pyramid-pyramid-sysv3
adam@0 317 else
adam@0 318 echo pyramid-pyramid-bsd
adam@0 319 fi
adam@0 320 exit ;;
adam@0 321 NILE*:*:*:dcosx)
adam@0 322 echo pyramid-pyramid-svr4
adam@0 323 exit ;;
adam@0 324 DRS?6000:unix:4.0:6*)
adam@0 325 echo sparc-icl-nx6
adam@0 326 exit ;;
adam@0 327 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
adam@0 328 case `/usr/bin/uname -p` in
adam@0 329 sparc) echo sparc-icl-nx7; exit ;;
adam@0 330 esac ;;
adam@0 331 s390x:SunOS:*:*)
adam@0 332 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
adam@0 333 exit ;;
adam@0 334 sun4H:SunOS:5.*:*)
adam@0 335 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
adam@0 336 exit ;;
adam@0 337 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
adam@0 338 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
adam@0 339 exit ;;
adam@0 340 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
adam@0 341 echo i386-pc-auroraux${UNAME_RELEASE}
adam@0 342 exit ;;
adam@0 343 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
adam@0 344 eval $set_cc_for_build
adam@0 345 SUN_ARCH="i386"
adam@0 346 # If there is a compiler, see if it is configured for 64-bit objects.
adam@0 347 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
adam@0 348 # This test works for both compilers.
adam@0 349 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
adam@0 350 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
adam@0 351 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
adam@0 352 grep IS_64BIT_ARCH >/dev/null
adam@0 353 then
adam@0 354 SUN_ARCH="x86_64"
adam@0 355 fi
adam@0 356 fi
adam@0 357 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
adam@0 358 exit ;;
adam@0 359 sun4*:SunOS:6*:*)
adam@0 360 # According to config.sub, this is the proper way to canonicalize
adam@0 361 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
adam@0 362 # it's likely to be more like Solaris than SunOS4.
adam@0 363 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
adam@0 364 exit ;;
adam@0 365 sun4*:SunOS:*:*)
adam@0 366 case "`/usr/bin/arch -k`" in
adam@0 367 Series*|S4*)
adam@0 368 UNAME_RELEASE=`uname -v`
adam@0 369 ;;
adam@0 370 esac
adam@0 371 # Japanese Language versions have a version number like `4.1.3-JL'.
adam@0 372 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
adam@0 373 exit ;;
adam@0 374 sun3*:SunOS:*:*)
adam@0 375 echo m68k-sun-sunos${UNAME_RELEASE}
adam@0 376 exit ;;
adam@0 377 sun*:*:4.2BSD:*)
adam@0 378 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
adam@0 379 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
adam@0 380 case "`/bin/arch`" in
adam@0 381 sun3)
adam@0 382 echo m68k-sun-sunos${UNAME_RELEASE}
adam@0 383 ;;
adam@0 384 sun4)
adam@0 385 echo sparc-sun-sunos${UNAME_RELEASE}
adam@0 386 ;;
adam@0 387 esac
adam@0 388 exit ;;
adam@0 389 aushp:SunOS:*:*)
adam@0 390 echo sparc-auspex-sunos${UNAME_RELEASE}
adam@0 391 exit ;;
adam@0 392 # The situation for MiNT is a little confusing. The machine name
adam@0 393 # can be virtually everything (everything which is not
adam@0 394 # "atarist" or "atariste" at least should have a processor
adam@0 395 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
adam@0 396 # to the lowercase version "mint" (or "freemint"). Finally
adam@0 397 # the system name "TOS" denotes a system which is actually not
adam@0 398 # MiNT. But MiNT is downward compatible to TOS, so this should
adam@0 399 # be no problem.
adam@0 400 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
adam@0 401 echo m68k-atari-mint${UNAME_RELEASE}
adam@0 402 exit ;;
adam@0 403 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
adam@0 404 echo m68k-atari-mint${UNAME_RELEASE}
adam@0 405 exit ;;
adam@0 406 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
adam@0 407 echo m68k-atari-mint${UNAME_RELEASE}
adam@0 408 exit ;;
adam@0 409 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
adam@0 410 echo m68k-milan-mint${UNAME_RELEASE}
adam@0 411 exit ;;
adam@0 412 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
adam@0 413 echo m68k-hades-mint${UNAME_RELEASE}
adam@0 414 exit ;;
adam@0 415 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
adam@0 416 echo m68k-unknown-mint${UNAME_RELEASE}
adam@0 417 exit ;;
adam@0 418 m68k:machten:*:*)
adam@0 419 echo m68k-apple-machten${UNAME_RELEASE}
adam@0 420 exit ;;
adam@0 421 powerpc:machten:*:*)
adam@0 422 echo powerpc-apple-machten${UNAME_RELEASE}
adam@0 423 exit ;;
adam@0 424 RISC*:Mach:*:*)
adam@0 425 echo mips-dec-mach_bsd4.3
adam@0 426 exit ;;
adam@0 427 RISC*:ULTRIX:*:*)
adam@0 428 echo mips-dec-ultrix${UNAME_RELEASE}
adam@0 429 exit ;;
adam@0 430 VAX*:ULTRIX*:*:*)
adam@0 431 echo vax-dec-ultrix${UNAME_RELEASE}
adam@0 432 exit ;;
adam@0 433 2020:CLIX:*:* | 2430:CLIX:*:*)
adam@0 434 echo clipper-intergraph-clix${UNAME_RELEASE}
adam@0 435 exit ;;
adam@0 436 mips:*:*:UMIPS | mips:*:*:RISCos)
adam@0 437 eval $set_cc_for_build
adam@0 438 sed 's/^ //' << EOF >$dummy.c
adam@0 439 #ifdef __cplusplus
adam@0 440 #include <stdio.h> /* for printf() prototype */
adam@0 441 int main (int argc, char *argv[]) {
adam@0 442 #else
adam@0 443 int main (argc, argv) int argc; char *argv[]; {
adam@0 444 #endif
adam@0 445 #if defined (host_mips) && defined (MIPSEB)
adam@0 446 #if defined (SYSTYPE_SYSV)
adam@0 447 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
adam@0 448 #endif
adam@0 449 #if defined (SYSTYPE_SVR4)
adam@0 450 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
adam@0 451 #endif
adam@0 452 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
adam@0 453 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
adam@0 454 #endif
adam@0 455 #endif
adam@0 456 exit (-1);
adam@0 457 }
adam@0 458 EOF
adam@0 459 $CC_FOR_BUILD -o $dummy $dummy.c &&
adam@0 460 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
adam@0 461 SYSTEM_NAME=`$dummy $dummyarg` &&
adam@0 462 { echo "$SYSTEM_NAME"; exit; }
adam@0 463 echo mips-mips-riscos${UNAME_RELEASE}
adam@0 464 exit ;;
adam@0 465 Motorola:PowerMAX_OS:*:*)
adam@0 466 echo powerpc-motorola-powermax
adam@0 467 exit ;;
adam@0 468 Motorola:*:4.3:PL8-*)
adam@0 469 echo powerpc-harris-powermax
adam@0 470 exit ;;
adam@0 471 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
adam@0 472 echo powerpc-harris-powermax
adam@0 473 exit ;;
adam@0 474 Night_Hawk:Power_UNIX:*:*)
adam@0 475 echo powerpc-harris-powerunix
adam@0 476 exit ;;
adam@0 477 m88k:CX/UX:7*:*)
adam@0 478 echo m88k-harris-cxux7
adam@0 479 exit ;;
adam@0 480 m88k:*:4*:R4*)
adam@0 481 echo m88k-motorola-sysv4
adam@0 482 exit ;;
adam@0 483 m88k:*:3*:R3*)
adam@0 484 echo m88k-motorola-sysv3
adam@0 485 exit ;;
adam@0 486 AViiON:dgux:*:*)
adam@0 487 # DG/UX returns AViiON for all architectures
adam@0 488 UNAME_PROCESSOR=`/usr/bin/uname -p`
adam@0 489 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
adam@0 490 then
adam@0 491 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
adam@0 492 [ ${TARGET_BINARY_INTERFACE}x = x ]
adam@0 493 then
adam@0 494 echo m88k-dg-dgux${UNAME_RELEASE}
adam@0 495 else
adam@0 496 echo m88k-dg-dguxbcs${UNAME_RELEASE}
adam@0 497 fi
adam@0 498 else
adam@0 499 echo i586-dg-dgux${UNAME_RELEASE}
adam@0 500 fi
adam@0 501 exit ;;
adam@0 502 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
adam@0 503 echo m88k-dolphin-sysv3
adam@0 504 exit ;;
adam@0 505 M88*:*:R3*:*)
adam@0 506 # Delta 88k system running SVR3
adam@0 507 echo m88k-motorola-sysv3
adam@0 508 exit ;;
adam@0 509 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
adam@0 510 echo m88k-tektronix-sysv3
adam@0 511 exit ;;
adam@0 512 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
adam@0 513 echo m68k-tektronix-bsd
adam@0 514 exit ;;
adam@0 515 *:IRIX*:*:*)
adam@0 516 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
adam@0 517 exit ;;
adam@0 518 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
adam@0 519 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
adam@0 520 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
adam@0 521 i*86:AIX:*:*)
adam@0 522 echo i386-ibm-aix
adam@0 523 exit ;;
adam@0 524 ia64:AIX:*:*)
adam@0 525 if [ -x /usr/bin/oslevel ] ; then
adam@0 526 IBM_REV=`/usr/bin/oslevel`
adam@0 527 else
adam@0 528 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
adam@0 529 fi
adam@0 530 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
adam@0 531 exit ;;
adam@0 532 *:AIX:2:3)
adam@0 533 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
adam@0 534 eval $set_cc_for_build
adam@0 535 sed 's/^ //' << EOF >$dummy.c
adam@0 536 #include <sys/systemcfg.h>
adam@0 537
adam@0 538 main()
adam@0 539 {
adam@0 540 if (!__power_pc())
adam@0 541 exit(1);
adam@0 542 puts("powerpc-ibm-aix3.2.5");
adam@0 543 exit(0);
adam@0 544 }
adam@0 545 EOF
adam@0 546 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
adam@0 547 then
adam@0 548 echo "$SYSTEM_NAME"
adam@0 549 else
adam@0 550 echo rs6000-ibm-aix3.2.5
adam@0 551 fi
adam@0 552 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
adam@0 553 echo rs6000-ibm-aix3.2.4
adam@0 554 else
adam@0 555 echo rs6000-ibm-aix3.2
adam@0 556 fi
adam@0 557 exit ;;
adam@0 558 *:AIX:*:[4567])
adam@0 559 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
adam@0 560 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
adam@0 561 IBM_ARCH=rs6000
adam@0 562 else
adam@0 563 IBM_ARCH=powerpc
adam@0 564 fi
adam@0 565 if [ -x /usr/bin/oslevel ] ; then
adam@0 566 IBM_REV=`/usr/bin/oslevel`
adam@0 567 else
adam@0 568 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
adam@0 569 fi
adam@0 570 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
adam@0 571 exit ;;
adam@0 572 *:AIX:*:*)
adam@0 573 echo rs6000-ibm-aix
adam@0 574 exit ;;
adam@0 575 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
adam@0 576 echo romp-ibm-bsd4.4
adam@0 577 exit ;;
adam@0 578 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
adam@0 579 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
adam@0 580 exit ;; # report: romp-ibm BSD 4.3
adam@0 581 *:BOSX:*:*)
adam@0 582 echo rs6000-bull-bosx
adam@0 583 exit ;;
adam@0 584 DPX/2?00:B.O.S.:*:*)
adam@0 585 echo m68k-bull-sysv3
adam@0 586 exit ;;
adam@0 587 9000/[34]??:4.3bsd:1.*:*)
adam@0 588 echo m68k-hp-bsd
adam@0 589 exit ;;
adam@0 590 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
adam@0 591 echo m68k-hp-bsd4.4
adam@0 592 exit ;;
adam@0 593 9000/[34678]??:HP-UX:*:*)
adam@0 594 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
adam@0 595 case "${UNAME_MACHINE}" in
adam@0 596 9000/31? ) HP_ARCH=m68000 ;;
adam@0 597 9000/[34]?? ) HP_ARCH=m68k ;;
adam@0 598 9000/[678][0-9][0-9])
adam@0 599 if [ -x /usr/bin/getconf ]; then
adam@0 600 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
adam@0 601 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
adam@0 602 case "${sc_cpu_version}" in
adam@0 603 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
adam@0 604 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
adam@0 605 532) # CPU_PA_RISC2_0
adam@0 606 case "${sc_kernel_bits}" in
adam@0 607 32) HP_ARCH="hppa2.0n" ;;
adam@0 608 64) HP_ARCH="hppa2.0w" ;;
adam@0 609 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
adam@0 610 esac ;;
adam@0 611 esac
adam@0 612 fi
adam@0 613 if [ "${HP_ARCH}" = "" ]; then
adam@0 614 eval $set_cc_for_build
adam@0 615 sed 's/^ //' << EOF >$dummy.c
adam@0 616
adam@0 617 #define _HPUX_SOURCE
adam@0 618 #include <stdlib.h>
adam@0 619 #include <unistd.h>
adam@0 620
adam@0 621 int main ()
adam@0 622 {
adam@0 623 #if defined(_SC_KERNEL_BITS)
adam@0 624 long bits = sysconf(_SC_KERNEL_BITS);
adam@0 625 #endif
adam@0 626 long cpu = sysconf (_SC_CPU_VERSION);
adam@0 627
adam@0 628 switch (cpu)
adam@0 629 {
adam@0 630 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
adam@0 631 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
adam@0 632 case CPU_PA_RISC2_0:
adam@0 633 #if defined(_SC_KERNEL_BITS)
adam@0 634 switch (bits)
adam@0 635 {
adam@0 636 case 64: puts ("hppa2.0w"); break;
adam@0 637 case 32: puts ("hppa2.0n"); break;
adam@0 638 default: puts ("hppa2.0"); break;
adam@0 639 } break;
adam@0 640 #else /* !defined(_SC_KERNEL_BITS) */
adam@0 641 puts ("hppa2.0"); break;
adam@0 642 #endif
adam@0 643 default: puts ("hppa1.0"); break;
adam@0 644 }
adam@0 645 exit (0);
adam@0 646 }
adam@0 647 EOF
adam@0 648 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
adam@0 649 test -z "$HP_ARCH" && HP_ARCH=hppa
adam@0 650 fi ;;
adam@0 651 esac
adam@0 652 if [ ${HP_ARCH} = "hppa2.0w" ]
adam@0 653 then
adam@0 654 eval $set_cc_for_build
adam@0 655
adam@0 656 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
adam@0 657 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
adam@0 658 # generating 64-bit code. GNU and HP use different nomenclature:
adam@0 659 #
adam@0 660 # $ CC_FOR_BUILD=cc ./config.guess
adam@0 661 # => hppa2.0w-hp-hpux11.23
adam@0 662 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
adam@0 663 # => hppa64-hp-hpux11.23
adam@0 664
adam@0 665 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
adam@0 666 grep -q __LP64__
adam@0 667 then
adam@0 668 HP_ARCH="hppa2.0w"
adam@0 669 else
adam@0 670 HP_ARCH="hppa64"
adam@0 671 fi
adam@0 672 fi
adam@0 673 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
adam@0 674 exit ;;
adam@0 675 ia64:HP-UX:*:*)
adam@0 676 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
adam@0 677 echo ia64-hp-hpux${HPUX_REV}
adam@0 678 exit ;;
adam@0 679 3050*:HI-UX:*:*)
adam@0 680 eval $set_cc_for_build
adam@0 681 sed 's/^ //' << EOF >$dummy.c
adam@0 682 #include <unistd.h>
adam@0 683 int
adam@0 684 main ()
adam@0 685 {
adam@0 686 long cpu = sysconf (_SC_CPU_VERSION);
adam@0 687 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
adam@0 688 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
adam@0 689 results, however. */
adam@0 690 if (CPU_IS_PA_RISC (cpu))
adam@0 691 {
adam@0 692 switch (cpu)
adam@0 693 {
adam@0 694 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
adam@0 695 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
adam@0 696 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
adam@0 697 default: puts ("hppa-hitachi-hiuxwe2"); break;
adam@0 698 }
adam@0 699 }
adam@0 700 else if (CPU_IS_HP_MC68K (cpu))
adam@0 701 puts ("m68k-hitachi-hiuxwe2");
adam@0 702 else puts ("unknown-hitachi-hiuxwe2");
adam@0 703 exit (0);
adam@0 704 }
adam@0 705 EOF
adam@0 706 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
adam@0 707 { echo "$SYSTEM_NAME"; exit; }
adam@0 708 echo unknown-hitachi-hiuxwe2
adam@0 709 exit ;;
adam@0 710 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
adam@0 711 echo hppa1.1-hp-bsd
adam@0 712 exit ;;
adam@0 713 9000/8??:4.3bsd:*:*)
adam@0 714 echo hppa1.0-hp-bsd
adam@0 715 exit ;;
adam@0 716 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
adam@0 717 echo hppa1.0-hp-mpeix
adam@0 718 exit ;;
adam@0 719 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
adam@0 720 echo hppa1.1-hp-osf
adam@0 721 exit ;;
adam@0 722 hp8??:OSF1:*:*)
adam@0 723 echo hppa1.0-hp-osf
adam@0 724 exit ;;
adam@0 725 i*86:OSF1:*:*)
adam@0 726 if [ -x /usr/sbin/sysversion ] ; then
adam@0 727 echo ${UNAME_MACHINE}-unknown-osf1mk
adam@0 728 else
adam@0 729 echo ${UNAME_MACHINE}-unknown-osf1
adam@0 730 fi
adam@0 731 exit ;;
adam@0 732 parisc*:Lites*:*:*)
adam@0 733 echo hppa1.1-hp-lites
adam@0 734 exit ;;
adam@0 735 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
adam@0 736 echo c1-convex-bsd
adam@0 737 exit ;;
adam@0 738 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
adam@0 739 if getsysinfo -f scalar_acc
adam@0 740 then echo c32-convex-bsd
adam@0 741 else echo c2-convex-bsd
adam@0 742 fi
adam@0 743 exit ;;
adam@0 744 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
adam@0 745 echo c34-convex-bsd
adam@0 746 exit ;;
adam@0 747 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
adam@0 748 echo c38-convex-bsd
adam@0 749 exit ;;
adam@0 750 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
adam@0 751 echo c4-convex-bsd
adam@0 752 exit ;;
adam@0 753 CRAY*Y-MP:*:*:*)
adam@0 754 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
adam@0 755 exit ;;
adam@0 756 CRAY*[A-Z]90:*:*:*)
adam@0 757 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
adam@0 758 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
adam@0 759 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
adam@0 760 -e 's/\.[^.]*$/.X/'
adam@0 761 exit ;;
adam@0 762 CRAY*TS:*:*:*)
adam@0 763 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
adam@0 764 exit ;;
adam@0 765 CRAY*T3E:*:*:*)
adam@0 766 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
adam@0 767 exit ;;
adam@0 768 CRAY*SV1:*:*:*)
adam@0 769 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
adam@0 770 exit ;;
adam@0 771 *:UNICOS/mp:*:*)
adam@0 772 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
adam@0 773 exit ;;
adam@0 774 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
adam@0 775 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
adam@0 776 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
adam@0 777 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
adam@0 778 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
adam@0 779 exit ;;
adam@0 780 5000:UNIX_System_V:4.*:*)
adam@0 781 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
adam@0 782 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
adam@0 783 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
adam@0 784 exit ;;
adam@0 785 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
adam@0 786 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
adam@0 787 exit ;;
adam@0 788 sparc*:BSD/OS:*:*)
adam@0 789 echo sparc-unknown-bsdi${UNAME_RELEASE}
adam@0 790 exit ;;
adam@0 791 *:BSD/OS:*:*)
adam@0 792 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
adam@0 793 exit ;;
adam@0 794 *:FreeBSD:*:*)
adam@0 795 case ${UNAME_MACHINE} in
adam@0 796 pc98)
adam@0 797 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
adam@0 798 amd64)
adam@0 799 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
adam@0 800 *)
adam@0 801 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
adam@0 802 esac
adam@0 803 exit ;;
adam@0 804 i*:CYGWIN*:*)
adam@0 805 echo ${UNAME_MACHINE}-pc-cygwin
adam@0 806 exit ;;
adam@0 807 *:MINGW*:*)
adam@0 808 echo ${UNAME_MACHINE}-pc-mingw32
adam@0 809 exit ;;
adam@0 810 i*:windows32*:*)
adam@0 811 # uname -m includes "-pc" on this system.
adam@0 812 echo ${UNAME_MACHINE}-mingw32
adam@0 813 exit ;;
adam@0 814 i*:PW*:*)
adam@0 815 echo ${UNAME_MACHINE}-pc-pw32
adam@0 816 exit ;;
adam@0 817 *:Interix*:*)
adam@0 818 case ${UNAME_MACHINE} in
adam@0 819 x86)
adam@0 820 echo i586-pc-interix${UNAME_RELEASE}
adam@0 821 exit ;;
adam@0 822 authenticamd | genuineintel | EM64T)
adam@0 823 echo x86_64-unknown-interix${UNAME_RELEASE}
adam@0 824 exit ;;
adam@0 825 IA64)
adam@0 826 echo ia64-unknown-interix${UNAME_RELEASE}
adam@0 827 exit ;;
adam@0 828 esac ;;
adam@0 829 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
adam@0 830 echo i${UNAME_MACHINE}-pc-mks
adam@0 831 exit ;;
adam@0 832 8664:Windows_NT:*)
adam@0 833 echo x86_64-pc-mks
adam@0 834 exit ;;
adam@0 835 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
adam@0 836 # How do we know it's Interix rather than the generic POSIX subsystem?
adam@0 837 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
adam@0 838 # UNAME_MACHINE based on the output of uname instead of i386?
adam@0 839 echo i586-pc-interix
adam@0 840 exit ;;
adam@0 841 i*:UWIN*:*)
adam@0 842 echo ${UNAME_MACHINE}-pc-uwin
adam@0 843 exit ;;
adam@0 844 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
adam@0 845 echo x86_64-unknown-cygwin
adam@0 846 exit ;;
adam@0 847 p*:CYGWIN*:*)
adam@0 848 echo powerpcle-unknown-cygwin
adam@0 849 exit ;;
adam@0 850 prep*:SunOS:5.*:*)
adam@0 851 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
adam@0 852 exit ;;
adam@0 853 *:GNU:*:*)
adam@0 854 # the GNU system
adam@0 855 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
adam@0 856 exit ;;
adam@0 857 *:GNU/*:*:*)
adam@0 858 # other systems with GNU libc and userland
adam@0 859 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
adam@0 860 exit ;;
adam@0 861 i*86:Minix:*:*)
adam@0 862 echo ${UNAME_MACHINE}-pc-minix
adam@0 863 exit ;;
adam@0 864 alpha:Linux:*:*)
adam@0 865 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
adam@0 866 EV5) UNAME_MACHINE=alphaev5 ;;
adam@0 867 EV56) UNAME_MACHINE=alphaev56 ;;
adam@0 868 PCA56) UNAME_MACHINE=alphapca56 ;;
adam@0 869 PCA57) UNAME_MACHINE=alphapca56 ;;
adam@0 870 EV6) UNAME_MACHINE=alphaev6 ;;
adam@0 871 EV67) UNAME_MACHINE=alphaev67 ;;
adam@0 872 EV68*) UNAME_MACHINE=alphaev68 ;;
adam@0 873 esac
adam@0 874 objdump --private-headers /bin/sh | grep -q ld.so.1
adam@0 875 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
adam@0 876 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
adam@0 877 exit ;;
adam@0 878 arm*:Linux:*:*)
adam@0 879 eval $set_cc_for_build
adam@0 880 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
adam@0 881 | grep -q __ARM_EABI__
adam@0 882 then
adam@0 883 echo ${UNAME_MACHINE}-unknown-linux-gnu
adam@0 884 else
adam@0 885 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
adam@0 886 | grep -q __ARM_PCS_VFP
adam@0 887 then
adam@0 888 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
adam@0 889 else
adam@0 890 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
adam@0 891 fi
adam@0 892 fi
adam@0 893 exit ;;
adam@0 894 avr32*:Linux:*:*)
adam@0 895 echo ${UNAME_MACHINE}-unknown-linux-gnu
adam@0 896 exit ;;
adam@0 897 cris:Linux:*:*)
adam@0 898 echo cris-axis-linux-gnu
adam@0 899 exit ;;
adam@0 900 crisv32:Linux:*:*)
adam@0 901 echo crisv32-axis-linux-gnu
adam@0 902 exit ;;
adam@0 903 frv:Linux:*:*)
adam@0 904 echo frv-unknown-linux-gnu
adam@0 905 exit ;;
adam@0 906 i*86:Linux:*:*)
adam@0 907 LIBC=gnu
adam@0 908 eval $set_cc_for_build
adam@0 909 sed 's/^ //' << EOF >$dummy.c
adam@0 910 #ifdef __dietlibc__
adam@0 911 LIBC=dietlibc
adam@0 912 #endif
adam@0 913 EOF
adam@0 914 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
adam@0 915 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
adam@0 916 exit ;;
adam@0 917 ia64:Linux:*:*)
adam@0 918 echo ${UNAME_MACHINE}-unknown-linux-gnu
adam@0 919 exit ;;
adam@0 920 m32r*:Linux:*:*)
adam@0 921 echo ${UNAME_MACHINE}-unknown-linux-gnu
adam@0 922 exit ;;
adam@0 923 m68*:Linux:*:*)
adam@0 924 echo ${UNAME_MACHINE}-unknown-linux-gnu
adam@0 925 exit ;;
adam@0 926 mips:Linux:*:* | mips64:Linux:*:*)
adam@0 927 eval $set_cc_for_build
adam@0 928 sed 's/^ //' << EOF >$dummy.c
adam@0 929 #undef CPU
adam@0 930 #undef ${UNAME_MACHINE}
adam@0 931 #undef ${UNAME_MACHINE}el
adam@0 932 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
adam@0 933 CPU=${UNAME_MACHINE}el
adam@0 934 #else
adam@0 935 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
adam@0 936 CPU=${UNAME_MACHINE}
adam@0 937 #else
adam@0 938 CPU=
adam@0 939 #endif
adam@0 940 #endif
adam@0 941 EOF
adam@0 942 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
adam@0 943 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
adam@0 944 ;;
adam@0 945 or32:Linux:*:*)
adam@0 946 echo or32-unknown-linux-gnu
adam@0 947 exit ;;
adam@0 948 padre:Linux:*:*)
adam@0 949 echo sparc-unknown-linux-gnu
adam@0 950 exit ;;
adam@0 951 parisc64:Linux:*:* | hppa64:Linux:*:*)
adam@0 952 echo hppa64-unknown-linux-gnu
adam@0 953 exit ;;
adam@0 954 parisc:Linux:*:* | hppa:Linux:*:*)
adam@0 955 # Look for CPU level
adam@0 956 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
adam@0 957 PA7*) echo hppa1.1-unknown-linux-gnu ;;
adam@0 958 PA8*) echo hppa2.0-unknown-linux-gnu ;;
adam@0 959 *) echo hppa-unknown-linux-gnu ;;
adam@0 960 esac
adam@0 961 exit ;;
adam@0 962 ppc64:Linux:*:*)
adam@0 963 echo powerpc64-unknown-linux-gnu
adam@0 964 exit ;;
adam@0 965 ppc:Linux:*:*)
adam@0 966 echo powerpc-unknown-linux-gnu
adam@0 967 exit ;;
adam@0 968 s390:Linux:*:* | s390x:Linux:*:*)
adam@0 969 echo ${UNAME_MACHINE}-ibm-linux
adam@0 970 exit ;;
adam@0 971 sh64*:Linux:*:*)
adam@0 972 echo ${UNAME_MACHINE}-unknown-linux-gnu
adam@0 973 exit ;;
adam@0 974 sh*:Linux:*:*)
adam@0 975 echo ${UNAME_MACHINE}-unknown-linux-gnu
adam@0 976 exit ;;
adam@0 977 sparc:Linux:*:* | sparc64:Linux:*:*)
adam@0 978 echo ${UNAME_MACHINE}-unknown-linux-gnu
adam@0 979 exit ;;
adam@0 980 tile*:Linux:*:*)
adam@0 981 echo ${UNAME_MACHINE}-tilera-linux-gnu
adam@0 982 exit ;;
adam@0 983 vax:Linux:*:*)
adam@0 984 echo ${UNAME_MACHINE}-dec-linux-gnu
adam@0 985 exit ;;
adam@0 986 x86_64:Linux:*:*)
adam@0 987 echo x86_64-unknown-linux-gnu
adam@0 988 exit ;;
adam@0 989 xtensa*:Linux:*:*)
adam@0 990 echo ${UNAME_MACHINE}-unknown-linux-gnu
adam@0 991 exit ;;
adam@0 992 i*86:DYNIX/ptx:4*:*)
adam@0 993 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
adam@0 994 # earlier versions are messed up and put the nodename in both
adam@0 995 # sysname and nodename.
adam@0 996 echo i386-sequent-sysv4
adam@0 997 exit ;;
adam@0 998 i*86:UNIX_SV:4.2MP:2.*)
adam@0 999 # Unixware is an offshoot of SVR4, but it has its own version
adam@0 1000 # number series starting with 2...
adam@0 1001 # I am not positive that other SVR4 systems won't match this,
adam@0 1002 # I just have to hope. -- rms.
adam@0 1003 # Use sysv4.2uw... so that sysv4* matches it.
adam@0 1004 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
adam@0 1005 exit ;;
adam@0 1006 i*86:OS/2:*:*)
adam@0 1007 # If we were able to find `uname', then EMX Unix compatibility
adam@0 1008 # is probably installed.
adam@0 1009 echo ${UNAME_MACHINE}-pc-os2-emx
adam@0 1010 exit ;;
adam@0 1011 i*86:XTS-300:*:STOP)
adam@0 1012 echo ${UNAME_MACHINE}-unknown-stop
adam@0 1013 exit ;;
adam@0 1014 i*86:atheos:*:*)
adam@0 1015 echo ${UNAME_MACHINE}-unknown-atheos
adam@0 1016 exit ;;
adam@0 1017 i*86:syllable:*:*)
adam@0 1018 echo ${UNAME_MACHINE}-pc-syllable
adam@0 1019 exit ;;
adam@0 1020 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
adam@0 1021 echo i386-unknown-lynxos${UNAME_RELEASE}
adam@0 1022 exit ;;
adam@0 1023 i*86:*DOS:*:*)
adam@0 1024 echo ${UNAME_MACHINE}-pc-msdosdjgpp
adam@0 1025 exit ;;
adam@0 1026 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
adam@0 1027 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
adam@0 1028 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
adam@0 1029 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
adam@0 1030 else
adam@0 1031 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
adam@0 1032 fi
adam@0 1033 exit ;;
adam@0 1034 i*86:*:5:[678]*)
adam@0 1035 # UnixWare 7.x, OpenUNIX and OpenServer 6.
adam@0 1036 case `/bin/uname -X | grep "^Machine"` in
adam@0 1037 *486*) UNAME_MACHINE=i486 ;;
adam@0 1038 *Pentium) UNAME_MACHINE=i586 ;;
adam@0 1039 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
adam@0 1040 esac
adam@0 1041 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
adam@0 1042 exit ;;
adam@0 1043 i*86:*:3.2:*)
adam@0 1044 if test -f /usr/options/cb.name; then
adam@0 1045 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
adam@0 1046 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
adam@0 1047 elif /bin/uname -X 2>/dev/null >/dev/null ; then
adam@0 1048 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
adam@0 1049 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
adam@0 1050 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
adam@0 1051 && UNAME_MACHINE=i586
adam@0 1052 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
adam@0 1053 && UNAME_MACHINE=i686
adam@0 1054 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
adam@0 1055 && UNAME_MACHINE=i686
adam@0 1056 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
adam@0 1057 else
adam@0 1058 echo ${UNAME_MACHINE}-pc-sysv32
adam@0 1059 fi
adam@0 1060 exit ;;
adam@0 1061 pc:*:*:*)
adam@0 1062 # Left here for compatibility:
adam@0 1063 # uname -m prints for DJGPP always 'pc', but it prints nothing about
adam@0 1064 # the processor, so we play safe by assuming i586.
adam@0 1065 # Note: whatever this is, it MUST be the same as what config.sub
adam@0 1066 # prints for the "djgpp" host, or else GDB configury will decide that
adam@0 1067 # this is a cross-build.
adam@0 1068 echo i586-pc-msdosdjgpp
adam@0 1069 exit ;;
adam@0 1070 Intel:Mach:3*:*)
adam@0 1071 echo i386-pc-mach3
adam@0 1072 exit ;;
adam@0 1073 paragon:*:*:*)
adam@0 1074 echo i860-intel-osf1
adam@0 1075 exit ;;
adam@0 1076 i860:*:4.*:*) # i860-SVR4
adam@0 1077 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
adam@0 1078 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
adam@0 1079 else # Add other i860-SVR4 vendors below as they are discovered.
adam@0 1080 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
adam@0 1081 fi
adam@0 1082 exit ;;
adam@0 1083 mini*:CTIX:SYS*5:*)
adam@0 1084 # "miniframe"
adam@0 1085 echo m68010-convergent-sysv
adam@0 1086 exit ;;
adam@0 1087 mc68k:UNIX:SYSTEM5:3.51m)
adam@0 1088 echo m68k-convergent-sysv
adam@0 1089 exit ;;
adam@0 1090 M680?0:D-NIX:5.3:*)
adam@0 1091 echo m68k-diab-dnix
adam@0 1092 exit ;;
adam@0 1093 M68*:*:R3V[5678]*:*)
adam@0 1094 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
adam@0 1095 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)
adam@0 1096 OS_REL=''
adam@0 1097 test -r /etc/.relid \
adam@0 1098 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
adam@0 1099 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
adam@0 1100 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
adam@0 1101 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
adam@0 1102 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
adam@0 1103 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
adam@0 1104 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
adam@0 1105 && { echo i486-ncr-sysv4; exit; } ;;
adam@0 1106 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
adam@0 1107 OS_REL='.3'
adam@0 1108 test -r /etc/.relid \
adam@0 1109 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
adam@0 1110 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
adam@0 1111 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
adam@0 1112 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
adam@0 1113 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
adam@0 1114 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
adam@0 1115 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
adam@0 1116 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
adam@0 1117 echo m68k-unknown-lynxos${UNAME_RELEASE}
adam@0 1118 exit ;;
adam@0 1119 mc68030:UNIX_System_V:4.*:*)
adam@0 1120 echo m68k-atari-sysv4
adam@0 1121 exit ;;
adam@0 1122 TSUNAMI:LynxOS:2.*:*)
adam@0 1123 echo sparc-unknown-lynxos${UNAME_RELEASE}
adam@0 1124 exit ;;
adam@0 1125 rs6000:LynxOS:2.*:*)
adam@0 1126 echo rs6000-unknown-lynxos${UNAME_RELEASE}
adam@0 1127 exit ;;
adam@0 1128 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
adam@0 1129 echo powerpc-unknown-lynxos${UNAME_RELEASE}
adam@0 1130 exit ;;
adam@0 1131 SM[BE]S:UNIX_SV:*:*)
adam@0 1132 echo mips-dde-sysv${UNAME_RELEASE}
adam@0 1133 exit ;;
adam@0 1134 RM*:ReliantUNIX-*:*:*)
adam@0 1135 echo mips-sni-sysv4
adam@0 1136 exit ;;
adam@0 1137 RM*:SINIX-*:*:*)
adam@0 1138 echo mips-sni-sysv4
adam@0 1139 exit ;;
adam@0 1140 *:SINIX-*:*:*)
adam@0 1141 if uname -p 2>/dev/null >/dev/null ; then
adam@0 1142 UNAME_MACHINE=`(uname -p) 2>/dev/null`
adam@0 1143 echo ${UNAME_MACHINE}-sni-sysv4
adam@0 1144 else
adam@0 1145 echo ns32k-sni-sysv
adam@0 1146 fi
adam@0 1147 exit ;;
adam@0 1148 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
adam@0 1149 # says <Richard.M.Bartel@ccMail.Census.GOV>
adam@0 1150 echo i586-unisys-sysv4
adam@0 1151 exit ;;
adam@0 1152 *:UNIX_System_V:4*:FTX*)
adam@0 1153 # From Gerald Hewes <hewes@openmarket.com>.
adam@0 1154 # How about differentiating between stratus architectures? -djm
adam@0 1155 echo hppa1.1-stratus-sysv4
adam@0 1156 exit ;;
adam@0 1157 *:*:*:FTX*)
adam@0 1158 # From seanf@swdc.stratus.com.
adam@0 1159 echo i860-stratus-sysv4
adam@0 1160 exit ;;
adam@0 1161 i*86:VOS:*:*)
adam@0 1162 # From Paul.Green@stratus.com.
adam@0 1163 echo ${UNAME_MACHINE}-stratus-vos
adam@0 1164 exit ;;
adam@0 1165 *:VOS:*:*)
adam@0 1166 # From Paul.Green@stratus.com.
adam@0 1167 echo hppa1.1-stratus-vos
adam@0 1168 exit ;;
adam@0 1169 mc68*:A/UX:*:*)
adam@0 1170 echo m68k-apple-aux${UNAME_RELEASE}
adam@0 1171 exit ;;
adam@0 1172 news*:NEWS-OS:6*:*)
adam@0 1173 echo mips-sony-newsos6
adam@0 1174 exit ;;
adam@0 1175 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
adam@0 1176 if [ -d /usr/nec ]; then
adam@0 1177 echo mips-nec-sysv${UNAME_RELEASE}
adam@0 1178 else
adam@0 1179 echo mips-unknown-sysv${UNAME_RELEASE}
adam@0 1180 fi
adam@0 1181 exit ;;
adam@0 1182 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
adam@0 1183 echo powerpc-be-beos
adam@0 1184 exit ;;
adam@0 1185 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
adam@0 1186 echo powerpc-apple-beos
adam@0 1187 exit ;;
adam@0 1188 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
adam@0 1189 echo i586-pc-beos
adam@0 1190 exit ;;
adam@0 1191 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
adam@0 1192 echo i586-pc-haiku
adam@0 1193 exit ;;
adam@0 1194 SX-4:SUPER-UX:*:*)
adam@0 1195 echo sx4-nec-superux${UNAME_RELEASE}
adam@0 1196 exit ;;
adam@0 1197 SX-5:SUPER-UX:*:*)
adam@0 1198 echo sx5-nec-superux${UNAME_RELEASE}
adam@0 1199 exit ;;
adam@0 1200 SX-6:SUPER-UX:*:*)
adam@0 1201 echo sx6-nec-superux${UNAME_RELEASE}
adam@0 1202 exit ;;
adam@0 1203 SX-7:SUPER-UX:*:*)
adam@0 1204 echo sx7-nec-superux${UNAME_RELEASE}
adam@0 1205 exit ;;
adam@0 1206 SX-8:SUPER-UX:*:*)
adam@0 1207 echo sx8-nec-superux${UNAME_RELEASE}
adam@0 1208 exit ;;
adam@0 1209 SX-8R:SUPER-UX:*:*)
adam@0 1210 echo sx8r-nec-superux${UNAME_RELEASE}
adam@0 1211 exit ;;
adam@0 1212 Power*:Rhapsody:*:*)
adam@0 1213 echo powerpc-apple-rhapsody${UNAME_RELEASE}
adam@0 1214 exit ;;
adam@0 1215 *:Rhapsody:*:*)
adam@0 1216 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
adam@0 1217 exit ;;
adam@0 1218 *:Darwin:*:*)
adam@0 1219 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
adam@0 1220 case $UNAME_PROCESSOR in
adam@0 1221 i386)
adam@0 1222 eval $set_cc_for_build
adam@0 1223 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
adam@0 1224 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
adam@0 1225 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
adam@0 1226 grep IS_64BIT_ARCH >/dev/null
adam@0 1227 then
adam@0 1228 UNAME_PROCESSOR="x86_64"
adam@0 1229 fi
adam@0 1230 fi ;;
adam@0 1231 unknown) UNAME_PROCESSOR=powerpc ;;
adam@0 1232 esac
adam@0 1233 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
adam@0 1234 exit ;;
adam@0 1235 *:procnto*:*:* | *:QNX:[0123456789]*:*)
adam@0 1236 UNAME_PROCESSOR=`uname -p`
adam@0 1237 if test "$UNAME_PROCESSOR" = "x86"; then
adam@0 1238 UNAME_PROCESSOR=i386
adam@0 1239 UNAME_MACHINE=pc
adam@0 1240 fi
adam@0 1241 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
adam@0 1242 exit ;;
adam@0 1243 *:QNX:*:4*)
adam@0 1244 echo i386-pc-qnx
adam@0 1245 exit ;;
adam@0 1246 NEO-?:NONSTOP_KERNEL:*:*)
adam@0 1247 echo neo-tandem-nsk${UNAME_RELEASE}
adam@0 1248 exit ;;
adam@0 1249 NSE-?:NONSTOP_KERNEL:*:*)
adam@0 1250 echo nse-tandem-nsk${UNAME_RELEASE}
adam@0 1251 exit ;;
adam@0 1252 NSR-?:NONSTOP_KERNEL:*:*)
adam@0 1253 echo nsr-tandem-nsk${UNAME_RELEASE}
adam@0 1254 exit ;;
adam@0 1255 *:NonStop-UX:*:*)
adam@0 1256 echo mips-compaq-nonstopux
adam@0 1257 exit ;;
adam@0 1258 BS2000:POSIX*:*:*)
adam@0 1259 echo bs2000-siemens-sysv
adam@0 1260 exit ;;
adam@0 1261 DS/*:UNIX_System_V:*:*)
adam@0 1262 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
adam@0 1263 exit ;;
adam@0 1264 *:Plan9:*:*)
adam@0 1265 # "uname -m" is not consistent, so use $cputype instead. 386
adam@0 1266 # is converted to i386 for consistency with other x86
adam@0 1267 # operating systems.
adam@0 1268 if test "$cputype" = "386"; then
adam@0 1269 UNAME_MACHINE=i386
adam@0 1270 else
adam@0 1271 UNAME_MACHINE="$cputype"
adam@0 1272 fi
adam@0 1273 echo ${UNAME_MACHINE}-unknown-plan9
adam@0 1274 exit ;;
adam@0 1275 *:TOPS-10:*:*)
adam@0 1276 echo pdp10-unknown-tops10
adam@0 1277 exit ;;
adam@0 1278 *:TENEX:*:*)
adam@0 1279 echo pdp10-unknown-tenex
adam@0 1280 exit ;;
adam@0 1281 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
adam@0 1282 echo pdp10-dec-tops20
adam@0 1283 exit ;;
adam@0 1284 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
adam@0 1285 echo pdp10-xkl-tops20
adam@0 1286 exit ;;
adam@0 1287 *:TOPS-20:*:*)
adam@0 1288 echo pdp10-unknown-tops20
adam@0 1289 exit ;;
adam@0 1290 *:ITS:*:*)
adam@0 1291 echo pdp10-unknown-its
adam@0 1292 exit ;;
adam@0 1293 SEI:*:*:SEIUX)
adam@0 1294 echo mips-sei-seiux${UNAME_RELEASE}
adam@0 1295 exit ;;
adam@0 1296 *:DragonFly:*:*)
adam@0 1297 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
adam@0 1298 exit ;;
adam@0 1299 *:*VMS:*:*)
adam@0 1300 UNAME_MACHINE=`(uname -p) 2>/dev/null`
adam@0 1301 case "${UNAME_MACHINE}" in
adam@0 1302 A*) echo alpha-dec-vms ; exit ;;
adam@0 1303 I*) echo ia64-dec-vms ; exit ;;
adam@0 1304 V*) echo vax-dec-vms ; exit ;;
adam@0 1305 esac ;;
adam@0 1306 *:XENIX:*:SysV)
adam@0 1307 echo i386-pc-xenix
adam@0 1308 exit ;;
adam@0 1309 i*86:skyos:*:*)
adam@0 1310 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
adam@0 1311 exit ;;
adam@0 1312 i*86:rdos:*:*)
adam@0 1313 echo ${UNAME_MACHINE}-pc-rdos
adam@0 1314 exit ;;
adam@0 1315 i*86:AROS:*:*)
adam@0 1316 echo ${UNAME_MACHINE}-pc-aros
adam@0 1317 exit ;;
adam@0 1318 esac
adam@0 1319
adam@0 1320 #echo '(No uname command or uname output not recognized.)' 1>&2
adam@0 1321 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
adam@0 1322
adam@0 1323 eval $set_cc_for_build
adam@0 1324 cat >$dummy.c <<EOF
adam@0 1325 #ifdef _SEQUENT_
adam@0 1326 # include <sys/types.h>
adam@0 1327 # include <sys/utsname.h>
adam@0 1328 #endif
adam@0 1329 main ()
adam@0 1330 {
adam@0 1331 #if defined (sony)
adam@0 1332 #if defined (MIPSEB)
adam@0 1333 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
adam@0 1334 I don't know.... */
adam@0 1335 printf ("mips-sony-bsd\n"); exit (0);
adam@0 1336 #else
adam@0 1337 #include <sys/param.h>
adam@0 1338 printf ("m68k-sony-newsos%s\n",
adam@0 1339 #ifdef NEWSOS4
adam@0 1340 "4"
adam@0 1341 #else
adam@0 1342 ""
adam@0 1343 #endif
adam@0 1344 ); exit (0);
adam@0 1345 #endif
adam@0 1346 #endif
adam@0 1347
adam@0 1348 #if defined (__arm) && defined (__acorn) && defined (__unix)
adam@0 1349 printf ("arm-acorn-riscix\n"); exit (0);
adam@0 1350 #endif
adam@0 1351
adam@0 1352 #if defined (hp300) && !defined (hpux)
adam@0 1353 printf ("m68k-hp-bsd\n"); exit (0);
adam@0 1354 #endif
adam@0 1355
adam@0 1356 #if defined (NeXT)
adam@0 1357 #if !defined (__ARCHITECTURE__)
adam@0 1358 #define __ARCHITECTURE__ "m68k"
adam@0 1359 #endif
adam@0 1360 int version;
adam@0 1361 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
adam@0 1362 if (version < 4)
adam@0 1363 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
adam@0 1364 else
adam@0 1365 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
adam@0 1366 exit (0);
adam@0 1367 #endif
adam@0 1368
adam@0 1369 #if defined (MULTIMAX) || defined (n16)
adam@0 1370 #if defined (UMAXV)
adam@0 1371 printf ("ns32k-encore-sysv\n"); exit (0);
adam@0 1372 #else
adam@0 1373 #if defined (CMU)
adam@0 1374 printf ("ns32k-encore-mach\n"); exit (0);
adam@0 1375 #else
adam@0 1376 printf ("ns32k-encore-bsd\n"); exit (0);
adam@0 1377 #endif
adam@0 1378 #endif
adam@0 1379 #endif
adam@0 1380
adam@0 1381 #if defined (__386BSD__)
adam@0 1382 printf ("i386-pc-bsd\n"); exit (0);
adam@0 1383 #endif
adam@0 1384
adam@0 1385 #if defined (sequent)
adam@0 1386 #if defined (i386)
adam@0 1387 printf ("i386-sequent-dynix\n"); exit (0);
adam@0 1388 #endif
adam@0 1389 #if defined (ns32000)
adam@0 1390 printf ("ns32k-sequent-dynix\n"); exit (0);
adam@0 1391 #endif
adam@0 1392 #endif
adam@0 1393
adam@0 1394 #if defined (_SEQUENT_)
adam@0 1395 struct utsname un;
adam@0 1396
adam@0 1397 uname(&un);
adam@0 1398
adam@0 1399 if (strncmp(un.version, "V2", 2) == 0) {
adam@0 1400 printf ("i386-sequent-ptx2\n"); exit (0);
adam@0 1401 }
adam@0 1402 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
adam@0 1403 printf ("i386-sequent-ptx1\n"); exit (0);
adam@0 1404 }
adam@0 1405 printf ("i386-sequent-ptx\n"); exit (0);
adam@0 1406
adam@0 1407 #endif
adam@0 1408
adam@0 1409 #if defined (vax)
adam@0 1410 # if !defined (ultrix)
adam@0 1411 # include <sys/param.h>
adam@0 1412 # if defined (BSD)
adam@0 1413 # if BSD == 43
adam@0 1414 printf ("vax-dec-bsd4.3\n"); exit (0);
adam@0 1415 # else
adam@0 1416 # if BSD == 199006
adam@0 1417 printf ("vax-dec-bsd4.3reno\n"); exit (0);
adam@0 1418 # else
adam@0 1419 printf ("vax-dec-bsd\n"); exit (0);
adam@0 1420 # endif
adam@0 1421 # endif
adam@0 1422 # else
adam@0 1423 printf ("vax-dec-bsd\n"); exit (0);
adam@0 1424 # endif
adam@0 1425 # else
adam@0 1426 printf ("vax-dec-ultrix\n"); exit (0);
adam@0 1427 # endif
adam@0 1428 #endif
adam@0 1429
adam@0 1430 #if defined (alliant) && defined (i860)
adam@0 1431 printf ("i860-alliant-bsd\n"); exit (0);
adam@0 1432 #endif
adam@0 1433
adam@0 1434 exit (1);
adam@0 1435 }
adam@0 1436 EOF
adam@0 1437
adam@0 1438 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
adam@0 1439 { echo "$SYSTEM_NAME"; exit; }
adam@0 1440
adam@0 1441 # Apollos put the system type in the environment.
adam@0 1442
adam@0 1443 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
adam@0 1444
adam@0 1445 # Convex versions that predate uname can use getsysinfo(1)
adam@0 1446
adam@0 1447 if [ -x /usr/convex/getsysinfo ]
adam@0 1448 then
adam@0 1449 case `getsysinfo -f cpu_type` in
adam@0 1450 c1*)
adam@0 1451 echo c1-convex-bsd
adam@0 1452 exit ;;
adam@0 1453 c2*)
adam@0 1454 if getsysinfo -f scalar_acc
adam@0 1455 then echo c32-convex-bsd
adam@0 1456 else echo c2-convex-bsd
adam@0 1457 fi
adam@0 1458 exit ;;
adam@0 1459 c34*)
adam@0 1460 echo c34-convex-bsd
adam@0 1461 exit ;;
adam@0 1462 c38*)
adam@0 1463 echo c38-convex-bsd
adam@0 1464 exit ;;
adam@0 1465 c4*)
adam@0 1466 echo c4-convex-bsd
adam@0 1467 exit ;;
adam@0 1468 esac
adam@0 1469 fi
adam@0 1470
adam@0 1471 cat >&2 <<EOF
adam@0 1472 $0: unable to guess system type
adam@0 1473
adam@0 1474 This script, last modified $timestamp, has failed to recognize
adam@0 1475 the operating system you are using. It is advised that you
adam@0 1476 download the most up to date version of the config scripts from
adam@0 1477
adam@0 1478 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
adam@0 1479 and
adam@0 1480 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
adam@0 1481
adam@0 1482 If the version you run ($0) is already up to date, please
adam@0 1483 send the following data and any information you think might be
adam@0 1484 pertinent to <config-patches@gnu.org> in order to provide the needed
adam@0 1485 information to handle your system.
adam@0 1486
adam@0 1487 config.guess timestamp = $timestamp
adam@0 1488
adam@0 1489 uname -m = `(uname -m) 2>/dev/null || echo unknown`
adam@0 1490 uname -r = `(uname -r) 2>/dev/null || echo unknown`
adam@0 1491 uname -s = `(uname -s) 2>/dev/null || echo unknown`
adam@0 1492 uname -v = `(uname -v) 2>/dev/null || echo unknown`
adam@0 1493
adam@0 1494 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
adam@0 1495 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
adam@0 1496
adam@0 1497 hostinfo = `(hostinfo) 2>/dev/null`
adam@0 1498 /bin/universe = `(/bin/universe) 2>/dev/null`
adam@0 1499 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
adam@0 1500 /bin/arch = `(/bin/arch) 2>/dev/null`
adam@0 1501 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
adam@0 1502 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
adam@0 1503
adam@0 1504 UNAME_MACHINE = ${UNAME_MACHINE}
adam@0 1505 UNAME_RELEASE = ${UNAME_RELEASE}
adam@0 1506 UNAME_SYSTEM = ${UNAME_SYSTEM}
adam@0 1507 UNAME_VERSION = ${UNAME_VERSION}
adam@0 1508 EOF
adam@0 1509
adam@0 1510 exit 1
adam@0 1511
adam@0 1512 # Local variables:
adam@0 1513 # eval: (add-hook 'write-file-hooks 'time-stamp)
adam@0 1514 # time-stamp-start: "timestamp='"
adam@0 1515 # time-stamp-format: "%:y-%02m-%02d"
adam@0 1516 # time-stamp-end: "'"
adam@0 1517 # End: