annotate src/fftw-3.3.3/config.guess @ 10:37bf6b4a2645

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