1 |
#! /bin/sh |
#! /bin/sh |
2 |
# Attempt to guess a canonical system name. |
# Attempt to guess a canonical system name. |
3 |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
4 |
# Free Software Foundation, Inc. |
# 2000, 2001, 2002 Free Software Foundation, Inc. |
5 |
|
|
6 |
timestamp='2001-06-29' |
timestamp='2002-03-20' |
7 |
|
|
8 |
# This file is free software; you can redistribute it and/or modify it |
# This file is free software; you can redistribute it and/or modify it |
9 |
# under the terms of the GNU General Public License as published by |
# under the terms of the GNU General Public License as published by |
24 |
# configuration script generated by Autoconf, you may include it under |
# configuration script generated by Autoconf, you may include it under |
25 |
# the same distribution terms that you use for the rest of that program. |
# the same distribution terms that you use for the rest of that program. |
26 |
|
|
27 |
# Written by Per Bothner <bothner@cygnus.com>. |
# Originally written by Per Bothner <per@bothner.com>. |
28 |
# Please send patches to <config-patches@gnu.org>. |
# Please send patches to <config-patches@gnu.org>. Submit a context |
29 |
|
# diff and a properly formatted ChangeLog entry. |
30 |
# |
# |
31 |
# This script attempts to guess a canonical system name similar to |
# This script attempts to guess a canonical system name similar to |
32 |
# config.sub. If it succeeds, it prints the system name on stdout, and |
# config.sub. If it succeeds, it prints the system name on stdout, and |
98 |
|
|
99 |
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in |
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in |
100 |
,,) echo "int dummy(){}" > $dummy.c ; |
,,) echo "int dummy(){}" > $dummy.c ; |
101 |
for c in cc gcc c89 ; do |
for c in cc gcc c89 c99 ; do |
102 |
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; |
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; |
103 |
if test $? = 0 ; then |
if test $? = 0 ; then |
104 |
CC_FOR_BUILD="$c"; break ; |
CC_FOR_BUILD="$c"; break ; |
128 |
|
|
129 |
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
130 |
*:NetBSD:*:*) |
*:NetBSD:*:*) |
131 |
# Netbsd (nbsd) targets should (where applicable) match one or |
# NetBSD (nbsd) targets should (where applicable) match one or |
132 |
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, |
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, |
133 |
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
134 |
# switched to ELF, *-*-netbsd* would select the old |
# switched to ELF, *-*-netbsd* would select the old |
135 |
# object file format. This provides both forward |
# object file format. This provides both forward |
136 |
# compatibility and a consistent mechanism for selecting the |
# compatibility and a consistent mechanism for selecting the |
137 |
# object file format. |
# object file format. |
138 |
# Determine the machine/vendor (is the vendor relevant). |
# |
139 |
case "${UNAME_MACHINE}" in |
# Note: NetBSD doesn't particularly care about the vendor |
140 |
amiga) machine=m68k-unknown ;; |
# portion of the name. We always set it to "unknown". |
141 |
arm32) machine=arm-unknown ;; |
sysctl="sysctl -n hw.machine_arch" |
142 |
atari*) machine=m68k-atari ;; |
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ |
143 |
sun3*) machine=m68k-sun ;; |
/usr/sbin/$sysctl 2>/dev/null || echo unknown)` |
144 |
mac68k) machine=m68k-apple ;; |
case "${UNAME_MACHINE_ARCH}" in |
145 |
macppc) machine=powerpc-apple ;; |
arm*) machine=arm-unknown ;; |
146 |
hp3[0-9][05]) machine=m68k-hp ;; |
sh3el) machine=shl-unknown ;; |
147 |
ibmrt|romp-ibm) machine=romp-ibm ;; |
sh3eb) machine=sh-unknown ;; |
148 |
*) machine=${UNAME_MACHINE}-unknown ;; |
*) machine=${UNAME_MACHINE_ARCH}-unknown ;; |
149 |
esac |
esac |
150 |
# The Operating System including object format, if it has switched |
# The Operating System including object format, if it has switched |
151 |
# to ELF recently, or will in the future. |
# to ELF recently, or will in the future. |
152 |
case "${UNAME_MACHINE}" in |
case "${UNAME_MACHINE_ARCH}" in |
153 |
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) |
arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
154 |
eval $set_cc_for_build |
eval $set_cc_for_build |
155 |
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
156 |
| grep __ELF__ >/dev/null |
| grep __ELF__ >/dev/null |
173 |
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
174 |
echo "${machine}-${os}${release}" |
echo "${machine}-${os}${release}" |
175 |
exit 0 ;; |
exit 0 ;; |
176 |
|
amiga:OpenBSD:*:*) |
177 |
|
echo m68k-unknown-openbsd${UNAME_RELEASE} |
178 |
|
exit 0 ;; |
179 |
|
arc:OpenBSD:*:*) |
180 |
|
echo mipsel-unknown-openbsd${UNAME_RELEASE} |
181 |
|
exit 0 ;; |
182 |
|
hp300:OpenBSD:*:*) |
183 |
|
echo m68k-unknown-openbsd${UNAME_RELEASE} |
184 |
|
exit 0 ;; |
185 |
|
mac68k:OpenBSD:*:*) |
186 |
|
echo m68k-unknown-openbsd${UNAME_RELEASE} |
187 |
|
exit 0 ;; |
188 |
|
macppc:OpenBSD:*:*) |
189 |
|
echo powerpc-unknown-openbsd${UNAME_RELEASE} |
190 |
|
exit 0 ;; |
191 |
|
mvme68k:OpenBSD:*:*) |
192 |
|
echo m68k-unknown-openbsd${UNAME_RELEASE} |
193 |
|
exit 0 ;; |
194 |
|
mvme88k:OpenBSD:*:*) |
195 |
|
echo m88k-unknown-openbsd${UNAME_RELEASE} |
196 |
|
exit 0 ;; |
197 |
|
mvmeppc:OpenBSD:*:*) |
198 |
|
echo powerpc-unknown-openbsd${UNAME_RELEASE} |
199 |
|
exit 0 ;; |
200 |
|
pmax:OpenBSD:*:*) |
201 |
|
echo mipsel-unknown-openbsd${UNAME_RELEASE} |
202 |
|
exit 0 ;; |
203 |
|
sgi:OpenBSD:*:*) |
204 |
|
echo mipseb-unknown-openbsd${UNAME_RELEASE} |
205 |
|
exit 0 ;; |
206 |
|
sun3:OpenBSD:*:*) |
207 |
|
echo m68k-unknown-openbsd${UNAME_RELEASE} |
208 |
|
exit 0 ;; |
209 |
|
wgrisc:OpenBSD:*:*) |
210 |
|
echo mipsel-unknown-openbsd${UNAME_RELEASE} |
211 |
|
exit 0 ;; |
212 |
|
*:OpenBSD:*:*) |
213 |
|
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} |
214 |
|
exit 0 ;; |
215 |
alpha:OSF1:*:*) |
alpha:OSF1:*:*) |
216 |
if test $UNAME_RELEASE = "V4.0"; then |
if test $UNAME_RELEASE = "V4.0"; then |
217 |
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
267 |
2-307) |
2-307) |
268 |
UNAME_MACHINE="alphaev67" |
UNAME_MACHINE="alphaev67" |
269 |
;; |
;; |
270 |
|
2-1307) |
271 |
|
UNAME_MACHINE="alphaev68" |
272 |
|
;; |
273 |
esac |
esac |
274 |
fi |
fi |
275 |
rm -f $dummy.s $dummy |
rm -f $dummy.s $dummy |
287 |
Amiga*:UNIX_System_V:4.0:*) |
Amiga*:UNIX_System_V:4.0:*) |
288 |
echo m68k-unknown-sysv4 |
echo m68k-unknown-sysv4 |
289 |
exit 0;; |
exit 0;; |
|
amiga:OpenBSD:*:*) |
|
|
echo m68k-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
290 |
*:[Aa]miga[Oo][Ss]:*:*) |
*:[Aa]miga[Oo][Ss]:*:*) |
291 |
echo ${UNAME_MACHINE}-unknown-amigaos |
echo ${UNAME_MACHINE}-unknown-amigaos |
292 |
exit 0 ;; |
exit 0 ;; |
293 |
arc64:OpenBSD:*:*) |
*:[Mm]orph[Oo][Ss]:*:*) |
294 |
echo mips64el-unknown-openbsd${UNAME_RELEASE} |
echo ${UNAME_MACHINE}-unknown-morphos |
|
exit 0 ;; |
|
|
arc:OpenBSD:*:*) |
|
|
echo mipsel-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
|
hkmips:OpenBSD:*:*) |
|
|
echo mips-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
|
pmax:OpenBSD:*:*) |
|
|
echo mipsel-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
|
sgi:OpenBSD:*:*) |
|
|
echo mips-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
|
wgrisc:OpenBSD:*:*) |
|
|
echo mipsel-unknown-openbsd${UNAME_RELEASE} |
|
295 |
exit 0 ;; |
exit 0 ;; |
296 |
*:OS/390:*:*) |
*:OS/390:*:*) |
297 |
echo i370-ibm-openedition |
echo i370-ibm-openedition |
341 |
echo m68k-sun-sunos${UNAME_RELEASE} |
echo m68k-sun-sunos${UNAME_RELEASE} |
342 |
exit 0 ;; |
exit 0 ;; |
343 |
sun*:*:4.2BSD:*) |
sun*:*:4.2BSD:*) |
344 |
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
345 |
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 |
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 |
346 |
case "`/bin/arch`" in |
case "`/bin/arch`" in |
347 |
sun3) |
sun3) |
355 |
aushp:SunOS:*:*) |
aushp:SunOS:*:*) |
356 |
echo sparc-auspex-sunos${UNAME_RELEASE} |
echo sparc-auspex-sunos${UNAME_RELEASE} |
357 |
exit 0 ;; |
exit 0 ;; |
|
atari*:OpenBSD:*:*) |
|
|
echo m68k-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
358 |
# The situation for MiNT is a little confusing. The machine name |
# The situation for MiNT is a little confusing. The machine name |
359 |
# can be virtually everything (everything which is not |
# can be virtually everything (everything which is not |
360 |
# "atarist" or "atariste" at least should have a processor |
# "atarist" or "atariste" at least should have a processor |
381 |
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
382 |
echo m68k-unknown-mint${UNAME_RELEASE} |
echo m68k-unknown-mint${UNAME_RELEASE} |
383 |
exit 0 ;; |
exit 0 ;; |
|
sun3*:OpenBSD:*:*) |
|
|
echo m68k-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
|
mac68k:OpenBSD:*:*) |
|
|
echo m68k-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
|
mvme68k:OpenBSD:*:*) |
|
|
echo m68k-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
|
mvme88k:OpenBSD:*:*) |
|
|
echo m88k-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
384 |
powerpc:machten:*:*) |
powerpc:machten:*:*) |
385 |
echo powerpc-apple-machten${UNAME_RELEASE} |
echo powerpc-apple-machten${UNAME_RELEASE} |
386 |
exit 0 ;; |
exit 0 ;; |
397 |
echo clipper-intergraph-clix${UNAME_RELEASE} |
echo clipper-intergraph-clix${UNAME_RELEASE} |
398 |
exit 0 ;; |
exit 0 ;; |
399 |
mips:*:*:UMIPS | mips:*:*:RISCos) |
mips:*:*:UMIPS | mips:*:*:RISCos) |
400 |
|
eval $set_cc_for_build |
401 |
sed 's/^ //' << EOF >$dummy.c |
sed 's/^ //' << EOF >$dummy.c |
402 |
#ifdef __cplusplus |
#ifdef __cplusplus |
403 |
#include <stdio.h> /* for printf() prototype */ |
#include <stdio.h> /* for printf() prototype */ |
419 |
exit (-1); |
exit (-1); |
420 |
} |
} |
421 |
EOF |
EOF |
|
eval $set_cc_for_build |
|
422 |
$CC_FOR_BUILD $dummy.c -o $dummy \ |
$CC_FOR_BUILD $dummy.c -o $dummy \ |
423 |
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ |
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ |
424 |
&& rm -f $dummy.c $dummy && exit 0 |
&& rm -f $dummy.c $dummy && exit 0 |
488 |
exit 0 ;; |
exit 0 ;; |
489 |
*:AIX:2:3) |
*:AIX:2:3) |
490 |
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
491 |
|
eval $set_cc_for_build |
492 |
sed 's/^ //' << EOF >$dummy.c |
sed 's/^ //' << EOF >$dummy.c |
493 |
#include <sys/systemcfg.h> |
#include <sys/systemcfg.h> |
494 |
|
|
500 |
exit(0); |
exit(0); |
501 |
} |
} |
502 |
EOF |
EOF |
|
eval $set_cc_for_build |
|
503 |
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 |
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 |
504 |
rm -f $dummy.c $dummy |
rm -f $dummy.c $dummy |
505 |
echo rs6000-ibm-aix3.2.5 |
echo rs6000-ibm-aix3.2.5 |
510 |
fi |
fi |
511 |
exit 0 ;; |
exit 0 ;; |
512 |
*:AIX:*:[45]) |
*:AIX:*:[45]) |
513 |
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` |
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
514 |
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then |
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then |
515 |
IBM_ARCH=rs6000 |
IBM_ARCH=rs6000 |
516 |
else |
else |
550 |
9000/31? ) HP_ARCH=m68000 ;; |
9000/31? ) HP_ARCH=m68000 ;; |
551 |
9000/[34]?? ) HP_ARCH=m68k ;; |
9000/[34]?? ) HP_ARCH=m68k ;; |
552 |
9000/[678][0-9][0-9]) |
9000/[678][0-9][0-9]) |
553 |
case "${HPUX_REV}" in |
if [ -x /usr/bin/getconf ]; then |
554 |
11.[0-9][0-9]) |
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
|
if [ -x /usr/bin/getconf ]; then |
|
|
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
|
555 |
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
556 |
case "${sc_cpu_version}" in |
case "${sc_cpu_version}" in |
557 |
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 |
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 |
560 |
case "${sc_kernel_bits}" in |
case "${sc_kernel_bits}" in |
561 |
32) HP_ARCH="hppa2.0n" ;; |
32) HP_ARCH="hppa2.0n" ;; |
562 |
64) HP_ARCH="hppa2.0w" ;; |
64) HP_ARCH="hppa2.0w" ;; |
563 |
|
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 |
564 |
esac ;; |
esac ;; |
565 |
esac |
esac |
566 |
fi ;; |
fi |
567 |
esac |
if [ "${HP_ARCH}" = "" ]; then |
568 |
if [ "${HP_ARCH}" = "" ]; then |
eval $set_cc_for_build |
569 |
sed 's/^ //' << EOF >$dummy.c |
sed 's/^ //' << EOF >$dummy.c |
570 |
|
|
571 |
#define _HPUX_SOURCE |
#define _HPUX_SOURCE |
572 |
#include <stdlib.h> |
#include <stdlib.h> |
599 |
exit (0); |
exit (0); |
600 |
} |
} |
601 |
EOF |
EOF |
602 |
eval $set_cc_for_build |
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` |
603 |
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` |
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi |
604 |
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi |
rm -f $dummy.c $dummy |
605 |
rm -f $dummy.c $dummy |
fi ;; |
|
fi ;; |
|
606 |
esac |
esac |
607 |
echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
608 |
exit 0 ;; |
exit 0 ;; |
611 |
echo ia64-hp-hpux${HPUX_REV} |
echo ia64-hp-hpux${HPUX_REV} |
612 |
exit 0 ;; |
exit 0 ;; |
613 |
3050*:HI-UX:*:*) |
3050*:HI-UX:*:*) |
614 |
|
eval $set_cc_for_build |
615 |
sed 's/^ //' << EOF >$dummy.c |
sed 's/^ //' << EOF >$dummy.c |
616 |
#include <unistd.h> |
#include <unistd.h> |
617 |
int |
int |
637 |
exit (0); |
exit (0); |
638 |
} |
} |
639 |
EOF |
EOF |
|
eval $set_cc_for_build |
|
640 |
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 |
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 |
641 |
rm -f $dummy.c $dummy |
rm -f $dummy.c $dummy |
642 |
echo unknown-hitachi-hiuxwe2 |
echo unknown-hitachi-hiuxwe2 |
647 |
9000/8??:4.3bsd:*:*) |
9000/8??:4.3bsd:*:*) |
648 |
echo hppa1.0-hp-bsd |
echo hppa1.0-hp-bsd |
649 |
exit 0 ;; |
exit 0 ;; |
650 |
*9??*:MPE/iX:*:*) |
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
651 |
echo hppa1.0-hp-mpeix |
echo hppa1.0-hp-mpeix |
652 |
exit 0 ;; |
exit 0 ;; |
653 |
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) |
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) |
666 |
parisc*:Lites*:*:*) |
parisc*:Lites*:*:*) |
667 |
echo hppa1.1-hp-lites |
echo hppa1.1-hp-lites |
668 |
exit 0 ;; |
exit 0 ;; |
|
hppa*:OpenBSD:*:*) |
|
|
echo hppa-unknown-openbsd |
|
|
exit 0 ;; |
|
669 |
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
670 |
echo c1-convex-bsd |
echo c1-convex-bsd |
671 |
exit 0 ;; |
exit 0 ;; |
684 |
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
685 |
echo c4-convex-bsd |
echo c4-convex-bsd |
686 |
exit 0 ;; |
exit 0 ;; |
|
CRAY*X-MP:*:*:*) |
|
|
echo xmp-cray-unicos |
|
|
exit 0 ;; |
|
687 |
CRAY*Y-MP:*:*:*) |
CRAY*Y-MP:*:*:*) |
688 |
echo ymp-cray-unicos${UNAME_RELEASE} |
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
689 |
exit 0 ;; |
exit 0 ;; |
690 |
CRAY*[A-Z]90:*:*:*) |
CRAY*[A-Z]90:*:*:*) |
691 |
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ |
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ |
692 |
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
693 |
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ |
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
694 |
|
-e 's/\.[^.]*$/.X/' |
695 |
exit 0 ;; |
exit 0 ;; |
696 |
CRAY*TS:*:*:*) |
CRAY*TS:*:*:*) |
697 |
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
705 |
CRAY*SV1:*:*:*) |
CRAY*SV1:*:*:*) |
706 |
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
707 |
exit 0 ;; |
exit 0 ;; |
|
CRAY-2:*:*:*) |
|
|
echo cray2-cray-unicos |
|
|
exit 0 ;; |
|
708 |
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
709 |
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
710 |
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
711 |
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
712 |
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
713 |
exit 0 ;; |
exit 0 ;; |
|
hp300:OpenBSD:*:*) |
|
|
echo m68k-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
714 |
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
715 |
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
716 |
exit 0 ;; |
exit 0 ;; |
723 |
*:FreeBSD:*:*) |
*:FreeBSD:*:*) |
724 |
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
725 |
exit 0 ;; |
exit 0 ;; |
|
*:OpenBSD:*:*) |
|
|
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
|
|
exit 0 ;; |
|
726 |
i*:CYGWIN*:*) |
i*:CYGWIN*:*) |
727 |
echo ${UNAME_MACHINE}-pc-cygwin |
echo ${UNAME_MACHINE}-pc-cygwin |
728 |
exit 0 ;; |
exit 0 ;; |
732 |
i*:PW*:*) |
i*:PW*:*) |
733 |
echo ${UNAME_MACHINE}-pc-pw32 |
echo ${UNAME_MACHINE}-pc-pw32 |
734 |
exit 0 ;; |
exit 0 ;; |
735 |
|
x86:Interix*:3*) |
736 |
|
echo i386-pc-interix3 |
737 |
|
exit 0 ;; |
738 |
i*:Windows_NT*:* | Pentium*:Windows_NT*:*) |
i*:Windows_NT*:* | Pentium*:Windows_NT*:*) |
739 |
# How do we know it's Interix rather than the generic POSIX subsystem? |
# How do we know it's Interix rather than the generic POSIX subsystem? |
740 |
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we |
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we |
760 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
761 |
exit 0 ;; |
exit 0 ;; |
762 |
ia64:Linux:*:*) |
ia64:Linux:*:*) |
763 |
echo ${UNAME_MACHINE}-unknown-linux |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
764 |
exit 0 ;; |
exit 0 ;; |
765 |
m68*:Linux:*:*) |
m68*:Linux:*:*) |
766 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
767 |
exit 0 ;; |
exit 0 ;; |
768 |
mips:Linux:*:*) |
mips:Linux:*:*) |
769 |
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in |
eval $set_cc_for_build |
770 |
big) echo mips-unknown-linux-gnu && exit 0 ;; |
sed 's/^ //' << EOF >$dummy.c |
771 |
little) echo mipsel-unknown-linux-gnu && exit 0 ;; |
#undef CPU |
772 |
esac |
#undef mips |
773 |
|
#undef mipsel |
774 |
|
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
775 |
|
CPU=mipsel |
776 |
|
#else |
777 |
|
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
778 |
|
CPU=mips |
779 |
|
#else |
780 |
|
CPU= |
781 |
|
#endif |
782 |
|
#endif |
783 |
|
EOF |
784 |
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` |
785 |
|
rm -f $dummy.c |
786 |
|
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 |
787 |
;; |
;; |
788 |
ppc:Linux:*:*) |
ppc:Linux:*:*) |
789 |
echo powerpc-unknown-linux-gnu |
echo powerpc-unknown-linux-gnu |
790 |
exit 0 ;; |
exit 0 ;; |
791 |
|
ppc64:Linux:*:*) |
792 |
|
echo powerpc64-unknown-linux-gnu |
793 |
|
exit 0 ;; |
794 |
alpha:Linux:*:*) |
alpha:Linux:*:*) |
795 |
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
796 |
EV5) UNAME_MACHINE=alphaev5 ;; |
EV5) UNAME_MACHINE=alphaev5 ;; |
799 |
PCA57) UNAME_MACHINE=alphapca56 ;; |
PCA57) UNAME_MACHINE=alphapca56 ;; |
800 |
EV6) UNAME_MACHINE=alphaev6 ;; |
EV6) UNAME_MACHINE=alphaev6 ;; |
801 |
EV67) UNAME_MACHINE=alphaev67 ;; |
EV67) UNAME_MACHINE=alphaev67 ;; |
802 |
EV68*) UNAME_MACHINE=alphaev67 ;; |
EV68*) UNAME_MACHINE=alphaev68 ;; |
803 |
esac |
esac |
804 |
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null |
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null |
805 |
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi |
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi |
832 |
# The BFD linker knows what the default object file format is, so |
# The BFD linker knows what the default object file format is, so |
833 |
# first see if it will tell us. cd to the root directory to prevent |
# first see if it will tell us. cd to the root directory to prevent |
834 |
# problems with other programs or directories called `ld' in the path. |
# problems with other programs or directories called `ld' in the path. |
835 |
ld_supported_targets=`cd /; ld --help 2>&1 \ |
# Set LC_ALL=C to ensure ld outputs messages in English. |
836 |
|
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ |
837 |
| sed -ne '/supported targets:/!d |
| sed -ne '/supported targets:/!d |
838 |
s/[ ][ ]*/ /g |
s/[ ][ ]*/ /g |
839 |
s/.*supported targets: *// |
s/.*supported targets: *// |
856 |
exit 0 ;; |
exit 0 ;; |
857 |
esac |
esac |
858 |
# Determine whether the default compiler is a.out or elf |
# Determine whether the default compiler is a.out or elf |
|
cat >$dummy.c <<EOF |
|
|
#include <features.h> |
|
|
#ifdef __cplusplus |
|
|
#include <stdio.h> /* for printf() prototype */ |
|
|
int main (int argc, char *argv[]) { |
|
|
#else |
|
|
int main (argc, argv) int argc; char *argv[]; { |
|
|
#endif |
|
|
#ifdef __ELF__ |
|
|
# ifdef __GLIBC__ |
|
|
# if __GLIBC__ >= 2 |
|
|
printf ("%s-pc-linux-gnu\n", argv[1]); |
|
|
# else |
|
|
printf ("%s-pc-linux-gnulibc1\n", argv[1]); |
|
|
# endif |
|
|
# else |
|
|
printf ("%s-pc-linux-gnulibc1\n", argv[1]); |
|
|
# endif |
|
|
#else |
|
|
printf ("%s-pc-linux-gnuaout\n", argv[1]); |
|
|
#endif |
|
|
return 0; |
|
|
} |
|
|
EOF |
|
859 |
eval $set_cc_for_build |
eval $set_cc_for_build |
860 |
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 |
sed 's/^ //' << EOF >$dummy.c |
861 |
rm -f $dummy.c $dummy |
#include <features.h> |
862 |
|
#ifdef __ELF__ |
863 |
|
# ifdef __GLIBC__ |
864 |
|
# if __GLIBC__ >= 2 |
865 |
|
LIBC=gnu |
866 |
|
# else |
867 |
|
LIBC=gnulibc1 |
868 |
|
# endif |
869 |
|
# else |
870 |
|
LIBC=gnulibc1 |
871 |
|
# endif |
872 |
|
#else |
873 |
|
#ifdef __INTEL_COMPILER |
874 |
|
LIBC=gnu |
875 |
|
#else |
876 |
|
LIBC=gnuaout |
877 |
|
#endif |
878 |
|
#endif |
879 |
|
EOF |
880 |
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` |
881 |
|
rm -f $dummy.c |
882 |
|
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 |
883 |
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 |
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 |
884 |
;; |
;; |
885 |
i*86:DYNIX/ptx:4*:*) |
i*86:DYNIX/ptx:4*:*) |
958 |
exit 0 ;; |
exit 0 ;; |
959 |
M68*:*:R3V[567]*:*) |
M68*:*:R3V[567]*:*) |
960 |
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; |
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; |
961 |
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) |
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 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) |
962 |
OS_REL='' |
OS_REL='' |
963 |
test -r /etc/.relid \ |
test -r /etc/.relid \ |
964 |
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1004 |
echo ns32k-sni-sysv |
echo ns32k-sni-sysv |
1005 |
fi |
fi |
1006 |
exit 0 ;; |
exit 0 ;; |
1007 |
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
1008 |
# says <Richard.M.Bartel@ccMail.Census.GOV> |
# says <Richard.M.Bartel@ccMail.Census.GOV> |
1009 |
echo i586-unisys-sysv4 |
echo i586-unisys-sysv4 |
1010 |
exit 0 ;; |
exit 0 ;; |
1011 |
*:UNIX_System_V:4*:FTX*) |
*:UNIX_System_V:4*:FTX*) |
1017 |
# From seanf@swdc.stratus.com. |
# From seanf@swdc.stratus.com. |
1018 |
echo i860-stratus-sysv4 |
echo i860-stratus-sysv4 |
1019 |
exit 0 ;; |
exit 0 ;; |
1020 |
|
*:VOS:*:*) |
1021 |
|
# From Paul.Green@stratus.com. |
1022 |
|
echo hppa1.1-stratus-vos |
1023 |
|
exit 0 ;; |
1024 |
mc68*:A/UX:*:*) |
mc68*:A/UX:*:*) |
1025 |
echo m68k-apple-aux${UNAME_RELEASE} |
echo m68k-apple-aux${UNAME_RELEASE} |
1026 |
exit 0 ;; |
exit 0 ;; |
1059 |
echo `uname -p`-apple-darwin${UNAME_RELEASE} |
echo `uname -p`-apple-darwin${UNAME_RELEASE} |
1060 |
exit 0 ;; |
exit 0 ;; |
1061 |
*:procnto*:*:* | *:QNX:[0123456789]*:*) |
*:procnto*:*:* | *:QNX:[0123456789]*:*) |
1062 |
if test "${UNAME_MACHINE}" = "x86pc"; then |
UNAME_PROCESSOR=`uname -p` |
1063 |
|
if test "$UNAME_PROCESSOR" = "x86"; then |
1064 |
|
UNAME_PROCESSOR=i386 |
1065 |
UNAME_MACHINE=pc |
UNAME_MACHINE=pc |
1066 |
fi |
fi |
1067 |
echo `uname -p`-${UNAME_MACHINE}-nto-qnx |
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} |
1068 |
exit 0 ;; |
exit 0 ;; |
1069 |
*:QNX:*:4*) |
*:QNX:*:4*) |
1070 |
echo i386-pc-qnx |
echo i386-pc-qnx |
1071 |
exit 0 ;; |
exit 0 ;; |
1072 |
NSR-[KW]:NONSTOP_KERNEL:*:*) |
NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) |
1073 |
echo nsr-tandem-nsk${UNAME_RELEASE} |
echo nsr-tandem-nsk${UNAME_RELEASE} |
1074 |
exit 0 ;; |
exit 0 ;; |
1075 |
*:NonStop-UX:*:*) |
*:NonStop-UX:*:*) |
1115 |
*:ITS:*:*) |
*:ITS:*:*) |
1116 |
echo pdp10-unknown-its |
echo pdp10-unknown-its |
1117 |
exit 0 ;; |
exit 0 ;; |
1118 |
|
i*86:XTS-300:*:STOP) |
1119 |
|
echo ${UNAME_MACHINE}-unknown-stop |
1120 |
|
exit 0 ;; |
1121 |
|
i*86:atheos:*:*) |
1122 |
|
echo ${UNAME_MACHINE}-unknown-atheos |
1123 |
|
exit 0 ;; |
1124 |
esac |
esac |
1125 |
|
|
1126 |
#echo '(No uname command or uname output not recognized.)' 1>&2 |
#echo '(No uname command or uname output not recognized.)' 1>&2 |
1127 |
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 |
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 |
1128 |
|
|
1129 |
|
eval $set_cc_for_build |
1130 |
cat >$dummy.c <<EOF |
cat >$dummy.c <<EOF |
1131 |
#ifdef _SEQUENT_ |
#ifdef _SEQUENT_ |
1132 |
# include <sys/types.h> |
# include <sys/types.h> |
1241 |
} |
} |
1242 |
EOF |
EOF |
1243 |
|
|
|
eval $set_cc_for_build |
|
1244 |
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 |
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 |
1245 |
rm -f $dummy.c $dummy |
rm -f $dummy.c $dummy |
1246 |
|
|