Import upstream version 0.9.8+git20210412.1.ebf95df
Debian Janitor
2 years ago
0 | 0 | #! /bin/sh |
1 | 1 | # Attempt to guess a canonical system name. |
2 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, | |
4 | # Inc. | |
5 | ||
6 | timestamp='2007-07-22' | |
2 | # Copyright 1992-2020 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2020-04-26' | |
7 | 5 | |
8 | 6 | # This file is free software; you can redistribute it and/or modify it |
9 | 7 | # under the terms of the GNU General Public License as published by |
10 | # the Free Software Foundation; either version 2 of the License, or | |
8 | # the Free Software Foundation; either version 3 of the License, or | |
11 | 9 | # (at your option) any later version. |
12 | 10 | # |
13 | 11 | # This program is distributed in the hope that it will be useful, but |
16 | 14 | # General Public License for more details. |
17 | 15 | # |
18 | 16 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | |
20 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA | |
21 | # 02110-1301, USA. | |
17 | # along with this program; if not, see <https://www.gnu.org/licenses/>. | |
22 | 18 | # |
23 | 19 | # As a special exception to the GNU General Public License, if you |
24 | 20 | # distribute this file as part of a program that contains a |
25 | 21 | # configuration script generated by Autoconf, you may include it under |
26 | # the same distribution terms that you use for the rest of that program. | |
27 | ||
28 | ||
29 | # Originally written by Per Bothner <per@bothner.com>. | |
30 | # Please send patches to <config-patches@gnu.org>. Submit a context | |
31 | # diff and a properly formatted ChangeLog entry. | |
22 | # the same distribution terms that you use for the rest of that | |
23 | # program. This Exception is an additional permission under section 7 | |
24 | # of the GNU General Public License, version 3 ("GPLv3"). | |
32 | 25 | # |
33 | # This script attempts to guess a canonical system name similar to | |
34 | # config.sub. If it succeeds, it prints the system name on stdout, and | |
35 | # exits with 0. Otherwise, it exits with 1. | |
26 | # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. | |
36 | 27 | # |
37 | # The plan is that this can be called by configure scripts if you | |
38 | # don't specify an explicit build system type. | |
28 | # You can get the latest version of this script from: | |
29 | # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | |
30 | # | |
31 | # Please send patches to <config-patches@gnu.org>. | |
32 | ||
39 | 33 | |
40 | 34 | me=`echo "$0" | sed -e 's,.*/,,'` |
41 | 35 | |
44 | 38 | |
45 | 39 | Output the configuration name of the system \`$me' is run on. |
46 | 40 | |
47 | Operation modes: | |
41 | Options: | |
48 | 42 | -h, --help print this help, then exit |
49 | 43 | -t, --time-stamp print date of last modification, then exit |
50 | 44 | -v, --version print version number, then exit |
55 | 49 | GNU config.guess ($timestamp) |
56 | 50 | |
57 | 51 | Originally written by Per Bothner. |
58 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 | |
59 | Free Software Foundation, Inc. | |
52 | Copyright 1992-2020 Free Software Foundation, Inc. | |
60 | 53 | |
61 | 54 | This is free software; see the source for copying conditions. There is NO |
62 | 55 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
90 | 83 | exit 1 |
91 | 84 | fi |
92 | 85 | |
93 | trap 'exit 1' 1 2 15 | |
94 | ||
95 | 86 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
96 | 87 | # compiler to aid in system detection is discouraged as it requires |
97 | 88 | # temporary files to be created and, as you can see below, it is a |
102 | 93 | |
103 | 94 | # Portable tmp directory creation inspired by the Autoconf team. |
104 | 95 | |
105 | set_cc_for_build=' | |
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 ; | |
108 | : ${TMPDIR=/tmp} ; | |
109 | { tmp=`(umask 077 && mktemp -d "$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 ; } ; | |
113 | dummy=$tmp/dummy ; | |
114 | tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; | |
115 | case $CC_FOR_BUILD,$HOST_CC,$CC in | |
116 | ,,) echo "int x;" > $dummy.c ; | |
117 | for c in cc gcc c89 c99 ; do | |
118 | if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then | |
119 | CC_FOR_BUILD="$c"; break ; | |
120 | fi ; | |
121 | done ; | |
122 | if test x"$CC_FOR_BUILD" = x ; then | |
123 | CC_FOR_BUILD=no_compiler_found ; | |
124 | fi | |
125 | ;; | |
126 | ,,*) CC_FOR_BUILD=$CC ;; | |
127 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; | |
128 | esac ; set_cc_for_build= ;' | |
96 | tmp= | |
97 | # shellcheck disable=SC2172 | |
98 | trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 | |
99 | ||
100 | set_cc_for_build() { | |
101 | # prevent multiple calls if $tmp is already set | |
102 | test "$tmp" && return 0 | |
103 | : "${TMPDIR=/tmp}" | |
104 | # shellcheck disable=SC2039 | |
105 | { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | |
106 | { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || | |
107 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || | |
108 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } | |
109 | dummy=$tmp/dummy | |
110 | case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in | |
111 | ,,) echo "int x;" > "$dummy.c" | |
112 | for driver in cc gcc c89 c99 ; do | |
113 | if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then | |
114 | CC_FOR_BUILD="$driver" | |
115 | break | |
116 | fi | |
117 | done | |
118 | if test x"$CC_FOR_BUILD" = x ; then | |
119 | CC_FOR_BUILD=no_compiler_found | |
120 | fi | |
121 | ;; | |
122 | ,,*) CC_FOR_BUILD=$CC ;; | |
123 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; | |
124 | esac | |
125 | } | |
129 | 126 | |
130 | 127 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
131 | 128 | # (ghazi@noc.rutgers.edu 1994-08-24) |
132 | if (test -f /.attbin/uname) >/dev/null 2>&1 ; then | |
129 | if test -f /.attbin/uname ; then | |
133 | 130 | PATH=$PATH:/.attbin ; export PATH |
134 | 131 | fi |
135 | 132 | |
138 | 135 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
139 | 136 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
140 | 137 | |
138 | case "$UNAME_SYSTEM" in | |
139 | Linux|GNU|GNU/*) | |
140 | # If the system lacks a compiler, then just pick glibc. | |
141 | # We could probably try harder. | |
142 | LIBC=gnu | |
143 | ||
144 | set_cc_for_build | |
145 | cat <<-EOF > "$dummy.c" | |
146 | #include <features.h> | |
147 | #if defined(__UCLIBC__) | |
148 | LIBC=uclibc | |
149 | #elif defined(__dietlibc__) | |
150 | LIBC=dietlibc | |
151 | #else | |
152 | LIBC=gnu | |
153 | #endif | |
154 | EOF | |
155 | eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" | |
156 | ||
157 | # If ldd exists, use it to detect musl libc. | |
158 | if command -v ldd >/dev/null && \ | |
159 | ldd --version 2>&1 | grep -q ^musl | |
160 | then | |
161 | LIBC=musl | |
162 | fi | |
163 | ;; | |
164 | esac | |
165 | ||
141 | 166 | # Note: order is significant - the case branches are not exclusive. |
142 | 167 | |
143 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |
168 | case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in | |
144 | 169 | *:NetBSD:*:*) |
145 | 170 | # NetBSD (nbsd) targets should (where applicable) match one or |
146 | # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, | |
171 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, | |
147 | 172 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
148 | 173 | # switched to ELF, *-*-netbsd* would select the old |
149 | 174 | # object file format. This provides both forward |
153 | 178 | # Note: NetBSD doesn't particularly care about the vendor |
154 | 179 | # portion of the name. We always set it to "unknown". |
155 | 180 | sysctl="sysctl -n hw.machine_arch" |
156 | UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ | |
157 | /usr/sbin/$sysctl 2>/dev/null || echo unknown)` | |
158 | case "${UNAME_MACHINE_ARCH}" in | |
181 | UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ | |
182 | "/sbin/$sysctl" 2>/dev/null || \ | |
183 | "/usr/sbin/$sysctl" 2>/dev/null || \ | |
184 | echo unknown)` | |
185 | case "$UNAME_MACHINE_ARCH" in | |
159 | 186 | armeb) machine=armeb-unknown ;; |
160 | 187 | arm*) machine=arm-unknown ;; |
161 | 188 | sh3el) machine=shl-unknown ;; |
162 | 189 | sh3eb) machine=sh-unknown ;; |
163 | 190 | sh5el) machine=sh5le-unknown ;; |
164 | *) machine=${UNAME_MACHINE_ARCH}-unknown ;; | |
191 | earmv*) | |
192 | arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` | |
193 | endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` | |
194 | machine="${arch}${endian}"-unknown | |
195 | ;; | |
196 | *) machine="$UNAME_MACHINE_ARCH"-unknown ;; | |
165 | 197 | esac |
166 | 198 | # The Operating System including object format, if it has switched |
167 | # to ELF recently, or will in the future. | |
168 | case "${UNAME_MACHINE_ARCH}" in | |
199 | # to ELF recently (or will in the future) and ABI. | |
200 | case "$UNAME_MACHINE_ARCH" in | |
201 | earm*) | |
202 | os=netbsdelf | |
203 | ;; | |
169 | 204 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
170 | eval $set_cc_for_build | |
205 | set_cc_for_build | |
171 | 206 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
172 | | grep __ELF__ >/dev/null | |
207 | | grep -q __ELF__ | |
173 | 208 | then |
174 | 209 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). |
175 | 210 | # Return netbsd for either. FIX? |
179 | 214 | fi |
180 | 215 | ;; |
181 | 216 | *) |
182 | os=netbsd | |
217 | os=netbsd | |
218 | ;; | |
219 | esac | |
220 | # Determine ABI tags. | |
221 | case "$UNAME_MACHINE_ARCH" in | |
222 | earm*) | |
223 | expr='s/^earmv[0-9]/-eabi/;s/eb$//' | |
224 | abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` | |
183 | 225 | ;; |
184 | 226 | esac |
185 | 227 | # The OS release |
187 | 229 | # thus, need a distinct triplet. However, they do not need |
188 | 230 | # kernel version information, so it can be replaced with a |
189 | 231 | # suitable tag, in the style of linux-gnu. |
190 | case "${UNAME_VERSION}" in | |
232 | case "$UNAME_VERSION" in | |
191 | 233 | Debian*) |
192 | 234 | release='-gnu' |
193 | 235 | ;; |
194 | 236 | *) |
195 | release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | |
237 | release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` | |
196 | 238 | ;; |
197 | 239 | esac |
198 | 240 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
199 | 241 | # contains redundant information, the shorter form: |
200 | 242 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
201 | echo "${machine}-${os}${release}" | |
243 | echo "$machine-${os}${release}${abi-}" | |
244 | exit ;; | |
245 | *:Bitrig:*:*) | |
246 | UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` | |
247 | echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" | |
202 | 248 | exit ;; |
203 | 249 | *:OpenBSD:*:*) |
204 | 250 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
205 | echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} | |
251 | echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" | |
252 | exit ;; | |
253 | *:LibertyBSD:*:*) | |
254 | UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` | |
255 | echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" | |
256 | exit ;; | |
257 | *:MidnightBSD:*:*) | |
258 | echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" | |
206 | 259 | exit ;; |
207 | 260 | *:ekkoBSD:*:*) |
208 | echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} | |
261 | echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" | |
209 | 262 | exit ;; |
210 | 263 | *:SolidBSD:*:*) |
211 | echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} | |
264 | echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" | |
265 | exit ;; | |
266 | *:OS108:*:*) | |
267 | echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" | |
212 | 268 | exit ;; |
213 | 269 | macppc:MirBSD:*:*) |
214 | echo powerpc-unknown-mirbsd${UNAME_RELEASE} | |
270 | echo powerpc-unknown-mirbsd"$UNAME_RELEASE" | |
215 | 271 | exit ;; |
216 | 272 | *:MirBSD:*:*) |
217 | echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} | |
273 | echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" | |
274 | exit ;; | |
275 | *:Sortix:*:*) | |
276 | echo "$UNAME_MACHINE"-unknown-sortix | |
277 | exit ;; | |
278 | *:Twizzler:*:*) | |
279 | echo "$UNAME_MACHINE"-unknown-twizzler | |
280 | exit ;; | |
281 | *:Redox:*:*) | |
282 | echo "$UNAME_MACHINE"-unknown-redox | |
283 | exit ;; | |
284 | mips:OSF1:*.*) | |
285 | echo mips-dec-osf1 | |
218 | 286 | exit ;; |
219 | 287 | alpha:OSF1:*:*) |
220 | 288 | case $UNAME_RELEASE in |
222 | 290 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
223 | 291 | ;; |
224 | 292 | *5.*) |
225 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | |
293 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | |
226 | 294 | ;; |
227 | 295 | esac |
228 | 296 | # According to Compaq, /usr/sbin/psrinfo has been available on |
232 | 300 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
233 | 301 | case "$ALPHA_CPU_TYPE" in |
234 | 302 | "EV4 (21064)") |
235 | UNAME_MACHINE="alpha" ;; | |
303 | UNAME_MACHINE=alpha ;; | |
236 | 304 | "EV4.5 (21064)") |
237 | UNAME_MACHINE="alpha" ;; | |
305 | UNAME_MACHINE=alpha ;; | |
238 | 306 | "LCA4 (21066/21068)") |
239 | UNAME_MACHINE="alpha" ;; | |
307 | UNAME_MACHINE=alpha ;; | |
240 | 308 | "EV5 (21164)") |
241 | UNAME_MACHINE="alphaev5" ;; | |
309 | UNAME_MACHINE=alphaev5 ;; | |
242 | 310 | "EV5.6 (21164A)") |
243 | UNAME_MACHINE="alphaev56" ;; | |
311 | UNAME_MACHINE=alphaev56 ;; | |
244 | 312 | "EV5.6 (21164PC)") |
245 | UNAME_MACHINE="alphapca56" ;; | |
313 | UNAME_MACHINE=alphapca56 ;; | |
246 | 314 | "EV5.7 (21164PC)") |
247 | UNAME_MACHINE="alphapca57" ;; | |
315 | UNAME_MACHINE=alphapca57 ;; | |
248 | 316 | "EV6 (21264)") |
249 | UNAME_MACHINE="alphaev6" ;; | |
317 | UNAME_MACHINE=alphaev6 ;; | |
250 | 318 | "EV6.7 (21264A)") |
251 | UNAME_MACHINE="alphaev67" ;; | |
319 | UNAME_MACHINE=alphaev67 ;; | |
252 | 320 | "EV6.8CB (21264C)") |
253 | UNAME_MACHINE="alphaev68" ;; | |
321 | UNAME_MACHINE=alphaev68 ;; | |
254 | 322 | "EV6.8AL (21264B)") |
255 | UNAME_MACHINE="alphaev68" ;; | |
323 | UNAME_MACHINE=alphaev68 ;; | |
256 | 324 | "EV6.8CX (21264D)") |
257 | UNAME_MACHINE="alphaev68" ;; | |
325 | UNAME_MACHINE=alphaev68 ;; | |
258 | 326 | "EV6.9A (21264/EV69A)") |
259 | UNAME_MACHINE="alphaev69" ;; | |
327 | UNAME_MACHINE=alphaev69 ;; | |
260 | 328 | "EV7 (21364)") |
261 | UNAME_MACHINE="alphaev7" ;; | |
329 | UNAME_MACHINE=alphaev7 ;; | |
262 | 330 | "EV7.9 (21364A)") |
263 | UNAME_MACHINE="alphaev79" ;; | |
331 | UNAME_MACHINE=alphaev79 ;; | |
264 | 332 | esac |
265 | 333 | # A Pn.n version is a patched version. |
266 | 334 | # A Vn.n version is a released version. |
267 | 335 | # A Tn.n version is a released field test version. |
268 | 336 | # A Xn.n version is an unreleased experimental baselevel. |
269 | 337 | # 1.2 uses "1.2" for uname -r. |
270 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | |
271 | exit ;; | |
272 | Alpha\ *:Windows_NT*:*) | |
273 | # How do we know it's Interix rather than the generic POSIX subsystem? | |
274 | # Should we change UNAME_MACHINE based on the output of uname instead | |
275 | # of the specific Alpha model? | |
276 | echo alpha-pc-interix | |
277 | exit ;; | |
278 | 21064:Windows_NT:50:3) | |
279 | echo alpha-dec-winnt3.5 | |
280 | exit ;; | |
338 | echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" | |
339 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
340 | exitcode=$? | |
341 | trap '' 0 | |
342 | exit $exitcode ;; | |
281 | 343 | Amiga*:UNIX_System_V:4.0:*) |
282 | 344 | echo m68k-unknown-sysv4 |
283 | 345 | exit ;; |
284 | 346 | *:[Aa]miga[Oo][Ss]:*:*) |
285 | echo ${UNAME_MACHINE}-unknown-amigaos | |
347 | echo "$UNAME_MACHINE"-unknown-amigaos | |
286 | 348 | exit ;; |
287 | 349 | *:[Mm]orph[Oo][Ss]:*:*) |
288 | echo ${UNAME_MACHINE}-unknown-morphos | |
350 | echo "$UNAME_MACHINE"-unknown-morphos | |
289 | 351 | exit ;; |
290 | 352 | *:OS/390:*:*) |
291 | 353 | echo i370-ibm-openedition |
294 | 356 | echo s390-ibm-zvmoe |
295 | 357 | exit ;; |
296 | 358 | *:OS400:*:*) |
297 | echo powerpc-ibm-os400 | |
359 | echo powerpc-ibm-os400 | |
298 | 360 | exit ;; |
299 | 361 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
300 | echo arm-acorn-riscix${UNAME_RELEASE} | |
301 | exit ;; | |
302 | arm:riscos:*:*|arm:RISCOS:*:*) | |
362 | echo arm-acorn-riscix"$UNAME_RELEASE" | |
363 | exit ;; | |
364 | arm*:riscos:*:*|arm*:RISCOS:*:*) | |
303 | 365 | echo arm-unknown-riscos |
304 | 366 | exit ;; |
305 | 367 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
323 | 385 | case `/usr/bin/uname -p` in |
324 | 386 | sparc) echo sparc-icl-nx7; exit ;; |
325 | 387 | esac ;; |
388 | s390x:SunOS:*:*) | |
389 | echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
390 | exit ;; | |
326 | 391 | sun4H:SunOS:5.*:*) |
327 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
392 | echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
328 | 393 | exit ;; |
329 | 394 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
330 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
395 | echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
396 | exit ;; | |
397 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) | |
398 | echo i386-pc-auroraux"$UNAME_RELEASE" | |
331 | 399 | exit ;; |
332 | 400 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
333 | echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
401 | set_cc_for_build | |
402 | SUN_ARCH=i386 | |
403 | # If there is a compiler, see if it is configured for 64-bit objects. | |
404 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. | |
405 | # This test works for both compilers. | |
406 | if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | |
407 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
408 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
409 | grep IS_64BIT_ARCH >/dev/null | |
410 | then | |
411 | SUN_ARCH=x86_64 | |
412 | fi | |
413 | fi | |
414 | echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
334 | 415 | exit ;; |
335 | 416 | sun4*:SunOS:6*:*) |
336 | 417 | # According to config.sub, this is the proper way to canonicalize |
337 | 418 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
338 | 419 | # it's likely to be more like Solaris than SunOS4. |
339 | echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
420 | echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
340 | 421 | exit ;; |
341 | 422 | sun4*:SunOS:*:*) |
342 | 423 | case "`/usr/bin/arch -k`" in |
345 | 426 | ;; |
346 | 427 | esac |
347 | 428 | # Japanese Language versions have a version number like `4.1.3-JL'. |
348 | echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` | |
429 | echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" | |
349 | 430 | exit ;; |
350 | 431 | sun3*:SunOS:*:*) |
351 | echo m68k-sun-sunos${UNAME_RELEASE} | |
432 | echo m68k-sun-sunos"$UNAME_RELEASE" | |
352 | 433 | exit ;; |
353 | 434 | sun*:*:4.2BSD:*) |
354 | 435 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
355 | test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 | |
436 | test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 | |
356 | 437 | case "`/bin/arch`" in |
357 | 438 | sun3) |
358 | echo m68k-sun-sunos${UNAME_RELEASE} | |
439 | echo m68k-sun-sunos"$UNAME_RELEASE" | |
359 | 440 | ;; |
360 | 441 | sun4) |
361 | echo sparc-sun-sunos${UNAME_RELEASE} | |
442 | echo sparc-sun-sunos"$UNAME_RELEASE" | |
362 | 443 | ;; |
363 | 444 | esac |
364 | 445 | exit ;; |
365 | 446 | aushp:SunOS:*:*) |
366 | echo sparc-auspex-sunos${UNAME_RELEASE} | |
447 | echo sparc-auspex-sunos"$UNAME_RELEASE" | |
367 | 448 | exit ;; |
368 | 449 | # The situation for MiNT is a little confusing. The machine name |
369 | 450 | # can be virtually everything (everything which is not |
374 | 455 | # MiNT. But MiNT is downward compatible to TOS, so this should |
375 | 456 | # be no problem. |
376 | 457 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
377 | echo m68k-atari-mint${UNAME_RELEASE} | |
458 | echo m68k-atari-mint"$UNAME_RELEASE" | |
378 | 459 | exit ;; |
379 | 460 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
380 | echo m68k-atari-mint${UNAME_RELEASE} | |
381 | exit ;; | |
461 | echo m68k-atari-mint"$UNAME_RELEASE" | |
462 | exit ;; | |
382 | 463 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
383 | echo m68k-atari-mint${UNAME_RELEASE} | |
464 | echo m68k-atari-mint"$UNAME_RELEASE" | |
384 | 465 | exit ;; |
385 | 466 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
386 | echo m68k-milan-mint${UNAME_RELEASE} | |
387 | exit ;; | |
467 | echo m68k-milan-mint"$UNAME_RELEASE" | |
468 | exit ;; | |
388 | 469 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
389 | echo m68k-hades-mint${UNAME_RELEASE} | |
390 | exit ;; | |
470 | echo m68k-hades-mint"$UNAME_RELEASE" | |
471 | exit ;; | |
391 | 472 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
392 | echo m68k-unknown-mint${UNAME_RELEASE} | |
393 | exit ;; | |
473 | echo m68k-unknown-mint"$UNAME_RELEASE" | |
474 | exit ;; | |
394 | 475 | m68k:machten:*:*) |
395 | echo m68k-apple-machten${UNAME_RELEASE} | |
476 | echo m68k-apple-machten"$UNAME_RELEASE" | |
396 | 477 | exit ;; |
397 | 478 | powerpc:machten:*:*) |
398 | echo powerpc-apple-machten${UNAME_RELEASE} | |
479 | echo powerpc-apple-machten"$UNAME_RELEASE" | |
399 | 480 | exit ;; |
400 | 481 | RISC*:Mach:*:*) |
401 | 482 | echo mips-dec-mach_bsd4.3 |
402 | 483 | exit ;; |
403 | 484 | RISC*:ULTRIX:*:*) |
404 | echo mips-dec-ultrix${UNAME_RELEASE} | |
485 | echo mips-dec-ultrix"$UNAME_RELEASE" | |
405 | 486 | exit ;; |
406 | 487 | VAX*:ULTRIX*:*:*) |
407 | echo vax-dec-ultrix${UNAME_RELEASE} | |
488 | echo vax-dec-ultrix"$UNAME_RELEASE" | |
408 | 489 | exit ;; |
409 | 490 | 2020:CLIX:*:* | 2430:CLIX:*:*) |
410 | echo clipper-intergraph-clix${UNAME_RELEASE} | |
491 | echo clipper-intergraph-clix"$UNAME_RELEASE" | |
411 | 492 | exit ;; |
412 | 493 | mips:*:*:UMIPS | mips:*:*:RISCos) |
413 | eval $set_cc_for_build | |
414 | sed 's/^ //' << EOF >$dummy.c | |
494 | set_cc_for_build | |
495 | sed 's/^ //' << EOF > "$dummy.c" | |
415 | 496 | #ifdef __cplusplus |
416 | 497 | #include <stdio.h> /* for printf() prototype */ |
417 | 498 | int main (int argc, char *argv[]) { |
420 | 501 | #endif |
421 | 502 | #if defined (host_mips) && defined (MIPSEB) |
422 | 503 | #if defined (SYSTYPE_SYSV) |
423 | printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); | |
504 | printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); | |
424 | 505 | #endif |
425 | 506 | #if defined (SYSTYPE_SVR4) |
426 | printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); | |
507 | printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); | |
427 | 508 | #endif |
428 | 509 | #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) |
429 | printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); | |
510 | printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); | |
430 | 511 | #endif |
431 | 512 | #endif |
432 | 513 | exit (-1); |
433 | 514 | } |
434 | 515 | EOF |
435 | $CC_FOR_BUILD -o $dummy $dummy.c && | |
436 | dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && | |
437 | SYSTEM_NAME=`$dummy $dummyarg` && | |
516 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && | |
517 | dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && | |
518 | SYSTEM_NAME=`"$dummy" "$dummyarg"` && | |
438 | 519 | { echo "$SYSTEM_NAME"; exit; } |
439 | echo mips-mips-riscos${UNAME_RELEASE} | |
520 | echo mips-mips-riscos"$UNAME_RELEASE" | |
440 | 521 | exit ;; |
441 | 522 | Motorola:PowerMAX_OS:*:*) |
442 | 523 | echo powerpc-motorola-powermax |
460 | 541 | echo m88k-motorola-sysv3 |
461 | 542 | exit ;; |
462 | 543 | AViiON:dgux:*:*) |
463 | # DG/UX returns AViiON for all architectures | |
464 | UNAME_PROCESSOR=`/usr/bin/uname -p` | |
465 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] | |
544 | # DG/UX returns AViiON for all architectures | |
545 | UNAME_PROCESSOR=`/usr/bin/uname -p` | |
546 | if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] | |
466 | 547 | then |
467 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ | |
468 | [ ${TARGET_BINARY_INTERFACE}x = x ] | |
548 | if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ | |
549 | [ "$TARGET_BINARY_INTERFACE"x = x ] | |
469 | 550 | then |
470 | echo m88k-dg-dgux${UNAME_RELEASE} | |
551 | echo m88k-dg-dgux"$UNAME_RELEASE" | |
471 | 552 | else |
472 | echo m88k-dg-dguxbcs${UNAME_RELEASE} | |
553 | echo m88k-dg-dguxbcs"$UNAME_RELEASE" | |
473 | 554 | fi |
474 | 555 | else |
475 | echo i586-dg-dgux${UNAME_RELEASE} | |
476 | fi | |
477 | exit ;; | |
556 | echo i586-dg-dgux"$UNAME_RELEASE" | |
557 | fi | |
558 | exit ;; | |
478 | 559 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
479 | 560 | echo m88k-dolphin-sysv3 |
480 | 561 | exit ;; |
489 | 570 | echo m68k-tektronix-bsd |
490 | 571 | exit ;; |
491 | 572 | *:IRIX*:*:*) |
492 | echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` | |
573 | echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" | |
493 | 574 | exit ;; |
494 | 575 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
495 | 576 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
501 | 582 | if [ -x /usr/bin/oslevel ] ; then |
502 | 583 | IBM_REV=`/usr/bin/oslevel` |
503 | 584 | else |
504 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
505 | fi | |
506 | echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} | |
585 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
586 | fi | |
587 | echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" | |
507 | 588 | exit ;; |
508 | 589 | *:AIX:2:3) |
509 | 590 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
510 | eval $set_cc_for_build | |
511 | sed 's/^ //' << EOF >$dummy.c | |
591 | set_cc_for_build | |
592 | sed 's/^ //' << EOF > "$dummy.c" | |
512 | 593 | #include <sys/systemcfg.h> |
513 | 594 | |
514 | 595 | main() |
519 | 600 | exit(0); |
520 | 601 | } |
521 | 602 | EOF |
522 | if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` | |
603 | if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` | |
523 | 604 | then |
524 | 605 | echo "$SYSTEM_NAME" |
525 | 606 | else |
531 | 612 | echo rs6000-ibm-aix3.2 |
532 | 613 | fi |
533 | 614 | exit ;; |
534 | *:AIX:*:[45]) | |
615 | *:AIX:*:[4567]) | |
535 | 616 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
536 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then | |
617 | if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then | |
537 | 618 | IBM_ARCH=rs6000 |
538 | 619 | else |
539 | 620 | IBM_ARCH=powerpc |
540 | 621 | fi |
541 | if [ -x /usr/bin/oslevel ] ; then | |
542 | IBM_REV=`/usr/bin/oslevel` | |
622 | if [ -x /usr/bin/lslpp ] ; then | |
623 | IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | | |
624 | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` | |
543 | 625 | else |
544 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
545 | fi | |
546 | echo ${IBM_ARCH}-ibm-aix${IBM_REV} | |
626 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
627 | fi | |
628 | echo "$IBM_ARCH"-ibm-aix"$IBM_REV" | |
547 | 629 | exit ;; |
548 | 630 | *:AIX:*:*) |
549 | 631 | echo rs6000-ibm-aix |
550 | 632 | exit ;; |
551 | ibmrt:4.4BSD:*|romp-ibm:BSD:*) | |
633 | ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) | |
552 | 634 | echo romp-ibm-bsd4.4 |
553 | 635 | exit ;; |
554 | 636 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
555 | echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to | |
637 | echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to | |
556 | 638 | exit ;; # report: romp-ibm BSD 4.3 |
557 | 639 | *:BOSX:*:*) |
558 | 640 | echo rs6000-bull-bosx |
567 | 649 | echo m68k-hp-bsd4.4 |
568 | 650 | exit ;; |
569 | 651 | 9000/[34678]??:HP-UX:*:*) |
570 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
571 | case "${UNAME_MACHINE}" in | |
572 | 9000/31? ) HP_ARCH=m68000 ;; | |
573 | 9000/[34]?? ) HP_ARCH=m68k ;; | |
652 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
653 | case "$UNAME_MACHINE" in | |
654 | 9000/31?) HP_ARCH=m68000 ;; | |
655 | 9000/[34]??) HP_ARCH=m68k ;; | |
574 | 656 | 9000/[678][0-9][0-9]) |
575 | 657 | if [ -x /usr/bin/getconf ]; then |
576 | 658 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
577 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | |
578 | case "${sc_cpu_version}" in | |
579 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | |
580 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | |
581 | 532) # CPU_PA_RISC2_0 | |
582 | case "${sc_kernel_bits}" in | |
583 | 32) HP_ARCH="hppa2.0n" ;; | |
584 | 64) HP_ARCH="hppa2.0w" ;; | |
585 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 | |
586 | esac ;; | |
587 | esac | |
659 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | |
660 | case "$sc_cpu_version" in | |
661 | 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 | |
662 | 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 | |
663 | 532) # CPU_PA_RISC2_0 | |
664 | case "$sc_kernel_bits" in | |
665 | 32) HP_ARCH=hppa2.0n ;; | |
666 | 64) HP_ARCH=hppa2.0w ;; | |
667 | '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 | |
668 | esac ;; | |
669 | esac | |
588 | 670 | fi |
589 | if [ "${HP_ARCH}" = "" ]; then | |
590 | eval $set_cc_for_build | |
591 | sed 's/^ //' << EOF >$dummy.c | |
592 | ||
593 | #define _HPUX_SOURCE | |
594 | #include <stdlib.h> | |
595 | #include <unistd.h> | |
596 | ||
597 | int main () | |
598 | { | |
599 | #if defined(_SC_KERNEL_BITS) | |
600 | long bits = sysconf(_SC_KERNEL_BITS); | |
601 | #endif | |
602 | long cpu = sysconf (_SC_CPU_VERSION); | |
603 | ||
604 | switch (cpu) | |
605 | { | |
606 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | |
607 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | |
608 | case CPU_PA_RISC2_0: | |
609 | #if defined(_SC_KERNEL_BITS) | |
610 | switch (bits) | |
611 | { | |
612 | case 64: puts ("hppa2.0w"); break; | |
613 | case 32: puts ("hppa2.0n"); break; | |
614 | default: puts ("hppa2.0"); break; | |
615 | } break; | |
616 | #else /* !defined(_SC_KERNEL_BITS) */ | |
617 | puts ("hppa2.0"); break; | |
618 | #endif | |
619 | default: puts ("hppa1.0"); break; | |
620 | } | |
621 | exit (0); | |
622 | } | |
671 | if [ "$HP_ARCH" = "" ]; then | |
672 | set_cc_for_build | |
673 | sed 's/^ //' << EOF > "$dummy.c" | |
674 | ||
675 | #define _HPUX_SOURCE | |
676 | #include <stdlib.h> | |
677 | #include <unistd.h> | |
678 | ||
679 | int main () | |
680 | { | |
681 | #if defined(_SC_KERNEL_BITS) | |
682 | long bits = sysconf(_SC_KERNEL_BITS); | |
683 | #endif | |
684 | long cpu = sysconf (_SC_CPU_VERSION); | |
685 | ||
686 | switch (cpu) | |
687 | { | |
688 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | |
689 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | |
690 | case CPU_PA_RISC2_0: | |
691 | #if defined(_SC_KERNEL_BITS) | |
692 | switch (bits) | |
693 | { | |
694 | case 64: puts ("hppa2.0w"); break; | |
695 | case 32: puts ("hppa2.0n"); break; | |
696 | default: puts ("hppa2.0"); break; | |
697 | } break; | |
698 | #else /* !defined(_SC_KERNEL_BITS) */ | |
699 | puts ("hppa2.0"); break; | |
700 | #endif | |
701 | default: puts ("hppa1.0"); break; | |
702 | } | |
703 | exit (0); | |
704 | } | |
623 | 705 | EOF |
624 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` | |
706 | (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` | |
625 | 707 | test -z "$HP_ARCH" && HP_ARCH=hppa |
626 | 708 | fi ;; |
627 | 709 | esac |
628 | if [ ${HP_ARCH} = "hppa2.0w" ] | |
710 | if [ "$HP_ARCH" = hppa2.0w ] | |
629 | 711 | then |
630 | eval $set_cc_for_build | |
712 | set_cc_for_build | |
631 | 713 | |
632 | 714 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
633 | 715 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
638 | 720 | # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess |
639 | 721 | # => hppa64-hp-hpux11.23 |
640 | 722 | |
641 | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | | |
642 | grep __LP64__ >/dev/null | |
723 | if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | | |
724 | grep -q __LP64__ | |
643 | 725 | then |
644 | HP_ARCH="hppa2.0w" | |
726 | HP_ARCH=hppa2.0w | |
645 | 727 | else |
646 | HP_ARCH="hppa64" | |
728 | HP_ARCH=hppa64 | |
647 | 729 | fi |
648 | 730 | fi |
649 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} | |
731 | echo "$HP_ARCH"-hp-hpux"$HPUX_REV" | |
650 | 732 | exit ;; |
651 | 733 | ia64:HP-UX:*:*) |
652 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
653 | echo ia64-hp-hpux${HPUX_REV} | |
734 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
735 | echo ia64-hp-hpux"$HPUX_REV" | |
654 | 736 | exit ;; |
655 | 737 | 3050*:HI-UX:*:*) |
656 | eval $set_cc_for_build | |
657 | sed 's/^ //' << EOF >$dummy.c | |
738 | set_cc_for_build | |
739 | sed 's/^ //' << EOF > "$dummy.c" | |
658 | 740 | #include <unistd.h> |
659 | 741 | int |
660 | 742 | main () |
679 | 761 | exit (0); |
680 | 762 | } |
681 | 763 | EOF |
682 | $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && | |
764 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && | |
683 | 765 | { echo "$SYSTEM_NAME"; exit; } |
684 | 766 | echo unknown-hitachi-hiuxwe2 |
685 | 767 | exit ;; |
686 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) | |
768 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) | |
687 | 769 | echo hppa1.1-hp-bsd |
688 | 770 | exit ;; |
689 | 771 | 9000/8??:4.3bsd:*:*) |
692 | 774 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
693 | 775 | echo hppa1.0-hp-mpeix |
694 | 776 | exit ;; |
695 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) | |
777 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) | |
696 | 778 | echo hppa1.1-hp-osf |
697 | 779 | exit ;; |
698 | 780 | hp8??:OSF1:*:*) |
700 | 782 | exit ;; |
701 | 783 | i*86:OSF1:*:*) |
702 | 784 | if [ -x /usr/sbin/sysversion ] ; then |
703 | echo ${UNAME_MACHINE}-unknown-osf1mk | |
785 | echo "$UNAME_MACHINE"-unknown-osf1mk | |
704 | 786 | else |
705 | echo ${UNAME_MACHINE}-unknown-osf1 | |
787 | echo "$UNAME_MACHINE"-unknown-osf1 | |
706 | 788 | fi |
707 | 789 | exit ;; |
708 | 790 | parisc*:Lites*:*:*) |
710 | 792 | exit ;; |
711 | 793 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
712 | 794 | echo c1-convex-bsd |
713 | exit ;; | |
795 | exit ;; | |
714 | 796 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
715 | 797 | if getsysinfo -f scalar_acc |
716 | 798 | then echo c32-convex-bsd |
717 | 799 | else echo c2-convex-bsd |
718 | 800 | fi |
719 | exit ;; | |
801 | exit ;; | |
720 | 802 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
721 | 803 | echo c34-convex-bsd |
722 | exit ;; | |
804 | exit ;; | |
723 | 805 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
724 | 806 | echo c38-convex-bsd |
725 | exit ;; | |
807 | exit ;; | |
726 | 808 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
727 | 809 | echo c4-convex-bsd |
728 | exit ;; | |
810 | exit ;; | |
729 | 811 | CRAY*Y-MP:*:*:*) |
730 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
812 | echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
731 | 813 | exit ;; |
732 | 814 | CRAY*[A-Z]90:*:*:*) |
733 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | |
815 | echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | |
734 | 816 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
735 | 817 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
736 | 818 | -e 's/\.[^.]*$/.X/' |
737 | 819 | exit ;; |
738 | 820 | CRAY*TS:*:*:*) |
739 | echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
821 | echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
740 | 822 | exit ;; |
741 | 823 | CRAY*T3E:*:*:*) |
742 | echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
824 | echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
743 | 825 | exit ;; |
744 | 826 | CRAY*SV1:*:*:*) |
745 | echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
827 | echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
746 | 828 | exit ;; |
747 | 829 | *:UNICOS/mp:*:*) |
748 | echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
830 | echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
749 | 831 | exit ;; |
750 | 832 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
751 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | |
752 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
753 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | |
754 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
755 | exit ;; | |
833 | FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` | |
834 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` | |
835 | FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` | |
836 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
837 | exit ;; | |
756 | 838 | 5000:UNIX_System_V:4.*:*) |
757 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
758 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | |
759 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
839 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` | |
840 | FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` | |
841 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
760 | 842 | exit ;; |
761 | 843 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
762 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | |
844 | echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" | |
763 | 845 | exit ;; |
764 | 846 | sparc*:BSD/OS:*:*) |
765 | echo sparc-unknown-bsdi${UNAME_RELEASE} | |
847 | echo sparc-unknown-bsdi"$UNAME_RELEASE" | |
766 | 848 | exit ;; |
767 | 849 | *:BSD/OS:*:*) |
768 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} | |
850 | echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" | |
851 | exit ;; | |
852 | arm:FreeBSD:*:*) | |
853 | UNAME_PROCESSOR=`uname -p` | |
854 | set_cc_for_build | |
855 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | |
856 | | grep -q __ARM_PCS_VFP | |
857 | then | |
858 | echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi | |
859 | else | |
860 | echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf | |
861 | fi | |
769 | 862 | exit ;; |
770 | 863 | *:FreeBSD:*:*) |
771 | case ${UNAME_MACHINE} in | |
772 | pc98) | |
773 | echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | |
864 | UNAME_PROCESSOR=`/usr/bin/uname -p` | |
865 | case "$UNAME_PROCESSOR" in | |
774 | 866 | amd64) |
775 | echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | |
776 | *) | |
777 | echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | |
867 | UNAME_PROCESSOR=x86_64 ;; | |
868 | i386) | |
869 | UNAME_PROCESSOR=i586 ;; | |
778 | 870 | esac |
871 | echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
779 | 872 | exit ;; |
780 | 873 | i*:CYGWIN*:*) |
781 | echo ${UNAME_MACHINE}-pc-cygwin | |
874 | echo "$UNAME_MACHINE"-pc-cygwin | |
875 | exit ;; | |
876 | *:MINGW64*:*) | |
877 | echo "$UNAME_MACHINE"-pc-mingw64 | |
782 | 878 | exit ;; |
783 | 879 | *:MINGW*:*) |
784 | echo ${UNAME_MACHINE}-pc-mingw32 | |
785 | exit ;; | |
786 | i*:windows32*:*) | |
787 | # uname -m includes "-pc" on this system. | |
788 | echo ${UNAME_MACHINE}-mingw32 | |
880 | echo "$UNAME_MACHINE"-pc-mingw32 | |
881 | exit ;; | |
882 | *:MSYS*:*) | |
883 | echo "$UNAME_MACHINE"-pc-msys | |
789 | 884 | exit ;; |
790 | 885 | i*:PW*:*) |
791 | echo ${UNAME_MACHINE}-pc-pw32 | |
792 | exit ;; | |
793 | *:Interix*:[3456]*) | |
794 | case ${UNAME_MACHINE} in | |
886 | echo "$UNAME_MACHINE"-pc-pw32 | |
887 | exit ;; | |
888 | *:Interix*:*) | |
889 | case "$UNAME_MACHINE" in | |
795 | 890 | x86) |
796 | echo i586-pc-interix${UNAME_RELEASE} | |
891 | echo i586-pc-interix"$UNAME_RELEASE" | |
797 | 892 | exit ;; |
798 | EM64T | authenticamd) | |
799 | echo x86_64-unknown-interix${UNAME_RELEASE} | |
893 | authenticamd | genuineintel | EM64T) | |
894 | echo x86_64-unknown-interix"$UNAME_RELEASE" | |
895 | exit ;; | |
896 | IA64) | |
897 | echo ia64-unknown-interix"$UNAME_RELEASE" | |
800 | 898 | exit ;; |
801 | 899 | esac ;; |
802 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) | |
803 | echo i${UNAME_MACHINE}-pc-mks | |
804 | exit ;; | |
805 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | |
806 | # How do we know it's Interix rather than the generic POSIX subsystem? | |
807 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we | |
808 | # UNAME_MACHINE based on the output of uname instead of i386? | |
809 | echo i586-pc-interix | |
810 | exit ;; | |
811 | 900 | i*:UWIN*:*) |
812 | echo ${UNAME_MACHINE}-pc-uwin | |
901 | echo "$UNAME_MACHINE"-pc-uwin | |
813 | 902 | exit ;; |
814 | 903 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
815 | echo x86_64-unknown-cygwin | |
816 | exit ;; | |
817 | p*:CYGWIN*:*) | |
818 | echo powerpcle-unknown-cygwin | |
904 | echo x86_64-pc-cygwin | |
819 | 905 | exit ;; |
820 | 906 | prep*:SunOS:5.*:*) |
821 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
907 | echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
822 | 908 | exit ;; |
823 | 909 | *:GNU:*:*) |
824 | 910 | # the GNU system |
825 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | |
911 | echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" | |
826 | 912 | exit ;; |
827 | 913 | *:GNU/*:*:*) |
828 | 914 | # other systems with GNU libc and userland |
829 | echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu | |
830 | exit ;; | |
831 | i*86:Minix:*:*) | |
832 | echo ${UNAME_MACHINE}-pc-minix | |
833 | exit ;; | |
834 | arm*:Linux:*:*) | |
835 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
836 | exit ;; | |
837 | avr32*:Linux:*:*) | |
838 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
839 | exit ;; | |
840 | cris:Linux:*:*) | |
841 | echo cris-axis-linux-gnu | |
842 | exit ;; | |
843 | crisv32:Linux:*:*) | |
844 | echo crisv32-axis-linux-gnu | |
845 | exit ;; | |
846 | frv:Linux:*:*) | |
847 | echo frv-unknown-linux-gnu | |
848 | exit ;; | |
849 | ia64:Linux:*:*) | |
850 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
851 | exit ;; | |
852 | m32r*:Linux:*:*) | |
853 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
854 | exit ;; | |
855 | m68*:Linux:*:*) | |
856 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
857 | exit ;; | |
858 | mips:Linux:*:*) | |
859 | eval $set_cc_for_build | |
860 | sed 's/^ //' << EOF >$dummy.c | |
861 | #undef CPU | |
862 | #undef mips | |
863 | #undef mipsel | |
864 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | |
865 | CPU=mipsel | |
866 | #else | |
867 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | |
868 | CPU=mips | |
869 | #else | |
870 | CPU= | |
871 | #endif | |
872 | #endif | |
873 | EOF | |
874 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' | |
875 | /^CPU/{ | |
876 | s: ::g | |
877 | p | |
878 | }'`" | |
879 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | |
880 | ;; | |
881 | mips64:Linux:*:*) | |
882 | eval $set_cc_for_build | |
883 | sed 's/^ //' << EOF >$dummy.c | |
884 | #undef CPU | |
885 | #undef mips64 | |
886 | #undef mips64el | |
887 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | |
888 | CPU=mips64el | |
889 | #else | |
890 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | |
891 | CPU=mips64 | |
892 | #else | |
893 | CPU= | |
894 | #endif | |
895 | #endif | |
896 | EOF | |
897 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' | |
898 | /^CPU/{ | |
899 | s: ::g | |
900 | p | |
901 | }'`" | |
902 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | |
903 | ;; | |
904 | or32:Linux:*:*) | |
905 | echo or32-unknown-linux-gnu | |
906 | exit ;; | |
907 | ppc:Linux:*:*) | |
908 | echo powerpc-unknown-linux-gnu | |
909 | exit ;; | |
910 | ppc64:Linux:*:*) | |
911 | echo powerpc64-unknown-linux-gnu | |
915 | echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" | |
916 | exit ;; | |
917 | *:Minix:*:*) | |
918 | echo "$UNAME_MACHINE"-unknown-minix | |
919 | exit ;; | |
920 | aarch64:Linux:*:*) | |
921 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
922 | exit ;; | |
923 | aarch64_be:Linux:*:*) | |
924 | UNAME_MACHINE=aarch64_be | |
925 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
912 | 926 | exit ;; |
913 | 927 | alpha:Linux:*:*) |
914 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | |
928 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in | |
915 | 929 | EV5) UNAME_MACHINE=alphaev5 ;; |
916 | 930 | EV56) UNAME_MACHINE=alphaev56 ;; |
917 | 931 | PCA56) UNAME_MACHINE=alphapca56 ;; |
919 | 933 | EV6) UNAME_MACHINE=alphaev6 ;; |
920 | 934 | EV67) UNAME_MACHINE=alphaev67 ;; |
921 | 935 | EV68*) UNAME_MACHINE=alphaev68 ;; |
922 | esac | |
923 | objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null | |
924 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | |
925 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | |
936 | esac | |
937 | objdump --private-headers /bin/sh | grep -q ld.so.1 | |
938 | if test "$?" = 0 ; then LIBC=gnulibc1 ; fi | |
939 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
940 | exit ;; | |
941 | arc:Linux:*:* | arceb:Linux:*:*) | |
942 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
943 | exit ;; | |
944 | arm*:Linux:*:*) | |
945 | set_cc_for_build | |
946 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | |
947 | | grep -q __ARM_EABI__ | |
948 | then | |
949 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
950 | else | |
951 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | |
952 | | grep -q __ARM_PCS_VFP | |
953 | then | |
954 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi | |
955 | else | |
956 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf | |
957 | fi | |
958 | fi | |
959 | exit ;; | |
960 | avr32*:Linux:*:*) | |
961 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
962 | exit ;; | |
963 | cris:Linux:*:*) | |
964 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
965 | exit ;; | |
966 | crisv32:Linux:*:*) | |
967 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
968 | exit ;; | |
969 | e2k:Linux:*:*) | |
970 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
971 | exit ;; | |
972 | frv:Linux:*:*) | |
973 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
974 | exit ;; | |
975 | hexagon:Linux:*:*) | |
976 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
977 | exit ;; | |
978 | i*86:Linux:*:*) | |
979 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
980 | exit ;; | |
981 | ia64:Linux:*:*) | |
982 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
983 | exit ;; | |
984 | k1om:Linux:*:*) | |
985 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
986 | exit ;; | |
987 | m32r*:Linux:*:*) | |
988 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
989 | exit ;; | |
990 | m68*:Linux:*:*) | |
991 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
992 | exit ;; | |
993 | mips:Linux:*:* | mips64:Linux:*:*) | |
994 | set_cc_for_build | |
995 | IS_GLIBC=0 | |
996 | test x"${LIBC}" = xgnu && IS_GLIBC=1 | |
997 | sed 's/^ //' << EOF > "$dummy.c" | |
998 | #undef CPU | |
999 | #undef mips | |
1000 | #undef mipsel | |
1001 | #undef mips64 | |
1002 | #undef mips64el | |
1003 | #if ${IS_GLIBC} && defined(_ABI64) | |
1004 | LIBCABI=gnuabi64 | |
1005 | #else | |
1006 | #if ${IS_GLIBC} && defined(_ABIN32) | |
1007 | LIBCABI=gnuabin32 | |
1008 | #else | |
1009 | LIBCABI=${LIBC} | |
1010 | #endif | |
1011 | #endif | |
1012 | ||
1013 | #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
1014 | CPU=mipsisa64r6 | |
1015 | #else | |
1016 | #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
1017 | CPU=mipsisa32r6 | |
1018 | #else | |
1019 | #if defined(__mips64) | |
1020 | CPU=mips64 | |
1021 | #else | |
1022 | CPU=mips | |
1023 | #endif | |
1024 | #endif | |
1025 | #endif | |
1026 | ||
1027 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | |
1028 | MIPS_ENDIAN=el | |
1029 | #else | |
1030 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | |
1031 | MIPS_ENDIAN= | |
1032 | #else | |
1033 | MIPS_ENDIAN= | |
1034 | #endif | |
1035 | #endif | |
1036 | EOF | |
1037 | eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" | |
1038 | test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } | |
1039 | ;; | |
1040 | mips64el:Linux:*:*) | |
1041 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1042 | exit ;; | |
1043 | openrisc*:Linux:*:*) | |
1044 | echo or1k-unknown-linux-"$LIBC" | |
1045 | exit ;; | |
1046 | or32:Linux:*:* | or1k*:Linux:*:*) | |
1047 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1048 | exit ;; | |
1049 | padre:Linux:*:*) | |
1050 | echo sparc-unknown-linux-"$LIBC" | |
1051 | exit ;; | |
1052 | parisc64:Linux:*:* | hppa64:Linux:*:*) | |
1053 | echo hppa64-unknown-linux-"$LIBC" | |
926 | 1054 | exit ;; |
927 | 1055 | parisc:Linux:*:* | hppa:Linux:*:*) |
928 | 1056 | # Look for CPU level |
929 | 1057 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
930 | PA7*) echo hppa1.1-unknown-linux-gnu ;; | |
931 | PA8*) echo hppa2.0-unknown-linux-gnu ;; | |
932 | *) echo hppa-unknown-linux-gnu ;; | |
1058 | PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; | |
1059 | PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; | |
1060 | *) echo hppa-unknown-linux-"$LIBC" ;; | |
933 | 1061 | esac |
934 | 1062 | exit ;; |
935 | parisc64:Linux:*:* | hppa64:Linux:*:*) | |
936 | echo hppa64-unknown-linux-gnu | |
1063 | ppc64:Linux:*:*) | |
1064 | echo powerpc64-unknown-linux-"$LIBC" | |
1065 | exit ;; | |
1066 | ppc:Linux:*:*) | |
1067 | echo powerpc-unknown-linux-"$LIBC" | |
1068 | exit ;; | |
1069 | ppc64le:Linux:*:*) | |
1070 | echo powerpc64le-unknown-linux-"$LIBC" | |
1071 | exit ;; | |
1072 | ppcle:Linux:*:*) | |
1073 | echo powerpcle-unknown-linux-"$LIBC" | |
1074 | exit ;; | |
1075 | riscv32:Linux:*:* | riscv64:Linux:*:*) | |
1076 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
937 | 1077 | exit ;; |
938 | 1078 | s390:Linux:*:* | s390x:Linux:*:*) |
939 | echo ${UNAME_MACHINE}-ibm-linux | |
1079 | echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" | |
940 | 1080 | exit ;; |
941 | 1081 | sh64*:Linux:*:*) |
942 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
1082 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
943 | 1083 | exit ;; |
944 | 1084 | sh*:Linux:*:*) |
945 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
1085 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
946 | 1086 | exit ;; |
947 | 1087 | sparc:Linux:*:* | sparc64:Linux:*:*) |
948 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
1088 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1089 | exit ;; | |
1090 | tile*:Linux:*:*) | |
1091 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
949 | 1092 | exit ;; |
950 | 1093 | vax:Linux:*:*) |
951 | echo ${UNAME_MACHINE}-dec-linux-gnu | |
1094 | echo "$UNAME_MACHINE"-dec-linux-"$LIBC" | |
952 | 1095 | exit ;; |
953 | 1096 | x86_64:Linux:*:*) |
954 | echo x86_64-unknown-linux-gnu | |
955 | exit ;; | |
956 | xtensa:Linux:*:*) | |
957 | echo xtensa-unknown-linux-gnu | |
958 | exit ;; | |
959 | i*86:Linux:*:*) | |
960 | # The BFD linker knows what the default object file format is, so | |
961 | # first see if it will tell us. cd to the root directory to prevent | |
962 | # problems with other programs or directories called `ld' in the path. | |
963 | # Set LC_ALL=C to ensure ld outputs messages in English. | |
964 | ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | |
965 | | sed -ne '/supported targets:/!d | |
966 | s/[ ][ ]*/ /g | |
967 | s/.*supported targets: *// | |
968 | s/ .*// | |
969 | p'` | |
970 | case "$ld_supported_targets" in | |
971 | elf32-i386) | |
972 | TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" | |
973 | ;; | |
974 | a.out-i386-linux) | |
975 | echo "${UNAME_MACHINE}-pc-linux-gnuaout" | |
976 | exit ;; | |
977 | coff-i386) | |
978 | echo "${UNAME_MACHINE}-pc-linux-gnucoff" | |
979 | exit ;; | |
980 | "") | |
981 | # Either a pre-BFD a.out linker (linux-gnuoldld) or | |
982 | # one that does not give us useful --help. | |
983 | echo "${UNAME_MACHINE}-pc-linux-gnuoldld" | |
984 | exit ;; | |
985 | esac | |
986 | # Determine whether the default compiler is a.out or elf | |
987 | eval $set_cc_for_build | |
988 | sed 's/^ //' << EOF >$dummy.c | |
989 | #include <features.h> | |
990 | #ifdef __ELF__ | |
991 | # ifdef __GLIBC__ | |
992 | # if __GLIBC__ >= 2 | |
993 | LIBC=gnu | |
994 | # else | |
995 | LIBC=gnulibc1 | |
996 | # endif | |
997 | # else | |
998 | LIBC=gnulibc1 | |
999 | # endif | |
1000 | #else | |
1001 | #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) | |
1002 | LIBC=gnu | |
1003 | #else | |
1004 | LIBC=gnuaout | |
1005 | #endif | |
1006 | #endif | |
1007 | #ifdef __dietlibc__ | |
1008 | LIBC=dietlibc | |
1009 | #endif | |
1010 | EOF | |
1011 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' | |
1012 | /^LIBC/{ | |
1013 | s: ::g | |
1014 | p | |
1015 | }'`" | |
1016 | test x"${LIBC}" != x && { | |
1017 | echo "${UNAME_MACHINE}-pc-linux-${LIBC}" | |
1018 | exit | |
1019 | } | |
1020 | test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } | |
1021 | ;; | |
1097 | set_cc_for_build | |
1098 | LIBCABI=$LIBC | |
1099 | if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | |
1100 | if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ | |
1101 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1102 | grep IS_X32 >/dev/null | |
1103 | then | |
1104 | LIBCABI="$LIBC"x32 | |
1105 | fi | |
1106 | fi | |
1107 | echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" | |
1108 | exit ;; | |
1109 | xtensa*:Linux:*:*) | |
1110 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1111 | exit ;; | |
1022 | 1112 | i*86:DYNIX/ptx:4*:*) |
1023 | 1113 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1024 | 1114 | # earlier versions are messed up and put the nodename in both |
1026 | 1116 | echo i386-sequent-sysv4 |
1027 | 1117 | exit ;; |
1028 | 1118 | i*86:UNIX_SV:4.2MP:2.*) |
1029 | # Unixware is an offshoot of SVR4, but it has its own version | |
1030 | # number series starting with 2... | |
1031 | # I am not positive that other SVR4 systems won't match this, | |
1119 | # Unixware is an offshoot of SVR4, but it has its own version | |
1120 | # number series starting with 2... | |
1121 | # I am not positive that other SVR4 systems won't match this, | |
1032 | 1122 | # I just have to hope. -- rms. |
1033 | # Use sysv4.2uw... so that sysv4* matches it. | |
1034 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | |
1123 | # Use sysv4.2uw... so that sysv4* matches it. | |
1124 | echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" | |
1035 | 1125 | exit ;; |
1036 | 1126 | i*86:OS/2:*:*) |
1037 | 1127 | # If we were able to find `uname', then EMX Unix compatibility |
1038 | 1128 | # is probably installed. |
1039 | echo ${UNAME_MACHINE}-pc-os2-emx | |
1129 | echo "$UNAME_MACHINE"-pc-os2-emx | |
1040 | 1130 | exit ;; |
1041 | 1131 | i*86:XTS-300:*:STOP) |
1042 | echo ${UNAME_MACHINE}-unknown-stop | |
1132 | echo "$UNAME_MACHINE"-unknown-stop | |
1043 | 1133 | exit ;; |
1044 | 1134 | i*86:atheos:*:*) |
1045 | echo ${UNAME_MACHINE}-unknown-atheos | |
1135 | echo "$UNAME_MACHINE"-unknown-atheos | |
1046 | 1136 | exit ;; |
1047 | 1137 | i*86:syllable:*:*) |
1048 | echo ${UNAME_MACHINE}-pc-syllable | |
1049 | exit ;; | |
1050 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) | |
1051 | echo i386-unknown-lynxos${UNAME_RELEASE} | |
1138 | echo "$UNAME_MACHINE"-pc-syllable | |
1139 | exit ;; | |
1140 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) | |
1141 | echo i386-unknown-lynxos"$UNAME_RELEASE" | |
1052 | 1142 | exit ;; |
1053 | 1143 | i*86:*DOS:*:*) |
1054 | echo ${UNAME_MACHINE}-pc-msdosdjgpp | |
1055 | exit ;; | |
1056 | i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) | |
1057 | UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` | |
1144 | echo "$UNAME_MACHINE"-pc-msdosdjgpp | |
1145 | exit ;; | |
1146 | i*86:*:4.*:*) | |
1147 | UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` | |
1058 | 1148 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
1059 | echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} | |
1149 | echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" | |
1060 | 1150 | else |
1061 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} | |
1151 | echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" | |
1062 | 1152 | fi |
1063 | 1153 | exit ;; |
1064 | 1154 | i*86:*:5:[678]*) |
1065 | # UnixWare 7.x, OpenUNIX and OpenServer 6. | |
1155 | # UnixWare 7.x, OpenUNIX and OpenServer 6. | |
1066 | 1156 | case `/bin/uname -X | grep "^Machine"` in |
1067 | 1157 | *486*) UNAME_MACHINE=i486 ;; |
1068 | 1158 | *Pentium) UNAME_MACHINE=i586 ;; |
1069 | 1159 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1070 | 1160 | esac |
1071 | echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | |
1161 | echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" | |
1072 | 1162 | exit ;; |
1073 | 1163 | i*86:*:3.2:*) |
1074 | 1164 | if test -f /usr/options/cb.name; then |
1075 | 1165 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
1076 | echo ${UNAME_MACHINE}-pc-isc$UNAME_REL | |
1166 | echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" | |
1077 | 1167 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
1078 | 1168 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
1079 | 1169 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
1083 | 1173 | && UNAME_MACHINE=i686 |
1084 | 1174 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
1085 | 1175 | && UNAME_MACHINE=i686 |
1086 | echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | |
1176 | echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" | |
1087 | 1177 | else |
1088 | echo ${UNAME_MACHINE}-pc-sysv32 | |
1178 | echo "$UNAME_MACHINE"-pc-sysv32 | |
1089 | 1179 | fi |
1090 | 1180 | exit ;; |
1091 | 1181 | pc:*:*:*) |
1092 | 1182 | # Left here for compatibility: |
1093 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | |
1094 | # the processor, so we play safe by assuming i386. | |
1095 | echo i386-pc-msdosdjgpp | |
1096 | exit ;; | |
1183 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | |
1184 | # the processor, so we play safe by assuming i586. | |
1185 | # Note: whatever this is, it MUST be the same as what config.sub | |
1186 | # prints for the "djgpp" host, or else GDB configure will decide that | |
1187 | # this is a cross-build. | |
1188 | echo i586-pc-msdosdjgpp | |
1189 | exit ;; | |
1097 | 1190 | Intel:Mach:3*:*) |
1098 | 1191 | echo i386-pc-mach3 |
1099 | 1192 | exit ;; |
1102 | 1195 | exit ;; |
1103 | 1196 | i860:*:4.*:*) # i860-SVR4 |
1104 | 1197 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
1105 | echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 | |
1198 | echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 | |
1106 | 1199 | else # Add other i860-SVR4 vendors below as they are discovered. |
1107 | echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 | |
1200 | echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 | |
1108 | 1201 | fi |
1109 | 1202 | exit ;; |
1110 | 1203 | mini*:CTIX:SYS*5:*) |
1124 | 1217 | test -r /etc/.relid \ |
1125 | 1218 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1126 | 1219 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1127 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | |
1220 | && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | |
1128 | 1221 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1129 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | |
1222 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; | |
1130 | 1223 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
1131 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1132 | && { echo i486-ncr-sysv4; exit; } ;; | |
1224 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1225 | && { echo i486-ncr-sysv4; exit; } ;; | |
1226 | NCR*:*:4.2:* | MPRAS*:*:4.2:*) | |
1227 | OS_REL='.3' | |
1228 | test -r /etc/.relid \ | |
1229 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | |
1230 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1231 | && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | |
1232 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | |
1233 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } | |
1234 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ | |
1235 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; | |
1133 | 1236 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
1134 | echo m68k-unknown-lynxos${UNAME_RELEASE} | |
1237 | echo m68k-unknown-lynxos"$UNAME_RELEASE" | |
1135 | 1238 | exit ;; |
1136 | 1239 | mc68030:UNIX_System_V:4.*:*) |
1137 | 1240 | echo m68k-atari-sysv4 |
1138 | 1241 | exit ;; |
1139 | 1242 | TSUNAMI:LynxOS:2.*:*) |
1140 | echo sparc-unknown-lynxos${UNAME_RELEASE} | |
1243 | echo sparc-unknown-lynxos"$UNAME_RELEASE" | |
1141 | 1244 | exit ;; |
1142 | 1245 | rs6000:LynxOS:2.*:*) |
1143 | echo rs6000-unknown-lynxos${UNAME_RELEASE} | |
1144 | exit ;; | |
1145 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) | |
1146 | echo powerpc-unknown-lynxos${UNAME_RELEASE} | |
1246 | echo rs6000-unknown-lynxos"$UNAME_RELEASE" | |
1247 | exit ;; | |
1248 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) | |
1249 | echo powerpc-unknown-lynxos"$UNAME_RELEASE" | |
1147 | 1250 | exit ;; |
1148 | 1251 | SM[BE]S:UNIX_SV:*:*) |
1149 | echo mips-dde-sysv${UNAME_RELEASE} | |
1252 | echo mips-dde-sysv"$UNAME_RELEASE" | |
1150 | 1253 | exit ;; |
1151 | 1254 | RM*:ReliantUNIX-*:*:*) |
1152 | 1255 | echo mips-sni-sysv4 |
1157 | 1260 | *:SINIX-*:*:*) |
1158 | 1261 | if uname -p 2>/dev/null >/dev/null ; then |
1159 | 1262 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1160 | echo ${UNAME_MACHINE}-sni-sysv4 | |
1263 | echo "$UNAME_MACHINE"-sni-sysv4 | |
1161 | 1264 | else |
1162 | 1265 | echo ns32k-sni-sysv |
1163 | 1266 | fi |
1164 | 1267 | exit ;; |
1165 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | |
1166 | # says <Richard.M.Bartel@ccMail.Census.GOV> | |
1167 | echo i586-unisys-sysv4 | |
1168 | exit ;; | |
1268 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | |
1269 | # says <Richard.M.Bartel@ccMail.Census.GOV> | |
1270 | echo i586-unisys-sysv4 | |
1271 | exit ;; | |
1169 | 1272 | *:UNIX_System_V:4*:FTX*) |
1170 | 1273 | # From Gerald Hewes <hewes@openmarket.com>. |
1171 | 1274 | # How about differentiating between stratus architectures? -djm |
1177 | 1280 | exit ;; |
1178 | 1281 | i*86:VOS:*:*) |
1179 | 1282 | # From Paul.Green@stratus.com. |
1180 | echo ${UNAME_MACHINE}-stratus-vos | |
1283 | echo "$UNAME_MACHINE"-stratus-vos | |
1181 | 1284 | exit ;; |
1182 | 1285 | *:VOS:*:*) |
1183 | 1286 | # From Paul.Green@stratus.com. |
1184 | 1287 | echo hppa1.1-stratus-vos |
1185 | 1288 | exit ;; |
1186 | 1289 | mc68*:A/UX:*:*) |
1187 | echo m68k-apple-aux${UNAME_RELEASE} | |
1290 | echo m68k-apple-aux"$UNAME_RELEASE" | |
1188 | 1291 | exit ;; |
1189 | 1292 | news*:NEWS-OS:6*:*) |
1190 | 1293 | echo mips-sony-newsos6 |
1191 | 1294 | exit ;; |
1192 | 1295 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1193 | 1296 | if [ -d /usr/nec ]; then |
1194 | echo mips-nec-sysv${UNAME_RELEASE} | |
1297 | echo mips-nec-sysv"$UNAME_RELEASE" | |
1195 | 1298 | else |
1196 | echo mips-unknown-sysv${UNAME_RELEASE} | |
1197 | fi | |
1198 | exit ;; | |
1299 | echo mips-unknown-sysv"$UNAME_RELEASE" | |
1300 | fi | |
1301 | exit ;; | |
1199 | 1302 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1200 | 1303 | echo powerpc-be-beos |
1201 | 1304 | exit ;; |
1205 | 1308 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
1206 | 1309 | echo i586-pc-beos |
1207 | 1310 | exit ;; |
1311 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. | |
1312 | echo i586-pc-haiku | |
1313 | exit ;; | |
1314 | x86_64:Haiku:*:*) | |
1315 | echo x86_64-unknown-haiku | |
1316 | exit ;; | |
1208 | 1317 | SX-4:SUPER-UX:*:*) |
1209 | echo sx4-nec-superux${UNAME_RELEASE} | |
1318 | echo sx4-nec-superux"$UNAME_RELEASE" | |
1210 | 1319 | exit ;; |
1211 | 1320 | SX-5:SUPER-UX:*:*) |
1212 | echo sx5-nec-superux${UNAME_RELEASE} | |
1321 | echo sx5-nec-superux"$UNAME_RELEASE" | |
1213 | 1322 | exit ;; |
1214 | 1323 | SX-6:SUPER-UX:*:*) |
1215 | echo sx6-nec-superux${UNAME_RELEASE} | |
1324 | echo sx6-nec-superux"$UNAME_RELEASE" | |
1216 | 1325 | exit ;; |
1217 | 1326 | SX-7:SUPER-UX:*:*) |
1218 | echo sx7-nec-superux${UNAME_RELEASE} | |
1327 | echo sx7-nec-superux"$UNAME_RELEASE" | |
1219 | 1328 | exit ;; |
1220 | 1329 | SX-8:SUPER-UX:*:*) |
1221 | echo sx8-nec-superux${UNAME_RELEASE} | |
1330 | echo sx8-nec-superux"$UNAME_RELEASE" | |
1222 | 1331 | exit ;; |
1223 | 1332 | SX-8R:SUPER-UX:*:*) |
1224 | echo sx8r-nec-superux${UNAME_RELEASE} | |
1333 | echo sx8r-nec-superux"$UNAME_RELEASE" | |
1334 | exit ;; | |
1335 | SX-ACE:SUPER-UX:*:*) | |
1336 | echo sxace-nec-superux"$UNAME_RELEASE" | |
1225 | 1337 | exit ;; |
1226 | 1338 | Power*:Rhapsody:*:*) |
1227 | echo powerpc-apple-rhapsody${UNAME_RELEASE} | |
1339 | echo powerpc-apple-rhapsody"$UNAME_RELEASE" | |
1228 | 1340 | exit ;; |
1229 | 1341 | *:Rhapsody:*:*) |
1230 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | |
1342 | echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" | |
1231 | 1343 | exit ;; |
1232 | 1344 | *:Darwin:*:*) |
1233 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | |
1345 | UNAME_PROCESSOR=`uname -p` | |
1234 | 1346 | case $UNAME_PROCESSOR in |
1235 | 1347 | unknown) UNAME_PROCESSOR=powerpc ;; |
1236 | 1348 | esac |
1237 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | |
1349 | if command -v xcode-select > /dev/null 2> /dev/null && \ | |
1350 | ! xcode-select --print-path > /dev/null 2> /dev/null ; then | |
1351 | # Avoid executing cc if there is no toolchain installed as | |
1352 | # cc will be a stub that puts up a graphical alert | |
1353 | # prompting the user to install developer tools. | |
1354 | CC_FOR_BUILD=no_compiler_found | |
1355 | else | |
1356 | set_cc_for_build | |
1357 | fi | |
1358 | if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | |
1359 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
1360 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1361 | grep IS_64BIT_ARCH >/dev/null | |
1362 | then | |
1363 | case $UNAME_PROCESSOR in | |
1364 | i386) UNAME_PROCESSOR=x86_64 ;; | |
1365 | powerpc) UNAME_PROCESSOR=powerpc64 ;; | |
1366 | esac | |
1367 | fi | |
1368 | # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc | |
1369 | if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ | |
1370 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1371 | grep IS_PPC >/dev/null | |
1372 | then | |
1373 | UNAME_PROCESSOR=powerpc | |
1374 | fi | |
1375 | elif test "$UNAME_PROCESSOR" = i386 ; then | |
1376 | # uname -m returns i386 or x86_64 | |
1377 | UNAME_PROCESSOR=$UNAME_MACHINE | |
1378 | fi | |
1379 | echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" | |
1238 | 1380 | exit ;; |
1239 | 1381 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1240 | 1382 | UNAME_PROCESSOR=`uname -p` |
1241 | if test "$UNAME_PROCESSOR" = "x86"; then | |
1383 | if test "$UNAME_PROCESSOR" = x86; then | |
1242 | 1384 | UNAME_PROCESSOR=i386 |
1243 | 1385 | UNAME_MACHINE=pc |
1244 | 1386 | fi |
1245 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} | |
1387 | echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" | |
1246 | 1388 | exit ;; |
1247 | 1389 | *:QNX:*:4*) |
1248 | 1390 | echo i386-pc-qnx |
1249 | 1391 | exit ;; |
1250 | NSE-?:NONSTOP_KERNEL:*:*) | |
1251 | echo nse-tandem-nsk${UNAME_RELEASE} | |
1252 | exit ;; | |
1253 | NSR-?:NONSTOP_KERNEL:*:*) | |
1254 | echo nsr-tandem-nsk${UNAME_RELEASE} | |
1392 | NEO-*:NONSTOP_KERNEL:*:*) | |
1393 | echo neo-tandem-nsk"$UNAME_RELEASE" | |
1394 | exit ;; | |
1395 | NSE-*:NONSTOP_KERNEL:*:*) | |
1396 | echo nse-tandem-nsk"$UNAME_RELEASE" | |
1397 | exit ;; | |
1398 | NSR-*:NONSTOP_KERNEL:*:*) | |
1399 | echo nsr-tandem-nsk"$UNAME_RELEASE" | |
1400 | exit ;; | |
1401 | NSV-*:NONSTOP_KERNEL:*:*) | |
1402 | echo nsv-tandem-nsk"$UNAME_RELEASE" | |
1403 | exit ;; | |
1404 | NSX-*:NONSTOP_KERNEL:*:*) | |
1405 | echo nsx-tandem-nsk"$UNAME_RELEASE" | |
1255 | 1406 | exit ;; |
1256 | 1407 | *:NonStop-UX:*:*) |
1257 | 1408 | echo mips-compaq-nonstopux |
1260 | 1411 | echo bs2000-siemens-sysv |
1261 | 1412 | exit ;; |
1262 | 1413 | DS/*:UNIX_System_V:*:*) |
1263 | echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | |
1414 | echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" | |
1264 | 1415 | exit ;; |
1265 | 1416 | *:Plan9:*:*) |
1266 | 1417 | # "uname -m" is not consistent, so use $cputype instead. 386 |
1267 | 1418 | # is converted to i386 for consistency with other x86 |
1268 | 1419 | # operating systems. |
1269 | if test "$cputype" = "386"; then | |
1420 | # shellcheck disable=SC2154 | |
1421 | if test "$cputype" = 386; then | |
1270 | 1422 | UNAME_MACHINE=i386 |
1271 | 1423 | else |
1272 | 1424 | UNAME_MACHINE="$cputype" |
1273 | 1425 | fi |
1274 | echo ${UNAME_MACHINE}-unknown-plan9 | |
1426 | echo "$UNAME_MACHINE"-unknown-plan9 | |
1275 | 1427 | exit ;; |
1276 | 1428 | *:TOPS-10:*:*) |
1277 | 1429 | echo pdp10-unknown-tops10 |
1292 | 1444 | echo pdp10-unknown-its |
1293 | 1445 | exit ;; |
1294 | 1446 | SEI:*:*:SEIUX) |
1295 | echo mips-sei-seiux${UNAME_RELEASE} | |
1447 | echo mips-sei-seiux"$UNAME_RELEASE" | |
1296 | 1448 | exit ;; |
1297 | 1449 | *:DragonFly:*:*) |
1298 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | |
1450 | echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
1299 | 1451 | exit ;; |
1300 | 1452 | *:*VMS:*:*) |
1301 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
1302 | case "${UNAME_MACHINE}" in | |
1453 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
1454 | case "$UNAME_MACHINE" in | |
1303 | 1455 | A*) echo alpha-dec-vms ; exit ;; |
1304 | 1456 | I*) echo ia64-dec-vms ; exit ;; |
1305 | 1457 | V*) echo vax-dec-vms ; exit ;; |
1308 | 1460 | echo i386-pc-xenix |
1309 | 1461 | exit ;; |
1310 | 1462 | i*86:skyos:*:*) |
1311 | echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' | |
1463 | echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" | |
1312 | 1464 | exit ;; |
1313 | 1465 | i*86:rdos:*:*) |
1314 | echo ${UNAME_MACHINE}-pc-rdos | |
1466 | echo "$UNAME_MACHINE"-pc-rdos | |
1467 | exit ;; | |
1468 | i*86:AROS:*:*) | |
1469 | echo "$UNAME_MACHINE"-pc-aros | |
1470 | exit ;; | |
1471 | x86_64:VMkernel:*:*) | |
1472 | echo "$UNAME_MACHINE"-unknown-esx | |
1473 | exit ;; | |
1474 | amd64:Isilon\ OneFS:*:*) | |
1475 | echo x86_64-unknown-onefs | |
1476 | exit ;; | |
1477 | *:Unleashed:*:*) | |
1478 | echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" | |
1315 | 1479 | exit ;; |
1316 | 1480 | esac |
1317 | 1481 | |
1318 | #echo '(No uname command or uname output not recognized.)' 1>&2 | |
1319 | #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 | |
1320 | ||
1321 | eval $set_cc_for_build | |
1322 | cat >$dummy.c <<EOF | |
1482 | # No uname command or uname output not recognized. | |
1483 | set_cc_for_build | |
1484 | cat > "$dummy.c" <<EOF | |
1323 | 1485 | #ifdef _SEQUENT_ |
1324 | # include <sys/types.h> | |
1325 | # include <sys/utsname.h> | |
1486 | #include <sys/types.h> | |
1487 | #include <sys/utsname.h> | |
1488 | #endif | |
1489 | #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
1490 | #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
1491 | #include <signal.h> | |
1492 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1493 | #include <sys/utsname.h> | |
1494 | #endif | |
1495 | #endif | |
1326 | 1496 | #endif |
1327 | 1497 | main () |
1328 | 1498 | { |
1335 | 1505 | #include <sys/param.h> |
1336 | 1506 | printf ("m68k-sony-newsos%s\n", |
1337 | 1507 | #ifdef NEWSOS4 |
1338 | "4" | |
1508 | "4" | |
1339 | 1509 | #else |
1340 | "" | |
1341 | #endif | |
1342 | ); exit (0); | |
1343 | #endif | |
1344 | #endif | |
1345 | ||
1346 | #if defined (__arm) && defined (__acorn) && defined (__unix) | |
1347 | printf ("arm-acorn-riscix\n"); exit (0); | |
1348 | #endif | |
1349 | ||
1350 | #if defined (hp300) && !defined (hpux) | |
1351 | printf ("m68k-hp-bsd\n"); exit (0); | |
1510 | "" | |
1511 | #endif | |
1512 | ); exit (0); | |
1513 | #endif | |
1352 | 1514 | #endif |
1353 | 1515 | |
1354 | 1516 | #if defined (NeXT) |
1390 | 1552 | #endif |
1391 | 1553 | |
1392 | 1554 | #if defined (_SEQUENT_) |
1393 | struct utsname un; | |
1394 | ||
1395 | uname(&un); | |
1396 | ||
1397 | if (strncmp(un.version, "V2", 2) == 0) { | |
1398 | printf ("i386-sequent-ptx2\n"); exit (0); | |
1399 | } | |
1400 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
1401 | printf ("i386-sequent-ptx1\n"); exit (0); | |
1402 | } | |
1403 | printf ("i386-sequent-ptx\n"); exit (0); | |
1404 | ||
1555 | struct utsname un; | |
1556 | ||
1557 | uname(&un); | |
1558 | if (strncmp(un.version, "V2", 2) == 0) { | |
1559 | printf ("i386-sequent-ptx2\n"); exit (0); | |
1560 | } | |
1561 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
1562 | printf ("i386-sequent-ptx1\n"); exit (0); | |
1563 | } | |
1564 | printf ("i386-sequent-ptx\n"); exit (0); | |
1405 | 1565 | #endif |
1406 | 1566 | |
1407 | 1567 | #if defined (vax) |
1408 | # if !defined (ultrix) | |
1409 | # include <sys/param.h> | |
1410 | # if defined (BSD) | |
1411 | # if BSD == 43 | |
1412 | printf ("vax-dec-bsd4.3\n"); exit (0); | |
1413 | # else | |
1414 | # if BSD == 199006 | |
1415 | printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
1416 | # else | |
1417 | printf ("vax-dec-bsd\n"); exit (0); | |
1418 | # endif | |
1419 | # endif | |
1420 | # else | |
1421 | printf ("vax-dec-bsd\n"); exit (0); | |
1422 | # endif | |
1423 | # else | |
1424 | printf ("vax-dec-ultrix\n"); exit (0); | |
1425 | # endif | |
1568 | #if !defined (ultrix) | |
1569 | #include <sys/param.h> | |
1570 | #if defined (BSD) | |
1571 | #if BSD == 43 | |
1572 | printf ("vax-dec-bsd4.3\n"); exit (0); | |
1573 | #else | |
1574 | #if BSD == 199006 | |
1575 | printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
1576 | #else | |
1577 | printf ("vax-dec-bsd\n"); exit (0); | |
1578 | #endif | |
1579 | #endif | |
1580 | #else | |
1581 | printf ("vax-dec-bsd\n"); exit (0); | |
1582 | #endif | |
1583 | #else | |
1584 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1585 | struct utsname un; | |
1586 | uname (&un); | |
1587 | printf ("vax-dec-ultrix%s\n", un.release); exit (0); | |
1588 | #else | |
1589 | printf ("vax-dec-ultrix\n"); exit (0); | |
1590 | #endif | |
1591 | #endif | |
1592 | #endif | |
1593 | #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
1594 | #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
1595 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1596 | struct utsname *un; | |
1597 | uname (&un); | |
1598 | printf ("mips-dec-ultrix%s\n", un.release); exit (0); | |
1599 | #else | |
1600 | printf ("mips-dec-ultrix\n"); exit (0); | |
1601 | #endif | |
1602 | #endif | |
1426 | 1603 | #endif |
1427 | 1604 | |
1428 | 1605 | #if defined (alliant) && defined (i860) |
1433 | 1610 | } |
1434 | 1611 | EOF |
1435 | 1612 | |
1436 | $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && | |
1613 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && | |
1437 | 1614 | { echo "$SYSTEM_NAME"; exit; } |
1438 | 1615 | |
1439 | 1616 | # Apollos put the system type in the environment. |
1440 | ||
1441 | test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } | |
1442 | ||
1443 | # Convex versions that predate uname can use getsysinfo(1) | |
1444 | ||
1445 | if [ -x /usr/convex/getsysinfo ] | |
1446 | then | |
1447 | case `getsysinfo -f cpu_type` in | |
1448 | c1*) | |
1449 | echo c1-convex-bsd | |
1450 | exit ;; | |
1451 | c2*) | |
1452 | if getsysinfo -f scalar_acc | |
1453 | then echo c32-convex-bsd | |
1454 | else echo c2-convex-bsd | |
1455 | fi | |
1456 | exit ;; | |
1457 | c34*) | |
1458 | echo c34-convex-bsd | |
1459 | exit ;; | |
1460 | c38*) | |
1461 | echo c38-convex-bsd | |
1462 | exit ;; | |
1463 | c4*) | |
1464 | echo c4-convex-bsd | |
1465 | exit ;; | |
1466 | esac | |
1467 | fi | |
1617 | test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } | |
1618 | ||
1619 | echo "$0: unable to guess system type" >&2 | |
1620 | ||
1621 | case "$UNAME_MACHINE:$UNAME_SYSTEM" in | |
1622 | mips:Linux | mips64:Linux) | |
1623 | # If we got here on MIPS GNU/Linux, output extra information. | |
1624 | cat >&2 <<EOF | |
1625 | ||
1626 | NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize | |
1627 | the system type. Please install a C compiler and try again. | |
1628 | EOF | |
1629 | ;; | |
1630 | esac | |
1468 | 1631 | |
1469 | 1632 | cat >&2 <<EOF |
1470 | $0: unable to guess system type | |
1471 | ||
1472 | This script, last modified $timestamp, has failed to recognize | |
1473 | the operating system you are using. It is advised that you | |
1474 | download the most up to date version of the config scripts from | |
1475 | ||
1476 | http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess | |
1633 | ||
1634 | This script (version $timestamp), has failed to recognize the | |
1635 | operating system you are using. If your script is old, overwrite *all* | |
1636 | copies of config.guess and config.sub with the latest versions from: | |
1637 | ||
1638 | https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | |
1477 | 1639 | and |
1478 | http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub | |
1479 | ||
1480 | If the version you run ($0) is already up to date, please | |
1481 | send the following data and any information you think might be | |
1482 | pertinent to <config-patches@gnu.org> in order to provide the needed | |
1483 | information to handle your system. | |
1640 | https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub | |
1641 | EOF | |
1642 | ||
1643 | year=`echo $timestamp | sed 's,-.*,,'` | |
1644 | # shellcheck disable=SC2003 | |
1645 | if test "`expr "\`date +%Y\`" - "$year"`" -lt 3 ; then | |
1646 | cat >&2 <<EOF | |
1647 | ||
1648 | If $0 has already been updated, send the following data and any | |
1649 | information you think might be pertinent to config-patches@gnu.org to | |
1650 | provide the necessary information to handle your system. | |
1484 | 1651 | |
1485 | 1652 | config.guess timestamp = $timestamp |
1486 | 1653 | |
1499 | 1666 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` |
1500 | 1667 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` |
1501 | 1668 | |
1502 | UNAME_MACHINE = ${UNAME_MACHINE} | |
1503 | UNAME_RELEASE = ${UNAME_RELEASE} | |
1504 | UNAME_SYSTEM = ${UNAME_SYSTEM} | |
1505 | UNAME_VERSION = ${UNAME_VERSION} | |
1669 | UNAME_MACHINE = "$UNAME_MACHINE" | |
1670 | UNAME_RELEASE = "$UNAME_RELEASE" | |
1671 | UNAME_SYSTEM = "$UNAME_SYSTEM" | |
1672 | UNAME_VERSION = "$UNAME_VERSION" | |
1506 | 1673 | EOF |
1674 | fi | |
1507 | 1675 | |
1508 | 1676 | exit 1 |
1509 | 1677 | |
1510 | 1678 | # Local variables: |
1511 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
1679 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
1512 | 1680 | # time-stamp-start: "timestamp='" |
1513 | 1681 | # time-stamp-format: "%:y-%02m-%02d" |
1514 | 1682 | # time-stamp-end: "'" |
0 | 0 | #! /bin/sh |
1 | 1 | # Configuration validation subroutine script. |
2 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, | |
4 | # Inc. | |
5 | ||
6 | timestamp='2007-06-28' | |
7 | ||
8 | # This file is (in principle) common to ALL GNU software. | |
9 | # The presence of a machine in this file suggests that SOME GNU software | |
10 | # can handle that machine. It does not imply ALL GNU software can. | |
11 | # | |
12 | # This file is free software; you can redistribute it and/or modify | |
13 | # it under the terms of the GNU General Public License as published by | |
14 | # the Free Software Foundation; either version 2 of the License, or | |
2 | # Copyright 1992-2020 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2020-06-20' | |
5 | ||
6 | # This file is free software; you can redistribute it and/or modify it | |
7 | # under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation; either version 3 of the License, or | |
15 | 9 | # (at your option) any later version. |
16 | 10 | # |
17 | # This program is distributed in the hope that it will be useful, | |
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | # GNU General Public License for more details. | |
11 | # This program is distributed in the hope that it will be useful, but | |
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | # General Public License for more details. | |
21 | 15 | # |
22 | 16 | # You should have received a copy of the GNU General Public License |
23 | # along with this program; if not, write to the Free Software | |
24 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA | |
25 | # 02110-1301, USA. | |
17 | # along with this program; if not, see <https://www.gnu.org/licenses/>. | |
26 | 18 | # |
27 | 19 | # As a special exception to the GNU General Public License, if you |
28 | 20 | # distribute this file as part of a program that contains a |
29 | 21 | # configuration script generated by Autoconf, you may include it under |
30 | # the same distribution terms that you use for the rest of that program. | |
31 | ||
32 | ||
33 | # Please send patches to <config-patches@gnu.org>. Submit a context | |
34 | # diff and a properly formatted ChangeLog entry. | |
22 | # the same distribution terms that you use for the rest of that | |
23 | # program. This Exception is an additional permission under section 7 | |
24 | # of the GNU General Public License, version 3 ("GPLv3"). | |
25 | ||
26 | ||
27 | # Please send patches to <config-patches@gnu.org>. | |
35 | 28 | # |
36 | 29 | # Configuration subroutine to validate and canonicalize a configuration type. |
37 | 30 | # Supply the specified configuration type as an argument. |
38 | 31 | # If it is invalid, we print an error message on stderr and exit with code 1. |
39 | 32 | # Otherwise, we print the canonical config type on stdout and succeed. |
33 | ||
34 | # You can get the latest version of this script from: | |
35 | # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub | |
40 | 36 | |
41 | 37 | # This file is supposed to be the same for all GNU packages |
42 | 38 | # and recognize all the CPU types, system types and aliases |
56 | 52 | me=`echo "$0" | sed -e 's,.*/,,'` |
57 | 53 | |
58 | 54 | usage="\ |
59 | Usage: $0 [OPTION] CPU-MFR-OPSYS | |
60 | $0 [OPTION] ALIAS | |
55 | Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS | |
61 | 56 | |
62 | 57 | Canonicalize a configuration name. |
63 | 58 | |
64 | Operation modes: | |
59 | Options: | |
65 | 60 | -h, --help print this help, then exit |
66 | 61 | -t, --time-stamp print date of last modification, then exit |
67 | 62 | -v, --version print version number, then exit |
71 | 66 | version="\ |
72 | 67 | GNU config.sub ($timestamp) |
73 | 68 | |
74 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 | |
75 | Free Software Foundation, Inc. | |
69 | Copyright 1992-2020 Free Software Foundation, Inc. | |
76 | 70 | |
77 | 71 | This is free software; see the source for copying conditions. There is NO |
78 | 72 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
94 | 88 | - ) # Use stdin as input. |
95 | 89 | break ;; |
96 | 90 | -* ) |
97 | echo "$me: invalid option $1$help" | |
91 | echo "$me: invalid option $1$help" >&2 | |
98 | 92 | exit 1 ;; |
99 | 93 | |
100 | 94 | *local*) |
101 | 95 | # First pass through any local machine types. |
102 | echo $1 | |
96 | echo "$1" | |
103 | 97 | exit ;; |
104 | 98 | |
105 | 99 | * ) |
115 | 109 | exit 1;; |
116 | 110 | esac |
117 | 111 | |
118 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). | |
119 | # Here we must recognize all the valid KERNEL-OS combinations. | |
120 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | |
121 | case $maybe_os in | |
122 | nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ | |
123 | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ | |
124 | storm-chaos* | os2-emx* | rtmk-nova*) | |
125 | os=-$maybe_os | |
126 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | |
127 | ;; | |
128 | *) | |
129 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` | |
130 | if [ $basic_machine != $1 ] | |
131 | then os=`echo $1 | sed 's/.*-/-/'` | |
132 | else os=; fi | |
133 | ;; | |
112 | # Split fields of configuration type | |
113 | # shellcheck disable=SC2162 | |
114 | IFS="-" read field1 field2 field3 field4 <<EOF | |
115 | $1 | |
116 | EOF | |
117 | ||
118 | # Separate into logical components for further validation | |
119 | case $1 in | |
120 | *-*-*-*-*) | |
121 | echo Invalid configuration \`"$1"\': more than four components >&2 | |
122 | exit 1 | |
123 | ;; | |
124 | *-*-*-*) | |
125 | basic_machine=$field1-$field2 | |
126 | os=$field3-$field4 | |
127 | ;; | |
128 | *-*-*) | |
129 | # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two | |
130 | # parts | |
131 | maybe_os=$field2-$field3 | |
132 | case $maybe_os in | |
133 | nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ | |
134 | | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ | |
135 | | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | |
136 | | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | |
137 | | storm-chaos* | os2-emx* | rtmk-nova*) | |
138 | basic_machine=$field1 | |
139 | os=$maybe_os | |
140 | ;; | |
141 | android-linux) | |
142 | basic_machine=$field1-unknown | |
143 | os=linux-android | |
144 | ;; | |
145 | *) | |
146 | basic_machine=$field1-$field2 | |
147 | os=$field3 | |
148 | ;; | |
149 | esac | |
150 | ;; | |
151 | *-*) | |
152 | # A lone config we happen to match not fitting any pattern | |
153 | case $field1-$field2 in | |
154 | decstation-3100) | |
155 | basic_machine=mips-dec | |
156 | os= | |
157 | ;; | |
158 | *-*) | |
159 | # Second component is usually, but not always the OS | |
160 | case $field2 in | |
161 | # Prevent following clause from handling this valid os | |
162 | sun*os*) | |
163 | basic_machine=$field1 | |
164 | os=$field2 | |
165 | ;; | |
166 | # Manufacturers | |
167 | dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | |
168 | | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | |
169 | | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | |
170 | | convergent* | ncr* | news | 32* | 3600* | 3100* \ | |
171 | | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | |
172 | | ultra | tti* | harris | dolphin | highlevel | gould \ | |
173 | | cbm | ns | masscomp | apple | axis | knuth | cray \ | |
174 | | microblaze* | sim | cisco \ | |
175 | | oki | wec | wrs | winbond) | |
176 | basic_machine=$field1-$field2 | |
177 | os= | |
178 | ;; | |
179 | *) | |
180 | basic_machine=$field1 | |
181 | os=$field2 | |
182 | ;; | |
183 | esac | |
184 | ;; | |
185 | esac | |
186 | ;; | |
187 | *) | |
188 | # Convert single-component short-hands not valid as part of | |
189 | # multi-component configurations. | |
190 | case $field1 in | |
191 | 386bsd) | |
192 | basic_machine=i386-pc | |
193 | os=bsd | |
194 | ;; | |
195 | a29khif) | |
196 | basic_machine=a29k-amd | |
197 | os=udi | |
198 | ;; | |
199 | adobe68k) | |
200 | basic_machine=m68010-adobe | |
201 | os=scout | |
202 | ;; | |
203 | alliant) | |
204 | basic_machine=fx80-alliant | |
205 | os= | |
206 | ;; | |
207 | altos | altos3068) | |
208 | basic_machine=m68k-altos | |
209 | os= | |
210 | ;; | |
211 | am29k) | |
212 | basic_machine=a29k-none | |
213 | os=bsd | |
214 | ;; | |
215 | amdahl) | |
216 | basic_machine=580-amdahl | |
217 | os=sysv | |
218 | ;; | |
219 | amiga) | |
220 | basic_machine=m68k-unknown | |
221 | os= | |
222 | ;; | |
223 | amigaos | amigados) | |
224 | basic_machine=m68k-unknown | |
225 | os=amigaos | |
226 | ;; | |
227 | amigaunix | amix) | |
228 | basic_machine=m68k-unknown | |
229 | os=sysv4 | |
230 | ;; | |
231 | apollo68) | |
232 | basic_machine=m68k-apollo | |
233 | os=sysv | |
234 | ;; | |
235 | apollo68bsd) | |
236 | basic_machine=m68k-apollo | |
237 | os=bsd | |
238 | ;; | |
239 | aros) | |
240 | basic_machine=i386-pc | |
241 | os=aros | |
242 | ;; | |
243 | aux) | |
244 | basic_machine=m68k-apple | |
245 | os=aux | |
246 | ;; | |
247 | balance) | |
248 | basic_machine=ns32k-sequent | |
249 | os=dynix | |
250 | ;; | |
251 | blackfin) | |
252 | basic_machine=bfin-unknown | |
253 | os=linux | |
254 | ;; | |
255 | cegcc) | |
256 | basic_machine=arm-unknown | |
257 | os=cegcc | |
258 | ;; | |
259 | convex-c1) | |
260 | basic_machine=c1-convex | |
261 | os=bsd | |
262 | ;; | |
263 | convex-c2) | |
264 | basic_machine=c2-convex | |
265 | os=bsd | |
266 | ;; | |
267 | convex-c32) | |
268 | basic_machine=c32-convex | |
269 | os=bsd | |
270 | ;; | |
271 | convex-c34) | |
272 | basic_machine=c34-convex | |
273 | os=bsd | |
274 | ;; | |
275 | convex-c38) | |
276 | basic_machine=c38-convex | |
277 | os=bsd | |
278 | ;; | |
279 | cray) | |
280 | basic_machine=j90-cray | |
281 | os=unicos | |
282 | ;; | |
283 | crds | unos) | |
284 | basic_machine=m68k-crds | |
285 | os= | |
286 | ;; | |
287 | da30) | |
288 | basic_machine=m68k-da30 | |
289 | os= | |
290 | ;; | |
291 | decstation | pmax | pmin | dec3100 | decstatn) | |
292 | basic_machine=mips-dec | |
293 | os= | |
294 | ;; | |
295 | delta88) | |
296 | basic_machine=m88k-motorola | |
297 | os=sysv3 | |
298 | ;; | |
299 | dicos) | |
300 | basic_machine=i686-pc | |
301 | os=dicos | |
302 | ;; | |
303 | djgpp) | |
304 | basic_machine=i586-pc | |
305 | os=msdosdjgpp | |
306 | ;; | |
307 | ebmon29k) | |
308 | basic_machine=a29k-amd | |
309 | os=ebmon | |
310 | ;; | |
311 | es1800 | OSE68k | ose68k | ose | OSE) | |
312 | basic_machine=m68k-ericsson | |
313 | os=ose | |
314 | ;; | |
315 | gmicro) | |
316 | basic_machine=tron-gmicro | |
317 | os=sysv | |
318 | ;; | |
319 | go32) | |
320 | basic_machine=i386-pc | |
321 | os=go32 | |
322 | ;; | |
323 | h8300hms) | |
324 | basic_machine=h8300-hitachi | |
325 | os=hms | |
326 | ;; | |
327 | h8300xray) | |
328 | basic_machine=h8300-hitachi | |
329 | os=xray | |
330 | ;; | |
331 | h8500hms) | |
332 | basic_machine=h8500-hitachi | |
333 | os=hms | |
334 | ;; | |
335 | harris) | |
336 | basic_machine=m88k-harris | |
337 | os=sysv3 | |
338 | ;; | |
339 | hp300 | hp300hpux) | |
340 | basic_machine=m68k-hp | |
341 | os=hpux | |
342 | ;; | |
343 | hp300bsd) | |
344 | basic_machine=m68k-hp | |
345 | os=bsd | |
346 | ;; | |
347 | hppaosf) | |
348 | basic_machine=hppa1.1-hp | |
349 | os=osf | |
350 | ;; | |
351 | hppro) | |
352 | basic_machine=hppa1.1-hp | |
353 | os=proelf | |
354 | ;; | |
355 | i386mach) | |
356 | basic_machine=i386-mach | |
357 | os=mach | |
358 | ;; | |
359 | isi68 | isi) | |
360 | basic_machine=m68k-isi | |
361 | os=sysv | |
362 | ;; | |
363 | m68knommu) | |
364 | basic_machine=m68k-unknown | |
365 | os=linux | |
366 | ;; | |
367 | magnum | m3230) | |
368 | basic_machine=mips-mips | |
369 | os=sysv | |
370 | ;; | |
371 | merlin) | |
372 | basic_machine=ns32k-utek | |
373 | os=sysv | |
374 | ;; | |
375 | mingw64) | |
376 | basic_machine=x86_64-pc | |
377 | os=mingw64 | |
378 | ;; | |
379 | mingw32) | |
380 | basic_machine=i686-pc | |
381 | os=mingw32 | |
382 | ;; | |
383 | mingw32ce) | |
384 | basic_machine=arm-unknown | |
385 | os=mingw32ce | |
386 | ;; | |
387 | monitor) | |
388 | basic_machine=m68k-rom68k | |
389 | os=coff | |
390 | ;; | |
391 | morphos) | |
392 | basic_machine=powerpc-unknown | |
393 | os=morphos | |
394 | ;; | |
395 | moxiebox) | |
396 | basic_machine=moxie-unknown | |
397 | os=moxiebox | |
398 | ;; | |
399 | msdos) | |
400 | basic_machine=i386-pc | |
401 | os=msdos | |
402 | ;; | |
403 | msys) | |
404 | basic_machine=i686-pc | |
405 | os=msys | |
406 | ;; | |
407 | mvs) | |
408 | basic_machine=i370-ibm | |
409 | os=mvs | |
410 | ;; | |
411 | nacl) | |
412 | basic_machine=le32-unknown | |
413 | os=nacl | |
414 | ;; | |
415 | ncr3000) | |
416 | basic_machine=i486-ncr | |
417 | os=sysv4 | |
418 | ;; | |
419 | netbsd386) | |
420 | basic_machine=i386-pc | |
421 | os=netbsd | |
422 | ;; | |
423 | netwinder) | |
424 | basic_machine=armv4l-rebel | |
425 | os=linux | |
426 | ;; | |
427 | news | news700 | news800 | news900) | |
428 | basic_machine=m68k-sony | |
429 | os=newsos | |
430 | ;; | |
431 | news1000) | |
432 | basic_machine=m68030-sony | |
433 | os=newsos | |
434 | ;; | |
435 | necv70) | |
436 | basic_machine=v70-nec | |
437 | os=sysv | |
438 | ;; | |
439 | nh3000) | |
440 | basic_machine=m68k-harris | |
441 | os=cxux | |
442 | ;; | |
443 | nh[45]000) | |
444 | basic_machine=m88k-harris | |
445 | os=cxux | |
446 | ;; | |
447 | nindy960) | |
448 | basic_machine=i960-intel | |
449 | os=nindy | |
450 | ;; | |
451 | mon960) | |
452 | basic_machine=i960-intel | |
453 | os=mon960 | |
454 | ;; | |
455 | nonstopux) | |
456 | basic_machine=mips-compaq | |
457 | os=nonstopux | |
458 | ;; | |
459 | os400) | |
460 | basic_machine=powerpc-ibm | |
461 | os=os400 | |
462 | ;; | |
463 | OSE68000 | ose68000) | |
464 | basic_machine=m68000-ericsson | |
465 | os=ose | |
466 | ;; | |
467 | os68k) | |
468 | basic_machine=m68k-none | |
469 | os=os68k | |
470 | ;; | |
471 | paragon) | |
472 | basic_machine=i860-intel | |
473 | os=osf | |
474 | ;; | |
475 | parisc) | |
476 | basic_machine=hppa-unknown | |
477 | os=linux | |
478 | ;; | |
479 | psp) | |
480 | basic_machine=mipsallegrexel-sony | |
481 | os=psp | |
482 | ;; | |
483 | pw32) | |
484 | basic_machine=i586-unknown | |
485 | os=pw32 | |
486 | ;; | |
487 | rdos | rdos64) | |
488 | basic_machine=x86_64-pc | |
489 | os=rdos | |
490 | ;; | |
491 | rdos32) | |
492 | basic_machine=i386-pc | |
493 | os=rdos | |
494 | ;; | |
495 | rom68k) | |
496 | basic_machine=m68k-rom68k | |
497 | os=coff | |
498 | ;; | |
499 | sa29200) | |
500 | basic_machine=a29k-amd | |
501 | os=udi | |
502 | ;; | |
503 | sei) | |
504 | basic_machine=mips-sei | |
505 | os=seiux | |
506 | ;; | |
507 | sequent) | |
508 | basic_machine=i386-sequent | |
509 | os= | |
510 | ;; | |
511 | sps7) | |
512 | basic_machine=m68k-bull | |
513 | os=sysv2 | |
514 | ;; | |
515 | st2000) | |
516 | basic_machine=m68k-tandem | |
517 | os= | |
518 | ;; | |
519 | stratus) | |
520 | basic_machine=i860-stratus | |
521 | os=sysv4 | |
522 | ;; | |
523 | sun2) | |
524 | basic_machine=m68000-sun | |
525 | os= | |
526 | ;; | |
527 | sun2os3) | |
528 | basic_machine=m68000-sun | |
529 | os=sunos3 | |
530 | ;; | |
531 | sun2os4) | |
532 | basic_machine=m68000-sun | |
533 | os=sunos4 | |
534 | ;; | |
535 | sun3) | |
536 | basic_machine=m68k-sun | |
537 | os= | |
538 | ;; | |
539 | sun3os3) | |
540 | basic_machine=m68k-sun | |
541 | os=sunos3 | |
542 | ;; | |
543 | sun3os4) | |
544 | basic_machine=m68k-sun | |
545 | os=sunos4 | |
546 | ;; | |
547 | sun4) | |
548 | basic_machine=sparc-sun | |
549 | os= | |
550 | ;; | |
551 | sun4os3) | |
552 | basic_machine=sparc-sun | |
553 | os=sunos3 | |
554 | ;; | |
555 | sun4os4) | |
556 | basic_machine=sparc-sun | |
557 | os=sunos4 | |
558 | ;; | |
559 | sun4sol2) | |
560 | basic_machine=sparc-sun | |
561 | os=solaris2 | |
562 | ;; | |
563 | sun386 | sun386i | roadrunner) | |
564 | basic_machine=i386-sun | |
565 | os= | |
566 | ;; | |
567 | sv1) | |
568 | basic_machine=sv1-cray | |
569 | os=unicos | |
570 | ;; | |
571 | symmetry) | |
572 | basic_machine=i386-sequent | |
573 | os=dynix | |
574 | ;; | |
575 | t3e) | |
576 | basic_machine=alphaev5-cray | |
577 | os=unicos | |
578 | ;; | |
579 | t90) | |
580 | basic_machine=t90-cray | |
581 | os=unicos | |
582 | ;; | |
583 | toad1) | |
584 | basic_machine=pdp10-xkl | |
585 | os=tops20 | |
586 | ;; | |
587 | tpf) | |
588 | basic_machine=s390x-ibm | |
589 | os=tpf | |
590 | ;; | |
591 | udi29k) | |
592 | basic_machine=a29k-amd | |
593 | os=udi | |
594 | ;; | |
595 | ultra3) | |
596 | basic_machine=a29k-nyu | |
597 | os=sym1 | |
598 | ;; | |
599 | v810 | necv810) | |
600 | basic_machine=v810-nec | |
601 | os=none | |
602 | ;; | |
603 | vaxv) | |
604 | basic_machine=vax-dec | |
605 | os=sysv | |
606 | ;; | |
607 | vms) | |
608 | basic_machine=vax-dec | |
609 | os=vms | |
610 | ;; | |
611 | vsta) | |
612 | basic_machine=i386-pc | |
613 | os=vsta | |
614 | ;; | |
615 | vxworks960) | |
616 | basic_machine=i960-wrs | |
617 | os=vxworks | |
618 | ;; | |
619 | vxworks68) | |
620 | basic_machine=m68k-wrs | |
621 | os=vxworks | |
622 | ;; | |
623 | vxworks29k) | |
624 | basic_machine=a29k-wrs | |
625 | os=vxworks | |
626 | ;; | |
627 | xbox) | |
628 | basic_machine=i686-pc | |
629 | os=mingw32 | |
630 | ;; | |
631 | ymp) | |
632 | basic_machine=ymp-cray | |
633 | os=unicos | |
634 | ;; | |
635 | *) | |
636 | basic_machine=$1 | |
637 | os= | |
638 | ;; | |
639 | esac | |
640 | ;; | |
134 | 641 | esac |
135 | 642 | |
136 | ### Let's recognize common machines as not being operating systems so | |
137 | ### that things like config.sub decstation-3100 work. We also | |
138 | ### recognize some manufacturers as not being operating systems, so we | |
139 | ### can provide default operating systems below. | |
140 | case $os in | |
141 | -sun*os*) | |
142 | # Prevent following clause from handling this invalid input. | |
143 | ;; | |
144 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
145 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
146 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ | |
147 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | |
148 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
149 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | |
150 | -apple | -axis | -knuth | -cray) | |
151 | os= | |
152 | basic_machine=$1 | |
153 | ;; | |
154 | -sim | -cisco | -oki | -wec | -winbond) | |
155 | os= | |
156 | basic_machine=$1 | |
157 | ;; | |
158 | -scout) | |
159 | ;; | |
160 | -wrs) | |
161 | os=-vxworks | |
162 | basic_machine=$1 | |
163 | ;; | |
164 | -chorusos*) | |
165 | os=-chorusos | |
166 | basic_machine=$1 | |
167 | ;; | |
168 | -chorusrdb) | |
169 | os=-chorusrdb | |
170 | basic_machine=$1 | |
171 | ;; | |
172 | -hiux*) | |
173 | os=-hiuxwe2 | |
174 | ;; | |
175 | -sco6) | |
176 | os=-sco5v6 | |
177 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
178 | ;; | |
179 | -sco5) | |
180 | os=-sco3.2v5 | |
181 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
182 | ;; | |
183 | -sco4) | |
184 | os=-sco3.2v4 | |
185 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
186 | ;; | |
187 | -sco3.2.[4-9]*) | |
188 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
189 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
190 | ;; | |
191 | -sco3.2v[4-9]*) | |
192 | # Don't forget version if it is 3.2v4 or newer. | |
193 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
194 | ;; | |
195 | -sco5v6*) | |
196 | # Don't forget version if it is 3.2v4 or newer. | |
197 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
198 | ;; | |
199 | -sco*) | |
200 | os=-sco3.2v2 | |
201 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
202 | ;; | |
203 | -udk*) | |
204 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
205 | ;; | |
206 | -isc) | |
207 | os=-isc2.2 | |
208 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
209 | ;; | |
210 | -clix*) | |
211 | basic_machine=clipper-intergraph | |
212 | ;; | |
213 | -isc*) | |
214 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
215 | ;; | |
216 | -lynx*) | |
217 | os=-lynxos | |
218 | ;; | |
219 | -ptx*) | |
220 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | |
221 | ;; | |
222 | -windowsnt*) | |
223 | os=`echo $os | sed -e 's/windowsnt/winnt/'` | |
224 | ;; | |
225 | -psos*) | |
226 | os=-psos | |
227 | ;; | |
228 | -mint | -mint[0-9]*) | |
229 | basic_machine=m68k-atari | |
230 | os=-mint | |
231 | ;; | |
232 | esac | |
233 | ||
234 | # Decode aliases for certain CPU-COMPANY combinations. | |
643 | # Decode 1-component or ad-hoc basic machines | |
235 | 644 | case $basic_machine in |
236 | # Recognize the basic CPU types without company name. | |
237 | # Some are omitted here because they have special meanings below. | |
238 | 1750a | 580 \ | |
239 | | a29k \ | |
240 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | |
241 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | |
242 | | am33_2.0 \ | |
243 | | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | |
244 | | bfin \ | |
245 | | c4x | clipper \ | |
246 | | d10v | d30v | dlx | dsp16xx \ | |
247 | | fido | fr30 | frv \ | |
248 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
249 | | i370 | i860 | i960 | ia64 \ | |
250 | | ip2k | iq2000 \ | |
251 | | m32c | m32r | m32rle | m68000 | m68k | m88k \ | |
252 | | maxq | mb | microblaze | mcore | mep \ | |
253 | | mips | mipsbe | mipseb | mipsel | mipsle \ | |
254 | | mips16 \ | |
255 | | mips64 | mips64el \ | |
256 | | mips64vr | mips64vrel \ | |
257 | | mips64orion | mips64orionel \ | |
258 | | mips64vr4100 | mips64vr4100el \ | |
259 | | mips64vr4300 | mips64vr4300el \ | |
260 | | mips64vr5000 | mips64vr5000el \ | |
261 | | mips64vr5900 | mips64vr5900el \ | |
262 | | mipsisa32 | mipsisa32el \ | |
263 | | mipsisa32r2 | mipsisa32r2el \ | |
264 | | mipsisa64 | mipsisa64el \ | |
265 | | mipsisa64r2 | mipsisa64r2el \ | |
266 | | mipsisa64sb1 | mipsisa64sb1el \ | |
267 | | mipsisa64sr71k | mipsisa64sr71kel \ | |
268 | | mipstx39 | mipstx39el \ | |
269 | | mn10200 | mn10300 \ | |
270 | | mt \ | |
271 | | msp430 \ | |
272 | | nios | nios2 \ | |
273 | | ns16k | ns32k \ | |
274 | | or32 \ | |
275 | | pdp10 | pdp11 | pj | pjl \ | |
276 | | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | |
277 | | pyramid \ | |
278 | | score \ | |
279 | | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | |
280 | | sh64 | sh64le \ | |
281 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | |
282 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | |
283 | | spu | strongarm \ | |
284 | | tahoe | thumb | tic4x | tic80 | tron \ | |
285 | | v850 | v850e \ | |
286 | | we32k \ | |
287 | | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | |
288 | | z8k) | |
289 | basic_machine=$basic_machine-unknown | |
290 | ;; | |
291 | m6811 | m68hc11 | m6812 | m68hc12) | |
292 | # Motorola 68HC11/12. | |
293 | basic_machine=$basic_machine-unknown | |
294 | os=-none | |
295 | ;; | |
296 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) | |
297 | ;; | |
298 | ms1) | |
299 | basic_machine=mt-unknown | |
300 | ;; | |
301 | ||
645 | # Here we handle the default manufacturer of certain CPU types. It is in | |
646 | # some cases the only manufacturer, in others, it is the most popular. | |
647 | w89k) | |
648 | cpu=hppa1.1 | |
649 | vendor=winbond | |
650 | ;; | |
651 | op50n) | |
652 | cpu=hppa1.1 | |
653 | vendor=oki | |
654 | ;; | |
655 | op60c) | |
656 | cpu=hppa1.1 | |
657 | vendor=oki | |
658 | ;; | |
659 | ibm*) | |
660 | cpu=i370 | |
661 | vendor=ibm | |
662 | ;; | |
663 | orion105) | |
664 | cpu=clipper | |
665 | vendor=highlevel | |
666 | ;; | |
667 | mac | mpw | mac-mpw) | |
668 | cpu=m68k | |
669 | vendor=apple | |
670 | ;; | |
671 | pmac | pmac-mpw) | |
672 | cpu=powerpc | |
673 | vendor=apple | |
674 | ;; | |
675 | ||
676 | # Recognize the various machine names and aliases which stand | |
677 | # for a CPU type and a company and sometimes even an OS. | |
678 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
679 | cpu=m68000 | |
680 | vendor=att | |
681 | ;; | |
682 | 3b*) | |
683 | cpu=we32k | |
684 | vendor=att | |
685 | ;; | |
686 | bluegene*) | |
687 | cpu=powerpc | |
688 | vendor=ibm | |
689 | os=cnk | |
690 | ;; | |
691 | decsystem10* | dec10*) | |
692 | cpu=pdp10 | |
693 | vendor=dec | |
694 | os=tops10 | |
695 | ;; | |
696 | decsystem20* | dec20*) | |
697 | cpu=pdp10 | |
698 | vendor=dec | |
699 | os=tops20 | |
700 | ;; | |
701 | delta | 3300 | motorola-3300 | motorola-delta \ | |
702 | | 3300-motorola | delta-motorola) | |
703 | cpu=m68k | |
704 | vendor=motorola | |
705 | ;; | |
706 | dpx2*) | |
707 | cpu=m68k | |
708 | vendor=bull | |
709 | os=sysv3 | |
710 | ;; | |
711 | encore | umax | mmax) | |
712 | cpu=ns32k | |
713 | vendor=encore | |
714 | ;; | |
715 | elxsi) | |
716 | cpu=elxsi | |
717 | vendor=elxsi | |
718 | os=${os:-bsd} | |
719 | ;; | |
720 | fx2800) | |
721 | cpu=i860 | |
722 | vendor=alliant | |
723 | ;; | |
724 | genix) | |
725 | cpu=ns32k | |
726 | vendor=ns | |
727 | ;; | |
728 | h3050r* | hiux*) | |
729 | cpu=hppa1.1 | |
730 | vendor=hitachi | |
731 | os=hiuxwe2 | |
732 | ;; | |
733 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) | |
734 | cpu=hppa1.0 | |
735 | vendor=hp | |
736 | ;; | |
737 | hp9k2[0-9][0-9] | hp9k31[0-9]) | |
738 | cpu=m68000 | |
739 | vendor=hp | |
740 | ;; | |
741 | hp9k3[2-9][0-9]) | |
742 | cpu=m68k | |
743 | vendor=hp | |
744 | ;; | |
745 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) | |
746 | cpu=hppa1.0 | |
747 | vendor=hp | |
748 | ;; | |
749 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) | |
750 | cpu=hppa1.1 | |
751 | vendor=hp | |
752 | ;; | |
753 | hp9k78[0-9] | hp78[0-9]) | |
754 | # FIXME: really hppa2.0-hp | |
755 | cpu=hppa1.1 | |
756 | vendor=hp | |
757 | ;; | |
758 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
759 | # FIXME: really hppa2.0-hp | |
760 | cpu=hppa1.1 | |
761 | vendor=hp | |
762 | ;; | |
763 | hp9k8[0-9][13679] | hp8[0-9][13679]) | |
764 | cpu=hppa1.1 | |
765 | vendor=hp | |
766 | ;; | |
767 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
768 | cpu=hppa1.0 | |
769 | vendor=hp | |
770 | ;; | |
771 | i*86v32) | |
772 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
773 | vendor=pc | |
774 | os=sysv32 | |
775 | ;; | |
776 | i*86v4*) | |
777 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
778 | vendor=pc | |
779 | os=sysv4 | |
780 | ;; | |
781 | i*86v) | |
782 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
783 | vendor=pc | |
784 | os=sysv | |
785 | ;; | |
786 | i*86sol2) | |
787 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
788 | vendor=pc | |
789 | os=solaris2 | |
790 | ;; | |
791 | j90 | j90-cray) | |
792 | cpu=j90 | |
793 | vendor=cray | |
794 | os=${os:-unicos} | |
795 | ;; | |
796 | iris | iris4d) | |
797 | cpu=mips | |
798 | vendor=sgi | |
799 | case $os in | |
800 | irix*) | |
801 | ;; | |
802 | *) | |
803 | os=irix4 | |
804 | ;; | |
805 | esac | |
806 | ;; | |
807 | miniframe) | |
808 | cpu=m68000 | |
809 | vendor=convergent | |
810 | ;; | |
811 | *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
812 | cpu=m68k | |
813 | vendor=atari | |
814 | os=mint | |
815 | ;; | |
816 | news-3600 | risc-news) | |
817 | cpu=mips | |
818 | vendor=sony | |
819 | os=newsos | |
820 | ;; | |
821 | next | m*-next) | |
822 | cpu=m68k | |
823 | vendor=next | |
824 | case $os in | |
825 | openstep*) | |
826 | ;; | |
827 | nextstep*) | |
828 | ;; | |
829 | ns2*) | |
830 | os=nextstep2 | |
831 | ;; | |
832 | *) | |
833 | os=nextstep3 | |
834 | ;; | |
835 | esac | |
836 | ;; | |
837 | np1) | |
838 | cpu=np1 | |
839 | vendor=gould | |
840 | ;; | |
841 | op50n-* | op60c-*) | |
842 | cpu=hppa1.1 | |
843 | vendor=oki | |
844 | os=proelf | |
845 | ;; | |
846 | pa-hitachi) | |
847 | cpu=hppa1.1 | |
848 | vendor=hitachi | |
849 | os=hiuxwe2 | |
850 | ;; | |
851 | pbd) | |
852 | cpu=sparc | |
853 | vendor=tti | |
854 | ;; | |
855 | pbb) | |
856 | cpu=m68k | |
857 | vendor=tti | |
858 | ;; | |
859 | pc532) | |
860 | cpu=ns32k | |
861 | vendor=pc532 | |
862 | ;; | |
863 | pn) | |
864 | cpu=pn | |
865 | vendor=gould | |
866 | ;; | |
867 | power) | |
868 | cpu=power | |
869 | vendor=ibm | |
870 | ;; | |
871 | ps2) | |
872 | cpu=i386 | |
873 | vendor=ibm | |
874 | ;; | |
875 | rm[46]00) | |
876 | cpu=mips | |
877 | vendor=siemens | |
878 | ;; | |
879 | rtpc | rtpc-*) | |
880 | cpu=romp | |
881 | vendor=ibm | |
882 | ;; | |
883 | sde) | |
884 | cpu=mipsisa32 | |
885 | vendor=sde | |
886 | os=${os:-elf} | |
887 | ;; | |
888 | simso-wrs) | |
889 | cpu=sparclite | |
890 | vendor=wrs | |
891 | os=vxworks | |
892 | ;; | |
893 | tower | tower-32) | |
894 | cpu=m68k | |
895 | vendor=ncr | |
896 | ;; | |
897 | vpp*|vx|vx-*) | |
898 | cpu=f301 | |
899 | vendor=fujitsu | |
900 | ;; | |
901 | w65) | |
902 | cpu=w65 | |
903 | vendor=wdc | |
904 | ;; | |
905 | w89k-*) | |
906 | cpu=hppa1.1 | |
907 | vendor=winbond | |
908 | os=proelf | |
909 | ;; | |
910 | none) | |
911 | cpu=none | |
912 | vendor=none | |
913 | ;; | |
914 | leon|leon[3-9]) | |
915 | cpu=sparc | |
916 | vendor=$basic_machine | |
917 | ;; | |
918 | leon-*|leon[3-9]-*) | |
919 | cpu=sparc | |
920 | vendor=`echo "$basic_machine" | sed 's/-.*//'` | |
921 | ;; | |
922 | ||
923 | *-*) | |
924 | # shellcheck disable=SC2162 | |
925 | IFS="-" read cpu vendor <<EOF | |
926 | $basic_machine | |
927 | EOF | |
928 | ;; | |
302 | 929 | # We use `pc' rather than `unknown' |
303 | 930 | # because (1) that's what they normally are, and |
304 | 931 | # (2) the word "unknown" tends to confuse beginning users. |
305 | 932 | i*86 | x86_64) |
306 | basic_machine=$basic_machine-pc | |
307 | ;; | |
308 | # Object if more than one company name word. | |
309 | *-*-*) | |
310 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
311 | exit 1 | |
312 | ;; | |
313 | # Recognize the basic CPU types with company name. | |
314 | 580-* \ | |
315 | | a29k-* \ | |
316 | | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | |
317 | | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | |
318 | | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | |
319 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | |
320 | | avr-* | avr32-* \ | |
321 | | bfin-* | bs2000-* \ | |
322 | | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | |
323 | | clipper-* | craynv-* | cydra-* \ | |
324 | | d10v-* | d30v-* | dlx-* \ | |
325 | | elxsi-* \ | |
326 | | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | |
327 | | h8300-* | h8500-* \ | |
328 | | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | |
329 | | i*86-* | i860-* | i960-* | ia64-* \ | |
330 | | ip2k-* | iq2000-* \ | |
331 | | m32c-* | m32r-* | m32rle-* \ | |
332 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | |
333 | | m88110-* | m88k-* | maxq-* | mcore-* \ | |
334 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | |
335 | | mips16-* \ | |
336 | | mips64-* | mips64el-* \ | |
337 | | mips64vr-* | mips64vrel-* \ | |
338 | | mips64orion-* | mips64orionel-* \ | |
339 | | mips64vr4100-* | mips64vr4100el-* \ | |
340 | | mips64vr4300-* | mips64vr4300el-* \ | |
341 | | mips64vr5000-* | mips64vr5000el-* \ | |
342 | | mips64vr5900-* | mips64vr5900el-* \ | |
343 | | mipsisa32-* | mipsisa32el-* \ | |
344 | | mipsisa32r2-* | mipsisa32r2el-* \ | |
345 | | mipsisa64-* | mipsisa64el-* \ | |
346 | | mipsisa64r2-* | mipsisa64r2el-* \ | |
347 | | mipsisa64sb1-* | mipsisa64sb1el-* \ | |
348 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | |
349 | | mipstx39-* | mipstx39el-* \ | |
350 | | mmix-* \ | |
351 | | mt-* \ | |
352 | | msp430-* \ | |
353 | | nios-* | nios2-* \ | |
354 | | none-* | np1-* | ns16k-* | ns32k-* \ | |
355 | | orion-* \ | |
356 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | |
357 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | |
358 | | pyramid-* \ | |
359 | | romp-* | rs6000-* \ | |
360 | | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | |
361 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | |
362 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | |
363 | | sparclite-* \ | |
364 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | |
365 | | tahoe-* | thumb-* \ | |
366 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | |
367 | | tron-* \ | |
368 | | v850-* | v850e-* | vax-* \ | |
369 | | we32k-* \ | |
370 | | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | |
371 | | xstormy16-* | xtensa-* \ | |
372 | | ymp-* \ | |
373 | | z8k-*) | |
374 | ;; | |
375 | # Recognize the various machine names and aliases which stand | |
376 | # for a CPU type and a company and sometimes even an OS. | |
377 | 386bsd) | |
378 | basic_machine=i386-unknown | |
379 | os=-bsd | |
380 | ;; | |
381 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
382 | basic_machine=m68000-att | |
383 | ;; | |
384 | 3b*) | |
385 | basic_machine=we32k-att | |
386 | ;; | |
387 | a29khif) | |
388 | basic_machine=a29k-amd | |
389 | os=-udi | |
390 | ;; | |
391 | abacus) | |
392 | basic_machine=abacus-unknown | |
393 | ;; | |
394 | adobe68k) | |
395 | basic_machine=m68010-adobe | |
396 | os=-scout | |
397 | ;; | |
398 | alliant | fx80) | |
399 | basic_machine=fx80-alliant | |
400 | ;; | |
401 | altos | altos3068) | |
402 | basic_machine=m68k-altos | |
403 | ;; | |
404 | am29k) | |
405 | basic_machine=a29k-none | |
406 | os=-bsd | |
407 | ;; | |
408 | amd64) | |
409 | basic_machine=x86_64-pc | |
410 | ;; | |
933 | cpu=$basic_machine | |
934 | vendor=pc | |
935 | ;; | |
936 | # These rules are duplicated from below for sake of the special case above; | |
937 | # i.e. things that normalized to x86 arches should also default to "pc" | |
938 | pc98) | |
939 | cpu=i386 | |
940 | vendor=pc | |
941 | ;; | |
942 | x64 | amd64) | |
943 | cpu=x86_64 | |
944 | vendor=pc | |
945 | ;; | |
946 | # Recognize the basic CPU types without company name. | |
947 | *) | |
948 | cpu=$basic_machine | |
949 | vendor=unknown | |
950 | ;; | |
951 | esac | |
952 | ||
953 | unset -v basic_machine | |
954 | ||
955 | # Decode basic machines in the full and proper CPU-Company form. | |
956 | case $cpu-$vendor in | |
957 | # Here we handle the default manufacturer of certain CPU types in canonical form. It is in | |
958 | # some cases the only manufacturer, in others, it is the most popular. | |
959 | craynv-unknown) | |
960 | vendor=cray | |
961 | os=${os:-unicosmp} | |
962 | ;; | |
963 | c90-unknown | c90-cray) | |
964 | vendor=cray | |
965 | os=${os:-unicos} | |
966 | ;; | |
967 | fx80-unknown) | |
968 | vendor=alliant | |
969 | ;; | |
970 | romp-unknown) | |
971 | vendor=ibm | |
972 | ;; | |
973 | mmix-unknown) | |
974 | vendor=knuth | |
975 | ;; | |
976 | microblaze-unknown | microblazeel-unknown) | |
977 | vendor=xilinx | |
978 | ;; | |
979 | rs6000-unknown) | |
980 | vendor=ibm | |
981 | ;; | |
982 | vax-unknown) | |
983 | vendor=dec | |
984 | ;; | |
985 | pdp11-unknown) | |
986 | vendor=dec | |
987 | ;; | |
988 | we32k-unknown) | |
989 | vendor=att | |
990 | ;; | |
991 | cydra-unknown) | |
992 | vendor=cydrome | |
993 | ;; | |
994 | i370-ibm*) | |
995 | vendor=ibm | |
996 | ;; | |
997 | orion-unknown) | |
998 | vendor=highlevel | |
999 | ;; | |
1000 | xps-unknown | xps100-unknown) | |
1001 | cpu=xps100 | |
1002 | vendor=honeywell | |
1003 | ;; | |
1004 | ||
1005 | # Here we normalize CPU types with a missing or matching vendor | |
1006 | dpx20-unknown | dpx20-bull) | |
1007 | cpu=rs6000 | |
1008 | vendor=bull | |
1009 | os=${os:-bosx} | |
1010 | ;; | |
1011 | ||
1012 | # Here we normalize CPU types irrespective of the vendor | |
411 | 1013 | amd64-*) |
412 | basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
413 | ;; | |
414 | amdahl) | |
415 | basic_machine=580-amdahl | |
416 | os=-sysv | |
417 | ;; | |
418 | amiga | amiga-*) | |
419 | basic_machine=m68k-unknown | |
420 | ;; | |
421 | amigaos | amigados) | |
422 | basic_machine=m68k-unknown | |
423 | os=-amigaos | |
424 | ;; | |
425 | amigaunix | amix) | |
426 | basic_machine=m68k-unknown | |
427 | os=-sysv4 | |
428 | ;; | |
429 | apollo68) | |
430 | basic_machine=m68k-apollo | |
431 | os=-sysv | |
432 | ;; | |
433 | apollo68bsd) | |
434 | basic_machine=m68k-apollo | |
435 | os=-bsd | |
436 | ;; | |
437 | aux) | |
438 | basic_machine=m68k-apple | |
439 | os=-aux | |
440 | ;; | |
441 | balance) | |
442 | basic_machine=ns32k-sequent | |
443 | os=-dynix | |
444 | ;; | |
445 | c90) | |
446 | basic_machine=c90-cray | |
447 | os=-unicos | |
448 | ;; | |
449 | convex-c1) | |
450 | basic_machine=c1-convex | |
451 | os=-bsd | |
452 | ;; | |
453 | convex-c2) | |
454 | basic_machine=c2-convex | |
455 | os=-bsd | |
456 | ;; | |
457 | convex-c32) | |
458 | basic_machine=c32-convex | |
459 | os=-bsd | |
460 | ;; | |
461 | convex-c34) | |
462 | basic_machine=c34-convex | |
463 | os=-bsd | |
464 | ;; | |
465 | convex-c38) | |
466 | basic_machine=c38-convex | |
467 | os=-bsd | |
468 | ;; | |
469 | cray | j90) | |
470 | basic_machine=j90-cray | |
471 | os=-unicos | |
472 | ;; | |
473 | craynv) | |
474 | basic_machine=craynv-cray | |
475 | os=-unicosmp | |
476 | ;; | |
477 | cr16) | |
478 | basic_machine=cr16-unknown | |
479 | os=-elf | |
480 | ;; | |
481 | crds | unos) | |
482 | basic_machine=m68k-crds | |
483 | ;; | |
484 | crisv32 | crisv32-* | etraxfs*) | |
485 | basic_machine=crisv32-axis | |
486 | ;; | |
487 | cris | cris-* | etrax*) | |
488 | basic_machine=cris-axis | |
489 | ;; | |
490 | crx) | |
491 | basic_machine=crx-unknown | |
492 | os=-elf | |
493 | ;; | |
494 | da30 | da30-*) | |
495 | basic_machine=m68k-da30 | |
496 | ;; | |
497 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) | |
498 | basic_machine=mips-dec | |
499 | ;; | |
500 | decsystem10* | dec10*) | |
501 | basic_machine=pdp10-dec | |
502 | os=-tops10 | |
503 | ;; | |
504 | decsystem20* | dec20*) | |
505 | basic_machine=pdp10-dec | |
506 | os=-tops20 | |
507 | ;; | |
508 | delta | 3300 | motorola-3300 | motorola-delta \ | |
509 | | 3300-motorola | delta-motorola) | |
510 | basic_machine=m68k-motorola | |
511 | ;; | |
512 | delta88) | |
513 | basic_machine=m88k-motorola | |
514 | os=-sysv3 | |
515 | ;; | |
516 | djgpp) | |
517 | basic_machine=i586-pc | |
518 | os=-msdosdjgpp | |
519 | ;; | |
520 | dpx20 | dpx20-*) | |
521 | basic_machine=rs6000-bull | |
522 | os=-bosx | |
523 | ;; | |
524 | dpx2* | dpx2*-bull) | |
525 | basic_machine=m68k-bull | |
526 | os=-sysv3 | |
527 | ;; | |
528 | ebmon29k) | |
529 | basic_machine=a29k-amd | |
530 | os=-ebmon | |
531 | ;; | |
532 | elxsi) | |
533 | basic_machine=elxsi-elxsi | |
534 | os=-bsd | |
535 | ;; | |
536 | encore | umax | mmax) | |
537 | basic_machine=ns32k-encore | |
538 | ;; | |
539 | es1800 | OSE68k | ose68k | ose | OSE) | |
540 | basic_machine=m68k-ericsson | |
541 | os=-ose | |
542 | ;; | |
543 | fx2800) | |
544 | basic_machine=i860-alliant | |
545 | ;; | |
546 | genix) | |
547 | basic_machine=ns32k-ns | |
548 | ;; | |
549 | gmicro) | |
550 | basic_machine=tron-gmicro | |
551 | os=-sysv | |
552 | ;; | |
553 | go32) | |
554 | basic_machine=i386-pc | |
555 | os=-go32 | |
556 | ;; | |
557 | h3050r* | hiux*) | |
558 | basic_machine=hppa1.1-hitachi | |
559 | os=-hiuxwe2 | |
560 | ;; | |
561 | h8300hms) | |
562 | basic_machine=h8300-hitachi | |
563 | os=-hms | |
564 | ;; | |
565 | h8300xray) | |
566 | basic_machine=h8300-hitachi | |
567 | os=-xray | |
568 | ;; | |
569 | h8500hms) | |
570 | basic_machine=h8500-hitachi | |
571 | os=-hms | |
572 | ;; | |
573 | harris) | |
574 | basic_machine=m88k-harris | |
575 | os=-sysv3 | |
576 | ;; | |
577 | hp300-*) | |
578 | basic_machine=m68k-hp | |
579 | ;; | |
580 | hp300bsd) | |
581 | basic_machine=m68k-hp | |
582 | os=-bsd | |
583 | ;; | |
584 | hp300hpux) | |
585 | basic_machine=m68k-hp | |
586 | os=-hpux | |
587 | ;; | |
588 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) | |
589 | basic_machine=hppa1.0-hp | |
590 | ;; | |
591 | hp9k2[0-9][0-9] | hp9k31[0-9]) | |
592 | basic_machine=m68000-hp | |
593 | ;; | |
594 | hp9k3[2-9][0-9]) | |
595 | basic_machine=m68k-hp | |
596 | ;; | |
597 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) | |
598 | basic_machine=hppa1.0-hp | |
599 | ;; | |
600 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) | |
601 | basic_machine=hppa1.1-hp | |
602 | ;; | |
603 | hp9k78[0-9] | hp78[0-9]) | |
604 | # FIXME: really hppa2.0-hp | |
605 | basic_machine=hppa1.1-hp | |
606 | ;; | |
607 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
608 | # FIXME: really hppa2.0-hp | |
609 | basic_machine=hppa1.1-hp | |
610 | ;; | |
611 | hp9k8[0-9][13679] | hp8[0-9][13679]) | |
612 | basic_machine=hppa1.1-hp | |
613 | ;; | |
614 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
615 | basic_machine=hppa1.0-hp | |
616 | ;; | |
617 | hppa-next) | |
618 | os=-nextstep3 | |
619 | ;; | |
620 | hppaosf) | |
621 | basic_machine=hppa1.1-hp | |
622 | os=-osf | |
623 | ;; | |
624 | hppro) | |
625 | basic_machine=hppa1.1-hp | |
626 | os=-proelf | |
627 | ;; | |
628 | i370-ibm* | ibm*) | |
629 | basic_machine=i370-ibm | |
630 | ;; | |
631 | # I'm not sure what "Sysv32" means. Should this be sysv3.2? | |
632 | i*86v32) | |
633 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
634 | os=-sysv32 | |
635 | ;; | |
636 | i*86v4*) | |
637 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
638 | os=-sysv4 | |
639 | ;; | |
640 | i*86v) | |
641 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
642 | os=-sysv | |
643 | ;; | |
644 | i*86sol2) | |
645 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
646 | os=-solaris2 | |
647 | ;; | |
648 | i386mach) | |
649 | basic_machine=i386-mach | |
650 | os=-mach | |
651 | ;; | |
652 | i386-vsta | vsta) | |
653 | basic_machine=i386-unknown | |
654 | os=-vsta | |
655 | ;; | |
656 | iris | iris4d) | |
657 | basic_machine=mips-sgi | |
658 | case $os in | |
659 | -irix*) | |
1014 | cpu=x86_64 | |
1015 | ;; | |
1016 | blackfin-*) | |
1017 | cpu=bfin | |
1018 | os=linux | |
1019 | ;; | |
1020 | c54x-*) | |
1021 | cpu=tic54x | |
1022 | ;; | |
1023 | c55x-*) | |
1024 | cpu=tic55x | |
1025 | ;; | |
1026 | c6x-*) | |
1027 | cpu=tic6x | |
1028 | ;; | |
1029 | e500v[12]-*) | |
1030 | cpu=powerpc | |
1031 | os=$os"spe" | |
1032 | ;; | |
1033 | mips3*-*) | |
1034 | cpu=mips64 | |
1035 | ;; | |
1036 | ms1-*) | |
1037 | cpu=mt | |
1038 | ;; | |
1039 | m68knommu-*) | |
1040 | cpu=m68k | |
1041 | os=linux | |
1042 | ;; | |
1043 | m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) | |
1044 | cpu=s12z | |
1045 | ;; | |
1046 | openrisc-*) | |
1047 | cpu=or32 | |
1048 | ;; | |
1049 | parisc-*) | |
1050 | cpu=hppa | |
1051 | os=linux | |
1052 | ;; | |
1053 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
1054 | cpu=i586 | |
1055 | ;; | |
1056 | pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) | |
1057 | cpu=i686 | |
1058 | ;; | |
1059 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
1060 | cpu=i686 | |
1061 | ;; | |
1062 | pentium4-*) | |
1063 | cpu=i786 | |
1064 | ;; | |
1065 | pc98-*) | |
1066 | cpu=i386 | |
1067 | ;; | |
1068 | ppc-* | ppcbe-*) | |
1069 | cpu=powerpc | |
1070 | ;; | |
1071 | ppcle-* | powerpclittle-*) | |
1072 | cpu=powerpcle | |
1073 | ;; | |
1074 | ppc64-*) | |
1075 | cpu=powerpc64 | |
1076 | ;; | |
1077 | ppc64le-* | powerpc64little-*) | |
1078 | cpu=powerpc64le | |
1079 | ;; | |
1080 | sb1-*) | |
1081 | cpu=mipsisa64sb1 | |
1082 | ;; | |
1083 | sb1el-*) | |
1084 | cpu=mipsisa64sb1el | |
1085 | ;; | |
1086 | sh5e[lb]-*) | |
1087 | cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` | |
1088 | ;; | |
1089 | spur-*) | |
1090 | cpu=spur | |
1091 | ;; | |
1092 | strongarm-* | thumb-*) | |
1093 | cpu=arm | |
1094 | ;; | |
1095 | tx39-*) | |
1096 | cpu=mipstx39 | |
1097 | ;; | |
1098 | tx39el-*) | |
1099 | cpu=mipstx39el | |
1100 | ;; | |
1101 | x64-*) | |
1102 | cpu=x86_64 | |
1103 | ;; | |
1104 | xscale-* | xscalee[bl]-*) | |
1105 | cpu=`echo "$cpu" | sed 's/^xscale/arm/'` | |
1106 | ;; | |
1107 | ||
1108 | # Recognize the canonical CPU Types that limit and/or modify the | |
1109 | # company names they are paired with. | |
1110 | cr16-*) | |
1111 | os=${os:-elf} | |
1112 | ;; | |
1113 | crisv32-* | etraxfs*-*) | |
1114 | cpu=crisv32 | |
1115 | vendor=axis | |
1116 | ;; | |
1117 | cris-* | etrax*-*) | |
1118 | cpu=cris | |
1119 | vendor=axis | |
1120 | ;; | |
1121 | crx-*) | |
1122 | os=${os:-elf} | |
1123 | ;; | |
1124 | neo-tandem) | |
1125 | cpu=neo | |
1126 | vendor=tandem | |
1127 | ;; | |
1128 | nse-tandem) | |
1129 | cpu=nse | |
1130 | vendor=tandem | |
1131 | ;; | |
1132 | nsr-tandem) | |
1133 | cpu=nsr | |
1134 | vendor=tandem | |
1135 | ;; | |
1136 | nsv-tandem) | |
1137 | cpu=nsv | |
1138 | vendor=tandem | |
1139 | ;; | |
1140 | nsx-tandem) | |
1141 | cpu=nsx | |
1142 | vendor=tandem | |
1143 | ;; | |
1144 | mipsallegrexel-sony) | |
1145 | cpu=mipsallegrexel | |
1146 | vendor=sony | |
1147 | ;; | |
1148 | tile*-*) | |
1149 | os=${os:-linux-gnu} | |
1150 | ;; | |
1151 | ||
1152 | *) | |
1153 | # Recognize the canonical CPU types that are allowed with any | |
1154 | # company name. | |
1155 | case $cpu in | |
1156 | 1750a | 580 \ | |
1157 | | a29k \ | |
1158 | | aarch64 | aarch64_be \ | |
1159 | | abacus \ | |
1160 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | |
1161 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ | |
1162 | | alphapca5[67] | alpha64pca5[67] \ | |
1163 | | am33_2.0 \ | |
1164 | | amdgcn \ | |
1165 | | arc | arceb \ | |
1166 | | arm | arm[lb]e | arme[lb] | armv* \ | |
1167 | | avr | avr32 \ | |
1168 | | asmjs \ | |
1169 | | ba \ | |
1170 | | be32 | be64 \ | |
1171 | | bfin | bpf | bs2000 \ | |
1172 | | c[123]* | c30 | [cjt]90 | c4x \ | |
1173 | | c8051 | clipper | craynv | csky | cydra \ | |
1174 | | d10v | d30v | dlx | dsp16xx \ | |
1175 | | e2k | elxsi | epiphany \ | |
1176 | | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ | |
1177 | | h8300 | h8500 \ | |
1178 | | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
1179 | | hexagon \ | |
1180 | | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | |
1181 | | ip2k | iq2000 \ | |
1182 | | k1om \ | |
1183 | | le32 | le64 \ | |
1184 | | lm32 \ | |
1185 | | m32c | m32r | m32rle \ | |
1186 | | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | |
1187 | | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | |
1188 | | m88110 | m88k | maxq | mb | mcore | mep | metag \ | |
1189 | | microblaze | microblazeel \ | |
1190 | | mips | mipsbe | mipseb | mipsel | mipsle \ | |
1191 | | mips16 \ | |
1192 | | mips64 | mips64eb | mips64el \ | |
1193 | | mips64octeon | mips64octeonel \ | |
1194 | | mips64orion | mips64orionel \ | |
1195 | | mips64r5900 | mips64r5900el \ | |
1196 | | mips64vr | mips64vrel \ | |
1197 | | mips64vr4100 | mips64vr4100el \ | |
1198 | | mips64vr4300 | mips64vr4300el \ | |
1199 | | mips64vr5000 | mips64vr5000el \ | |
1200 | | mips64vr5900 | mips64vr5900el \ | |
1201 | | mipsisa32 | mipsisa32el \ | |
1202 | | mipsisa32r2 | mipsisa32r2el \ | |
1203 | | mipsisa32r6 | mipsisa32r6el \ | |
1204 | | mipsisa64 | mipsisa64el \ | |
1205 | | mipsisa64r2 | mipsisa64r2el \ | |
1206 | | mipsisa64r6 | mipsisa64r6el \ | |
1207 | | mipsisa64sb1 | mipsisa64sb1el \ | |
1208 | | mipsisa64sr71k | mipsisa64sr71kel \ | |
1209 | | mipsr5900 | mipsr5900el \ | |
1210 | | mipstx39 | mipstx39el \ | |
1211 | | mmix \ | |
1212 | | mn10200 | mn10300 \ | |
1213 | | moxie \ | |
1214 | | mt \ | |
1215 | | msp430 \ | |
1216 | | nds32 | nds32le | nds32be \ | |
1217 | | nfp \ | |
1218 | | nios | nios2 | nios2eb | nios2el \ | |
1219 | | none | np1 | ns16k | ns32k | nvptx \ | |
1220 | | open8 \ | |
1221 | | or1k* \ | |
1222 | | or32 \ | |
1223 | | orion \ | |
1224 | | picochip \ | |
1225 | | pdp10 | pdp11 | pj | pjl | pn | power \ | |
1226 | | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ | |
1227 | | pru \ | |
1228 | | pyramid \ | |
1229 | | riscv | riscv32 | riscv64 \ | |
1230 | | rl78 | romp | rs6000 | rx \ | |
1231 | | s390 | s390x \ | |
1232 | | score \ | |
1233 | | sh | shl \ | |
1234 | | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ | |
1235 | | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ | |
1236 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ | |
1237 | | sparclite \ | |
1238 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | |
1239 | | spu \ | |
1240 | | tahoe \ | |
1241 | | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | |
1242 | | tron \ | |
1243 | | ubicom32 \ | |
1244 | | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | |
1245 | | vax \ | |
1246 | | visium \ | |
1247 | | w65 \ | |
1248 | | wasm32 | wasm64 \ | |
1249 | | we32k \ | |
1250 | | x86 | x86_64 | xc16x | xgate | xps100 \ | |
1251 | | xstormy16 | xtensa* \ | |
1252 | | ymp \ | |
1253 | | z8k | z80) | |
1254 | ;; | |
1255 | ||
1256 | *) | |
1257 | echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 | |
1258 | exit 1 | |
1259 | ;; | |
1260 | esac | |
1261 | ;; | |
1262 | esac | |
1263 | ||
1264 | # Here we canonicalize certain aliases for manufacturers. | |
1265 | case $vendor in | |
1266 | digital*) | |
1267 | vendor=dec | |
1268 | ;; | |
1269 | commodore*) | |
1270 | vendor=cbm | |
1271 | ;; | |
1272 | *) | |
1273 | ;; | |
1274 | esac | |
1275 | ||
1276 | # Decode manufacturer-specific aliases for certain operating systems. | |
1277 | ||
1278 | if [ x$os != x ] | |
1279 | then | |
1280 | case $os in | |
1281 | # First match some system type aliases that might get confused | |
1282 | # with valid system types. | |
1283 | # solaris* is a basic system type, with this one exception. | |
1284 | auroraux) | |
1285 | os=auroraux | |
1286 | ;; | |
1287 | bluegene*) | |
1288 | os=cnk | |
1289 | ;; | |
1290 | solaris1 | solaris1.*) | |
1291 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
1292 | ;; | |
1293 | solaris) | |
1294 | os=solaris2 | |
1295 | ;; | |
1296 | unixware*) | |
1297 | os=sysv4.2uw | |
1298 | ;; | |
1299 | gnu/linux*) | |
1300 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` | |
1301 | ;; | |
1302 | # es1800 is here to avoid being matched by es* (a different OS) | |
1303 | es1800*) | |
1304 | os=ose | |
1305 | ;; | |
1306 | # Some version numbers need modification | |
1307 | chorusos*) | |
1308 | os=chorusos | |
1309 | ;; | |
1310 | isc) | |
1311 | os=isc2.2 | |
1312 | ;; | |
1313 | sco6) | |
1314 | os=sco5v6 | |
1315 | ;; | |
1316 | sco5) | |
1317 | os=sco3.2v5 | |
1318 | ;; | |
1319 | sco4) | |
1320 | os=sco3.2v4 | |
1321 | ;; | |
1322 | sco3.2.[4-9]*) | |
1323 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
1324 | ;; | |
1325 | sco3.2v[4-9]* | sco5v6*) | |
1326 | # Don't forget version if it is 3.2v4 or newer. | |
1327 | ;; | |
1328 | scout) | |
1329 | # Don't match below | |
1330 | ;; | |
1331 | sco*) | |
1332 | os=sco3.2v2 | |
1333 | ;; | |
1334 | psos*) | |
1335 | os=psos | |
1336 | ;; | |
1337 | # Now accept the basic system types. | |
1338 | # The portable systems comes first. | |
1339 | # Each alternative MUST end in a * to match a version number. | |
1340 | # sysv* is not here because it comes later, after sysvr4. | |
1341 | gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ | |
1342 | | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ | |
1343 | | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | |
1344 | | sym* | kopensolaris* | plan9* \ | |
1345 | | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | |
1346 | | aos* | aros* | cloudabi* | sortix* | twizzler* \ | |
1347 | | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | |
1348 | | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | |
1349 | | knetbsd* | mirbsd* | netbsd* \ | |
1350 | | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ | |
1351 | | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ | |
1352 | | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | |
1353 | | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | |
1354 | | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ | |
1355 | | chorusrdb* | cegcc* | glidix* \ | |
1356 | | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ | |
1357 | | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ | |
1358 | | linux-newlib* | linux-musl* | linux-uclibc* \ | |
1359 | | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | |
1360 | | interix* | uwin* | mks* | rhapsody* | darwin* \ | |
1361 | | openstep* | oskit* | conix* | pw32* | nonstopux* \ | |
1362 | | storm-chaos* | tops10* | tenex* | tops20* | its* \ | |
1363 | | os2* | vos* | palmos* | uclinux* | nucleus* \ | |
1364 | | morphos* | superux* | rtmk* | windiss* \ | |
1365 | | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | |
1366 | | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | |
1367 | | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | |
1368 | | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | |
1369 | | nsk* | powerunix* | genode*) | |
1370 | # Remember, each alternative MUST END IN *, to match a version number. | |
1371 | ;; | |
1372 | qnx*) | |
1373 | case $cpu in | |
1374 | x86 | i*86) | |
660 | 1375 | ;; |
661 | 1376 | *) |
662 | os=-irix4 | |
1377 | os=nto-$os | |
663 | 1378 | ;; |
664 | 1379 | esac |
665 | 1380 | ;; |
666 | isi68 | isi) | |
667 | basic_machine=m68k-isi | |
668 | os=-sysv | |
669 | ;; | |
670 | m88k-omron*) | |
671 | basic_machine=m88k-omron | |
672 | ;; | |
673 | magnum | m3230) | |
674 | basic_machine=mips-mips | |
675 | os=-sysv | |
676 | ;; | |
677 | merlin) | |
678 | basic_machine=ns32k-utek | |
679 | os=-sysv | |
680 | ;; | |
681 | mingw32) | |
682 | basic_machine=i386-pc | |
683 | os=-mingw32 | |
684 | ;; | |
685 | mingw32ce) | |
686 | basic_machine=arm-unknown | |
687 | os=-mingw32ce | |
688 | ;; | |
689 | miniframe) | |
690 | basic_machine=m68000-convergent | |
691 | ;; | |
692 | *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
693 | basic_machine=m68k-atari | |
694 | os=-mint | |
695 | ;; | |
696 | mips3*-*) | |
697 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | |
698 | ;; | |
699 | mips3*) | |
700 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | |
701 | ;; | |
702 | monitor) | |
703 | basic_machine=m68k-rom68k | |
704 | os=-coff | |
705 | ;; | |
706 | morphos) | |
707 | basic_machine=powerpc-unknown | |
708 | os=-morphos | |
709 | ;; | |
710 | msdos) | |
711 | basic_machine=i386-pc | |
712 | os=-msdos | |
713 | ;; | |
714 | ms1-*) | |
715 | basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` | |
716 | ;; | |
717 | mvs) | |
718 | basic_machine=i370-ibm | |
719 | os=-mvs | |
720 | ;; | |
721 | ncr3000) | |
722 | basic_machine=i486-ncr | |
723 | os=-sysv4 | |
724 | ;; | |
725 | netbsd386) | |
726 | basic_machine=i386-unknown | |
727 | os=-netbsd | |
728 | ;; | |
729 | netwinder) | |
730 | basic_machine=armv4l-rebel | |
731 | os=-linux | |
732 | ;; | |
733 | news | news700 | news800 | news900) | |
734 | basic_machine=m68k-sony | |
735 | os=-newsos | |
736 | ;; | |
737 | news1000) | |
738 | basic_machine=m68030-sony | |
739 | os=-newsos | |
740 | ;; | |
741 | news-3600 | risc-news) | |
742 | basic_machine=mips-sony | |
743 | os=-newsos | |
744 | ;; | |
745 | necv70) | |
746 | basic_machine=v70-nec | |
747 | os=-sysv | |
748 | ;; | |
749 | next | m*-next ) | |
750 | basic_machine=m68k-next | |
751 | case $os in | |
752 | -nextstep* ) | |
753 | ;; | |
754 | -ns2*) | |
755 | os=-nextstep2 | |
1381 | hiux*) | |
1382 | os=hiuxwe2 | |
1383 | ;; | |
1384 | nto-qnx*) | |
1385 | ;; | |
1386 | nto*) | |
1387 | os=`echo $os | sed -e 's|nto|nto-qnx|'` | |
1388 | ;; | |
1389 | sim | xray | os68k* | v88r* \ | |
1390 | | windows* | osx | abug | netware* | os9* \ | |
1391 | | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) | |
1392 | ;; | |
1393 | linux-dietlibc) | |
1394 | os=linux-dietlibc | |
1395 | ;; | |
1396 | linux*) | |
1397 | os=`echo $os | sed -e 's|linux|linux-gnu|'` | |
1398 | ;; | |
1399 | lynx*178) | |
1400 | os=lynxos178 | |
1401 | ;; | |
1402 | lynx*5) | |
1403 | os=lynxos5 | |
1404 | ;; | |
1405 | lynx*) | |
1406 | os=lynxos | |
1407 | ;; | |
1408 | mac*) | |
1409 | os=`echo "$os" | sed -e 's|mac|macos|'` | |
1410 | ;; | |
1411 | opened*) | |
1412 | os=openedition | |
1413 | ;; | |
1414 | os400*) | |
1415 | os=os400 | |
1416 | ;; | |
1417 | sunos5*) | |
1418 | os=`echo "$os" | sed -e 's|sunos5|solaris2|'` | |
1419 | ;; | |
1420 | sunos6*) | |
1421 | os=`echo "$os" | sed -e 's|sunos6|solaris3|'` | |
1422 | ;; | |
1423 | wince*) | |
1424 | os=wince | |
1425 | ;; | |
1426 | utek*) | |
1427 | os=bsd | |
1428 | ;; | |
1429 | dynix*) | |
1430 | os=bsd | |
1431 | ;; | |
1432 | acis*) | |
1433 | os=aos | |
1434 | ;; | |
1435 | atheos*) | |
1436 | os=atheos | |
1437 | ;; | |
1438 | syllable*) | |
1439 | os=syllable | |
1440 | ;; | |
1441 | 386bsd) | |
1442 | os=bsd | |
1443 | ;; | |
1444 | ctix* | uts*) | |
1445 | os=sysv | |
1446 | ;; | |
1447 | nova*) | |
1448 | os=rtmk-nova | |
1449 | ;; | |
1450 | ns2) | |
1451 | os=nextstep2 | |
1452 | ;; | |
1453 | # Preserve the version number of sinix5. | |
1454 | sinix5.*) | |
1455 | os=`echo $os | sed -e 's|sinix|sysv|'` | |
1456 | ;; | |
1457 | sinix*) | |
1458 | os=sysv4 | |
1459 | ;; | |
1460 | tpf*) | |
1461 | os=tpf | |
1462 | ;; | |
1463 | triton*) | |
1464 | os=sysv3 | |
1465 | ;; | |
1466 | oss*) | |
1467 | os=sysv3 | |
1468 | ;; | |
1469 | svr4*) | |
1470 | os=sysv4 | |
1471 | ;; | |
1472 | svr3) | |
1473 | os=sysv3 | |
1474 | ;; | |
1475 | sysvr4) | |
1476 | os=sysv4 | |
1477 | ;; | |
1478 | # This must come after sysvr4. | |
1479 | sysv*) | |
1480 | ;; | |
1481 | ose*) | |
1482 | os=ose | |
1483 | ;; | |
1484 | *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) | |
1485 | os=mint | |
1486 | ;; | |
1487 | zvmoe) | |
1488 | os=zvmoe | |
1489 | ;; | |
1490 | dicos*) | |
1491 | os=dicos | |
1492 | ;; | |
1493 | pikeos*) | |
1494 | # Until real need of OS specific support for | |
1495 | # particular features comes up, bare metal | |
1496 | # configurations are quite functional. | |
1497 | case $cpu in | |
1498 | arm*) | |
1499 | os=eabi | |
756 | 1500 | ;; |
757 | 1501 | *) |
758 | os=-nextstep3 | |
1502 | os=elf | |
759 | 1503 | ;; |
760 | 1504 | esac |
761 | 1505 | ;; |
762 | nh3000) | |
763 | basic_machine=m68k-harris | |
764 | os=-cxux | |
765 | ;; | |
766 | nh[45]000) | |
767 | basic_machine=m88k-harris | |
768 | os=-cxux | |
769 | ;; | |
770 | nindy960) | |
771 | basic_machine=i960-intel | |
772 | os=-nindy | |
773 | ;; | |
774 | mon960) | |
775 | basic_machine=i960-intel | |
776 | os=-mon960 | |
777 | ;; | |
778 | nonstopux) | |
779 | basic_machine=mips-compaq | |
780 | os=-nonstopux | |
781 | ;; | |
782 | np1) | |
783 | basic_machine=np1-gould | |
784 | ;; | |
785 | nsr-tandem) | |
786 | basic_machine=nsr-tandem | |
787 | ;; | |
788 | op50n-* | op60c-*) | |
789 | basic_machine=hppa1.1-oki | |
790 | os=-proelf | |
791 | ;; | |
792 | openrisc | openrisc-*) | |
793 | basic_machine=or32-unknown | |
794 | ;; | |
795 | os400) | |
796 | basic_machine=powerpc-ibm | |
797 | os=-os400 | |
798 | ;; | |
799 | OSE68000 | ose68000) | |
800 | basic_machine=m68000-ericsson | |
801 | os=-ose | |
802 | ;; | |
803 | os68k) | |
804 | basic_machine=m68k-none | |
805 | os=-os68k | |
806 | ;; | |
807 | pa-hitachi) | |
808 | basic_machine=hppa1.1-hitachi | |
809 | os=-hiuxwe2 | |
810 | ;; | |
811 | paragon) | |
812 | basic_machine=i860-intel | |
813 | os=-osf | |
814 | ;; | |
815 | pbd) | |
816 | basic_machine=sparc-tti | |
817 | ;; | |
818 | pbb) | |
819 | basic_machine=m68k-tti | |
820 | ;; | |
821 | pc532 | pc532-*) | |
822 | basic_machine=ns32k-pc532 | |
823 | ;; | |
824 | pc98) | |
825 | basic_machine=i386-pc | |
826 | ;; | |
827 | pc98-*) | |
828 | basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` | |
829 | ;; | |
830 | pentium | p5 | k5 | k6 | nexgen | viac3) | |
831 | basic_machine=i586-pc | |
832 | ;; | |
833 | pentiumpro | p6 | 6x86 | athlon | athlon_*) | |
834 | basic_machine=i686-pc | |
835 | ;; | |
836 | pentiumii | pentium2 | pentiumiii | pentium3) | |
837 | basic_machine=i686-pc | |
838 | ;; | |
839 | pentium4) | |
840 | basic_machine=i786-pc | |
841 | ;; | |
842 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
843 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` | |
844 | ;; | |
845 | pentiumpro-* | p6-* | 6x86-* | athlon-*) | |
846 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
847 | ;; | |
848 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
849 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
850 | ;; | |
851 | pentium4-*) | |
852 | basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` | |
853 | ;; | |
854 | pn) | |
855 | basic_machine=pn-gould | |
856 | ;; | |
857 | power) basic_machine=power-ibm | |
858 | ;; | |
859 | ppc) basic_machine=powerpc-unknown | |
860 | ;; | |
861 | ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | |
862 | ;; | |
863 | ppcle | powerpclittle | ppc-le | powerpc-little) | |
864 | basic_machine=powerpcle-unknown | |
865 | ;; | |
866 | ppcle-* | powerpclittle-*) | |
867 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` | |
868 | ;; | |
869 | ppc64) basic_machine=powerpc64-unknown | |
870 | ;; | |
871 | ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
872 | ;; | |
873 | ppc64le | powerpc64little | ppc64-le | powerpc64-little) | |
874 | basic_machine=powerpc64le-unknown | |
875 | ;; | |
876 | ppc64le-* | powerpc64little-*) | |
877 | basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` | |
878 | ;; | |
879 | ps2) | |
880 | basic_machine=i386-ibm | |
881 | ;; | |
882 | pw32) | |
883 | basic_machine=i586-unknown | |
884 | os=-pw32 | |
885 | ;; | |
886 | rdos) | |
887 | basic_machine=i386-pc | |
888 | os=-rdos | |
889 | ;; | |
890 | rom68k) | |
891 | basic_machine=m68k-rom68k | |
892 | os=-coff | |
893 | ;; | |
894 | rm[46]00) | |
895 | basic_machine=mips-siemens | |
896 | ;; | |
897 | rtpc | rtpc-*) | |
898 | basic_machine=romp-ibm | |
899 | ;; | |
900 | s390 | s390-*) | |
901 | basic_machine=s390-ibm | |
902 | ;; | |
903 | s390x | s390x-*) | |
904 | basic_machine=s390x-ibm | |
905 | ;; | |
906 | sa29200) | |
907 | basic_machine=a29k-amd | |
908 | os=-udi | |
909 | ;; | |
910 | sb1) | |
911 | basic_machine=mipsisa64sb1-unknown | |
912 | ;; | |
913 | sb1el) | |
914 | basic_machine=mipsisa64sb1el-unknown | |
915 | ;; | |
916 | sde) | |
917 | basic_machine=mipsisa32-sde | |
918 | os=-elf | |
919 | ;; | |
920 | sei) | |
921 | basic_machine=mips-sei | |
922 | os=-seiux | |
923 | ;; | |
924 | sequent) | |
925 | basic_machine=i386-sequent | |
926 | ;; | |
927 | sh) | |
928 | basic_machine=sh-hitachi | |
929 | os=-hms | |
930 | ;; | |
931 | sh5el) | |
932 | basic_machine=sh5le-unknown | |
933 | ;; | |
934 | sh64) | |
935 | basic_machine=sh64-unknown | |
936 | ;; | |
937 | sparclite-wrs | simso-wrs) | |
938 | basic_machine=sparclite-wrs | |
939 | os=-vxworks | |
940 | ;; | |
941 | sps7) | |
942 | basic_machine=m68k-bull | |
943 | os=-sysv2 | |
944 | ;; | |
945 | spur) | |
946 | basic_machine=spur-unknown | |
947 | ;; | |
948 | st2000) | |
949 | basic_machine=m68k-tandem | |
950 | ;; | |
951 | stratus) | |
952 | basic_machine=i860-stratus | |
953 | os=-sysv4 | |
954 | ;; | |
955 | sun2) | |
956 | basic_machine=m68000-sun | |
957 | ;; | |
958 | sun2os3) | |
959 | basic_machine=m68000-sun | |
960 | os=-sunos3 | |
961 | ;; | |
962 | sun2os4) | |
963 | basic_machine=m68000-sun | |
964 | os=-sunos4 | |
965 | ;; | |
966 | sun3os3) | |
967 | basic_machine=m68k-sun | |
968 | os=-sunos3 | |
969 | ;; | |
970 | sun3os4) | |
971 | basic_machine=m68k-sun | |
972 | os=-sunos4 | |
973 | ;; | |
974 | sun4os3) | |
975 | basic_machine=sparc-sun | |
976 | os=-sunos3 | |
977 | ;; | |
978 | sun4os4) | |
979 | basic_machine=sparc-sun | |
980 | os=-sunos4 | |
981 | ;; | |
982 | sun4sol2) | |
983 | basic_machine=sparc-sun | |
984 | os=-solaris2 | |
985 | ;; | |
986 | sun3 | sun3-*) | |
987 | basic_machine=m68k-sun | |
988 | ;; | |
989 | sun4) | |
990 | basic_machine=sparc-sun | |
991 | ;; | |
992 | sun386 | sun386i | roadrunner) | |
993 | basic_machine=i386-sun | |
994 | ;; | |
995 | sv1) | |
996 | basic_machine=sv1-cray | |
997 | os=-unicos | |
998 | ;; | |
999 | symmetry) | |
1000 | basic_machine=i386-sequent | |
1001 | os=-dynix | |
1002 | ;; | |
1003 | t3e) | |
1004 | basic_machine=alphaev5-cray | |
1005 | os=-unicos | |
1006 | ;; | |
1007 | t90) | |
1008 | basic_machine=t90-cray | |
1009 | os=-unicos | |
1010 | ;; | |
1011 | tic54x | c54x*) | |
1012 | basic_machine=tic54x-unknown | |
1013 | os=-coff | |
1014 | ;; | |
1015 | tic55x | c55x*) | |
1016 | basic_machine=tic55x-unknown | |
1017 | os=-coff | |
1018 | ;; | |
1019 | tic6x | c6x*) | |
1020 | basic_machine=tic6x-unknown | |
1021 | os=-coff | |
1022 | ;; | |
1023 | tx39) | |
1024 | basic_machine=mipstx39-unknown | |
1025 | ;; | |
1026 | tx39el) | |
1027 | basic_machine=mipstx39el-unknown | |
1028 | ;; | |
1029 | toad1) | |
1030 | basic_machine=pdp10-xkl | |
1031 | os=-tops20 | |
1032 | ;; | |
1033 | tower | tower-32) | |
1034 | basic_machine=m68k-ncr | |
1035 | ;; | |
1036 | tpf) | |
1037 | basic_machine=s390x-ibm | |
1038 | os=-tpf | |
1039 | ;; | |
1040 | udi29k) | |
1041 | basic_machine=a29k-amd | |
1042 | os=-udi | |
1043 | ;; | |
1044 | ultra3) | |
1045 | basic_machine=a29k-nyu | |
1046 | os=-sym1 | |
1047 | ;; | |
1048 | v810 | necv810) | |
1049 | basic_machine=v810-nec | |
1050 | os=-none | |
1051 | ;; | |
1052 | vaxv) | |
1053 | basic_machine=vax-dec | |
1054 | os=-sysv | |
1055 | ;; | |
1056 | vms) | |
1057 | basic_machine=vax-dec | |
1058 | os=-vms | |
1059 | ;; | |
1060 | vpp*|vx|vx-*) | |
1061 | basic_machine=f301-fujitsu | |
1062 | ;; | |
1063 | vxworks960) | |
1064 | basic_machine=i960-wrs | |
1065 | os=-vxworks | |
1066 | ;; | |
1067 | vxworks68) | |
1068 | basic_machine=m68k-wrs | |
1069 | os=-vxworks | |
1070 | ;; | |
1071 | vxworks29k) | |
1072 | basic_machine=a29k-wrs | |
1073 | os=-vxworks | |
1074 | ;; | |
1075 | w65*) | |
1076 | basic_machine=w65-wdc | |
1077 | os=-none | |
1078 | ;; | |
1079 | w89k-*) | |
1080 | basic_machine=hppa1.1-winbond | |
1081 | os=-proelf | |
1082 | ;; | |
1083 | xbox) | |
1084 | basic_machine=i686-pc | |
1085 | os=-mingw32 | |
1086 | ;; | |
1087 | xps | xps100) | |
1088 | basic_machine=xps100-honeywell | |
1089 | ;; | |
1090 | ymp) | |
1091 | basic_machine=ymp-cray | |
1092 | os=-unicos | |
1093 | ;; | |
1094 | z8k-*-coff) | |
1095 | basic_machine=z8k-unknown | |
1096 | os=-sim | |
1506 | nacl*) | |
1507 | ;; | |
1508 | ios) | |
1509 | ;; | |
1510 | psp) | |
1097 | 1511 | ;; |
1098 | 1512 | none) |
1099 | basic_machine=none-none | |
1100 | os=-none | |
1101 | ;; | |
1102 | ||
1103 | # Here we handle the default manufacturer of certain CPU types. It is in | |
1104 | # some cases the only manufacturer, in others, it is the most popular. | |
1105 | w89k) | |
1106 | basic_machine=hppa1.1-winbond | |
1107 | ;; | |
1108 | op50n) | |
1109 | basic_machine=hppa1.1-oki | |
1110 | ;; | |
1111 | op60c) | |
1112 | basic_machine=hppa1.1-oki | |
1113 | ;; | |
1114 | romp) | |
1115 | basic_machine=romp-ibm | |
1116 | ;; | |
1117 | mmix) | |
1118 | basic_machine=mmix-knuth | |
1119 | ;; | |
1120 | rs6000) | |
1121 | basic_machine=rs6000-ibm | |
1122 | ;; | |
1123 | vax) | |
1124 | basic_machine=vax-dec | |
1125 | ;; | |
1126 | pdp10) | |
1127 | # there are many clones, so DEC is not a safe bet | |
1128 | basic_machine=pdp10-unknown | |
1129 | ;; | |
1130 | pdp11) | |
1131 | basic_machine=pdp11-dec | |
1132 | ;; | |
1133 | we32k) | |
1134 | basic_machine=we32k-att | |
1135 | ;; | |
1136 | sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) | |
1137 | basic_machine=sh-unknown | |
1138 | ;; | |
1139 | sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) | |
1140 | basic_machine=sparc-sun | |
1141 | ;; | |
1142 | cydra) | |
1143 | basic_machine=cydra-cydrome | |
1144 | ;; | |
1145 | orion) | |
1146 | basic_machine=orion-highlevel | |
1147 | ;; | |
1148 | orion105) | |
1149 | basic_machine=clipper-highlevel | |
1150 | ;; | |
1151 | mac | mpw | mac-mpw) | |
1152 | basic_machine=m68k-apple | |
1153 | ;; | |
1154 | pmac | pmac-mpw) | |
1155 | basic_machine=powerpc-apple | |
1156 | ;; | |
1157 | *-unknown) | |
1158 | # Make sure to match an already-canonicalized machine name. | |
1513 | ;; | |
1514 | *-eabi) | |
1159 | 1515 | ;; |
1160 | 1516 | *) |
1161 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
1162 | exit 1 | |
1163 | ;; | |
1164 | esac | |
1165 | ||
1166 | # Here we canonicalize certain aliases for manufacturers. | |
1167 | case $basic_machine in | |
1168 | *-digital*) | |
1169 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | |
1170 | ;; | |
1171 | *-commodore*) | |
1172 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | |
1173 | ;; | |
1174 | *) | |
1175 | ;; | |
1176 | esac | |
1177 | ||
1178 | # Decode manufacturer-specific aliases for certain operating systems. | |
1179 | ||
1180 | if [ x"$os" != x"" ] | |
1181 | then | |
1182 | case $os in | |
1183 | # First match some system type aliases | |
1184 | # that might get confused with valid system types. | |
1185 | # -solaris* is a basic system type, with this one exception. | |
1186 | -solaris1 | -solaris1.*) | |
1187 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
1188 | ;; | |
1189 | -solaris) | |
1190 | os=-solaris2 | |
1191 | ;; | |
1192 | -svr4*) | |
1193 | os=-sysv4 | |
1194 | ;; | |
1195 | -unixware*) | |
1196 | os=-sysv4.2uw | |
1197 | ;; | |
1198 | -gnu/linux*) | |
1199 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` | |
1200 | ;; | |
1201 | # First accept the basic system types. | |
1202 | # The portable systems comes first. | |
1203 | # Each alternative MUST END IN A *, to match a version number. | |
1204 | # -sysv* is not here because it comes later, after sysvr4. | |
1205 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | |
1206 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | |
1207 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | |
1208 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | |
1209 | | -aos* \ | |
1210 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | |
1211 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | |
1212 | | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | |
1213 | | -openbsd* | -solidbsd* \ | |
1214 | | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | |
1215 | | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | |
1216 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | |
1217 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | |
1218 | | -chorusos* | -chorusrdb* \ | |
1219 | | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | |
1220 | | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | |
1221 | | -uxpv* | -beos* | -mpeix* | -udk* \ | |
1222 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | |
1223 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | |
1224 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | |
1225 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | |
1226 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | |
1227 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | |
1228 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) | |
1229 | # Remember, each alternative MUST END IN *, to match a version number. | |
1230 | ;; | |
1231 | -qnx*) | |
1232 | case $basic_machine in | |
1233 | x86-* | i*86-*) | |
1234 | ;; | |
1235 | *) | |
1236 | os=-nto$os | |
1237 | ;; | |
1238 | esac | |
1239 | ;; | |
1240 | -nto-qnx*) | |
1241 | ;; | |
1242 | -nto*) | |
1243 | os=`echo $os | sed -e 's|nto|nto-qnx|'` | |
1244 | ;; | |
1245 | -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | |
1246 | | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | |
1247 | | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | |
1248 | ;; | |
1249 | -mac*) | |
1250 | os=`echo $os | sed -e 's|mac|macos|'` | |
1251 | ;; | |
1252 | -linux-dietlibc) | |
1253 | os=-linux-dietlibc | |
1254 | ;; | |
1255 | -linux*) | |
1256 | os=`echo $os | sed -e 's|linux|linux-gnu|'` | |
1257 | ;; | |
1258 | -sunos5*) | |
1259 | os=`echo $os | sed -e 's|sunos5|solaris2|'` | |
1260 | ;; | |
1261 | -sunos6*) | |
1262 | os=`echo $os | sed -e 's|sunos6|solaris3|'` | |
1263 | ;; | |
1264 | -opened*) | |
1265 | os=-openedition | |
1266 | ;; | |
1267 | -os400*) | |
1268 | os=-os400 | |
1269 | ;; | |
1270 | -wince*) | |
1271 | os=-wince | |
1272 | ;; | |
1273 | -osfrose*) | |
1274 | os=-osfrose | |
1275 | ;; | |
1276 | -osf*) | |
1277 | os=-osf | |
1278 | ;; | |
1279 | -utek*) | |
1280 | os=-bsd | |
1281 | ;; | |
1282 | -dynix*) | |
1283 | os=-bsd | |
1284 | ;; | |
1285 | -acis*) | |
1286 | os=-aos | |
1287 | ;; | |
1288 | -atheos*) | |
1289 | os=-atheos | |
1290 | ;; | |
1291 | -syllable*) | |
1292 | os=-syllable | |
1293 | ;; | |
1294 | -386bsd) | |
1295 | os=-bsd | |
1296 | ;; | |
1297 | -ctix* | -uts*) | |
1298 | os=-sysv | |
1299 | ;; | |
1300 | -nova*) | |
1301 | os=-rtmk-nova | |
1302 | ;; | |
1303 | -ns2 ) | |
1304 | os=-nextstep2 | |
1305 | ;; | |
1306 | -nsk*) | |
1307 | os=-nsk | |
1308 | ;; | |
1309 | # Preserve the version number of sinix5. | |
1310 | -sinix5.*) | |
1311 | os=`echo $os | sed -e 's|sinix|sysv|'` | |
1312 | ;; | |
1313 | -sinix*) | |
1314 | os=-sysv4 | |
1315 | ;; | |
1316 | -tpf*) | |
1317 | os=-tpf | |
1318 | ;; | |
1319 | -triton*) | |
1320 | os=-sysv3 | |
1321 | ;; | |
1322 | -oss*) | |
1323 | os=-sysv3 | |
1324 | ;; | |
1325 | -svr4) | |
1326 | os=-sysv4 | |
1327 | ;; | |
1328 | -svr3) | |
1329 | os=-sysv3 | |
1330 | ;; | |
1331 | -sysvr4) | |
1332 | os=-sysv4 | |
1333 | ;; | |
1334 | # This must come after -sysvr4. | |
1335 | -sysv*) | |
1336 | ;; | |
1337 | -ose*) | |
1338 | os=-ose | |
1339 | ;; | |
1340 | -es1800*) | |
1341 | os=-ose | |
1342 | ;; | |
1343 | -xenix) | |
1344 | os=-xenix | |
1345 | ;; | |
1346 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
1347 | os=-mint | |
1348 | ;; | |
1349 | -aros*) | |
1350 | os=-aros | |
1351 | ;; | |
1352 | -kaos*) | |
1353 | os=-kaos | |
1354 | ;; | |
1355 | -zvmoe) | |
1356 | os=-zvmoe | |
1357 | ;; | |
1358 | -none) | |
1359 | ;; | |
1360 | *) | |
1361 | # Get rid of the `-' at the beginning of $os. | |
1362 | os=`echo $os | sed 's/[^-]*-//'` | |
1363 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | |
1517 | echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 | |
1364 | 1518 | exit 1 |
1365 | 1519 | ;; |
1366 | 1520 | esac |
1376 | 1530 | # will signal an error saying that MANUFACTURER isn't an operating |
1377 | 1531 | # system, and we'll never get to this point. |
1378 | 1532 | |
1379 | case $basic_machine in | |
1380 | score-*) | |
1381 | os=-elf | |
1382 | ;; | |
1383 | spu-*) | |
1384 | os=-elf | |
1533 | case $cpu-$vendor in | |
1534 | score-*) | |
1535 | os=elf | |
1536 | ;; | |
1537 | spu-*) | |
1538 | os=elf | |
1385 | 1539 | ;; |
1386 | 1540 | *-acorn) |
1387 | os=-riscix1.2 | |
1541 | os=riscix1.2 | |
1388 | 1542 | ;; |
1389 | 1543 | arm*-rebel) |
1390 | os=-linux | |
1544 | os=linux | |
1391 | 1545 | ;; |
1392 | 1546 | arm*-semi) |
1393 | os=-aout | |
1394 | ;; | |
1395 | c4x-* | tic4x-*) | |
1396 | os=-coff | |
1547 | os=aout | |
1548 | ;; | |
1549 | c4x-* | tic4x-*) | |
1550 | os=coff | |
1551 | ;; | |
1552 | c8051-*) | |
1553 | os=elf | |
1554 | ;; | |
1555 | clipper-intergraph) | |
1556 | os=clix | |
1557 | ;; | |
1558 | hexagon-*) | |
1559 | os=elf | |
1560 | ;; | |
1561 | tic54x-*) | |
1562 | os=coff | |
1563 | ;; | |
1564 | tic55x-*) | |
1565 | os=coff | |
1566 | ;; | |
1567 | tic6x-*) | |
1568 | os=coff | |
1397 | 1569 | ;; |
1398 | 1570 | # This must come before the *-dec entry. |
1399 | 1571 | pdp10-*) |
1400 | os=-tops20 | |
1572 | os=tops20 | |
1401 | 1573 | ;; |
1402 | 1574 | pdp11-*) |
1403 | os=-none | |
1575 | os=none | |
1404 | 1576 | ;; |
1405 | 1577 | *-dec | vax-*) |
1406 | os=-ultrix4.2 | |
1578 | os=ultrix4.2 | |
1407 | 1579 | ;; |
1408 | 1580 | m68*-apollo) |
1409 | os=-domain | |
1581 | os=domain | |
1410 | 1582 | ;; |
1411 | 1583 | i386-sun) |
1412 | os=-sunos4.0.2 | |
1584 | os=sunos4.0.2 | |
1413 | 1585 | ;; |
1414 | 1586 | m68000-sun) |
1415 | os=-sunos3 | |
1416 | # This also exists in the configure program, but was not the | |
1417 | # default. | |
1418 | # os=-sunos4 | |
1587 | os=sunos3 | |
1419 | 1588 | ;; |
1420 | 1589 | m68*-cisco) |
1421 | os=-aout | |
1422 | ;; | |
1423 | mep-*) | |
1424 | os=-elf | |
1590 | os=aout | |
1591 | ;; | |
1592 | mep-*) | |
1593 | os=elf | |
1425 | 1594 | ;; |
1426 | 1595 | mips*-cisco) |
1427 | os=-elf | |
1596 | os=elf | |
1428 | 1597 | ;; |
1429 | 1598 | mips*-*) |
1430 | os=-elf | |
1599 | os=elf | |
1431 | 1600 | ;; |
1432 | 1601 | or32-*) |
1433 | os=-coff | |
1602 | os=coff | |
1434 | 1603 | ;; |
1435 | 1604 | *-tti) # must be before sparc entry or we get the wrong os. |
1436 | os=-sysv3 | |
1605 | os=sysv3 | |
1437 | 1606 | ;; |
1438 | 1607 | sparc-* | *-sun) |
1439 | os=-sunos4.1.1 | |
1608 | os=sunos4.1.1 | |
1609 | ;; | |
1610 | pru-*) | |
1611 | os=elf | |
1440 | 1612 | ;; |
1441 | 1613 | *-be) |
1442 | os=-beos | |
1443 | ;; | |
1444 | *-haiku) | |
1445 | os=-haiku | |
1614 | os=beos | |
1446 | 1615 | ;; |
1447 | 1616 | *-ibm) |
1448 | os=-aix | |
1449 | ;; | |
1450 | *-knuth) | |
1451 | os=-mmixware | |
1617 | os=aix | |
1618 | ;; | |
1619 | *-knuth) | |
1620 | os=mmixware | |
1452 | 1621 | ;; |
1453 | 1622 | *-wec) |
1454 | os=-proelf | |
1623 | os=proelf | |
1455 | 1624 | ;; |
1456 | 1625 | *-winbond) |
1457 | os=-proelf | |
1626 | os=proelf | |
1458 | 1627 | ;; |
1459 | 1628 | *-oki) |
1460 | os=-proelf | |
1629 | os=proelf | |
1461 | 1630 | ;; |
1462 | 1631 | *-hp) |
1463 | os=-hpux | |
1632 | os=hpux | |
1464 | 1633 | ;; |
1465 | 1634 | *-hitachi) |
1466 | os=-hiux | |
1635 | os=hiux | |
1467 | 1636 | ;; |
1468 | 1637 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
1469 | os=-sysv | |
1638 | os=sysv | |
1470 | 1639 | ;; |
1471 | 1640 | *-cbm) |
1472 | os=-amigaos | |
1641 | os=amigaos | |
1473 | 1642 | ;; |
1474 | 1643 | *-dg) |
1475 | os=-dgux | |
1644 | os=dgux | |
1476 | 1645 | ;; |
1477 | 1646 | *-dolphin) |
1478 | os=-sysv3 | |
1647 | os=sysv3 | |
1479 | 1648 | ;; |
1480 | 1649 | m68k-ccur) |
1481 | os=-rtu | |
1650 | os=rtu | |
1482 | 1651 | ;; |
1483 | 1652 | m88k-omron*) |
1484 | os=-luna | |
1485 | ;; | |
1486 | *-next ) | |
1487 | os=-nextstep | |
1653 | os=luna | |
1654 | ;; | |
1655 | *-next) | |
1656 | os=nextstep | |
1488 | 1657 | ;; |
1489 | 1658 | *-sequent) |
1490 | os=-ptx | |
1659 | os=ptx | |
1491 | 1660 | ;; |
1492 | 1661 | *-crds) |
1493 | os=-unos | |
1662 | os=unos | |
1494 | 1663 | ;; |
1495 | 1664 | *-ns) |
1496 | os=-genix | |
1665 | os=genix | |
1497 | 1666 | ;; |
1498 | 1667 | i370-*) |
1499 | os=-mvs | |
1500 | ;; | |
1501 | *-next) | |
1502 | os=-nextstep3 | |
1668 | os=mvs | |
1503 | 1669 | ;; |
1504 | 1670 | *-gould) |
1505 | os=-sysv | |
1671 | os=sysv | |
1506 | 1672 | ;; |
1507 | 1673 | *-highlevel) |
1508 | os=-bsd | |
1674 | os=bsd | |
1509 | 1675 | ;; |
1510 | 1676 | *-encore) |
1511 | os=-bsd | |
1677 | os=bsd | |
1512 | 1678 | ;; |
1513 | 1679 | *-sgi) |
1514 | os=-irix | |
1680 | os=irix | |
1515 | 1681 | ;; |
1516 | 1682 | *-siemens) |
1517 | os=-sysv4 | |
1683 | os=sysv4 | |
1518 | 1684 | ;; |
1519 | 1685 | *-masscomp) |
1520 | os=-rtu | |
1686 | os=rtu | |
1521 | 1687 | ;; |
1522 | 1688 | f30[01]-fujitsu | f700-fujitsu) |
1523 | os=-uxpv | |
1689 | os=uxpv | |
1524 | 1690 | ;; |
1525 | 1691 | *-rom68k) |
1526 | os=-coff | |
1692 | os=coff | |
1527 | 1693 | ;; |
1528 | 1694 | *-*bug) |
1529 | os=-coff | |
1695 | os=coff | |
1530 | 1696 | ;; |
1531 | 1697 | *-apple) |
1532 | os=-macos | |
1698 | os=macos | |
1533 | 1699 | ;; |
1534 | 1700 | *-atari*) |
1535 | os=-mint | |
1701 | os=mint | |
1702 | ;; | |
1703 | *-wrs) | |
1704 | os=vxworks | |
1536 | 1705 | ;; |
1537 | 1706 | *) |
1538 | os=-none | |
1707 | os=none | |
1539 | 1708 | ;; |
1540 | 1709 | esac |
1541 | 1710 | fi |
1542 | 1711 | |
1543 | 1712 | # Here we handle the case where we know the os, and the CPU type, but not the |
1544 | 1713 | # manufacturer. We pick the logical manufacturer. |
1545 | vendor=unknown | |
1546 | case $basic_machine in | |
1547 | *-unknown) | |
1714 | case $vendor in | |
1715 | unknown) | |
1548 | 1716 | case $os in |
1549 | -riscix*) | |
1717 | riscix*) | |
1550 | 1718 | vendor=acorn |
1551 | 1719 | ;; |
1552 | -sunos*) | |
1720 | sunos*) | |
1553 | 1721 | vendor=sun |
1554 | 1722 | ;; |
1555 | -aix*) | |
1723 | cnk*|-aix*) | |
1556 | 1724 | vendor=ibm |
1557 | 1725 | ;; |
1558 | -beos*) | |
1726 | beos*) | |
1559 | 1727 | vendor=be |
1560 | 1728 | ;; |
1561 | -hpux*) | |
1729 | hpux*) | |
1562 | 1730 | vendor=hp |
1563 | 1731 | ;; |
1564 | -mpeix*) | |
1732 | mpeix*) | |
1565 | 1733 | vendor=hp |
1566 | 1734 | ;; |
1567 | -hiux*) | |
1735 | hiux*) | |
1568 | 1736 | vendor=hitachi |
1569 | 1737 | ;; |
1570 | -unos*) | |
1738 | unos*) | |
1571 | 1739 | vendor=crds |
1572 | 1740 | ;; |
1573 | -dgux*) | |
1741 | dgux*) | |
1574 | 1742 | vendor=dg |
1575 | 1743 | ;; |
1576 | -luna*) | |
1744 | luna*) | |
1577 | 1745 | vendor=omron |
1578 | 1746 | ;; |
1579 | -genix*) | |
1747 | genix*) | |
1580 | 1748 | vendor=ns |
1581 | 1749 | ;; |
1582 | -mvs* | -opened*) | |
1750 | clix*) | |
1751 | vendor=intergraph | |
1752 | ;; | |
1753 | mvs* | opened*) | |
1583 | 1754 | vendor=ibm |
1584 | 1755 | ;; |
1585 | -os400*) | |
1756 | os400*) | |
1586 | 1757 | vendor=ibm |
1587 | 1758 | ;; |
1588 | -ptx*) | |
1759 | ptx*) | |
1589 | 1760 | vendor=sequent |
1590 | 1761 | ;; |
1591 | -tpf*) | |
1762 | tpf*) | |
1592 | 1763 | vendor=ibm |
1593 | 1764 | ;; |
1594 | -vxsim* | -vxworks* | -windiss*) | |
1765 | vxsim* | vxworks* | windiss*) | |
1595 | 1766 | vendor=wrs |
1596 | 1767 | ;; |
1597 | -aux*) | |
1768 | aux*) | |
1598 | 1769 | vendor=apple |
1599 | 1770 | ;; |
1600 | -hms*) | |
1771 | hms*) | |
1601 | 1772 | vendor=hitachi |
1602 | 1773 | ;; |
1603 | -mpw* | -macos*) | |
1774 | mpw* | macos*) | |
1604 | 1775 | vendor=apple |
1605 | 1776 | ;; |
1606 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
1777 | *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) | |
1607 | 1778 | vendor=atari |
1608 | 1779 | ;; |
1609 | -vos*) | |
1780 | vos*) | |
1610 | 1781 | vendor=stratus |
1611 | 1782 | ;; |
1612 | 1783 | esac |
1613 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
1614 | 1784 | ;; |
1615 | 1785 | esac |
1616 | 1786 | |
1617 | echo $basic_machine$os | |
1787 | echo "$cpu-$vendor-$os" | |
1618 | 1788 | exit |
1619 | 1789 | |
1620 | 1790 | # Local variables: |
1621 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
1791 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
1622 | 1792 | # time-stamp-start: "timestamp='" |
1623 | 1793 | # time-stamp-format: "%:y-%02m-%02d" |
1624 | 1794 | # time-stamp-end: "'" |
871 | 871 | docdir |
872 | 872 | oldincludedir |
873 | 873 | includedir |
874 | runstatedir | |
874 | 875 | localstatedir |
875 | 876 | sharedstatedir |
876 | 877 | sysconfdir |
958 | 959 | sysconfdir='${prefix}/etc' |
959 | 960 | sharedstatedir='${prefix}/com' |
960 | 961 | localstatedir='${prefix}/var' |
962 | runstatedir='${localstatedir}/run' | |
961 | 963 | includedir='${prefix}/include' |
962 | 964 | oldincludedir='/usr/include' |
963 | 965 | docdir='${datarootdir}/doc/${PACKAGE}' |
1210 | 1212 | | -silent | --silent | --silen | --sile | --sil) |
1211 | 1213 | silent=yes ;; |
1212 | 1214 | |
1215 | -runstatedir | --runstatedir | --runstatedi | --runstated \ | |
1216 | | --runstate | --runstat | --runsta | --runst | --runs \ | |
1217 | | --run | --ru | --r) | |
1218 | ac_prev=runstatedir ;; | |
1219 | -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | |
1220 | | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | |
1221 | | --run=* | --ru=* | --r=*) | |
1222 | runstatedir=$ac_optarg ;; | |
1223 | ||
1213 | 1224 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
1214 | 1225 | ac_prev=sbindir ;; |
1215 | 1226 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
1347 | 1358 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ |
1348 | 1359 | datadir sysconfdir sharedstatedir localstatedir includedir \ |
1349 | 1360 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ |
1350 | libdir localedir mandir | |
1361 | libdir localedir mandir runstatedir | |
1351 | 1362 | do |
1352 | 1363 | eval ac_val=\$$ac_var |
1353 | 1364 | # Remove trailing slashes. |
1500 | 1511 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] |
1501 | 1512 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
1502 | 1513 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
1514 | --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] | |
1503 | 1515 | --libdir=DIR object code libraries [EPREFIX/lib] |
1504 | 1516 | --includedir=DIR C header files [PREFIX/include] |
1505 | 1517 | --oldincludedir=DIR C header files for non-gcc [/usr/include] |
4769 | 4781 | else |
4770 | 4782 | lt_cv_nm_interface="BSD nm" |
4771 | 4783 | echo "int some_variable = 0;" > conftest.$ac_ext |
4772 | (eval echo "\"\$as_me:4773: $ac_compile\"" >&5) | |
4784 | (eval echo "\"\$as_me:4785: $ac_compile\"" >&5) | |
4773 | 4785 | (eval "$ac_compile" 2>conftest.err) |
4774 | 4786 | cat conftest.err >&5 |
4775 | (eval echo "\"\$as_me:4776: $NM \\\"conftest.$ac_objext\\\"\"" >&5) | |
4787 | (eval echo "\"\$as_me:4788: $NM \\\"conftest.$ac_objext\\\"\"" >&5) | |
4776 | 4788 | (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) |
4777 | 4789 | cat conftest.err >&5 |
4778 | (eval echo "\"\$as_me:4779: output\"" >&5) | |
4790 | (eval echo "\"\$as_me:4791: output\"" >&5) | |
4779 | 4791 | cat conftest.out >&5 |
4780 | 4792 | if $GREP 'External.*some_variable' conftest.out > /dev/null; then |
4781 | 4793 | lt_cv_nm_interface="MS dumpbin" |
5981 | 5993 | ;; |
5982 | 5994 | *-*-irix6*) |
5983 | 5995 | # Find out which ABI we are using. |
5984 | echo '#line 5985 "configure"' > conftest.$ac_ext | |
5996 | echo '#line 5997 "configure"' > conftest.$ac_ext | |
5985 | 5997 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
5986 | 5998 | (eval $ac_compile) 2>&5 |
5987 | 5999 | ac_status=$? |
7506 | 7518 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
7507 | 7519 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
7508 | 7520 | -e 's:$: $lt_compiler_flag:'` |
7509 | (eval echo "\"\$as_me:7510: $lt_compile\"" >&5) | |
7521 | (eval echo "\"\$as_me:7522: $lt_compile\"" >&5) | |
7510 | 7522 | (eval "$lt_compile" 2>conftest.err) |
7511 | 7523 | ac_status=$? |
7512 | 7524 | cat conftest.err >&5 |
7513 | echo "$as_me:7514: \$? = $ac_status" >&5 | |
7525 | echo "$as_me:7526: \$? = $ac_status" >&5 | |
7514 | 7526 | if (exit $ac_status) && test -s "$ac_outfile"; then |
7515 | 7527 | # The compiler can only warn and ignore the option if not recognized |
7516 | 7528 | # So say no if there are warnings other than the usual output. |
7845 | 7857 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
7846 | 7858 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
7847 | 7859 | -e 's:$: $lt_compiler_flag:'` |
7848 | (eval echo "\"\$as_me:7849: $lt_compile\"" >&5) | |
7860 | (eval echo "\"\$as_me:7861: $lt_compile\"" >&5) | |
7849 | 7861 | (eval "$lt_compile" 2>conftest.err) |
7850 | 7862 | ac_status=$? |
7851 | 7863 | cat conftest.err >&5 |
7852 | echo "$as_me:7853: \$? = $ac_status" >&5 | |
7864 | echo "$as_me:7865: \$? = $ac_status" >&5 | |
7853 | 7865 | if (exit $ac_status) && test -s "$ac_outfile"; then |
7854 | 7866 | # The compiler can only warn and ignore the option if not recognized |
7855 | 7867 | # So say no if there are warnings other than the usual output. |
7950 | 7962 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
7951 | 7963 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
7952 | 7964 | -e 's:$: $lt_compiler_flag:'` |
7953 | (eval echo "\"\$as_me:7954: $lt_compile\"" >&5) | |
7965 | (eval echo "\"\$as_me:7966: $lt_compile\"" >&5) | |
7954 | 7966 | (eval "$lt_compile" 2>out/conftest.err) |
7955 | 7967 | ac_status=$? |
7956 | 7968 | cat out/conftest.err >&5 |
7957 | echo "$as_me:7958: \$? = $ac_status" >&5 | |
7969 | echo "$as_me:7970: \$? = $ac_status" >&5 | |
7958 | 7970 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
7959 | 7971 | then |
7960 | 7972 | # The compiler can only warn and ignore the option if not recognized |
8005 | 8017 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
8006 | 8018 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
8007 | 8019 | -e 's:$: $lt_compiler_flag:'` |
8008 | (eval echo "\"\$as_me:8009: $lt_compile\"" >&5) | |
8020 | (eval echo "\"\$as_me:8021: $lt_compile\"" >&5) | |
8009 | 8021 | (eval "$lt_compile" 2>out/conftest.err) |
8010 | 8022 | ac_status=$? |
8011 | 8023 | cat out/conftest.err >&5 |
8012 | echo "$as_me:8013: \$? = $ac_status" >&5 | |
8024 | echo "$as_me:8025: \$? = $ac_status" >&5 | |
8013 | 8025 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
8014 | 8026 | then |
8015 | 8027 | # The compiler can only warn and ignore the option if not recognized |
10388 | 10400 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
10389 | 10401 | lt_status=$lt_dlunknown |
10390 | 10402 | cat > conftest.$ac_ext <<_LT_EOF |
10391 | #line 10392 "configure" | |
10403 | #line 10404 "configure" | |
10392 | 10404 | #include "confdefs.h" |
10393 | 10405 | |
10394 | 10406 | #if HAVE_DLFCN_H |
10484 | 10496 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
10485 | 10497 | lt_status=$lt_dlunknown |
10486 | 10498 | cat > conftest.$ac_ext <<_LT_EOF |
10487 | #line 10488 "configure" | |
10499 | #line 10500 "configure" | |
10488 | 10500 | #include "confdefs.h" |
10489 | 10501 | |
10490 | 10502 | #if HAVE_DLFCN_H |
10891 | 10903 | if (*(data + i) != *(data3 + i)) |
10892 | 10904 | return 14; |
10893 | 10905 | close (fd); |
10906 | free (data); | |
10907 | free (data3); | |
10894 | 10908 | return 0; |
10895 | 10909 | } |
10896 | 10910 | _ACEOF |
13584 | 13598 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
13585 | 13599 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
13586 | 13600 | -e 's:$: $lt_compiler_flag:'` |
13587 | (eval echo "\"\$as_me:13588: $lt_compile\"" >&5) | |
13601 | (eval echo "\"\$as_me:13602: $lt_compile\"" >&5) | |
13588 | 13602 | (eval "$lt_compile" 2>conftest.err) |
13589 | 13603 | ac_status=$? |
13590 | 13604 | cat conftest.err >&5 |
13591 | echo "$as_me:13592: \$? = $ac_status" >&5 | |
13605 | echo "$as_me:13606: \$? = $ac_status" >&5 | |
13592 | 13606 | if (exit $ac_status) && test -s "$ac_outfile"; then |
13593 | 13607 | # The compiler can only warn and ignore the option if not recognized |
13594 | 13608 | # So say no if there are warnings other than the usual output. |
13683 | 13697 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
13684 | 13698 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
13685 | 13699 | -e 's:$: $lt_compiler_flag:'` |
13686 | (eval echo "\"\$as_me:13687: $lt_compile\"" >&5) | |
13700 | (eval echo "\"\$as_me:13701: $lt_compile\"" >&5) | |
13687 | 13701 | (eval "$lt_compile" 2>out/conftest.err) |
13688 | 13702 | ac_status=$? |
13689 | 13703 | cat out/conftest.err >&5 |
13690 | echo "$as_me:13691: \$? = $ac_status" >&5 | |
13704 | echo "$as_me:13705: \$? = $ac_status" >&5 | |
13691 | 13705 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
13692 | 13706 | then |
13693 | 13707 | # The compiler can only warn and ignore the option if not recognized |
13735 | 13749 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
13736 | 13750 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
13737 | 13751 | -e 's:$: $lt_compiler_flag:'` |
13738 | (eval echo "\"\$as_me:13739: $lt_compile\"" >&5) | |
13752 | (eval echo "\"\$as_me:13753: $lt_compile\"" >&5) | |
13739 | 13753 | (eval "$lt_compile" 2>out/conftest.err) |
13740 | 13754 | ac_status=$? |
13741 | 13755 | cat out/conftest.err >&5 |
13742 | echo "$as_me:13743: \$? = $ac_status" >&5 | |
13756 | echo "$as_me:13757: \$? = $ac_status" >&5 | |
13743 | 13757 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
13744 | 13758 | then |
13745 | 13759 | # The compiler can only warn and ignore the option if not recognized |
0 | 0 | #include <getopt.h> |
1 | 1 | #include <iostream> |
2 | #include <cstdlib> | |
3 | #include <cstring> | |
4 | 2 | #include "mm.h" |
5 | 3 | #include "cmdline.h" |
6 | 4 |
12 | 12 | "abcdefghijklmnopqrstuvwxyz" |
13 | 13 | "0123456789+/="; |
14 | 14 | |
15 | const char Base64::sDecTable[] = { | |
15 | const signed char Base64::sDecTable[] = { | |
16 | 16 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1, |
17 | 17 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1, |
18 | 18 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1, |
19 | 19 | enum { default_maxlen = 76 }; |
20 | 20 | enum { eq_sign = 100 }; |
21 | 21 | static const char sEncTable[]; |
22 | static const char sDecTable[]; | |
22 | static const signed char sDecTable[]; | |
23 | 23 | static const int sDecTableSz; |
24 | 24 | public: |
25 | 25 | class Encoder; class Decoder; |
80 | 80 | */ |
81 | 81 | struct Lf2CrLf: public unbuffered_codec, public chainable_codec<Lf2CrLf> |
82 | 82 | { |
83 | Lf2CrLf() | |
84 | : m_prev('\0') | |
85 | { | |
86 | } | |
83 | 87 | template<typename OutIt> |
84 | 88 | void process(char c, OutIt& out) |
85 | 89 | { |
86 | 90 | enum { LF = 0xA, CR = 0xD }; |
87 | if(c == LF) | |
91 | if(c == LF && m_prev != CR) | |
88 | 92 | { |
89 | 93 | *out = CR; ++out; |
90 | 94 | *out = LF; ++out; |
91 | } else | |
95 | } else { | |
92 | 96 | *out = c; ++out; |
97 | } | |
98 | m_prev = c; | |
93 | 99 | } |
94 | 100 | const char* name() const |
95 | 101 | { |
96 | 102 | return "Lf2CrLf"; |
97 | 103 | } |
104 | private: | |
105 | char m_prev; | |
98 | 106 | }; |
99 | 107 | |
100 | 108 | /// Inserts a new line if the input line is too long |
53 | 53 | * Parse istream and build entity based on content |
54 | 54 | */ |
55 | 55 | MimeEntity(std::istream&); |
56 | ||
57 | MimeEntity(const MimeEntity&) = delete; | |
58 | MimeEntity& operator=(const MimeEntity&) = delete; | |
56 | 59 | |
57 | 60 | virtual ~MimeEntity(); |
58 | 61 |
56 | 56 | bool MMFile::map() |
57 | 57 | { |
58 | 58 | m_beg = (char*) mmap(0, m_st.st_size, PROT_READ, MAP_SHARED,m_fd,0); |
59 | if(m_beg > 0) | |
59 | if(m_beg != MAP_FAILED) | |
60 | 60 | { |
61 | 61 | m_end = m_beg + m_st.st_size; |
62 | 62 | #if HAVE_MADVISE |
717 | 717 | if(block_sz) |
718 | 718 | { |
719 | 719 | Iterator p = base + block_sz; |
720 | char a = *--p, b = *--p; | |
721 | if(isnl(a,b)) | |
720 | char a = *--p; | |
721 | if(block_sz>=2 && isnl(a,*--p)) | |
722 | 722 | block_sz -= 2; |
723 | 723 | else if(isnl(a)) |
724 | 724 | block_sz--; |
56 | 56 | blanks = 0; |
57 | 57 | } else if(*p == ' ') { |
58 | 58 | blanks++; |
59 | } else if(p != text.end()-1 && *p == '\\' && *(p+1) == '"') { | |
60 | p++; | |
59 | 61 | } |
60 | 62 | } |
61 | 63 | if( (p-beg) != blanks)// not a only-blanks-string |
95 | 95 | } |
96 | 96 | } |
97 | 97 | // trailing ';' missing |
98 | push_back(Mailbox(string(start, p-1))); | |
98 | if(start <= (p-1)) | |
99 | push_back(Mailbox(string(start, p-1))); | |
99 | 100 | } |
100 | 101 | |
101 | 102 | string Group::name(int bCanonical) const |
39 | 39 | { |
40 | 40 | rs = m_label + " <"; |
41 | 41 | if(hasRoute) |
42 | rs = m_route+ ":"; | |
42 | rs += m_route+ ":"; | |
43 | 43 | } |
44 | 44 | |
45 | 45 | rs += m_mailbox + "@" + m_domain; |
60 | 60 | // the string::erase or/and we cannot cache begin() end() |
61 | 61 | |
62 | 62 | int t = input.length() -1; |
63 | if(input[t] == '>') | |
63 | while(t && input[t] == ' ') | |
64 | t--; | |
65 | ||
66 | if(t > 0 && input[t] == '>') | |
64 | 67 | { |
65 | 68 | bool in_dquote = false, in_comment = false; |
66 | 69 | int endoff = t - 1; |
23 | 23 | idx++; |
24 | 24 | if(idx) |
25 | 25 | input.erase(0, idx); |
26 | ||
27 | if(input.empty()) | |
28 | return input; | |
29 | ||
26 | 30 | // removes trailing spaces |
27 | 31 | idx = input.length() - 1; |
28 | 32 | while(input[idx] == ' ') |
29 | 33 | idx--; |
30 | input.erase(idx, input.length() - ++idx); | |
34 | input.erase(1 + idx, string::npos); | |
31 | 35 | // removes rfc822 comments and non-required spaces |
32 | 36 | bool in_dquote = false, has_brack = false; |
33 | 37 | int in_par = 0, in_brack = 0, par_last; |
14 | 14 | |
15 | 15 | void test_codec::one() |
16 | 16 | { |
17 | ToUpperCase tue; | |
18 | MaxLineLen mll(44); | |
19 | Base64::Encoder b64e; | |
20 | QP::Encoder qpe; | |
21 | 17 | Base64::Decoder b64d; |
22 | 18 | string o; |
23 | 19 | string s("YWJjZGUBZmdoaQJsbW5vA3BxcgRzdHUFdno="); |
24 | 20 | code(s.begin(),s.end(), b64d , back_inserter(o)); |
25 | 21 | } |
26 | 22 | |
23 | void test_codec::lf2crlf() | |
24 | { | |
25 | Lf2CrLf l2cl; | |
26 | string src("a\nb\r\nc\n\n"); | |
27 | string exp("a\r\nb\r\nc\r\n\r\n"); | |
28 | string got; | |
29 | code(src.begin(), src.end(), l2cl , back_inserter(got)); | |
30 | TEST_ASSERT_EQUALS_P(exp, got); | |
27 | 31 | } |
32 | ||
33 | void test_codec::toUpper() | |
34 | { | |
35 | ToUpperCase tue; | |
36 | string src("abc=\n"); | |
37 | string exp("ABC=\n"); | |
38 | string got; | |
39 | code(src.begin(), src.end(), tue , back_inserter(got)); | |
40 | TEST_ASSERT_EQUALS_P(exp, got); | |
41 | } | |
42 | ||
43 | void test_codec::toLower() | |
44 | { | |
45 | ToLowerCase tle; | |
46 | string src("ABC=\n"); | |
47 | string exp("abc=\n"); | |
48 | string got; | |
49 | code(src.begin(), src.end(), tle , back_inserter(got)); | |
50 | TEST_ASSERT_EQUALS_P(exp, got); | |
51 | } | |
52 | ||
53 | void test_codec::maxLine() | |
54 | { | |
55 | MaxLineLen mll(4); | |
56 | string src("abcdefghij"); | |
57 | string exp("abcd\r\nefgh\r\nij"); | |
58 | string got; | |
59 | code(src.begin(), src.end(), mll , back_inserter(got)); | |
60 | TEST_ASSERT_EQUALS_P(exp, got); | |
61 | } | |
62 | ||
63 | } |
9 | 9 | struct TEST_CLASS( test_codec ) |
10 | 10 | { |
11 | 11 | void TEST_FUNCTION( one ); |
12 | void TEST_FUNCTION( lf2crlf ); | |
13 | void TEST_FUNCTION( toUpper ); | |
14 | void TEST_FUNCTION( toLower); | |
15 | void TEST_FUNCTION( maxLine ); | |
12 | 16 | }; |
13 | 17 | |
14 | 18 | } |
83 | 83 | { "<e(boom). (boo)d@mail.com>", "e.d", "mail.com", "", "" }, |
84 | 84 | { "Bella Ragga <e(boom). (boo)d@mail.com>", "e.d", |
85 | 85 | "mail.com", "Bella Ragga", "" }, |
86 | { "<e@mail.com> ", "e", "mail.com", "", "" }, | |
86 | 87 | { 0,0,0,0,0 } |
87 | 88 | }; |
88 | 89 | // test parser |
153 | 154 | b.set("group label: ;"); |
154 | 155 | TEST_ASSERT(b.isGroup()); |
155 | 156 | |
157 | b.set("undisclosed-recipient:"); | |
158 | TEST_ASSERT(b.isGroup()); | |
159 | ||
160 | } | |
161 | ||
162 | void testRfc822::testAddressList() | |
163 | { | |
164 | const char* str1 = "\"rcpt1\" <rcpt1@mail.com>"; | |
165 | const char* str2 = "\"\\\"rcpt2, abc\\\"\" <rcpt2@mail.com>"; | |
166 | const char* str3 = "rcpt3 <rcpt3@mail.com>"; | |
167 | const char* delimiter = ","; | |
168 | ||
169 | AddressList aList(string(str1) + delimiter + str2 + delimiter + str3); | |
170 | /* | |
171 | AddressList::const_iterator bit(aList.begin()), eit(aList.end()); | |
172 | for(; bit != eit; ++bit) | |
173 | { | |
174 | cout << *bit << endl; | |
175 | } | |
176 | */ | |
177 | TEST_ASSERT_EQUALS_P(aList.size(), 3); | |
156 | 178 | } |
157 | 179 | |
158 | 180 |