0 | 0 |
#! /bin/sh
|
1 | 1 |
# Attempt to guess a canonical system name.
|
2 | 2 |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
3 | |
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
4 | |
|
5 | |
timestamp='2002-11-30'
|
|
3 |
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
|
4 |
|
|
5 |
timestamp='2005-04-22'
|
6 | 6 |
|
7 | 7 |
# This file is free software; you can redistribute it and/or modify it
|
8 | 8 |
# under the terms of the GNU General Public License as published by
|
|
52 | 52 |
GNU config.guess ($timestamp)
|
53 | 53 |
|
54 | 54 |
Originally written by Per Bothner.
|
55 | |
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
|
55 |
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
56 | 56 |
Free Software Foundation, Inc.
|
57 | 57 |
|
58 | 58 |
This is free software; see the source for copying conditions. There is NO
|
|
97 | 97 |
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
98 | 98 |
# use `HOST_CC' if defined, but it is deprecated.
|
99 | 99 |
|
100 | |
# This shell variable is my proudest work .. or something. --bje
|
101 | |
|
102 | |
set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
|
103 | |
(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
|
104 | |
|| (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
|
105 | |
dummy=$tmpdir/dummy ;
|
106 | |
files="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
107 | |
trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
|
|
100 |
# Portable tmp directory creation inspired by the Autoconf team.
|
|
101 |
|
|
102 |
set_cc_for_build='
|
|
103 |
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
|
104 |
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
|
105 |
: ${TMPDIR=/tmp} ;
|
|
106 |
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
|
107 |
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
|
108 |
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
|
109 |
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
|
110 |
dummy=$tmp/dummy ;
|
|
111 |
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
108 | 112 |
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
109 | 113 |
,,) echo "int x;" > $dummy.c ;
|
110 | 114 |
for c in cc gcc c89 c99 ; do
|
|
112 | 116 |
CC_FOR_BUILD="$c"; break ;
|
113 | 117 |
fi ;
|
114 | 118 |
done ;
|
115 | |
rm -f $files ;
|
116 | 119 |
if test x"$CC_FOR_BUILD" = x ; then
|
117 | 120 |
CC_FOR_BUILD=no_compiler_found ;
|
118 | 121 |
fi
|
119 | 122 |
;;
|
120 | 123 |
,,*) CC_FOR_BUILD=$CC ;;
|
121 | 124 |
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
122 | |
esac ;
|
123 | |
unset files'
|
|
125 |
esac ;'
|
124 | 126 |
|
125 | 127 |
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
126 | 128 |
# (ghazi@noc.rutgers.edu 1994-08-24)
|
|
194 | 196 |
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
195 | 197 |
echo "${machine}-${os}${release}"
|
196 | 198 |
exit 0 ;;
|
|
199 |
amd64:OpenBSD:*:*)
|
|
200 |
echo x86_64-unknown-openbsd${UNAME_RELEASE}
|
|
201 |
exit 0 ;;
|
197 | 202 |
amiga:OpenBSD:*:*)
|
198 | 203 |
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
199 | 204 |
exit 0 ;;
|
200 | |
arc:OpenBSD:*:*)
|
201 | |
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
|
205 |
cats:OpenBSD:*:*)
|
|
206 |
echo arm-unknown-openbsd${UNAME_RELEASE}
|
202 | 207 |
exit 0 ;;
|
203 | 208 |
hp300:OpenBSD:*:*)
|
204 | 209 |
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
205 | 210 |
exit 0 ;;
|
|
211 |
luna88k:OpenBSD:*:*)
|
|
212 |
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
|
213 |
exit 0 ;;
|
206 | 214 |
mac68k:OpenBSD:*:*)
|
207 | 215 |
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
208 | 216 |
exit 0 ;;
|
|
218 | 226 |
mvmeppc:OpenBSD:*:*)
|
219 | 227 |
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
220 | 228 |
exit 0 ;;
|
221 | |
pmax:OpenBSD:*:*)
|
222 | |
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
223 | |
exit 0 ;;
|
224 | 229 |
sgi:OpenBSD:*:*)
|
225 | |
echo mipseb-unknown-openbsd${UNAME_RELEASE}
|
|
230 |
echo mips64-unknown-openbsd${UNAME_RELEASE}
|
226 | 231 |
exit 0 ;;
|
227 | 232 |
sun3:OpenBSD:*:*)
|
228 | 233 |
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
229 | 234 |
exit 0 ;;
|
230 | |
wgrisc:OpenBSD:*:*)
|
231 | |
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
232 | |
exit 0 ;;
|
233 | 235 |
*:OpenBSD:*:*)
|
234 | 236 |
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
235 | 237 |
exit 0 ;;
|
|
238 |
*:ekkoBSD:*:*)
|
|
239 |
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
|
240 |
exit 0 ;;
|
|
241 |
macppc:MirBSD:*:*)
|
|
242 |
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
|
|
243 |
exit 0 ;;
|
|
244 |
*:MirBSD:*:*)
|
|
245 |
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
|
246 |
exit 0 ;;
|
236 | 247 |
alpha:OSF1:*:*)
|
237 | |
if test $UNAME_RELEASE = "V4.0"; then
|
|
248 |
case $UNAME_RELEASE in
|
|
249 |
*4.0)
|
238 | 250 |
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
239 | |
fi
|
|
251 |
;;
|
|
252 |
*5.*)
|
|
253 |
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
|
254 |
;;
|
|
255 |
esac
|
|
256 |
# According to Compaq, /usr/sbin/psrinfo has been available on
|
|
257 |
# OSF/1 and Tru64 systems produced since 1995. I hope that
|
|
258 |
# covers most systems running today. This code pipes the CPU
|
|
259 |
# types through head -n 1, so we only detect the type of CPU 0.
|
|
260 |
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
|
261 |
case "$ALPHA_CPU_TYPE" in
|
|
262 |
"EV4 (21064)")
|
|
263 |
UNAME_MACHINE="alpha" ;;
|
|
264 |
"EV4.5 (21064)")
|
|
265 |
UNAME_MACHINE="alpha" ;;
|
|
266 |
"LCA4 (21066/21068)")
|
|
267 |
UNAME_MACHINE="alpha" ;;
|
|
268 |
"EV5 (21164)")
|
|
269 |
UNAME_MACHINE="alphaev5" ;;
|
|
270 |
"EV5.6 (21164A)")
|
|
271 |
UNAME_MACHINE="alphaev56" ;;
|
|
272 |
"EV5.6 (21164PC)")
|
|
273 |
UNAME_MACHINE="alphapca56" ;;
|
|
274 |
"EV5.7 (21164PC)")
|
|
275 |
UNAME_MACHINE="alphapca57" ;;
|
|
276 |
"EV6 (21264)")
|
|
277 |
UNAME_MACHINE="alphaev6" ;;
|
|
278 |
"EV6.7 (21264A)")
|
|
279 |
UNAME_MACHINE="alphaev67" ;;
|
|
280 |
"EV6.8CB (21264C)")
|
|
281 |
UNAME_MACHINE="alphaev68" ;;
|
|
282 |
"EV6.8AL (21264B)")
|
|
283 |
UNAME_MACHINE="alphaev68" ;;
|
|
284 |
"EV6.8CX (21264D)")
|
|
285 |
UNAME_MACHINE="alphaev68" ;;
|
|
286 |
"EV6.9A (21264/EV69A)")
|
|
287 |
UNAME_MACHINE="alphaev69" ;;
|
|
288 |
"EV7 (21364)")
|
|
289 |
UNAME_MACHINE="alphaev7" ;;
|
|
290 |
"EV7.9 (21364A)")
|
|
291 |
UNAME_MACHINE="alphaev79" ;;
|
|
292 |
esac
|
|
293 |
# A Pn.n version is a patched version.
|
240 | 294 |
# A Vn.n version is a released version.
|
241 | 295 |
# A Tn.n version is a released field test version.
|
242 | 296 |
# A Xn.n version is an unreleased experimental baselevel.
|
243 | 297 |
# 1.2 uses "1.2" for uname -r.
|
244 | |
eval $set_cc_for_build
|
245 | |
cat <<EOF >$dummy.s
|
246 | |
.data
|
247 | |
\$Lformat:
|
248 | |
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
249 | |
|
250 | |
.text
|
251 | |
.globl main
|
252 | |
.align 4
|
253 | |
.ent main
|
254 | |
main:
|
255 | |
.frame \$30,16,\$26,0
|
256 | |
ldgp \$29,0(\$27)
|
257 | |
.prologue 1
|
258 | |
.long 0x47e03d80 # implver \$0
|
259 | |
lda \$2,-1
|
260 | |
.long 0x47e20c21 # amask \$2,\$1
|
261 | |
lda \$16,\$Lformat
|
262 | |
mov \$0,\$17
|
263 | |
not \$1,\$18
|
264 | |
jsr \$26,printf
|
265 | |
ldgp \$29,0(\$26)
|
266 | |
mov 0,\$16
|
267 | |
jsr \$26,exit
|
268 | |
.end main
|
269 | |
EOF
|
270 | |
$CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
|
271 | |
if test "$?" = 0 ; then
|
272 | |
case `$dummy` in
|
273 | |
0-0)
|
274 | |
UNAME_MACHINE="alpha"
|
275 | |
;;
|
276 | |
1-0)
|
277 | |
UNAME_MACHINE="alphaev5"
|
278 | |
;;
|
279 | |
1-1)
|
280 | |
UNAME_MACHINE="alphaev56"
|
281 | |
;;
|
282 | |
1-101)
|
283 | |
UNAME_MACHINE="alphapca56"
|
284 | |
;;
|
285 | |
2-303)
|
286 | |
UNAME_MACHINE="alphaev6"
|
287 | |
;;
|
288 | |
2-307)
|
289 | |
UNAME_MACHINE="alphaev67"
|
290 | |
;;
|
291 | |
2-1307)
|
292 | |
UNAME_MACHINE="alphaev68"
|
293 | |
;;
|
294 | |
3-1307)
|
295 | |
UNAME_MACHINE="alphaev7"
|
296 | |
;;
|
297 | |
esac
|
298 | |
fi
|
299 | |
rm -f $dummy.s $dummy && rmdir $tmpdir
|
300 | |
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
|
298 |
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
301 | 299 |
exit 0 ;;
|
302 | 300 |
Alpha\ *:Windows_NT*:*)
|
303 | 301 |
# How do we know it's Interix rather than the generic POSIX subsystem?
|
|
319 | 317 |
exit 0 ;;
|
320 | 318 |
*:OS/390:*:*)
|
321 | 319 |
echo i370-ibm-openedition
|
|
320 |
exit 0 ;;
|
|
321 |
*:z/VM:*:*)
|
|
322 |
echo s390-ibm-zvmoe
|
|
323 |
exit 0 ;;
|
|
324 |
*:OS400:*:*)
|
|
325 |
echo powerpc-ibm-os400
|
322 | 326 |
exit 0 ;;
|
323 | 327 |
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
324 | 328 |
echo arm-acorn-riscix${UNAME_RELEASE}
|
|
337 | 341 |
NILE*:*:*:dcosx)
|
338 | 342 |
echo pyramid-pyramid-svr4
|
339 | 343 |
exit 0 ;;
|
340 | |
DRS?6000:UNIX_SV:4.2*:7*)
|
|
344 |
DRS?6000:unix:4.0:6*)
|
|
345 |
echo sparc-icl-nx6
|
|
346 |
exit 0 ;;
|
|
347 |
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
|
341 | 348 |
case `/usr/bin/uname -p` in
|
342 | 349 |
sparc) echo sparc-icl-nx7 && exit 0 ;;
|
343 | 350 |
esac ;;
|
|
409 | 416 |
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
410 | 417 |
echo m68k-unknown-mint${UNAME_RELEASE}
|
411 | 418 |
exit 0 ;;
|
|
419 |
m68k:machten:*:*)
|
|
420 |
echo m68k-apple-machten${UNAME_RELEASE}
|
|
421 |
exit 0 ;;
|
412 | 422 |
powerpc:machten:*:*)
|
413 | 423 |
echo powerpc-apple-machten${UNAME_RELEASE}
|
414 | 424 |
exit 0 ;;
|
|
449 | 459 |
EOF
|
450 | 460 |
$CC_FOR_BUILD -o $dummy $dummy.c \
|
451 | 461 |
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
452 | |
&& rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
453 | |
rm -f $dummy.c $dummy && rmdir $tmpdir
|
|
462 |
&& exit 0
|
454 | 463 |
echo mips-mips-riscos${UNAME_RELEASE}
|
455 | 464 |
exit 0 ;;
|
456 | 465 |
Motorola:PowerMAX_OS:*:*)
|
|
534 | 543 |
exit(0);
|
535 | 544 |
}
|
536 | 545 |
EOF
|
537 | |
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
538 | |
rm -f $dummy.c $dummy && rmdir $tmpdir
|
|
546 |
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
539 | 547 |
echo rs6000-ibm-aix3.2.5
|
540 | 548 |
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
541 | 549 |
echo rs6000-ibm-aix3.2.4
|
|
634 | 642 |
}
|
635 | 643 |
EOF
|
636 | 644 |
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
637 | |
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
638 | |
rm -f $dummy.c $dummy && rmdir $tmpdir
|
|
645 |
test -z "$HP_ARCH" && HP_ARCH=hppa
|
639 | 646 |
fi ;;
|
640 | 647 |
esac
|
|
648 |
if [ ${HP_ARCH} = "hppa2.0w" ]
|
|
649 |
then
|
|
650 |
# avoid double evaluation of $set_cc_for_build
|
|
651 |
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
|
|
652 |
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
|
|
653 |
then
|
|
654 |
HP_ARCH="hppa2.0w"
|
|
655 |
else
|
|
656 |
HP_ARCH="hppa64"
|
|
657 |
fi
|
|
658 |
fi
|
641 | 659 |
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
642 | 660 |
exit 0 ;;
|
643 | 661 |
ia64:HP-UX:*:*)
|
|
671 | 689 |
exit (0);
|
672 | 690 |
}
|
673 | 691 |
EOF
|
674 | |
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
675 | |
rm -f $dummy.c $dummy && rmdir $tmpdir
|
|
692 |
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
676 | 693 |
echo unknown-hitachi-hiuxwe2
|
677 | 694 |
exit 0 ;;
|
678 | 695 |
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
|
730 | 747 |
CRAY*TS:*:*:*)
|
731 | 748 |
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
732 | 749 |
exit 0 ;;
|
733 | |
CRAY*T3D:*:*:*)
|
734 | |
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
735 | |
exit 0 ;;
|
736 | 750 |
CRAY*T3E:*:*:*)
|
737 | 751 |
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
738 | 752 |
exit 0 ;;
|
739 | 753 |
CRAY*SV1:*:*:*)
|
740 | 754 |
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
|
755 |
exit 0 ;;
|
|
756 |
*:UNICOS/mp:*:*)
|
|
757 |
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
741 | 758 |
exit 0 ;;
|
742 | 759 |
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
743 | 760 |
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
|
745 | 762 |
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
746 | 763 |
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
747 | 764 |
exit 0 ;;
|
|
765 |
5000:UNIX_System_V:4.*:*)
|
|
766 |
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
|
767 |
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
|
768 |
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
|
769 |
exit 0 ;;
|
748 | 770 |
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
749 | 771 |
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
750 | 772 |
exit 0 ;;
|
|
755 | 777 |
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
756 | 778 |
exit 0 ;;
|
757 | 779 |
*:FreeBSD:*:*)
|
758 | |
# Determine whether the default compiler uses glibc.
|
759 | |
eval $set_cc_for_build
|
760 | |
sed 's/^ //' << EOF >$dummy.c
|
761 | |
#include <features.h>
|
762 | |
#if __GLIBC__ >= 2
|
763 | |
LIBC=gnu
|
764 | |
#else
|
765 | |
LIBC=
|
766 | |
#endif
|
767 | |
EOF
|
768 | |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
769 | |
rm -f $dummy.c && rmdir $tmpdir
|
770 | |
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
|
|
780 |
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
771 | 781 |
exit 0 ;;
|
772 | 782 |
i*:CYGWIN*:*)
|
773 | 783 |
echo ${UNAME_MACHINE}-pc-cygwin
|
|
778 | 788 |
i*:PW*:*)
|
779 | 789 |
echo ${UNAME_MACHINE}-pc-pw32
|
780 | 790 |
exit 0 ;;
|
781 | |
x86:Interix*:3*)
|
782 | |
echo i586-pc-interix3
|
|
791 |
x86:Interix*:[34]*)
|
|
792 |
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
|
783 | 793 |
exit 0 ;;
|
784 | 794 |
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
785 | 795 |
echo i${UNAME_MACHINE}-pc-mks
|
|
793 | 803 |
i*:UWIN*:*)
|
794 | 804 |
echo ${UNAME_MACHINE}-pc-uwin
|
795 | 805 |
exit 0 ;;
|
|
806 |
amd64:CYGWIN*:*:*)
|
|
807 |
echo x86_64-unknown-cygwin
|
|
808 |
exit 0 ;;
|
796 | 809 |
p*:CYGWIN*:*)
|
797 | 810 |
echo powerpcle-unknown-cygwin
|
798 | 811 |
exit 0 ;;
|
|
800 | 813 |
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
801 | 814 |
exit 0 ;;
|
802 | 815 |
*:GNU:*:*)
|
|
816 |
# the GNU system
|
803 | 817 |
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
|
818 |
exit 0 ;;
|
|
819 |
*:GNU/*:*:*)
|
|
820 |
# other systems with GNU libc and userland
|
|
821 |
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
804 | 822 |
exit 0 ;;
|
805 | 823 |
i*86:Minix:*:*)
|
806 | 824 |
echo ${UNAME_MACHINE}-pc-minix
|
|
808 | 826 |
arm*:Linux:*:*)
|
809 | 827 |
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
810 | 828 |
exit 0 ;;
|
|
829 |
cris:Linux:*:*)
|
|
830 |
echo cris-axis-linux-gnu
|
|
831 |
exit 0 ;;
|
|
832 |
crisv32:Linux:*:*)
|
|
833 |
echo crisv32-axis-linux-gnu
|
|
834 |
exit 0 ;;
|
|
835 |
frv:Linux:*:*)
|
|
836 |
echo frv-unknown-linux-gnu
|
|
837 |
exit 0 ;;
|
811 | 838 |
ia64:Linux:*:*)
|
|
839 |
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
840 |
exit 0 ;;
|
|
841 |
m32r*:Linux:*:*)
|
812 | 842 |
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
813 | 843 |
exit 0 ;;
|
814 | 844 |
m68*:Linux:*:*)
|
|
831 | 861 |
#endif
|
832 | 862 |
EOF
|
833 | 863 |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
834 | |
rm -f $dummy.c && rmdir $tmpdir
|
835 | 864 |
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
836 | 865 |
;;
|
837 | 866 |
mips64:Linux:*:*)
|
|
851 | 880 |
#endif
|
852 | 881 |
EOF
|
853 | 882 |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
854 | |
rm -f $dummy.c && rmdir $tmpdir
|
855 | 883 |
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
856 | 884 |
;;
|
857 | 885 |
ppc:Linux:*:*)
|
|
887 | 915 |
exit 0 ;;
|
888 | 916 |
s390:Linux:*:* | s390x:Linux:*:*)
|
889 | 917 |
echo ${UNAME_MACHINE}-ibm-linux
|
|
918 |
exit 0 ;;
|
|
919 |
sh64*:Linux:*:*)
|
|
920 |
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
890 | 921 |
exit 0 ;;
|
891 | 922 |
sh*:Linux:*:*)
|
892 | 923 |
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
945 | 976 |
LIBC=gnuaout
|
946 | 977 |
#endif
|
947 | 978 |
#endif
|
|
979 |
#ifdef __dietlibc__
|
|
980 |
LIBC=dietlibc
|
|
981 |
#endif
|
948 | 982 |
EOF
|
949 | 983 |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
950 | |
rm -f $dummy.c && rmdir $tmpdir
|
951 | 984 |
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
|
952 | 985 |
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
953 | 986 |
;;
|
|
975 | 1008 |
exit 0 ;;
|
976 | 1009 |
i*86:atheos:*:*)
|
977 | 1010 |
echo ${UNAME_MACHINE}-unknown-atheos
|
|
1011 |
exit 0 ;;
|
|
1012 |
i*86:syllable:*:*)
|
|
1013 |
echo ${UNAME_MACHINE}-pc-syllable
|
978 | 1014 |
exit 0 ;;
|
979 | 1015 |
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
980 | 1016 |
echo i386-unknown-lynxos${UNAME_RELEASE}
|
|
1045 | 1081 |
M680?0:D-NIX:5.3:*)
|
1046 | 1082 |
echo m68k-diab-dnix
|
1047 | 1083 |
exit 0 ;;
|
1048 | |
M68*:*:R3V[567]*:*)
|
|
1084 |
M68*:*:R3V[5678]*:*)
|
1049 | 1085 |
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
1050 | |
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)
|
|
1086 |
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)
|
1051 | 1087 |
OS_REL=''
|
1052 | 1088 |
test -r /etc/.relid \
|
1053 | 1089 |
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
|
1103 | 1139 |
# From seanf@swdc.stratus.com.
|
1104 | 1140 |
echo i860-stratus-sysv4
|
1105 | 1141 |
exit 0 ;;
|
|
1142 |
i*86:VOS:*:*)
|
|
1143 |
# From Paul.Green@stratus.com.
|
|
1144 |
echo ${UNAME_MACHINE}-stratus-vos
|
|
1145 |
exit 0 ;;
|
1106 | 1146 |
*:VOS:*:*)
|
1107 | 1147 |
# From Paul.Green@stratus.com.
|
1108 | 1148 |
echo hppa1.1-stratus-vos
|
|
1145 | 1185 |
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
1146 | 1186 |
exit 0 ;;
|
1147 | 1187 |
*:Darwin:*:*)
|
1148 | |
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
|
1188 |
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
|
1189 |
case $UNAME_PROCESSOR in
|
|
1190 |
*86) UNAME_PROCESSOR=i686 ;;
|
|
1191 |
unknown) UNAME_PROCESSOR=powerpc ;;
|
|
1192 |
esac
|
|
1193 |
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
1149 | 1194 |
exit 0 ;;
|
1150 | 1195 |
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
1151 | 1196 |
UNAME_PROCESSOR=`uname -p`
|
|
1158 | 1203 |
*:QNX:*:4*)
|
1159 | 1204 |
echo i386-pc-qnx
|
1160 | 1205 |
exit 0 ;;
|
1161 | |
NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
|
|
1206 |
NSE-?:NONSTOP_KERNEL:*:*)
|
|
1207 |
echo nse-tandem-nsk${UNAME_RELEASE}
|
|
1208 |
exit 0 ;;
|
|
1209 |
NSR-?:NONSTOP_KERNEL:*:*)
|
1162 | 1210 |
echo nsr-tandem-nsk${UNAME_RELEASE}
|
1163 | 1211 |
exit 0 ;;
|
1164 | 1212 |
*:NonStop-UX:*:*)
|
|
1198 | 1246 |
exit 0 ;;
|
1199 | 1247 |
*:ITS:*:*)
|
1200 | 1248 |
echo pdp10-unknown-its
|
|
1249 |
exit 0 ;;
|
|
1250 |
SEI:*:*:SEIUX)
|
|
1251 |
echo mips-sei-seiux${UNAME_RELEASE}
|
|
1252 |
exit 0 ;;
|
|
1253 |
*:DragonFly:*:*)
|
|
1254 |
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
|
1255 |
exit 0 ;;
|
|
1256 |
*:*VMS:*:*)
|
|
1257 |
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
|
1258 |
case "${UNAME_MACHINE}" in
|
|
1259 |
A*) echo alpha-dec-vms && exit 0 ;;
|
|
1260 |
I*) echo ia64-dec-vms && exit 0 ;;
|
|
1261 |
V*) echo vax-dec-vms && exit 0 ;;
|
|
1262 |
esac ;;
|
|
1263 |
*:XENIX:*:SysV)
|
|
1264 |
echo i386-pc-xenix
|
1201 | 1265 |
exit 0 ;;
|
1202 | 1266 |
esac
|
1203 | 1267 |
|
|
1319 | 1383 |
}
|
1320 | 1384 |
EOF
|
1321 | 1385 |
|
1322 | |
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
1323 | |
rm -f $dummy.c $dummy && rmdir $tmpdir
|
|
1386 |
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
|
1324 | 1387 |
|
1325 | 1388 |
# Apollos put the system type in the environment.
|
1326 | 1389 |
|
|
1359 | 1422 |
the operating system you are using. It is advised that you
|
1360 | 1423 |
download the most up to date version of the config scripts from
|
1361 | 1424 |
|
1362 | |
ftp://ftp.gnu.org/pub/gnu/config/
|
|
1425 |
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
|
|
1426 |
and
|
|
1427 |
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
|
1363 | 1428 |
|
1364 | 1429 |
If the version you run ($0) is already up to date, please
|
1365 | 1430 |
send the following data and any information you think might be
|