annotate src/libsamplerate-0.1.8/Cfg/config.guess @ 23:619f715526df sv_v2.1

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