common/autoconf/build-aux/autoconf-config.guess

Thu, 05 Jul 2012 18:27:07 -0700

author
erikj
date
Thu, 05 Jul 2012 18:27:07 -0700
changeset 459
3156dff953b1
child 576
b66c81dfa291
permissions
-rw-r--r--

7182051: Update of latest build-infra Makefiles (missing files)
Reviewed-by: ohair

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

mercurial