/[zanavi_public1]/navit/config.guess
ZANavi

Diff of /navit/config.guess

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 51 Revision 52
1#! /bin/sh 1#! /bin/sh
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5# Free Software Foundation, Inc. 3# Copyright 1992-2016 Free Software Foundation, Inc.
6 4
7timestamp='2009-06-10' 5timestamp='2016-10-02'
8 6
9# This file is free software; you can redistribute it and/or modify it 7# This file is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by 8# under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2 of the License, or 9# the Free Software Foundation; either version 3 of the License, or
12# (at your option) any later version. 10# (at your option) any later version.
13# 11#
14# This program is distributed in the hope that it will be useful, but 12# This program is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of 13# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# General Public License for more details. 15# General Public License for more details.
18# 16#
19# You should have received a copy of the GNU General Public License 17# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software 18# along with this program; if not, see <http://www.gnu.org/licenses/>.
21# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22# 02110-1301, USA.
23# 19#
24# As a special exception to the GNU General Public License, if you 20# As a special exception to the GNU General Public License, if you
25# distribute this file as part of a program that contains a 21# distribute this file as part of a program that contains a
26# configuration script generated by Autoconf, you may include it under 22# configuration script generated by Autoconf, you may include it under
27# the same distribution terms that you use for the rest of that program. 23# the same distribution terms that you use for the rest of that
28 24# program. This Exception is an additional permission under section 7
29 25# of the GNU General Public License, version 3 ("GPLv3").
30# Originally written by Per Bothner <per@bothner.com>.
31# Please send patches to <config-patches@gnu.org>. Submit a context
32# diff and a properly formatted ChangeLog entry.
33# 26#
34# This script attempts to guess a canonical system name similar to 27# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
35# config.sub. If it succeeds, it prints the system name on stdout, and
36# exits with 0. Otherwise, it exits with 1.
37# 28#
38# The plan is that this can be called by configure scripts if you 29# You can get the latest version of this script from:
39# don't specify an explicit build system type. 30# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
31#
32# Please send patches to <config-patches@gnu.org>.
33
40 34
41me=`echo "$0" | sed -e 's,.*/,,'` 35me=`echo "$0" | sed -e 's,.*/,,'`
42 36
43usage="\ 37usage="\
44Usage: $0 [OPTION] 38Usage: $0 [OPTION]
54 48
55version="\ 49version="\
56GNU config.guess ($timestamp) 50GNU config.guess ($timestamp)
57 51
58Originally written by Per Bothner. 52Originally written by Per Bothner.
59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 53Copyright 1992-2016 Free Software Foundation, Inc.
602002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
61 54
62This is free software; see the source for copying conditions. There is NO 55This is free software; see the source for copying conditions. There is NO
63warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 56warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
64 57
65help=" 58help="
137UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 130UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
138UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 131UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
139UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 132UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
140UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 133UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141 134
135case "${UNAME_SYSTEM}" in
136Linux|GNU|GNU/*)
137 # If the system lacks a compiler, then just pick glibc.
138 # We could probably try harder.
139 LIBC=gnu
140
141 eval $set_cc_for_build
142 cat <<-EOF > $dummy.c
143 #include <features.h>
144 #if defined(__UCLIBC__)
145 LIBC=uclibc
146 #elif defined(__dietlibc__)
147 LIBC=dietlibc
148 #else
149 LIBC=gnu
150 #endif
151 EOF
152 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
153 ;;
154esac
155
142# Note: order is significant - the case branches are not exclusive. 156# Note: order is significant - the case branches are not exclusive.
143 157
144case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 158case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145 *:NetBSD:*:*) 159 *:NetBSD:*:*)
146 # NetBSD (nbsd) targets should (where applicable) match one or 160 # NetBSD (nbsd) targets should (where applicable) match one or
147 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 161 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
148 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 162 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149 # switched to ELF, *-*-netbsd* would select the old 163 # switched to ELF, *-*-netbsd* would select the old
150 # object file format. This provides both forward 164 # object file format. This provides both forward
151 # compatibility and a consistent mechanism for selecting the 165 # compatibility and a consistent mechanism for selecting the
152 # object file format. 166 # object file format.
153 # 167 #
154 # Note: NetBSD doesn't particularly care about the vendor 168 # Note: NetBSD doesn't particularly care about the vendor
155 # portion of the name. We always set it to "unknown". 169 # portion of the name. We always set it to "unknown".
156 sysctl="sysctl -n hw.machine_arch" 170 sysctl="sysctl -n hw.machine_arch"
157 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 171 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
172 /sbin/$sysctl 2>/dev/null || \
158 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 173 /usr/sbin/$sysctl 2>/dev/null || \
174 echo unknown)`
159 case "${UNAME_MACHINE_ARCH}" in 175 case "${UNAME_MACHINE_ARCH}" in
160 armeb) machine=armeb-unknown ;; 176 armeb) machine=armeb-unknown ;;
161 arm*) machine=arm-unknown ;; 177 arm*) machine=arm-unknown ;;
162 sh3el) machine=shl-unknown ;; 178 sh3el) machine=shl-unknown ;;
163 sh3eb) machine=sh-unknown ;; 179 sh3eb) machine=sh-unknown ;;
164 sh5el) machine=sh5le-unknown ;; 180 sh5el) machine=sh5le-unknown ;;
181 earmv*)
182 arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
183 endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
184 machine=${arch}${endian}-unknown
185 ;;
165 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 186 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
166 esac 187 esac
167 # The Operating System including object format, if it has switched 188 # The Operating System including object format, if it has switched
168 # to ELF recently, or will in the future. 189 # to ELF recently (or will in the future) and ABI.
169 case "${UNAME_MACHINE_ARCH}" in 190 case "${UNAME_MACHINE_ARCH}" in
191 earm*)
192 os=netbsdelf
193 ;;
170 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 194 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171 eval $set_cc_for_build 195 eval $set_cc_for_build
172 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 196 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173 | grep -q __ELF__ 197 | grep -q __ELF__
174 then 198 then
178 else 202 else
179 os=netbsdelf 203 os=netbsdelf
180 fi 204 fi
181 ;; 205 ;;
182 *) 206 *)
183 os=netbsd 207 os=netbsd
208 ;;
209 esac
210 # Determine ABI tags.
211 case "${UNAME_MACHINE_ARCH}" in
212 earm*)
213 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
214 abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
184 ;; 215 ;;
185 esac 216 esac
186 # The OS release 217 # The OS release
187 # Debian GNU/NetBSD machines have a different userland, and 218 # Debian GNU/NetBSD machines have a different userland, and
188 # thus, need a distinct triplet. However, they do not need 219 # thus, need a distinct triplet. However, they do not need
191 case "${UNAME_VERSION}" in 222 case "${UNAME_VERSION}" in
192 Debian*) 223 Debian*)
193 release='-gnu' 224 release='-gnu'
194 ;; 225 ;;
195 *) 226 *)
196 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 227 release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
197 ;; 228 ;;
198 esac 229 esac
199 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 230 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
200 # contains redundant information, the shorter form: 231 # contains redundant information, the shorter form:
201 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 232 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
202 echo "${machine}-${os}${release}" 233 echo "${machine}-${os}${release}${abi}"
234 exit ;;
235 *:Bitrig:*:*)
236 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
237 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
203 exit ;; 238 exit ;;
204 *:OpenBSD:*:*) 239 *:OpenBSD:*:*)
205 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 240 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 241 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
207 exit ;; 242 exit ;;
243 *:LibertyBSD:*:*)
244 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
245 echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
246 exit ;;
208 *:ekkoBSD:*:*) 247 *:ekkoBSD:*:*)
209 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 248 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
210 exit ;; 249 exit ;;
211 *:SolidBSD:*:*) 250 *:SolidBSD:*:*)
212 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 251 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
214 macppc:MirBSD:*:*) 253 macppc:MirBSD:*:*)
215 echo powerpc-unknown-mirbsd${UNAME_RELEASE} 254 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
216 exit ;; 255 exit ;;
217 *:MirBSD:*:*) 256 *:MirBSD:*:*)
218 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 257 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
258 exit ;;
259 *:Sortix:*:*)
260 echo ${UNAME_MACHINE}-unknown-sortix
219 exit ;; 261 exit ;;
220 alpha:OSF1:*:*) 262 alpha:OSF1:*:*)
221 case $UNAME_RELEASE in 263 case $UNAME_RELEASE in
222 *4.0) 264 *4.0)
223 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 265 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
224 ;; 266 ;;
225 *5.*) 267 *5.*)
226 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 268 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227 ;; 269 ;;
228 esac 270 esac
229 # According to Compaq, /usr/sbin/psrinfo has been available on 271 # According to Compaq, /usr/sbin/psrinfo has been available on
230 # OSF/1 and Tru64 systems produced since 1995. I hope that 272 # OSF/1 and Tru64 systems produced since 1995. I hope that
231 # covers most systems running today. This code pipes the CPU 273 # covers most systems running today. This code pipes the CPU
232 # types through head -n 1, so we only detect the type of CPU 0. 274 # types through head -n 1, so we only detect the type of CPU 0.
233 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 275 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
234 case "$ALPHA_CPU_TYPE" in 276 case "$ALPHA_CPU_TYPE" in
235 "EV4 (21064)") 277 "EV4 (21064)")
236 UNAME_MACHINE="alpha" ;; 278 UNAME_MACHINE=alpha ;;
237 "EV4.5 (21064)") 279 "EV4.5 (21064)")
238 UNAME_MACHINE="alpha" ;; 280 UNAME_MACHINE=alpha ;;
239 "LCA4 (21066/21068)") 281 "LCA4 (21066/21068)")
240 UNAME_MACHINE="alpha" ;; 282 UNAME_MACHINE=alpha ;;
241 "EV5 (21164)") 283 "EV5 (21164)")
242 UNAME_MACHINE="alphaev5" ;; 284 UNAME_MACHINE=alphaev5 ;;
243 "EV5.6 (21164A)") 285 "EV5.6 (21164A)")
244 UNAME_MACHINE="alphaev56" ;; 286 UNAME_MACHINE=alphaev56 ;;
245 "EV5.6 (21164PC)") 287 "EV5.6 (21164PC)")
246 UNAME_MACHINE="alphapca56" ;; 288 UNAME_MACHINE=alphapca56 ;;
247 "EV5.7 (21164PC)") 289 "EV5.7 (21164PC)")
248 UNAME_MACHINE="alphapca57" ;; 290 UNAME_MACHINE=alphapca57 ;;
249 "EV6 (21264)") 291 "EV6 (21264)")
250 UNAME_MACHINE="alphaev6" ;; 292 UNAME_MACHINE=alphaev6 ;;
251 "EV6.7 (21264A)") 293 "EV6.7 (21264A)")
252 UNAME_MACHINE="alphaev67" ;; 294 UNAME_MACHINE=alphaev67 ;;
253 "EV6.8CB (21264C)") 295 "EV6.8CB (21264C)")
254 UNAME_MACHINE="alphaev68" ;; 296 UNAME_MACHINE=alphaev68 ;;
255 "EV6.8AL (21264B)") 297 "EV6.8AL (21264B)")
256 UNAME_MACHINE="alphaev68" ;; 298 UNAME_MACHINE=alphaev68 ;;
257 "EV6.8CX (21264D)") 299 "EV6.8CX (21264D)")
258 UNAME_MACHINE="alphaev68" ;; 300 UNAME_MACHINE=alphaev68 ;;
259 "EV6.9A (21264/EV69A)") 301 "EV6.9A (21264/EV69A)")
260 UNAME_MACHINE="alphaev69" ;; 302 UNAME_MACHINE=alphaev69 ;;
261 "EV7 (21364)") 303 "EV7 (21364)")
262 UNAME_MACHINE="alphaev7" ;; 304 UNAME_MACHINE=alphaev7 ;;
263 "EV7.9 (21364A)") 305 "EV7.9 (21364A)")
264 UNAME_MACHINE="alphaev79" ;; 306 UNAME_MACHINE=alphaev79 ;;
265 esac 307 esac
266 # A Pn.n version is a patched version. 308 # A Pn.n version is a patched version.
267 # A Vn.n version is a released version. 309 # A Vn.n version is a released version.
268 # A Tn.n version is a released field test version. 310 # A Tn.n version is a released field test version.
269 # A Xn.n version is an unreleased experimental baselevel. 311 # A Xn.n version is an unreleased experimental baselevel.
270 # 1.2 uses "1.2" for uname -r. 312 # 1.2 uses "1.2" for uname -r.
271 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 313 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
272 exit ;; 314 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
315 exitcode=$?
316 trap '' 0
317 exit $exitcode ;;
273 Alpha\ *:Windows_NT*:*) 318 Alpha\ *:Windows_NT*:*)
274 # How do we know it's Interix rather than the generic POSIX subsystem? 319 # How do we know it's Interix rather than the generic POSIX subsystem?
275 # Should we change UNAME_MACHINE based on the output of uname instead 320 # Should we change UNAME_MACHINE based on the output of uname instead
276 # of the specific Alpha model? 321 # of the specific Alpha model?
277 echo alpha-pc-interix 322 echo alpha-pc-interix
293 exit ;; 338 exit ;;
294 *:z/VM:*:*) 339 *:z/VM:*:*)
295 echo s390-ibm-zvmoe 340 echo s390-ibm-zvmoe
296 exit ;; 341 exit ;;
297 *:OS400:*:*) 342 *:OS400:*:*)
298 echo powerpc-ibm-os400 343 echo powerpc-ibm-os400
299 exit ;; 344 exit ;;
300 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 345 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
301 echo arm-acorn-riscix${UNAME_RELEASE} 346 echo arm-acorn-riscix${UNAME_RELEASE}
302 exit ;; 347 exit ;;
303 arm:riscos:*:*|arm:RISCOS:*:*) 348 arm*:riscos:*:*|arm*:RISCOS:*:*)
304 echo arm-unknown-riscos 349 echo arm-unknown-riscos
305 exit ;; 350 exit ;;
306 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 351 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
307 echo hppa1.1-hitachi-hiuxmpp 352 echo hppa1.1-hitachi-hiuxmpp
308 exit ;; 353 exit ;;
331 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 376 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332 exit ;; 377 exit ;;
333 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 378 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
334 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 379 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit ;; 380 exit ;;
381 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
382 echo i386-pc-auroraux${UNAME_RELEASE}
383 exit ;;
336 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 384 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
337 eval $set_cc_for_build 385 eval $set_cc_for_build
338 SUN_ARCH="i386" 386 SUN_ARCH=i386
339 # If there is a compiler, see if it is configured for 64-bit objects. 387 # If there is a compiler, see if it is configured for 64-bit objects.
340 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 388 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
341 # This test works for both compilers. 389 # This test works for both compilers.
342 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 390 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
343 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 391 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
344 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 392 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
345 grep IS_64BIT_ARCH >/dev/null 393 grep IS_64BIT_ARCH >/dev/null
346 then 394 then
347 SUN_ARCH="x86_64" 395 SUN_ARCH=x86_64
348 fi 396 fi
349 fi 397 fi
350 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 398 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
351 exit ;; 399 exit ;;
352 sun4*:SunOS:6*:*) 400 sun4*:SunOS:6*:*)
367 sun3*:SunOS:*:*) 415 sun3*:SunOS:*:*)
368 echo m68k-sun-sunos${UNAME_RELEASE} 416 echo m68k-sun-sunos${UNAME_RELEASE}
369 exit ;; 417 exit ;;
370 sun*:*:4.2BSD:*) 418 sun*:*:4.2BSD:*)
371 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 419 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
372 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 420 test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
373 case "`/bin/arch`" in 421 case "`/bin/arch`" in
374 sun3) 422 sun3)
375 echo m68k-sun-sunos${UNAME_RELEASE} 423 echo m68k-sun-sunos${UNAME_RELEASE}
376 ;; 424 ;;
377 sun4) 425 sun4)
389 # to the lowercase version "mint" (or "freemint"). Finally 437 # to the lowercase version "mint" (or "freemint"). Finally
390 # the system name "TOS" denotes a system which is actually not 438 # the system name "TOS" denotes a system which is actually not
391 # MiNT. But MiNT is downward compatible to TOS, so this should 439 # MiNT. But MiNT is downward compatible to TOS, so this should
392 # be no problem. 440 # be no problem.
393 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 441 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
394 echo m68k-atari-mint${UNAME_RELEASE} 442 echo m68k-atari-mint${UNAME_RELEASE}
395 exit ;; 443 exit ;;
396 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 444 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
397 echo m68k-atari-mint${UNAME_RELEASE} 445 echo m68k-atari-mint${UNAME_RELEASE}
398 exit ;; 446 exit ;;
399 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 447 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
400 echo m68k-atari-mint${UNAME_RELEASE} 448 echo m68k-atari-mint${UNAME_RELEASE}
401 exit ;; 449 exit ;;
402 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 450 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
403 echo m68k-milan-mint${UNAME_RELEASE} 451 echo m68k-milan-mint${UNAME_RELEASE}
404 exit ;; 452 exit ;;
405 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 453 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
406 echo m68k-hades-mint${UNAME_RELEASE} 454 echo m68k-hades-mint${UNAME_RELEASE}
407 exit ;; 455 exit ;;
408 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 456 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
409 echo m68k-unknown-mint${UNAME_RELEASE} 457 echo m68k-unknown-mint${UNAME_RELEASE}
410 exit ;; 458 exit ;;
411 m68k:machten:*:*) 459 m68k:machten:*:*)
412 echo m68k-apple-machten${UNAME_RELEASE} 460 echo m68k-apple-machten${UNAME_RELEASE}
413 exit ;; 461 exit ;;
414 powerpc:machten:*:*) 462 powerpc:machten:*:*)
415 echo powerpc-apple-machten${UNAME_RELEASE} 463 echo powerpc-apple-machten${UNAME_RELEASE}
475 exit ;; 523 exit ;;
476 m88k:*:3*:R3*) 524 m88k:*:3*:R3*)
477 echo m88k-motorola-sysv3 525 echo m88k-motorola-sysv3
478 exit ;; 526 exit ;;
479 AViiON:dgux:*:*) 527 AViiON:dgux:*:*)
480 # DG/UX returns AViiON for all architectures 528 # DG/UX returns AViiON for all architectures
481 UNAME_PROCESSOR=`/usr/bin/uname -p` 529 UNAME_PROCESSOR=`/usr/bin/uname -p`
482 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 530 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
483 then 531 then
484 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 532 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
485 [ ${TARGET_BINARY_INTERFACE}x = x ] 533 [ ${TARGET_BINARY_INTERFACE}x = x ]
486 then 534 then
489 echo m88k-dg-dguxbcs${UNAME_RELEASE} 537 echo m88k-dg-dguxbcs${UNAME_RELEASE}
490 fi 538 fi
491 else 539 else
492 echo i586-dg-dgux${UNAME_RELEASE} 540 echo i586-dg-dgux${UNAME_RELEASE}
493 fi 541 fi
494 exit ;; 542 exit ;;
495 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 543 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
496 echo m88k-dolphin-sysv3 544 echo m88k-dolphin-sysv3
497 exit ;; 545 exit ;;
498 M88*:*:R3*:*) 546 M88*:*:R3*:*)
499 # Delta 88k system running SVR3 547 # Delta 88k system running SVR3
546 echo rs6000-ibm-aix3.2.4 594 echo rs6000-ibm-aix3.2.4
547 else 595 else
548 echo rs6000-ibm-aix3.2 596 echo rs6000-ibm-aix3.2
549 fi 597 fi
550 exit ;; 598 exit ;;
551 *:AIX:*:[456]) 599 *:AIX:*:[4567])
552 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 600 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
553 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 601 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
554 IBM_ARCH=rs6000 602 IBM_ARCH=rs6000
555 else 603 else
556 IBM_ARCH=powerpc 604 IBM_ARCH=powerpc
557 fi 605 fi
558 if [ -x /usr/bin/oslevel ] ; then 606 if [ -x /usr/bin/lslpp ] ; then
559 IBM_REV=`/usr/bin/oslevel` 607 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
608 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
560 else 609 else
561 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 610 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
562 fi 611 fi
563 echo ${IBM_ARCH}-ibm-aix${IBM_REV} 612 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
564 exit ;; 613 exit ;;
589 9000/31? ) HP_ARCH=m68000 ;; 638 9000/31? ) HP_ARCH=m68000 ;;
590 9000/[34]?? ) HP_ARCH=m68k ;; 639 9000/[34]?? ) HP_ARCH=m68k ;;
591 9000/[678][0-9][0-9]) 640 9000/[678][0-9][0-9])
592 if [ -x /usr/bin/getconf ]; then 641 if [ -x /usr/bin/getconf ]; then
593 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 642 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
594 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 643 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
595 case "${sc_cpu_version}" in 644 case "${sc_cpu_version}" in
596 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 645 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
597 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 646 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
598 532) # CPU_PA_RISC2_0 647 532) # CPU_PA_RISC2_0
599 case "${sc_kernel_bits}" in 648 case "${sc_kernel_bits}" in
600 32) HP_ARCH="hppa2.0n" ;; 649 32) HP_ARCH=hppa2.0n ;;
601 64) HP_ARCH="hppa2.0w" ;; 650 64) HP_ARCH=hppa2.0w ;;
602 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 651 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
603 esac ;; 652 esac ;;
604 esac 653 esac
605 fi 654 fi
606 if [ "${HP_ARCH}" = "" ]; then 655 if [ "${HP_ARCH}" = "" ]; then
607 eval $set_cc_for_build 656 eval $set_cc_for_build
608 sed 's/^ //' << EOF >$dummy.c 657 sed 's/^ //' << EOF >$dummy.c
609 658
610 #define _HPUX_SOURCE 659 #define _HPUX_SOURCE
611 #include <stdlib.h> 660 #include <stdlib.h>
612 #include <unistd.h> 661 #include <unistd.h>
613 662
614 int main () 663 int main ()
615 { 664 {
616 #if defined(_SC_KERNEL_BITS) 665 #if defined(_SC_KERNEL_BITS)
617 long bits = sysconf(_SC_KERNEL_BITS); 666 long bits = sysconf(_SC_KERNEL_BITS);
618 #endif 667 #endif
619 long cpu = sysconf (_SC_CPU_VERSION); 668 long cpu = sysconf (_SC_CPU_VERSION);
620 669
621 switch (cpu) 670 switch (cpu)
622 { 671 {
623 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 672 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
624 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 673 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
625 case CPU_PA_RISC2_0: 674 case CPU_PA_RISC2_0:
626 #if defined(_SC_KERNEL_BITS) 675 #if defined(_SC_KERNEL_BITS)
627 switch (bits) 676 switch (bits)
628 { 677 {
629 case 64: puts ("hppa2.0w"); break; 678 case 64: puts ("hppa2.0w"); break;
630 case 32: puts ("hppa2.0n"); break; 679 case 32: puts ("hppa2.0n"); break;
631 default: puts ("hppa2.0"); break; 680 default: puts ("hppa2.0"); break;
632 } break; 681 } break;
633 #else /* !defined(_SC_KERNEL_BITS) */ 682 #else /* !defined(_SC_KERNEL_BITS) */
634 puts ("hppa2.0"); break; 683 puts ("hppa2.0"); break;
635 #endif 684 #endif
636 default: puts ("hppa1.0"); break; 685 default: puts ("hppa1.0"); break;
637 } 686 }
638 exit (0); 687 exit (0);
639 } 688 }
640EOF 689EOF
641 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 690 (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
642 test -z "$HP_ARCH" && HP_ARCH=hppa 691 test -z "$HP_ARCH" && HP_ARCH=hppa
643 fi ;; 692 fi ;;
644 esac 693 esac
645 if [ ${HP_ARCH} = "hppa2.0w" ] 694 if [ ${HP_ARCH} = hppa2.0w ]
646 then 695 then
647 eval $set_cc_for_build 696 eval $set_cc_for_build
648 697
649 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 698 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
650 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 699 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
653 # $ CC_FOR_BUILD=cc ./config.guess 702 # $ CC_FOR_BUILD=cc ./config.guess
654 # => hppa2.0w-hp-hpux11.23 703 # => hppa2.0w-hp-hpux11.23
655 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 704 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
656 # => hppa64-hp-hpux11.23 705 # => hppa64-hp-hpux11.23
657 706
658 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 707 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
659 grep -q __LP64__ 708 grep -q __LP64__
660 then 709 then
661 HP_ARCH="hppa2.0w" 710 HP_ARCH=hppa2.0w
662 else 711 else
663 HP_ARCH="hppa64" 712 HP_ARCH=hppa64
664 fi 713 fi
665 fi 714 fi
666 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 715 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
667 exit ;; 716 exit ;;
668 ia64:HP-UX:*:*) 717 ia64:HP-UX:*:*)
725 parisc*:Lites*:*:*) 774 parisc*:Lites*:*:*)
726 echo hppa1.1-hp-lites 775 echo hppa1.1-hp-lites
727 exit ;; 776 exit ;;
728 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 777 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
729 echo c1-convex-bsd 778 echo c1-convex-bsd
730 exit ;; 779 exit ;;
731 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 780 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
732 if getsysinfo -f scalar_acc 781 if getsysinfo -f scalar_acc
733 then echo c32-convex-bsd 782 then echo c32-convex-bsd
734 else echo c2-convex-bsd 783 else echo c2-convex-bsd
735 fi 784 fi
736 exit ;; 785 exit ;;
737 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 786 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
738 echo c34-convex-bsd 787 echo c34-convex-bsd
739 exit ;; 788 exit ;;
740 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 789 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
741 echo c38-convex-bsd 790 echo c38-convex-bsd
742 exit ;; 791 exit ;;
743 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 792 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
744 echo c4-convex-bsd 793 echo c4-convex-bsd
745 exit ;; 794 exit ;;
746 CRAY*Y-MP:*:*:*) 795 CRAY*Y-MP:*:*:*)
747 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 796 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
748 exit ;; 797 exit ;;
749 CRAY*[A-Z]90:*:*:*) 798 CRAY*[A-Z]90:*:*:*)
750 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 799 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
763 exit ;; 812 exit ;;
764 *:UNICOS/mp:*:*) 813 *:UNICOS/mp:*:*)
765 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 814 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
766 exit ;; 815 exit ;;
767 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 816 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
768 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 817 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
769 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 818 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
770 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 819 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
771 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 820 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
772 exit ;; 821 exit ;;
773 5000:UNIX_System_V:4.*:*) 822 5000:UNIX_System_V:4.*:*)
774 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 823 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
775 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 824 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
776 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 825 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
777 exit ;; 826 exit ;;
778 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 827 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
779 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 828 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
780 exit ;; 829 exit ;;
781 sparc*:BSD/OS:*:*) 830 sparc*:BSD/OS:*:*)
783 exit ;; 832 exit ;;
784 *:BSD/OS:*:*) 833 *:BSD/OS:*:*)
785 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 834 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
786 exit ;; 835 exit ;;
787 *:FreeBSD:*:*) 836 *:FreeBSD:*:*)
837 UNAME_PROCESSOR=`/usr/bin/uname -p`
788 case ${UNAME_MACHINE} in 838 case ${UNAME_PROCESSOR} in
789 pc98)
790 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
791 amd64) 839 amd64)
792 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 840 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
793 *) 841 *)
794 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 842 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
795 esac 843 esac
796 exit ;; 844 exit ;;
797 i*:CYGWIN*:*) 845 i*:CYGWIN*:*)
798 echo ${UNAME_MACHINE}-pc-cygwin 846 echo ${UNAME_MACHINE}-pc-cygwin
799 exit ;; 847 exit ;;
848 *:MINGW64*:*)
849 echo ${UNAME_MACHINE}-pc-mingw64
850 exit ;;
800 *:MINGW*:*) 851 *:MINGW*:*)
801 echo ${UNAME_MACHINE}-pc-mingw32 852 echo ${UNAME_MACHINE}-pc-mingw32
802 exit ;; 853 exit ;;
854 *:MSYS*:*)
855 echo ${UNAME_MACHINE}-pc-msys
856 exit ;;
803 i*:windows32*:*) 857 i*:windows32*:*)
804 # uname -m includes "-pc" on this system. 858 # uname -m includes "-pc" on this system.
805 echo ${UNAME_MACHINE}-mingw32 859 echo ${UNAME_MACHINE}-mingw32
806 exit ;; 860 exit ;;
807 i*:PW*:*) 861 i*:PW*:*)
808 echo ${UNAME_MACHINE}-pc-pw32 862 echo ${UNAME_MACHINE}-pc-pw32
809 exit ;; 863 exit ;;
810 *:Interix*:[3456]*) 864 *:Interix*:*)
811 case ${UNAME_MACHINE} in 865 case ${UNAME_MACHINE} in
812 x86) 866 x86)
813 echo i586-pc-interix${UNAME_RELEASE} 867 echo i586-pc-interix${UNAME_RELEASE}
814 exit ;; 868 exit ;;
815 EM64T | authenticamd | genuineintel) 869 authenticamd | genuineintel | EM64T)
816 echo x86_64-unknown-interix${UNAME_RELEASE} 870 echo x86_64-unknown-interix${UNAME_RELEASE}
817 exit ;; 871 exit ;;
818 IA64) 872 IA64)
819 echo ia64-unknown-interix${UNAME_RELEASE} 873 echo ia64-unknown-interix${UNAME_RELEASE}
820 exit ;; 874 exit ;;
843 prep*:SunOS:5.*:*) 897 prep*:SunOS:5.*:*)
844 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 898 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
845 exit ;; 899 exit ;;
846 *:GNU:*:*) 900 *:GNU:*:*)
847 # the GNU system 901 # the GNU system
848 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 902 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
849 exit ;; 903 exit ;;
850 *:GNU/*:*:*) 904 *:GNU/*:*:*)
851 # other systems with GNU libc and userland 905 # other systems with GNU libc and userland
852 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 906 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
853 exit ;; 907 exit ;;
854 i*86:Minix:*:*) 908 i*86:Minix:*:*)
855 echo ${UNAME_MACHINE}-pc-minix 909 echo ${UNAME_MACHINE}-pc-minix
910 exit ;;
911 aarch64:Linux:*:*)
912 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
913 exit ;;
914 aarch64_be:Linux:*:*)
915 UNAME_MACHINE=aarch64_be
916 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
917 exit ;;
918 alpha:Linux:*:*)
919 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
920 EV5) UNAME_MACHINE=alphaev5 ;;
921 EV56) UNAME_MACHINE=alphaev56 ;;
922 PCA56) UNAME_MACHINE=alphapca56 ;;
923 PCA57) UNAME_MACHINE=alphapca56 ;;
924 EV6) UNAME_MACHINE=alphaev6 ;;
925 EV67) UNAME_MACHINE=alphaev67 ;;
926 EV68*) UNAME_MACHINE=alphaev68 ;;
927 esac
928 objdump --private-headers /bin/sh | grep -q ld.so.1
929 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
930 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
931 exit ;;
932 arc:Linux:*:* | arceb:Linux:*:*)
933 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
856 exit ;; 934 exit ;;
857 arm*:Linux:*:*) 935 arm*:Linux:*:*)
858 eval $set_cc_for_build 936 eval $set_cc_for_build
859 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 937 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
860 | grep -q __ARM_EABI__ 938 | grep -q __ARM_EABI__
861 then 939 then
862 echo ${UNAME_MACHINE}-unknown-linux-gnu 940 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
863 else 941 else
942 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
943 | grep -q __ARM_PCS_VFP
944 then
864 echo ${UNAME_MACHINE}-unknown-linux-gnueabi 945 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
946 else
947 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
948 fi
865 fi 949 fi
866 exit ;; 950 exit ;;
867 avr32*:Linux:*:*) 951 avr32*:Linux:*:*)
868 echo ${UNAME_MACHINE}-unknown-linux-gnu 952 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
869 exit ;; 953 exit ;;
870 cris:Linux:*:*) 954 cris:Linux:*:*)
871 echo cris-axis-linux-gnu 955 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
872 exit ;; 956 exit ;;
873 crisv32:Linux:*:*) 957 crisv32:Linux:*:*)
874 echo crisv32-axis-linux-gnu 958 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
959 exit ;;
960 e2k:Linux:*:*)
961 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
875 exit ;; 962 exit ;;
876 frv:Linux:*:*) 963 frv:Linux:*:*)
877 echo frv-unknown-linux-gnu 964 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
965 exit ;;
966 hexagon:Linux:*:*)
967 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
968 exit ;;
969 i*86:Linux:*:*)
970 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
878 exit ;; 971 exit ;;
879 ia64:Linux:*:*) 972 ia64:Linux:*:*)
880 echo ${UNAME_MACHINE}-unknown-linux-gnu 973 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
974 exit ;;
975 k1om:Linux:*:*)
976 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
881 exit ;; 977 exit ;;
882 m32r*:Linux:*:*) 978 m32r*:Linux:*:*)
883 echo ${UNAME_MACHINE}-unknown-linux-gnu 979 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
884 exit ;; 980 exit ;;
885 m68*:Linux:*:*) 981 m68*:Linux:*:*)
886 echo ${UNAME_MACHINE}-unknown-linux-gnu 982 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
887 exit ;; 983 exit ;;
888 mips:Linux:*:* | mips64:Linux:*:*) 984 mips:Linux:*:* | mips64:Linux:*:*)
889 eval $set_cc_for_build 985 eval $set_cc_for_build
890 sed 's/^ //' << EOF >$dummy.c 986 sed 's/^ //' << EOF >$dummy.c
891 #undef CPU 987 #undef CPU
899 #else 995 #else
900 CPU= 996 CPU=
901 #endif 997 #endif
902 #endif 998 #endif
903EOF 999EOF
904 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 1000 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
905 /^CPU/{
906 s: ::g
907 p
908 }'`"
909 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 1001 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
910 ;; 1002 ;;
911 or32:Linux:*:*)
912 echo or32-unknown-linux-gnu
913 exit ;;
914 ppc:Linux:*:*)
915 echo powerpc-unknown-linux-gnu
916 exit ;;
917 ppc64:Linux:*:*) 1003 mips64el:Linux:*:*)
918 echo powerpc64-unknown-linux-gnu
919 exit ;;
920 alpha:Linux:*:*)
921 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
922 EV5) UNAME_MACHINE=alphaev5 ;;
923 EV56) UNAME_MACHINE=alphaev56 ;;
924 PCA56) UNAME_MACHINE=alphapca56 ;;
925 PCA57) UNAME_MACHINE=alphapca56 ;;
926 EV6) UNAME_MACHINE=alphaev6 ;;
927 EV67) UNAME_MACHINE=alphaev67 ;;
928 EV68*) UNAME_MACHINE=alphaev68 ;;
929 esac
930 objdump --private-headers /bin/sh | grep -q ld.so.1
931 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
932 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 1004 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1005 exit ;;
1006 openrisc*:Linux:*:*)
1007 echo or1k-unknown-linux-${LIBC}
1008 exit ;;
1009 or32:Linux:*:* | or1k*:Linux:*:*)
1010 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
933 exit ;; 1011 exit ;;
934 padre:Linux:*:*) 1012 padre:Linux:*:*)
935 echo sparc-unknown-linux-gnu 1013 echo sparc-unknown-linux-${LIBC}
1014 exit ;;
1015 parisc64:Linux:*:* | hppa64:Linux:*:*)
1016 echo hppa64-unknown-linux-${LIBC}
936 exit ;; 1017 exit ;;
937 parisc:Linux:*:* | hppa:Linux:*:*) 1018 parisc:Linux:*:* | hppa:Linux:*:*)
938 # Look for CPU level 1019 # Look for CPU level
939 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 1020 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
940 PA7*) echo hppa1.1-unknown-linux-gnu ;; 1021 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
941 PA8*) echo hppa2.0-unknown-linux-gnu ;; 1022 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
942 *) echo hppa-unknown-linux-gnu ;; 1023 *) echo hppa-unknown-linux-${LIBC} ;;
943 esac 1024 esac
944 exit ;; 1025 exit ;;
1026 ppc64:Linux:*:*)
1027 echo powerpc64-unknown-linux-${LIBC}
1028 exit ;;
1029 ppc:Linux:*:*)
1030 echo powerpc-unknown-linux-${LIBC}
1031 exit ;;
1032 ppc64le:Linux:*:*)
1033 echo powerpc64le-unknown-linux-${LIBC}
1034 exit ;;
1035 ppcle:Linux:*:*)
1036 echo powerpcle-unknown-linux-${LIBC}
1037 exit ;;
945 parisc64:Linux:*:* | hppa64:Linux:*:*) 1038 riscv32:Linux:*:* | riscv64:Linux:*:*)
946 echo hppa64-unknown-linux-gnu 1039 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
947 exit ;; 1040 exit ;;
948 s390:Linux:*:* | s390x:Linux:*:*) 1041 s390:Linux:*:* | s390x:Linux:*:*)
949 echo ${UNAME_MACHINE}-ibm-linux 1042 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
950 exit ;; 1043 exit ;;
951 sh64*:Linux:*:*) 1044 sh64*:Linux:*:*)
952 echo ${UNAME_MACHINE}-unknown-linux-gnu 1045 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
953 exit ;; 1046 exit ;;
954 sh*:Linux:*:*) 1047 sh*:Linux:*:*)
955 echo ${UNAME_MACHINE}-unknown-linux-gnu 1048 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
956 exit ;; 1049 exit ;;
957 sparc:Linux:*:* | sparc64:Linux:*:*) 1050 sparc:Linux:*:* | sparc64:Linux:*:*)
958 echo ${UNAME_MACHINE}-unknown-linux-gnu 1051 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1052 exit ;;
1053 tile*:Linux:*:*)
1054 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
959 exit ;; 1055 exit ;;
960 vax:Linux:*:*) 1056 vax:Linux:*:*)
961 echo ${UNAME_MACHINE}-dec-linux-gnu 1057 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
962 exit ;; 1058 exit ;;
963 x86_64:Linux:*:*) 1059 x86_64:Linux:*:*)
964 echo x86_64-unknown-linux-gnu 1060 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
965 exit ;; 1061 exit ;;
966 xtensa*:Linux:*:*) 1062 xtensa*:Linux:*:*)
967 echo ${UNAME_MACHINE}-unknown-linux-gnu
968 exit ;;
969 i*86:Linux:*:*)
970 # The BFD linker knows what the default object file format is, so
971 # first see if it will tell us. cd to the root directory to prevent
972 # problems with other programs or directories called `ld' in the path.
973 # Set LC_ALL=C to ensure ld outputs messages in English.
974 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
975 | sed -ne '/supported targets:/!d
976 s/[ ][ ]*/ /g
977 s/.*supported targets: *//
978 s/ .*//
979 p'`
980 case "$ld_supported_targets" in
981 elf32-i386)
982 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
983 ;;
984 esac
985 # Determine whether the default compiler is a.out or elf
986 eval $set_cc_for_build
987 sed 's/^ //' << EOF >$dummy.c
988 #include <features.h>
989 #ifdef __ELF__
990 # ifdef __GLIBC__
991 # if __GLIBC__ >= 2
992 LIBC=gnu
993 # else
994 LIBC=gnulibc1
995 # endif
996 # else
997 LIBC=gnulibc1
998 # endif
999 #else
1000 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1001 LIBC=gnu
1002 #else
1003 LIBC=gnuaout
1004 #endif
1005 #endif
1006 #ifdef __dietlibc__
1007 LIBC=dietlibc
1008 #endif
1009EOF
1010 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1011 /^LIBC/{
1012 s: ::g
1013 p
1014 }'`"
1015 test x"${LIBC}" != x && {
1016 echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 1063 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1017 exit 1064 exit ;;
1018 }
1019 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1020 ;;
1021 i*86:DYNIX/ptx:4*:*) 1065 i*86:DYNIX/ptx:4*:*)
1022 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1066 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1023 # earlier versions are messed up and put the nodename in both 1067 # earlier versions are messed up and put the nodename in both
1024 # sysname and nodename. 1068 # sysname and nodename.
1025 echo i386-sequent-sysv4 1069 echo i386-sequent-sysv4
1026 exit ;; 1070 exit ;;
1027 i*86:UNIX_SV:4.2MP:2.*) 1071 i*86:UNIX_SV:4.2MP:2.*)
1028 # Unixware is an offshoot of SVR4, but it has its own version 1072 # Unixware is an offshoot of SVR4, but it has its own version
1029 # number series starting with 2... 1073 # number series starting with 2...
1030 # I am not positive that other SVR4 systems won't match this, 1074 # I am not positive that other SVR4 systems won't match this,
1031 # I just have to hope. -- rms. 1075 # I just have to hope. -- rms.
1032 # Use sysv4.2uw... so that sysv4* matches it. 1076 # Use sysv4.2uw... so that sysv4* matches it.
1033 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1077 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1034 exit ;; 1078 exit ;;
1035 i*86:OS/2:*:*) 1079 i*86:OS/2:*:*)
1036 # If we were able to find `uname', then EMX Unix compatibility 1080 # If we were able to find `uname', then EMX Unix compatibility
1037 # is probably installed. 1081 # is probably installed.
1059 else 1103 else
1060 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1104 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1061 fi 1105 fi
1062 exit ;; 1106 exit ;;
1063 i*86:*:5:[678]*) 1107 i*86:*:5:[678]*)
1064 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1108 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1065 case `/bin/uname -X | grep "^Machine"` in 1109 case `/bin/uname -X | grep "^Machine"` in
1066 *486*) UNAME_MACHINE=i486 ;; 1110 *486*) UNAME_MACHINE=i486 ;;
1067 *Pentium) UNAME_MACHINE=i586 ;; 1111 *Pentium) UNAME_MACHINE=i586 ;;
1068 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1112 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1069 esac 1113 esac
1087 echo ${UNAME_MACHINE}-pc-sysv32 1131 echo ${UNAME_MACHINE}-pc-sysv32
1088 fi 1132 fi
1089 exit ;; 1133 exit ;;
1090 pc:*:*:*) 1134 pc:*:*:*)
1091 # Left here for compatibility: 1135 # Left here for compatibility:
1092 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1136 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1093 # the processor, so we play safe by assuming i586. 1137 # the processor, so we play safe by assuming i586.
1094 # Note: whatever this is, it MUST be the same as what config.sub 1138 # Note: whatever this is, it MUST be the same as what config.sub
1095 # prints for the "djgpp" host, or else GDB configury will decide that 1139 # prints for the "djgpp" host, or else GDB configure will decide that
1096 # this is a cross-build. 1140 # this is a cross-build.
1097 echo i586-pc-msdosdjgpp 1141 echo i586-pc-msdosdjgpp
1098 exit ;; 1142 exit ;;
1099 Intel:Mach:3*:*) 1143 Intel:Mach:3*:*)
1100 echo i386-pc-mach3 1144 echo i386-pc-mach3
1101 exit ;; 1145 exit ;;
1102 paragon:*:*:*) 1146 paragon:*:*:*)
1103 echo i860-intel-osf1 1147 echo i860-intel-osf1
1128 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1172 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1129 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1173 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1130 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1174 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1131 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1175 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1132 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1176 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1133 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1177 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1134 && { echo i486-ncr-sysv4; exit; } ;; 1178 && { echo i486-ncr-sysv4; exit; } ;;
1135 NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1179 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1136 OS_REL='.3' 1180 OS_REL='.3'
1137 test -r /etc/.relid \ 1181 test -r /etc/.relid \
1138 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1182 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1139 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1183 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1172 echo ${UNAME_MACHINE}-sni-sysv4 1216 echo ${UNAME_MACHINE}-sni-sysv4
1173 else 1217 else
1174 echo ns32k-sni-sysv 1218 echo ns32k-sni-sysv
1175 fi 1219 fi
1176 exit ;; 1220 exit ;;
1177 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1221 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1178 # says <Richard.M.Bartel@ccMail.Census.GOV> 1222 # says <Richard.M.Bartel@ccMail.Census.GOV>
1179 echo i586-unisys-sysv4 1223 echo i586-unisys-sysv4
1180 exit ;; 1224 exit ;;
1181 *:UNIX_System_V:4*:FTX*) 1225 *:UNIX_System_V:4*:FTX*)
1182 # From Gerald Hewes <hewes@openmarket.com>. 1226 # From Gerald Hewes <hewes@openmarket.com>.
1183 # How about differentiating between stratus architectures? -djm 1227 # How about differentiating between stratus architectures? -djm
1184 echo hppa1.1-stratus-sysv4 1228 echo hppa1.1-stratus-sysv4
1185 exit ;; 1229 exit ;;
1201 news*:NEWS-OS:6*:*) 1245 news*:NEWS-OS:6*:*)
1202 echo mips-sony-newsos6 1246 echo mips-sony-newsos6
1203 exit ;; 1247 exit ;;
1204 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1248 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1205 if [ -d /usr/nec ]; then 1249 if [ -d /usr/nec ]; then
1206 echo mips-nec-sysv${UNAME_RELEASE} 1250 echo mips-nec-sysv${UNAME_RELEASE}
1207 else 1251 else
1208 echo mips-unknown-sysv${UNAME_RELEASE} 1252 echo mips-unknown-sysv${UNAME_RELEASE}
1209 fi 1253 fi
1210 exit ;; 1254 exit ;;
1211 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1255 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1212 echo powerpc-be-beos 1256 echo powerpc-be-beos
1213 exit ;; 1257 exit ;;
1214 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1258 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1215 echo powerpc-apple-beos 1259 echo powerpc-apple-beos
1218 echo i586-pc-beos 1262 echo i586-pc-beos
1219 exit ;; 1263 exit ;;
1220 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1264 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1221 echo i586-pc-haiku 1265 echo i586-pc-haiku
1222 exit ;; 1266 exit ;;
1267 x86_64:Haiku:*:*)
1268 echo x86_64-unknown-haiku
1269 exit ;;
1223 SX-4:SUPER-UX:*:*) 1270 SX-4:SUPER-UX:*:*)
1224 echo sx4-nec-superux${UNAME_RELEASE} 1271 echo sx4-nec-superux${UNAME_RELEASE}
1225 exit ;; 1272 exit ;;
1226 SX-5:SUPER-UX:*:*) 1273 SX-5:SUPER-UX:*:*)
1227 echo sx5-nec-superux${UNAME_RELEASE} 1274 echo sx5-nec-superux${UNAME_RELEASE}
1236 echo sx8-nec-superux${UNAME_RELEASE} 1283 echo sx8-nec-superux${UNAME_RELEASE}
1237 exit ;; 1284 exit ;;
1238 SX-8R:SUPER-UX:*:*) 1285 SX-8R:SUPER-UX:*:*)
1239 echo sx8r-nec-superux${UNAME_RELEASE} 1286 echo sx8r-nec-superux${UNAME_RELEASE}
1240 exit ;; 1287 exit ;;
1288 SX-ACE:SUPER-UX:*:*)
1289 echo sxace-nec-superux${UNAME_RELEASE}
1290 exit ;;
1241 Power*:Rhapsody:*:*) 1291 Power*:Rhapsody:*:*)
1242 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1292 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1243 exit ;; 1293 exit ;;
1244 *:Rhapsody:*:*) 1294 *:Rhapsody:*:*)
1245 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1295 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1246 exit ;; 1296 exit ;;
1247 *:Darwin:*:*) 1297 *:Darwin:*:*)
1248 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1298 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1299 eval $set_cc_for_build
1300 if test "$UNAME_PROCESSOR" = unknown ; then
1301 UNAME_PROCESSOR=powerpc
1302 fi
1303 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1304 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1305 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1306 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1307 grep IS_64BIT_ARCH >/dev/null
1308 then
1249 case $UNAME_PROCESSOR in 1309 case $UNAME_PROCESSOR in
1310 i386) UNAME_PROCESSOR=x86_64 ;;
1250 unknown) UNAME_PROCESSOR=powerpc ;; 1311 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1251 esac 1312 esac
1313 fi
1314 fi
1315 elif test "$UNAME_PROCESSOR" = i386 ; then
1316 # Avoid executing cc on OS X 10.9, as it ships with a stub
1317 # that puts up a graphical alert prompting to install
1318 # developer tools. Any system running Mac OS X 10.7 or
1319 # later (Darwin 11 and later) is required to have a 64-bit
1320 # processor. This is not true of the ARM version of Darwin
1321 # that Apple uses in portable devices.
1322 UNAME_PROCESSOR=x86_64
1323 fi
1252 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1324 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1253 exit ;; 1325 exit ;;
1254 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1326 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1255 UNAME_PROCESSOR=`uname -p` 1327 UNAME_PROCESSOR=`uname -p`
1256 if test "$UNAME_PROCESSOR" = "x86"; then 1328 if test "$UNAME_PROCESSOR" = x86; then
1257 UNAME_PROCESSOR=i386 1329 UNAME_PROCESSOR=i386
1258 UNAME_MACHINE=pc 1330 UNAME_MACHINE=pc
1259 fi 1331 fi
1260 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1332 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1261 exit ;; 1333 exit ;;
1262 *:QNX:*:4*) 1334 *:QNX:*:4*)
1263 echo i386-pc-qnx 1335 echo i386-pc-qnx
1264 exit ;; 1336 exit ;;
1265 NSE-?:NONSTOP_KERNEL:*:*) 1337 NEO-?:NONSTOP_KERNEL:*:*)
1338 echo neo-tandem-nsk${UNAME_RELEASE}
1339 exit ;;
1340 NSE-*:NONSTOP_KERNEL:*:*)
1266 echo nse-tandem-nsk${UNAME_RELEASE} 1341 echo nse-tandem-nsk${UNAME_RELEASE}
1267 exit ;; 1342 exit ;;
1268 NSR-?:NONSTOP_KERNEL:*:*) 1343 NSR-?:NONSTOP_KERNEL:*:*)
1269 echo nsr-tandem-nsk${UNAME_RELEASE} 1344 echo nsr-tandem-nsk${UNAME_RELEASE}
1270 exit ;; 1345 exit ;;
1279 exit ;; 1354 exit ;;
1280 *:Plan9:*:*) 1355 *:Plan9:*:*)
1281 # "uname -m" is not consistent, so use $cputype instead. 386 1356 # "uname -m" is not consistent, so use $cputype instead. 386
1282 # is converted to i386 for consistency with other x86 1357 # is converted to i386 for consistency with other x86
1283 # operating systems. 1358 # operating systems.
1284 if test "$cputype" = "386"; then 1359 if test "$cputype" = 386; then
1285 UNAME_MACHINE=i386 1360 UNAME_MACHINE=i386
1286 else 1361 else
1287 UNAME_MACHINE="$cputype" 1362 UNAME_MACHINE="$cputype"
1288 fi 1363 fi
1289 echo ${UNAME_MACHINE}-unknown-plan9 1364 echo ${UNAME_MACHINE}-unknown-plan9
1305 exit ;; 1380 exit ;;
1306 *:ITS:*:*) 1381 *:ITS:*:*)
1307 echo pdp10-unknown-its 1382 echo pdp10-unknown-its
1308 exit ;; 1383 exit ;;
1309 SEI:*:*:SEIUX) 1384 SEI:*:*:SEIUX)
1310 echo mips-sei-seiux${UNAME_RELEASE} 1385 echo mips-sei-seiux${UNAME_RELEASE}
1311 exit ;; 1386 exit ;;
1312 *:DragonFly:*:*) 1387 *:DragonFly:*:*)
1313 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1388 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1314 exit ;; 1389 exit ;;
1315 *:*VMS:*:*) 1390 *:*VMS:*:*)
1316 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1391 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1317 case "${UNAME_MACHINE}" in 1392 case "${UNAME_MACHINE}" in
1318 A*) echo alpha-dec-vms ; exit ;; 1393 A*) echo alpha-dec-vms ; exit ;;
1319 I*) echo ia64-dec-vms ; exit ;; 1394 I*) echo ia64-dec-vms ; exit ;;
1320 V*) echo vax-dec-vms ; exit ;; 1395 V*) echo vax-dec-vms ; exit ;;
1321 esac ;; 1396 esac ;;
1322 *:XENIX:*:SysV) 1397 *:XENIX:*:SysV)
1323 echo i386-pc-xenix 1398 echo i386-pc-xenix
1324 exit ;; 1399 exit ;;
1325 i*86:skyos:*:*) 1400 i*86:skyos:*:*)
1326 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1401 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
1327 exit ;; 1402 exit ;;
1328 i*86:rdos:*:*) 1403 i*86:rdos:*:*)
1329 echo ${UNAME_MACHINE}-pc-rdos 1404 echo ${UNAME_MACHINE}-pc-rdos
1330 exit ;; 1405 exit ;;
1331 i*86:AROS:*:*) 1406 i*86:AROS:*:*)
1332 echo ${UNAME_MACHINE}-pc-aros 1407 echo ${UNAME_MACHINE}-pc-aros
1333 exit ;; 1408 exit ;;
1409 x86_64:VMkernel:*:*)
1410 echo ${UNAME_MACHINE}-unknown-esx
1411 exit ;;
1412 amd64:Isilon\ OneFS:*:*)
1413 echo x86_64-unknown-onefs
1414 exit ;;
1334esac 1415esac
1335
1336#echo '(No uname command or uname output not recognized.)' 1>&2
1337#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1338
1339eval $set_cc_for_build
1340cat >$dummy.c <<EOF
1341#ifdef _SEQUENT_
1342# include <sys/types.h>
1343# include <sys/utsname.h>
1344#endif
1345main ()
1346{
1347#if defined (sony)
1348#if defined (MIPSEB)
1349 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1350 I don't know.... */
1351 printf ("mips-sony-bsd\n"); exit (0);
1352#else
1353#include <sys/param.h>
1354 printf ("m68k-sony-newsos%s\n",
1355#ifdef NEWSOS4
1356 "4"
1357#else
1358 ""
1359#endif
1360 ); exit (0);
1361#endif
1362#endif
1363
1364#if defined (__arm) && defined (__acorn) && defined (__unix)
1365 printf ("arm-acorn-riscix\n"); exit (0);
1366#endif
1367
1368#if defined (hp300) && !defined (hpux)
1369 printf ("m68k-hp-bsd\n"); exit (0);
1370#endif
1371
1372#if defined (NeXT)
1373#if !defined (__ARCHITECTURE__)
1374#define __ARCHITECTURE__ "m68k"
1375#endif
1376 int version;
1377 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1378 if (version < 4)
1379 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1380 else
1381 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1382 exit (0);
1383#endif
1384
1385#if defined (MULTIMAX) || defined (n16)
1386#if defined (UMAXV)
1387 printf ("ns32k-encore-sysv\n"); exit (0);
1388#else
1389#if defined (CMU)
1390 printf ("ns32k-encore-mach\n"); exit (0);
1391#else
1392 printf ("ns32k-encore-bsd\n"); exit (0);
1393#endif
1394#endif
1395#endif
1396
1397#if defined (__386BSD__)
1398 printf ("i386-pc-bsd\n"); exit (0);
1399#endif
1400
1401#if defined (sequent)
1402#if defined (i386)
1403 printf ("i386-sequent-dynix\n"); exit (0);
1404#endif
1405#if defined (ns32000)
1406 printf ("ns32k-sequent-dynix\n"); exit (0);
1407#endif
1408#endif
1409
1410#if defined (_SEQUENT_)
1411 struct utsname un;
1412
1413 uname(&un);
1414
1415 if (strncmp(un.version, "V2", 2) == 0) {
1416 printf ("i386-sequent-ptx2\n"); exit (0);
1417 }
1418 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1419 printf ("i386-sequent-ptx1\n"); exit (0);
1420 }
1421 printf ("i386-sequent-ptx\n"); exit (0);
1422
1423#endif
1424
1425#if defined (vax)
1426# if !defined (ultrix)
1427# include <sys/param.h>
1428# if defined (BSD)
1429# if BSD == 43
1430 printf ("vax-dec-bsd4.3\n"); exit (0);
1431# else
1432# if BSD == 199006
1433 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1434# else
1435 printf ("vax-dec-bsd\n"); exit (0);
1436# endif
1437# endif
1438# else
1439 printf ("vax-dec-bsd\n"); exit (0);
1440# endif
1441# else
1442 printf ("vax-dec-ultrix\n"); exit (0);
1443# endif
1444#endif
1445
1446#if defined (alliant) && defined (i860)
1447 printf ("i860-alliant-bsd\n"); exit (0);
1448#endif
1449
1450 exit (1);
1451}
1452EOF
1453
1454$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1455 { echo "$SYSTEM_NAME"; exit; }
1456
1457# Apollos put the system type in the environment.
1458
1459test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1460
1461# Convex versions that predate uname can use getsysinfo(1)
1462
1463if [ -x /usr/convex/getsysinfo ]
1464then
1465 case `getsysinfo -f cpu_type` in
1466 c1*)
1467 echo c1-convex-bsd
1468 exit ;;
1469 c2*)
1470 if getsysinfo -f scalar_acc
1471 then echo c32-convex-bsd
1472 else echo c2-convex-bsd
1473 fi
1474 exit ;;
1475 c34*)
1476 echo c34-convex-bsd
1477 exit ;;
1478 c38*)
1479 echo c38-convex-bsd
1480 exit ;;
1481 c4*)
1482 echo c4-convex-bsd
1483 exit ;;
1484 esac
1485fi
1486 1416
1487cat >&2 <<EOF 1417cat >&2 <<EOF
1488$0: unable to guess system type 1418$0: unable to guess system type
1489 1419
1490This script, last modified $timestamp, has failed to recognize 1420This script (version $timestamp), has failed to recognize the
1491the operating system you are using. It is advised that you 1421operating system you are using. If your script is old, overwrite
1492download the most up to date version of the config scripts from 1422config.guess and config.sub with the latest versions from:
1493 1423
1494 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1424 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1495and 1425and
1496 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1426 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1497 1427
1498If the version you run ($0) is already up to date, please 1428If $0 has already been updated, send the following data and any
1499send the following data and any information you think might be 1429information you think might be pertinent to config-patches@gnu.org to
1500pertinent to <config-patches@gnu.org> in order to provide the needed
1501information to handle your system. 1430provide the necessary information to handle your system.
1502 1431
1503config.guess timestamp = $timestamp 1432config.guess timestamp = $timestamp
1504 1433
1505uname -m = `(uname -m) 2>/dev/null || echo unknown` 1434uname -m = `(uname -m) 2>/dev/null || echo unknown`
1506uname -r = `(uname -r) 2>/dev/null || echo unknown` 1435uname -r = `(uname -r) 2>/dev/null || echo unknown`
1529# eval: (add-hook 'write-file-hooks 'time-stamp) 1458# eval: (add-hook 'write-file-hooks 'time-stamp)
1530# time-stamp-start: "timestamp='" 1459# time-stamp-start: "timestamp='"
1531# time-stamp-format: "%:y-%02m-%02d" 1460# time-stamp-format: "%:y-%02m-%02d"
1532# time-stamp-end: "'" 1461# time-stamp-end: "'"
1533# End: 1462# End:
1463

Legend:
Removed from v.51  
changed lines
  Added in v.52

   
Visit the ZANavi Wiki