annotate src/libsamplerate-0.1.9/Cfg/config.guess @ 83:ae30d91d2ffe

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