2
2
# Attempt to guess a canonical system name.
3
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
# 2000, 2001, 2002 Free Software Foundation, Inc.
4
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
8
8
# This file is free software; you can redistribute it and/or modify it
9
9
# under the terms of the GNU General Public License as published by
18
18
# You should have received a copy of the GNU General Public License
19
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22
23
# As a special exception to the GNU General Public License, if you
23
24
# distribute this file as part of a program that contains a
24
25
# configuration script generated by Autoconf, you may include it under
25
26
# the same distribution terms that you use for the rest of that program.
27
29
# Originally written by Per Bothner <per@bothner.com>.
28
30
# Please send patches to <config-patches@gnu.org>. Submit a context
29
31
# diff and a properly formatted ChangeLog entry.
53
55
GNU config.guess ($timestamp)
55
57
Originally written by Per Bothner.
56
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
58
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
57
59
Free Software Foundation, Inc.
59
61
This is free software; see the source for copying conditions. There is NO
98
100
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
99
101
# use `HOST_CC' if defined, but it is deprecated.
101
# This shell variable is my proudest work .. or something. --bje
103
# Portable tmp directory creation inspired by the Autoconf team.
103
set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
104
(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
105
|| (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
106
dummy=$tmpdir/dummy ;
107
files="$dummy.c $dummy.o $dummy.rel $dummy" ;
108
trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
106
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
109
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
114
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
109
115
case $CC_FOR_BUILD,$HOST_CC,$CC in
110
116
,,) echo "int x;" > $dummy.c ;
111
117
for c in cc gcc c89 c99 ; do
204
198
# contains redundant information, the shorter form:
205
199
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
206
200
echo "${machine}-${os}${release}"
209
echo m68k-unknown-openbsd${UNAME_RELEASE}
212
echo mipsel-unknown-openbsd${UNAME_RELEASE}
215
echo m68k-unknown-openbsd${UNAME_RELEASE}
218
echo m68k-unknown-openbsd${UNAME_RELEASE}
221
echo powerpc-unknown-openbsd${UNAME_RELEASE}
224
echo m68k-unknown-openbsd${UNAME_RELEASE}
227
echo m88k-unknown-openbsd${UNAME_RELEASE}
230
echo powerpc-unknown-openbsd${UNAME_RELEASE}
233
echo mipsel-unknown-openbsd${UNAME_RELEASE}
236
echo mipseb-unknown-openbsd${UNAME_RELEASE}
239
echo m68k-unknown-openbsd${UNAME_RELEASE}
242
echo mipsel-unknown-openbsd${UNAME_RELEASE}
245
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
203
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
204
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
207
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
210
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
213
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
248
if test $UNAME_RELEASE = "V4.0"; then
216
case $UNAME_RELEASE in
249
218
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
221
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
224
# According to Compaq, /usr/sbin/psrinfo has been available on
225
# OSF/1 and Tru64 systems produced since 1995. I hope that
226
# covers most systems running today. This code pipes the CPU
227
# types through head -n 1, so we only detect the type of CPU 0.
228
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
229
case "$ALPHA_CPU_TYPE" in
231
UNAME_MACHINE="alpha" ;;
233
UNAME_MACHINE="alpha" ;;
234
"LCA4 (21066/21068)")
235
UNAME_MACHINE="alpha" ;;
237
UNAME_MACHINE="alphaev5" ;;
239
UNAME_MACHINE="alphaev56" ;;
241
UNAME_MACHINE="alphapca56" ;;
243
UNAME_MACHINE="alphapca57" ;;
245
UNAME_MACHINE="alphaev6" ;;
247
UNAME_MACHINE="alphaev67" ;;
249
UNAME_MACHINE="alphaev68" ;;
251
UNAME_MACHINE="alphaev68" ;;
253
UNAME_MACHINE="alphaev68" ;;
254
"EV6.9A (21264/EV69A)")
255
UNAME_MACHINE="alphaev69" ;;
257
UNAME_MACHINE="alphaev7" ;;
259
UNAME_MACHINE="alphaev79" ;;
261
# A Pn.n version is a patched version.
251
262
# A Vn.n version is a released version.
252
263
# A Tn.n version is a released field test version.
253
264
# A Xn.n version is an unreleased experimental baselevel.
254
265
# 1.2 uses "1.2" for uname -r.
255
eval $set_cc_for_build
259
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
266
.frame \$30,16,\$26,0
269
.long 0x47e03d80 # implver \$0
271
.long 0x47e20c21 # amask \$2,\$1
281
$CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
282
if test "$?" = 0 ; then
285
UNAME_MACHINE="alpha"
288
UNAME_MACHINE="alphaev5"
291
UNAME_MACHINE="alphaev56"
294
UNAME_MACHINE="alphapca56"
297
UNAME_MACHINE="alphaev6"
300
UNAME_MACHINE="alphaev67"
303
UNAME_MACHINE="alphaev68"
306
UNAME_MACHINE="alphaev7"
310
rm -f $dummy.s $dummy && rmdir $tmpdir
311
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
266
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
313
268
Alpha\ *:Windows_NT*:*)
314
269
# How do we know it's Interix rather than the generic POSIX subsystem?
315
270
# Should we change UNAME_MACHINE based on the output of uname instead
316
271
# of the specific Alpha model?
317
272
echo alpha-pc-interix
319
274
21064:Windows_NT:50:3)
320
275
echo alpha-dec-winnt3.5
322
277
Amiga*:UNIX_System_V:4.0:*)
323
278
echo m68k-unknown-sysv4
325
280
*:[Aa]miga[Oo][Ss]:*:*)
326
281
echo ${UNAME_MACHINE}-unknown-amigaos
328
283
*:[Mm]orph[Oo][Ss]:*:*)
329
284
echo ${UNAME_MACHINE}-unknown-morphos
332
287
echo i370-ibm-openedition
293
echo powerpc-ibm-os400
334
295
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
335
296
echo arm-acorn-riscix${UNAME_RELEASE}
298
arm:riscos:*:*|arm:RISCOS:*:*)
299
echo arm-unknown-riscos
337
301
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
338
302
echo hppa1.1-hitachi-hiuxmpp
340
304
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
341
305
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
342
306
if test "`(/bin/universe) 2>/dev/null`" = att ; then
345
309
echo pyramid-pyramid-bsd
349
313
echo pyramid-pyramid-svr4
351
DRS?6000:UNIX_SV:4.2*:7*)
315
DRS?6000:unix:4.0:6*)
318
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
352
319
case `/usr/bin/uname -p` in
353
sparc) echo sparc-icl-nx7 && exit 0 ;;
320
sparc) echo sparc-icl-nx7; exit ;;
355
322
sun4H:SunOS:5.*:*)
356
323
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
358
325
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
359
326
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
361
328
i86pc:SunOS:5.*:*)
362
329
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
364
331
sun4*:SunOS:6*:*)
365
332
# According to config.sub, this is the proper way to canonicalize
366
333
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
367
334
# it's likely to be more like Solaris than SunOS4.
368
335
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
371
338
case "`/usr/bin/arch -k`" in
405
372
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
406
373
echo m68k-atari-mint${UNAME_RELEASE}
408
375
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
409
376
echo m68k-atari-mint${UNAME_RELEASE}
411
378
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
412
379
echo m68k-atari-mint${UNAME_RELEASE}
414
381
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
415
382
echo m68k-milan-mint${UNAME_RELEASE}
417
384
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
418
385
echo m68k-hades-mint${UNAME_RELEASE}
420
387
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
421
388
echo m68k-unknown-mint${UNAME_RELEASE}
391
echo m68k-apple-machten${UNAME_RELEASE}
423
393
powerpc:machten:*:*)
424
394
echo powerpc-apple-machten${UNAME_RELEASE}
427
397
echo mips-dec-mach_bsd4.3
429
399
RISC*:ULTRIX:*:*)
430
400
echo mips-dec-ultrix${UNAME_RELEASE}
432
402
VAX*:ULTRIX*:*:*)
433
403
echo vax-dec-ultrix${UNAME_RELEASE}
435
405
2020:CLIX:*:* | 2430:CLIX:*:*)
436
406
echo clipper-intergraph-clix${UNAME_RELEASE}
438
408
mips:*:*:UMIPS | mips:*:*:RISCos)
439
409
eval $set_cc_for_build
440
410
sed 's/^ //' << EOF >$dummy.c
461
$CC_FOR_BUILD -o $dummy $dummy.c \
462
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
463
&& rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
464
rm -f $dummy.c $dummy && rmdir $tmpdir
431
$CC_FOR_BUILD -o $dummy $dummy.c &&
432
dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
433
SYSTEM_NAME=`$dummy $dummyarg` &&
434
{ echo "$SYSTEM_NAME"; exit; }
465
435
echo mips-mips-riscos${UNAME_RELEASE}
467
437
Motorola:PowerMAX_OS:*:*)
468
438
echo powerpc-motorola-powermax
470
440
Motorola:*:4.3:PL8-*)
471
441
echo powerpc-harris-powermax
473
443
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
474
444
echo powerpc-harris-powermax
476
446
Night_Hawk:Power_UNIX:*:*)
477
447
echo powerpc-harris-powerunix
480
450
echo m88k-harris-cxux7
483
453
echo m88k-motorola-sysv4
486
456
echo m88k-motorola-sysv3
489
459
# DG/UX returns AViiON for all architectures
490
460
UNAME_PROCESSOR=`/usr/bin/uname -p`
501
471
echo i586-dg-dgux${UNAME_RELEASE}
504
474
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
505
475
echo m88k-dolphin-sysv3
508
478
# Delta 88k system running SVR3
509
479
echo m88k-motorola-sysv3
511
481
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
512
482
echo m88k-tektronix-sysv3
514
484
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
515
485
echo m68k-tektronix-bsd
518
488
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
520
490
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
521
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
522
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
491
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
492
exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
524
494
echo i386-ibm-aix
527
497
if [ -x /usr/bin/oslevel ] ; then
528
498
IBM_REV=`/usr/bin/oslevel`
647
620
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
648
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
649
rm -f $dummy.c $dummy && rmdir $tmpdir
621
test -z "$HP_ARCH" && HP_ARCH=hppa
624
if [ ${HP_ARCH} = "hppa2.0w" ]
626
eval $set_cc_for_build
628
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
629
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
630
# generating 64-bit code. GNU and HP use different nomenclature:
632
# $ CC_FOR_BUILD=cc ./config.guess
633
# => hppa2.0w-hp-hpux11.23
634
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
635
# => hppa64-hp-hpux11.23
637
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
638
grep __LP64__ >/dev/null
652
645
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
655
648
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
656
649
echo ia64-hp-hpux${HPUX_REV}
659
652
eval $set_cc_for_build
660
653
sed 's/^ //' << EOF >$dummy.c
685
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
686
rm -f $dummy.c $dummy && rmdir $tmpdir
678
$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
679
{ echo "$SYSTEM_NAME"; exit; }
687
680
echo unknown-hitachi-hiuxwe2
689
682
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
690
683
echo hppa1.1-hp-bsd
692
685
9000/8??:4.3bsd:*:*)
693
686
echo hppa1.0-hp-bsd
695
688
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
696
689
echo hppa1.0-hp-mpeix
698
691
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
699
692
echo hppa1.1-hp-osf
702
695
echo hppa1.0-hp-osf
705
698
if [ -x /usr/sbin/sysversion ] ; then
706
699
echo ${UNAME_MACHINE}-unknown-osf1mk
708
701
echo ${UNAME_MACHINE}-unknown-osf1
711
704
parisc*:Lites*:*:*)
712
705
echo hppa1.1-hp-lites
714
707
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
715
708
echo c1-convex-bsd
717
710
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
718
711
if getsysinfo -f scalar_acc
719
712
then echo c32-convex-bsd
720
713
else echo c2-convex-bsd
723
716
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
724
717
echo c34-convex-bsd
726
719
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
727
720
echo c38-convex-bsd
729
722
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
730
723
echo c4-convex-bsd
733
726
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
735
728
CRAY*[A-Z]90:*:*:*)
736
729
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
737
730
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
738
731
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
739
732
-e 's/\.[^.]*$/.X/'
742
735
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
745
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
748
738
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
751
741
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
744
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
753
746
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
754
747
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
755
748
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
756
749
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
757
750
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
752
5000:UNIX_System_V:4.*:*)
753
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
754
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
755
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
759
757
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
760
758
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
762
760
sparc*:BSD/OS:*:*)
763
761
echo sparc-unknown-bsdi${UNAME_RELEASE}
766
764
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
769
# Determine whether the default compiler uses glibc.
770
eval $set_cc_for_build
771
sed 's/^ //' << EOF >$dummy.c
772
#include <features.h>
779
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
780
rm -f $dummy.c && rmdir $tmpdir
781
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
767
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
784
770
echo ${UNAME_MACHINE}-pc-cygwin
787
773
echo ${UNAME_MACHINE}-pc-mingw32
776
# uname -m includes "-pc" on this system.
777
echo ${UNAME_MACHINE}-mingw32
790
780
echo ${UNAME_MACHINE}-pc-pw32
793
echo i586-pc-interix3
783
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
795
785
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
796
786
echo i${UNAME_MACHINE}-pc-mks
798
788
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
799
789
# How do we know it's Interix rather than the generic POSIX subsystem?
800
790
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
801
791
# UNAME_MACHINE based on the output of uname instead of i386?
802
792
echo i586-pc-interix
805
795
echo ${UNAME_MACHINE}-pc-uwin
797
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
798
echo x86_64-unknown-cygwin
808
801
echo powerpcle-unknown-cygwin
810
803
prep*:SunOS:5.*:*)
811
804
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
814
808
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
811
# other systems with GNU libc and userland
812
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
817
815
echo ${UNAME_MACHINE}-pc-minix
820
echo ${UNAME_MACHINE}-${VENDOR}-linux
818
echo ${UNAME_MACHINE}-unknown-linux-gnu
821
echo cris-axis-linux-gnu
824
echo crisv32-axis-linux-gnu
827
echo frv-unknown-linux-gnu
823
echo ${UNAME_MACHINE}-${VENDOR}-linux
830
echo ${UNAME_MACHINE}-unknown-linux-gnu
833
echo ${UNAME_MACHINE}-unknown-linux-gnu
826
echo ${UNAME_MACHINE}-${VENDOR}-linux
836
echo ${UNAME_MACHINE}-unknown-linux-gnu
829
839
eval $set_cc_for_build
830
840
sed 's/^ //' << EOF >$dummy.c
884
895
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
885
896
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
886
echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
897
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
888
899
parisc:Linux:*:* | hppa:Linux:*:*)
889
900
# Look for CPU level
890
901
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
891
PA7*) echo hppa1.1-${VENDOR}-linux ;;
892
PA8*) echo hppa2.0-${VENDOR}-linux ;;
893
*) echo hppa-${VENDOR}-linux ;;
902
PA7*) echo hppa1.1-unknown-linux-gnu ;;
903
PA8*) echo hppa2.0-unknown-linux-gnu ;;
904
*) echo hppa-unknown-linux-gnu ;;
896
907
parisc64:Linux:*:* | hppa64:Linux:*:*)
897
echo hppa64-${VENDOR}-linux
908
echo hppa64-unknown-linux-gnu
899
910
s390:Linux:*:* | s390x:Linux:*:*)
900
911
echo ${UNAME_MACHINE}-ibm-linux
914
echo ${UNAME_MACHINE}-unknown-linux-gnu
903
echo ${UNAME_MACHINE}-${VENDOR}-linux
917
echo ${UNAME_MACHINE}-unknown-linux-gnu
905
919
sparc:Linux:*:* | sparc64:Linux:*:*)
906
echo ${UNAME_MACHINE}-${VENDOR}-linux
920
echo ${UNAME_MACHINE}-unknown-linux-gnu
908
922
x86_64:Linux:*:*)
909
echo x86_64-${VENDOR}-linux
923
echo x86_64-unknown-linux-gnu
912
926
# The BFD linker knows what the default object file format is, so
913
927
# first see if it will tell us. cd to the root directory to prevent
975
994
# I just have to hope. -- rms.
976
995
# Use sysv4.2uw... so that sysv4* matches it.
977
996
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
980
# If we were able to find `uname', then EMX Unix compatibility
981
# is probably installed.
982
echo ${UNAME_MACHINE}-pc-os2-emx
985
echo ${UNAME_MACHINE}-unknown-stop
988
echo ${UNAME_MACHINE}-unknown-atheos
990
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
991
echo i386-unknown-lynxos${UNAME_RELEASE}
994
echo ${UNAME_MACHINE}-pc-msdosdjgpp
997
# If we were able to find `uname', then EMX Unix compatibility
998
# is probably installed.
999
echo ${UNAME_MACHINE}-pc-os2-emx
1001
i*86:XTS-300:*:STOP)
1002
echo ${UNAME_MACHINE}-unknown-stop
1005
echo ${UNAME_MACHINE}-unknown-atheos
1007
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1008
echo i386-unknown-lynxos${UNAME_RELEASE}
1011
echo ${UNAME_MACHINE}-pc-msdosdjgpp
999
# If we were able to find `uname', then EMX Unix compatibility
1000
# is probably installed.
1001
echo ${UNAME_MACHINE}-pc-os2-emx
1003
i*86:XTS-300:*:STOP)
1004
echo ${UNAME_MACHINE}-unknown-stop
1007
echo ${UNAME_MACHINE}-unknown-atheos
1010
echo ${UNAME_MACHINE}-pc-syllable
1012
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1013
echo i386-unknown-lynxos${UNAME_RELEASE}
1016
echo ${UNAME_MACHINE}-pc-msdosdjgpp
1013
1018
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1014
1019
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1015
1020
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1044
1050
echo ${UNAME_MACHINE}-pc-sysv32
1048
1054
# Left here for compatibility:
1049
1055
# uname -m prints for DJGPP always 'pc', but it prints nothing about
1050
1056
# the processor, so we play safe by assuming i386.
1051
1057
echo i386-pc-msdosdjgpp
1053
1059
Intel:Mach:3*:*)
1054
1060
echo i386-pc-mach3
1057
1063
echo i860-intel-osf1
1059
1065
i860:*:4.*:*) # i860-SVR4
1060
1066
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1061
1067
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1062
1068
else # Add other i860-SVR4 vendors below as they are discovered.
1063
1069
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1066
1072
mini*:CTIX:SYS*5:*)
1068
1074
echo m68010-convergent-sysv
1070
1076
mc68k:UNIX:SYSTEM5:3.51m)
1071
1077
echo m68k-convergent-sysv
1073
1079
M680?0:D-NIX:5.3:*)
1074
1080
echo m68k-diab-dnix
1077
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1078
3[34]??:*: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)
1082
M68*:*:R3V[5678]*:*)
1083
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1084
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)
1080
1086
test -r /etc/.relid \
1081
1087
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1082
1088
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1083
&& echo i486-ncr-sysv4.3${OS_REL} && exit 0
1089
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1084
1090
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1085
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
1091
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1086
1092
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1087
1093
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1088
&& echo i486-ncr-sysv4 && exit 0 ;;
1094
&& { echo i486-ncr-sysv4; exit; } ;;
1089
1095
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1090
1096
echo m68k-unknown-lynxos${UNAME_RELEASE}
1092
1098
mc68030:UNIX_System_V:4.*:*)
1093
1099
echo m68k-atari-sysv4
1095
1101
TSUNAMI:LynxOS:2.*:*)
1096
1102
echo sparc-unknown-lynxos${UNAME_RELEASE}
1098
1104
rs6000:LynxOS:2.*:*)
1099
1105
echo rs6000-unknown-lynxos${UNAME_RELEASE}
1101
1107
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1102
1108
echo powerpc-unknown-lynxos${UNAME_RELEASE}
1104
1110
SM[BE]S:UNIX_SV:*:*)
1105
1111
echo mips-dde-sysv${UNAME_RELEASE}
1107
1113
RM*:ReliantUNIX-*:*:*)
1108
1114
echo mips-sni-sysv4
1110
1116
RM*:SINIX-*:*:*)
1111
1117
echo mips-sni-sysv4
1114
1120
if uname -p 2>/dev/null >/dev/null ; then
1115
1121
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1118
1124
echo ns32k-sni-sysv
1121
1127
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1122
1128
# says <Richard.M.Bartel@ccMail.Census.GOV>
1123
1129
echo i586-unisys-sysv4
1125
1131
*:UNIX_System_V:4*:FTX*)
1126
1132
# From Gerald Hewes <hewes@openmarket.com>.
1127
1133
# How about differentiating between stratus architectures? -djm
1128
1134
echo hppa1.1-stratus-sysv4
1131
1137
# From seanf@swdc.stratus.com.
1132
1138
echo i860-stratus-sysv4
1141
# From Paul.Green@stratus.com.
1142
echo ${UNAME_MACHINE}-stratus-vos
1135
1145
# From Paul.Green@stratus.com.
1136
1146
echo hppa1.1-stratus-vos
1138
1148
mc68*:A/UX:*:*)
1139
1149
echo m68k-apple-aux${UNAME_RELEASE}
1141
1151
news*:NEWS-OS:6*:*)
1142
1152
echo mips-sony-newsos6
1144
1154
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1145
1155
if [ -d /usr/nec ]; then
1146
1156
echo mips-nec-sysv${UNAME_RELEASE}
1148
1158
echo mips-unknown-sysv${UNAME_RELEASE}
1151
1161
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1152
1162
echo powerpc-be-beos
1154
1164
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1155
1165
echo powerpc-apple-beos
1157
1167
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1158
1168
echo i586-pc-beos
1160
1170
SX-4:SUPER-UX:*:*)
1161
1171
echo sx4-nec-superux${UNAME_RELEASE}
1163
1173
SX-5:SUPER-UX:*:*)
1164
1174
echo sx5-nec-superux${UNAME_RELEASE}
1167
echo sx6-nec-superux${UNAME_RELEASE}
1170
echo sx6-nec-superux${UNAME_RELEASE}
1177
echo sx6-nec-superux${UNAME_RELEASE}
1172
1179
Power*:Rhapsody:*:*)
1173
1180
echo powerpc-apple-rhapsody${UNAME_RELEASE}
1175
1182
*:Rhapsody:*:*)
1176
1183
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1179
echo `uname -p`-apple-darwin${UNAME_RELEASE}
1186
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1187
case $UNAME_PROCESSOR in
1188
*86) UNAME_PROCESSOR=i686 ;;
1189
unknown) UNAME_PROCESSOR=powerpc ;;
1191
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1181
1193
*:procnto*:*:* | *:QNX:[0123456789]*:*)
1182
1194
UNAME_PROCESSOR=`uname -p`
1183
1195
if test "$UNAME_PROCESSOR" = "x86"; then
1211
1226
UNAME_MACHINE="$cputype"
1213
1228
echo ${UNAME_MACHINE}-unknown-plan9
1216
1231
echo pdp10-unknown-tops10
1219
1234
echo pdp10-unknown-tenex
1221
1236
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1222
1237
echo pdp10-dec-tops20
1224
1239
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1225
1240
echo pdp10-xkl-tops20
1228
1243
echo pdp10-unknown-tops20
1231
1246
echo pdp10-unknown-its
1249
echo mips-sei-seiux${UNAME_RELEASE}
1252
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1255
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1256
case "${UNAME_MACHINE}" in
1257
A*) echo alpha-dec-vms ; exit ;;
1258
I*) echo ia64-dec-vms ; exit ;;
1259
V*) echo vax-dec-vms ; exit ;;
1265
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1235
1269
#echo '(No uname command or uname output not recognized.)' 1>&2