Codebase list libass / 91e65af
Import upstream version 0.15.2+git20210915.1.6409945 Debian Janitor 2 years ago
16 changed file(s) with 2517 addition(s) and 2583 deletion(s). Raw diff Collapse all Expand all
00 ACLOCAL_AMFLAGS = -I m4
1 EXTRA_DIST = libass.pc.in Changelog
1 EXTRA_DIST = libass.pc.in Changelog ltnasm.sh
22
33 pkgconfigdir = $(libdir)/pkgconfig
44 pkgconfig_DATA = libass.pc
371371 top_builddir = @top_builddir@
372372 top_srcdir = @top_srcdir@
373373 ACLOCAL_AMFLAGS = -I m4
374 EXTRA_DIST = libass.pc.in Changelog
374 EXTRA_DIST = libass.pc.in Changelog ltnasm.sh
375375 pkgconfigdir = $(libdir)/pkgconfig
376376 pkgconfig_DATA = libass.pc
377377 @ENABLE_TEST_TRUE@test = test
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
2 # Copyright 1992-2021 Free Software Foundation, Inc.
3
4 # shellcheck disable=SC2006,SC2268 # see below for rationale
5
6 timestamp='2021-06-03'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-24'
75
86 # This file is free software; you can redistribute it and/or modify it
97 # under the terms of the GNU General Public License as published by
2826 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
2927 #
3028 # You can get the latest version of this script from:
31 # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
29 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
3230 #
3331 # Please send patches to <config-patches@gnu.org>.
34
35
36 # The "shellcheck disable" line above the timestamp inhibits complaints
37 # about features and limitations of the classic Bourne shell that were
38 # superseded or lifted in POSIX. However, this script identifies a wide
39 # variety of pre-POSIX systems that do not have POSIX shells at all, and
40 # even some reasonably current systems (Solaris 10 as case-in-point) still
41 # have a pre-POSIX /bin/sh.
4232
4333
4434 me=`echo "$0" | sed -e 's,.*/,,'`
5949 GNU config.guess ($timestamp)
6050
6151 Originally written by Per Bothner.
62 Copyright 1992-2021 Free Software Foundation, Inc.
52 Copyright 1992-2018 Free Software Foundation, Inc.
6353
6454 This is free software; see the source for copying conditions. There is NO
6555 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
9383 exit 1
9484 fi
9585
96 # Just in case it came from the environment.
97 GUESS=
86 trap 'exit 1' 1 2 15
9887
9988 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
10089 # compiler to aid in system detection is discouraged as it requires
10695
10796 # Portable tmp directory creation inspired by the Autoconf team.
10897
109 tmp=
110 # shellcheck disable=SC2172
111 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
112
113 set_cc_for_build() {
114 # prevent multiple calls if $tmp is already set
115 test "$tmp" && return 0
116 : "${TMPDIR=/tmp}"
117 # shellcheck disable=SC2039,SC3028
118 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
119 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
120 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
121 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
122 dummy=$tmp/dummy
123 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
124 ,,) echo "int x;" > "$dummy.c"
125 for driver in cc gcc c89 c99 ; do
126 if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
127 CC_FOR_BUILD=$driver
128 break
129 fi
130 done
131 if test x"$CC_FOR_BUILD" = x ; then
132 CC_FOR_BUILD=no_compiler_found
133 fi
134 ;;
135 ,,*) CC_FOR_BUILD=$CC ;;
136 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
137 esac
138 }
98 set_cc_for_build='
99 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
100 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
101 : ${TMPDIR=/tmp} ;
102 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
103 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
104 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
105 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
106 dummy=$tmp/dummy ;
107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > "$dummy.c" ;
110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
112 CC_FOR_BUILD="$c"; break ;
113 fi ;
114 done ;
115 if test x"$CC_FOR_BUILD" = x ; then
116 CC_FOR_BUILD=no_compiler_found ;
117 fi
118 ;;
119 ,,*) CC_FOR_BUILD=$CC ;;
120 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
121 esac ; set_cc_for_build= ;'
139122
140123 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
141124 # (ghazi@noc.rutgers.edu 1994-08-24)
142 if test -f /.attbin/uname ; then
125 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
143126 PATH=$PATH:/.attbin ; export PATH
144127 fi
145128
146129 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
147130 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
148 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
149132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
150133
151 case $UNAME_SYSTEM in
134 case "$UNAME_SYSTEM" in
152135 Linux|GNU|GNU/*)
153 LIBC=unknown
154
155 set_cc_for_build
136 # If the system lacks a compiler, then just pick glibc.
137 # We could probably try harder.
138 LIBC=gnu
139
140 eval "$set_cc_for_build"
156141 cat <<-EOF > "$dummy.c"
157142 #include <features.h>
158143 #if defined(__UCLIBC__)
159144 LIBC=uclibc
160145 #elif defined(__dietlibc__)
161146 LIBC=dietlibc
162 #elif defined(__GLIBC__)
147 #else
163148 LIBC=gnu
164 #else
165 #include <stdarg.h>
166 /* First heuristic to detect musl libc. */
167 #ifdef __DEFINED_va_list
168 LIBC=musl
169 #endif
170149 #endif
171150 EOF
172 cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
173 eval "$cc_set_libc"
174
175 # Second heuristic to detect musl libc.
176 if [ "$LIBC" = unknown ] &&
177 command -v ldd >/dev/null &&
178 ldd --version 2>&1 | grep -q ^musl; then
179 LIBC=musl
180 fi
181
182 # If the system lacks a compiler, then just pick glibc.
183 # We could probably try harder.
184 if [ "$LIBC" = unknown ]; then
185 LIBC=gnu
151 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
152
153 # If ldd exists, use it to detect musl libc.
154 if command -v ldd >/dev/null && \
155 ldd --version 2>&1 | grep -q ^musl
156 then
157 LIBC=musl
186158 fi
187159 ;;
188160 esac
189161
190162 # Note: order is significant - the case branches are not exclusive.
191163
192 case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
164 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
193165 *:NetBSD:*:*)
194166 # NetBSD (nbsd) targets should (where applicable) match one or
195167 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
201173 #
202174 # Note: NetBSD doesn't particularly care about the vendor
203175 # portion of the name. We always set it to "unknown".
176 sysctl="sysctl -n hw.machine_arch"
204177 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
205 /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
206 /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
178 "/sbin/$sysctl" 2>/dev/null || \
179 "/usr/sbin/$sysctl" 2>/dev/null || \
207180 echo unknown)`
208 case $UNAME_MACHINE_ARCH in
209 aarch64eb) machine=aarch64_be-unknown ;;
181 case "$UNAME_MACHINE_ARCH" in
210182 armeb) machine=armeb-unknown ;;
211183 arm*) machine=arm-unknown ;;
212184 sh3el) machine=shl-unknown ;;
215187 earmv*)
216188 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
217189 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
218 machine=${arch}${endian}-unknown
190 machine="${arch}${endian}"-unknown
219191 ;;
220 *) machine=$UNAME_MACHINE_ARCH-unknown ;;
192 *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
221193 esac
222194 # The Operating System including object format, if it has switched
223195 # to ELF recently (or will in the future) and ABI.
224 case $UNAME_MACHINE_ARCH in
196 case "$UNAME_MACHINE_ARCH" in
225197 earm*)
226198 os=netbsdelf
227199 ;;
228200 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
229 set_cc_for_build
201 eval "$set_cc_for_build"
230202 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
231203 | grep -q __ELF__
232204 then
242214 ;;
243215 esac
244216 # Determine ABI tags.
245 case $UNAME_MACHINE_ARCH in
217 case "$UNAME_MACHINE_ARCH" in
246218 earm*)
247219 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
248220 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
253225 # thus, need a distinct triplet. However, they do not need
254226 # kernel version information, so it can be replaced with a
255227 # suitable tag, in the style of linux-gnu.
256 case $UNAME_VERSION in
228 case "$UNAME_VERSION" in
257229 Debian*)
258230 release='-gnu'
259231 ;;
264236 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
265237 # contains redundant information, the shorter form:
266238 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
267 GUESS=$machine-${os}${release}${abi-}
268 ;;
239 echo "$machine-${os}${release}${abi}"
240 exit ;;
269241 *:Bitrig:*:*)
270242 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
271 GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
272 ;;
243 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
244 exit ;;
273245 *:OpenBSD:*:*)
274246 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
275 GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
276 ;;
277 *:SecBSD:*:*)
278 UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
279 GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
280 ;;
247 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
248 exit ;;
281249 *:LibertyBSD:*:*)
282250 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
283 GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
284 ;;
251 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
252 exit ;;
285253 *:MidnightBSD:*:*)
286 GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
287 ;;
254 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
255 exit ;;
288256 *:ekkoBSD:*:*)
289 GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
290 ;;
257 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
258 exit ;;
291259 *:SolidBSD:*:*)
292 GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
293 ;;
294 *:OS108:*:*)
295 GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
296 ;;
260 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
261 exit ;;
297262 macppc:MirBSD:*:*)
298 GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
299 ;;
263 echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
264 exit ;;
300265 *:MirBSD:*:*)
301 GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
302 ;;
266 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
267 exit ;;
303268 *:Sortix:*:*)
304 GUESS=$UNAME_MACHINE-unknown-sortix
305 ;;
306 *:Twizzler:*:*)
307 GUESS=$UNAME_MACHINE-unknown-twizzler
308 ;;
269 echo "$UNAME_MACHINE"-unknown-sortix
270 exit ;;
309271 *:Redox:*:*)
310 GUESS=$UNAME_MACHINE-unknown-redox
311 ;;
272 echo "$UNAME_MACHINE"-unknown-redox
273 exit ;;
312274 mips:OSF1:*.*)
313 GUESS=mips-dec-osf1
314 ;;
275 echo mips-dec-osf1
276 exit ;;
315277 alpha:OSF1:*:*)
316 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
317 trap '' 0
318278 case $UNAME_RELEASE in
319279 *4.0)
320280 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
328288 # covers most systems running today. This code pipes the CPU
329289 # types through head -n 1, so we only detect the type of CPU 0.
330290 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
331 case $ALPHA_CPU_TYPE in
291 case "$ALPHA_CPU_TYPE" in
332292 "EV4 (21064)")
333293 UNAME_MACHINE=alpha ;;
334294 "EV4.5 (21064)")
365325 # A Tn.n version is a released field test version.
366326 # A Xn.n version is an unreleased experimental baselevel.
367327 # 1.2 uses "1.2" for uname -r.
368 OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
369 GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
370 ;;
328 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
329 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
330 exitcode=$?
331 trap '' 0
332 exit $exitcode ;;
371333 Amiga*:UNIX_System_V:4.0:*)
372 GUESS=m68k-unknown-sysv4
373 ;;
334 echo m68k-unknown-sysv4
335 exit ;;
374336 *:[Aa]miga[Oo][Ss]:*:*)
375 GUESS=$UNAME_MACHINE-unknown-amigaos
376 ;;
337 echo "$UNAME_MACHINE"-unknown-amigaos
338 exit ;;
377339 *:[Mm]orph[Oo][Ss]:*:*)
378 GUESS=$UNAME_MACHINE-unknown-morphos
379 ;;
340 echo "$UNAME_MACHINE"-unknown-morphos
341 exit ;;
380342 *:OS/390:*:*)
381 GUESS=i370-ibm-openedition
382 ;;
343 echo i370-ibm-openedition
344 exit ;;
383345 *:z/VM:*:*)
384 GUESS=s390-ibm-zvmoe
385 ;;
346 echo s390-ibm-zvmoe
347 exit ;;
386348 *:OS400:*:*)
387 GUESS=powerpc-ibm-os400
388 ;;
349 echo powerpc-ibm-os400
350 exit ;;
389351 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
390 GUESS=arm-acorn-riscix$UNAME_RELEASE
391 ;;
352 echo arm-acorn-riscix"$UNAME_RELEASE"
353 exit ;;
392354 arm*:riscos:*:*|arm*:RISCOS:*:*)
393 GUESS=arm-unknown-riscos
394 ;;
355 echo arm-unknown-riscos
356 exit ;;
395357 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
396 GUESS=hppa1.1-hitachi-hiuxmpp
397 ;;
358 echo hppa1.1-hitachi-hiuxmpp
359 exit ;;
398360 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
399361 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
400 case `(/bin/universe) 2>/dev/null` in
401 att) GUESS=pyramid-pyramid-sysv3 ;;
402 *) GUESS=pyramid-pyramid-bsd ;;
403 esac
404 ;;
362 if test "`(/bin/universe) 2>/dev/null`" = att ; then
363 echo pyramid-pyramid-sysv3
364 else
365 echo pyramid-pyramid-bsd
366 fi
367 exit ;;
405368 NILE*:*:*:dcosx)
406 GUESS=pyramid-pyramid-svr4
407 ;;
369 echo pyramid-pyramid-svr4
370 exit ;;
408371 DRS?6000:unix:4.0:6*)
409 GUESS=sparc-icl-nx6
410 ;;
372 echo sparc-icl-nx6
373 exit ;;
411374 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
412375 case `/usr/bin/uname -p` in
413 sparc) GUESS=sparc-icl-nx7 ;;
414 esac
415 ;;
376 sparc) echo sparc-icl-nx7; exit ;;
377 esac ;;
416378 s390x:SunOS:*:*)
417 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
418 GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
419 ;;
379 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
380 exit ;;
420381 sun4H:SunOS:5.*:*)
421 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
422 GUESS=sparc-hal-solaris2$SUN_REL
423 ;;
382 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
383 exit ;;
424384 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
425 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
426 GUESS=sparc-sun-solaris2$SUN_REL
427 ;;
385 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
386 exit ;;
428387 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
429 GUESS=i386-pc-auroraux$UNAME_RELEASE
430 ;;
388 echo i386-pc-auroraux"$UNAME_RELEASE"
389 exit ;;
431390 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
432 set_cc_for_build
391 eval "$set_cc_for_build"
433392 SUN_ARCH=i386
434393 # If there is a compiler, see if it is configured for 64-bit objects.
435394 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
436395 # This test works for both compilers.
437 if test "$CC_FOR_BUILD" != no_compiler_found; then
396 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
438397 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
439398 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
440399 grep IS_64BIT_ARCH >/dev/null
442401 SUN_ARCH=x86_64
443402 fi
444403 fi
445 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
446 GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
447 ;;
404 echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
405 exit ;;
448406 sun4*:SunOS:6*:*)
449407 # According to config.sub, this is the proper way to canonicalize
450408 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
451409 # it's likely to be more like Solaris than SunOS4.
452 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
453 GUESS=sparc-sun-solaris3$SUN_REL
454 ;;
410 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
411 exit ;;
455412 sun4*:SunOS:*:*)
456 case `/usr/bin/arch -k` in
413 case "`/usr/bin/arch -k`" in
457414 Series*|S4*)
458415 UNAME_RELEASE=`uname -v`
459416 ;;
460417 esac
461418 # Japanese Language versions have a version number like `4.1.3-JL'.
462 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
463 GUESS=sparc-sun-sunos$SUN_REL
464 ;;
419 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
420 exit ;;
465421 sun3*:SunOS:*:*)
466 GUESS=m68k-sun-sunos$UNAME_RELEASE
467 ;;
422 echo m68k-sun-sunos"$UNAME_RELEASE"
423 exit ;;
468424 sun*:*:4.2BSD:*)
469425 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
470426 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
471 case `/bin/arch` in
427 case "`/bin/arch`" in
472428 sun3)
473 GUESS=m68k-sun-sunos$UNAME_RELEASE
429 echo m68k-sun-sunos"$UNAME_RELEASE"
474430 ;;
475431 sun4)
476 GUESS=sparc-sun-sunos$UNAME_RELEASE
432 echo sparc-sun-sunos"$UNAME_RELEASE"
477433 ;;
478434 esac
479 ;;
435 exit ;;
480436 aushp:SunOS:*:*)
481 GUESS=sparc-auspex-sunos$UNAME_RELEASE
482 ;;
437 echo sparc-auspex-sunos"$UNAME_RELEASE"
438 exit ;;
483439 # The situation for MiNT is a little confusing. The machine name
484440 # can be virtually everything (everything which is not
485441 # "atarist" or "atariste" at least should have a processor
489445 # MiNT. But MiNT is downward compatible to TOS, so this should
490446 # be no problem.
491447 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
492 GUESS=m68k-atari-mint$UNAME_RELEASE
493 ;;
448 echo m68k-atari-mint"$UNAME_RELEASE"
449 exit ;;
494450 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
495 GUESS=m68k-atari-mint$UNAME_RELEASE
496 ;;
451 echo m68k-atari-mint"$UNAME_RELEASE"
452 exit ;;
497453 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
498 GUESS=m68k-atari-mint$UNAME_RELEASE
499 ;;
454 echo m68k-atari-mint"$UNAME_RELEASE"
455 exit ;;
500456 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
501 GUESS=m68k-milan-mint$UNAME_RELEASE
502 ;;
457 echo m68k-milan-mint"$UNAME_RELEASE"
458 exit ;;
503459 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
504 GUESS=m68k-hades-mint$UNAME_RELEASE
505 ;;
460 echo m68k-hades-mint"$UNAME_RELEASE"
461 exit ;;
506462 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
507 GUESS=m68k-unknown-mint$UNAME_RELEASE
508 ;;
463 echo m68k-unknown-mint"$UNAME_RELEASE"
464 exit ;;
509465 m68k:machten:*:*)
510 GUESS=m68k-apple-machten$UNAME_RELEASE
511 ;;
466 echo m68k-apple-machten"$UNAME_RELEASE"
467 exit ;;
512468 powerpc:machten:*:*)
513 GUESS=powerpc-apple-machten$UNAME_RELEASE
514 ;;
469 echo powerpc-apple-machten"$UNAME_RELEASE"
470 exit ;;
515471 RISC*:Mach:*:*)
516 GUESS=mips-dec-mach_bsd4.3
517 ;;
472 echo mips-dec-mach_bsd4.3
473 exit ;;
518474 RISC*:ULTRIX:*:*)
519 GUESS=mips-dec-ultrix$UNAME_RELEASE
520 ;;
475 echo mips-dec-ultrix"$UNAME_RELEASE"
476 exit ;;
521477 VAX*:ULTRIX*:*:*)
522 GUESS=vax-dec-ultrix$UNAME_RELEASE
523 ;;
478 echo vax-dec-ultrix"$UNAME_RELEASE"
479 exit ;;
524480 2020:CLIX:*:* | 2430:CLIX:*:*)
525 GUESS=clipper-intergraph-clix$UNAME_RELEASE
526 ;;
481 echo clipper-intergraph-clix"$UNAME_RELEASE"
482 exit ;;
527483 mips:*:*:UMIPS | mips:*:*:RISCos)
528 set_cc_for_build
484 eval "$set_cc_for_build"
529485 sed 's/^ //' << EOF > "$dummy.c"
530486 #ifdef __cplusplus
531487 #include <stdio.h> /* for printf() prototype */
551507 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
552508 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
553509 { echo "$SYSTEM_NAME"; exit; }
554 GUESS=mips-mips-riscos$UNAME_RELEASE
555 ;;
510 echo mips-mips-riscos"$UNAME_RELEASE"
511 exit ;;
556512 Motorola:PowerMAX_OS:*:*)
557 GUESS=powerpc-motorola-powermax
558 ;;
513 echo powerpc-motorola-powermax
514 exit ;;
559515 Motorola:*:4.3:PL8-*)
560 GUESS=powerpc-harris-powermax
561 ;;
516 echo powerpc-harris-powermax
517 exit ;;
562518 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
563 GUESS=powerpc-harris-powermax
564 ;;
519 echo powerpc-harris-powermax
520 exit ;;
565521 Night_Hawk:Power_UNIX:*:*)
566 GUESS=powerpc-harris-powerunix
567 ;;
522 echo powerpc-harris-powerunix
523 exit ;;
568524 m88k:CX/UX:7*:*)
569 GUESS=m88k-harris-cxux7
570 ;;
525 echo m88k-harris-cxux7
526 exit ;;
571527 m88k:*:4*:R4*)
572 GUESS=m88k-motorola-sysv4
573 ;;
528 echo m88k-motorola-sysv4
529 exit ;;
574530 m88k:*:3*:R3*)
575 GUESS=m88k-motorola-sysv3
576 ;;
531 echo m88k-motorola-sysv3
532 exit ;;
577533 AViiON:dgux:*:*)
578534 # DG/UX returns AViiON for all architectures
579535 UNAME_PROCESSOR=`/usr/bin/uname -p`
580 if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
536 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
581537 then
582 if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
583 test "$TARGET_BINARY_INTERFACE"x = x
538 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
539 [ "$TARGET_BINARY_INTERFACE"x = x ]
584540 then
585 GUESS=m88k-dg-dgux$UNAME_RELEASE
541 echo m88k-dg-dgux"$UNAME_RELEASE"
586542 else
587 GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
543 echo m88k-dg-dguxbcs"$UNAME_RELEASE"
588544 fi
589545 else
590 GUESS=i586-dg-dgux$UNAME_RELEASE
591 fi
592 ;;
546 echo i586-dg-dgux"$UNAME_RELEASE"
547 fi
548 exit ;;
593549 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
594 GUESS=m88k-dolphin-sysv3
595 ;;
550 echo m88k-dolphin-sysv3
551 exit ;;
596552 M88*:*:R3*:*)
597553 # Delta 88k system running SVR3
598 GUESS=m88k-motorola-sysv3
599 ;;
554 echo m88k-motorola-sysv3
555 exit ;;
600556 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
601 GUESS=m88k-tektronix-sysv3
602 ;;
557 echo m88k-tektronix-sysv3
558 exit ;;
603559 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
604 GUESS=m68k-tektronix-bsd
605 ;;
560 echo m68k-tektronix-bsd
561 exit ;;
606562 *:IRIX*:*:*)
607 IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
608 GUESS=mips-sgi-irix$IRIX_REL
609 ;;
563 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
564 exit ;;
610565 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
611 GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
612 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
566 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
567 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
613568 i*86:AIX:*:*)
614 GUESS=i386-ibm-aix
615 ;;
569 echo i386-ibm-aix
570 exit ;;
616571 ia64:AIX:*:*)
617 if test -x /usr/bin/oslevel ; then
572 if [ -x /usr/bin/oslevel ] ; then
618573 IBM_REV=`/usr/bin/oslevel`
619574 else
620 IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
621 fi
622 GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
623 ;;
575 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
576 fi
577 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
578 exit ;;
624579 *:AIX:2:3)
625580 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
626 set_cc_for_build
581 eval "$set_cc_for_build"
627582 sed 's/^ //' << EOF > "$dummy.c"
628583 #include <sys/systemcfg.h>
629584
637592 EOF
638593 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
639594 then
640 GUESS=$SYSTEM_NAME
595 echo "$SYSTEM_NAME"
641596 else
642 GUESS=rs6000-ibm-aix3.2.5
597 echo rs6000-ibm-aix3.2.5
643598 fi
644599 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
645 GUESS=rs6000-ibm-aix3.2.4
600 echo rs6000-ibm-aix3.2.4
646601 else
647 GUESS=rs6000-ibm-aix3.2
648 fi
649 ;;
602 echo rs6000-ibm-aix3.2
603 fi
604 exit ;;
650605 *:AIX:*:[4567])
651606 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
652607 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
654609 else
655610 IBM_ARCH=powerpc
656611 fi
657 if test -x /usr/bin/lslpp ; then
658 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
612 if [ -x /usr/bin/lslpp ] ; then
613 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
659614 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
660615 else
661 IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
662 fi
663 GUESS=$IBM_ARCH-ibm-aix$IBM_REV
664 ;;
616 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
617 fi
618 echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
619 exit ;;
665620 *:AIX:*:*)
666 GUESS=rs6000-ibm-aix
667 ;;
621 echo rs6000-ibm-aix
622 exit ;;
668623 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
669 GUESS=romp-ibm-bsd4.4
670 ;;
624 echo romp-ibm-bsd4.4
625 exit ;;
671626 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
672 GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
673 ;; # report: romp-ibm BSD 4.3
627 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
628 exit ;; # report: romp-ibm BSD 4.3
674629 *:BOSX:*:*)
675 GUESS=rs6000-bull-bosx
676 ;;
630 echo rs6000-bull-bosx
631 exit ;;
677632 DPX/2?00:B.O.S.:*:*)
678 GUESS=m68k-bull-sysv3
679 ;;
633 echo m68k-bull-sysv3
634 exit ;;
680635 9000/[34]??:4.3bsd:1.*:*)
681 GUESS=m68k-hp-bsd
682 ;;
636 echo m68k-hp-bsd
637 exit ;;
683638 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
684 GUESS=m68k-hp-bsd4.4
685 ;;
639 echo m68k-hp-bsd4.4
640 exit ;;
686641 9000/[34678]??:HP-UX:*:*)
687 HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
688 case $UNAME_MACHINE in
642 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
643 case "$UNAME_MACHINE" in
689644 9000/31?) HP_ARCH=m68000 ;;
690645 9000/[34]??) HP_ARCH=m68k ;;
691646 9000/[678][0-9][0-9])
692 if test -x /usr/bin/getconf; then
647 if [ -x /usr/bin/getconf ]; then
693648 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
694649 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
695 case $sc_cpu_version in
650 case "$sc_cpu_version" in
696651 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
697652 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
698653 532) # CPU_PA_RISC2_0
699 case $sc_kernel_bits in
654 case "$sc_kernel_bits" in
700655 32) HP_ARCH=hppa2.0n ;;
701656 64) HP_ARCH=hppa2.0w ;;
702657 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
703658 esac ;;
704659 esac
705660 fi
706 if test "$HP_ARCH" = ""; then
707 set_cc_for_build
661 if [ "$HP_ARCH" = "" ]; then
662 eval "$set_cc_for_build"
708663 sed 's/^ //' << EOF > "$dummy.c"
709664
710665 #define _HPUX_SOURCE
742697 test -z "$HP_ARCH" && HP_ARCH=hppa
743698 fi ;;
744699 esac
745 if test "$HP_ARCH" = hppa2.0w
700 if [ "$HP_ARCH" = hppa2.0w ]
746701 then
747 set_cc_for_build
702 eval "$set_cc_for_build"
748703
749704 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
750705 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
763718 HP_ARCH=hppa64
764719 fi
765720 fi
766 GUESS=$HP_ARCH-hp-hpux$HPUX_REV
767 ;;
721 echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
722 exit ;;
768723 ia64:HP-UX:*:*)
769 HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
770 GUESS=ia64-hp-hpux$HPUX_REV
771 ;;
724 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
725 echo ia64-hp-hpux"$HPUX_REV"
726 exit ;;
772727 3050*:HI-UX:*:*)
773 set_cc_for_build
728 eval "$set_cc_for_build"
774729 sed 's/^ //' << EOF > "$dummy.c"
775730 #include <unistd.h>
776731 int
798753 EOF
799754 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
800755 { echo "$SYSTEM_NAME"; exit; }
801 GUESS=unknown-hitachi-hiuxwe2
802 ;;
756 echo unknown-hitachi-hiuxwe2
757 exit ;;
803758 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
804 GUESS=hppa1.1-hp-bsd
805 ;;
759 echo hppa1.1-hp-bsd
760 exit ;;
806761 9000/8??:4.3bsd:*:*)
807 GUESS=hppa1.0-hp-bsd
808 ;;
762 echo hppa1.0-hp-bsd
763 exit ;;
809764 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
810 GUESS=hppa1.0-hp-mpeix
811 ;;
765 echo hppa1.0-hp-mpeix
766 exit ;;
812767 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
813 GUESS=hppa1.1-hp-osf
814 ;;
768 echo hppa1.1-hp-osf
769 exit ;;
815770 hp8??:OSF1:*:*)
816 GUESS=hppa1.0-hp-osf
817 ;;
771 echo hppa1.0-hp-osf
772 exit ;;
818773 i*86:OSF1:*:*)
819 if test -x /usr/sbin/sysversion ; then
820 GUESS=$UNAME_MACHINE-unknown-osf1mk
774 if [ -x /usr/sbin/sysversion ] ; then
775 echo "$UNAME_MACHINE"-unknown-osf1mk
821776 else
822 GUESS=$UNAME_MACHINE-unknown-osf1
823 fi
824 ;;
777 echo "$UNAME_MACHINE"-unknown-osf1
778 fi
779 exit ;;
825780 parisc*:Lites*:*:*)
826 GUESS=hppa1.1-hp-lites
827 ;;
781 echo hppa1.1-hp-lites
782 exit ;;
828783 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
829 GUESS=c1-convex-bsd
830 ;;
784 echo c1-convex-bsd
785 exit ;;
831786 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
832787 if getsysinfo -f scalar_acc
833788 then echo c32-convex-bsd
835790 fi
836791 exit ;;
837792 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
838 GUESS=c34-convex-bsd
839 ;;
793 echo c34-convex-bsd
794 exit ;;
840795 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
841 GUESS=c38-convex-bsd
842 ;;
796 echo c38-convex-bsd
797 exit ;;
843798 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
844 GUESS=c4-convex-bsd
845 ;;
799 echo c4-convex-bsd
800 exit ;;
846801 CRAY*Y-MP:*:*:*)
847 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
848 GUESS=ymp-cray-unicos$CRAY_REL
849 ;;
802 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
803 exit ;;
850804 CRAY*[A-Z]90:*:*:*)
851805 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
852806 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
854808 -e 's/\.[^.]*$/.X/'
855809 exit ;;
856810 CRAY*TS:*:*:*)
857 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
858 GUESS=t90-cray-unicos$CRAY_REL
859 ;;
811 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
812 exit ;;
860813 CRAY*T3E:*:*:*)
861 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
862 GUESS=alphaev5-cray-unicosmk$CRAY_REL
863 ;;
814 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
815 exit ;;
864816 CRAY*SV1:*:*:*)
865 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
866 GUESS=sv1-cray-unicos$CRAY_REL
867 ;;
817 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
818 exit ;;
868819 *:UNICOS/mp:*:*)
869 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
870 GUESS=craynv-cray-unicosmp$CRAY_REL
871 ;;
820 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
821 exit ;;
872822 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
873823 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
874824 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
875825 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
876 GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
877 ;;
826 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
827 exit ;;
878828 5000:UNIX_System_V:4.*:*)
879829 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
880830 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
881 GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
882 ;;
831 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
832 exit ;;
883833 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
884 GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
885 ;;
834 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
835 exit ;;
886836 sparc*:BSD/OS:*:*)
887 GUESS=sparc-unknown-bsdi$UNAME_RELEASE
888 ;;
837 echo sparc-unknown-bsdi"$UNAME_RELEASE"
838 exit ;;
889839 *:BSD/OS:*:*)
890 GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
891 ;;
892 arm:FreeBSD:*:*)
893 UNAME_PROCESSOR=`uname -p`
894 set_cc_for_build
895 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
896 | grep -q __ARM_PCS_VFP
897 then
898 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
899 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
900 else
901 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
902 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
903 fi
904 ;;
840 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
841 exit ;;
905842 *:FreeBSD:*:*)
906843 UNAME_PROCESSOR=`/usr/bin/uname -p`
907 case $UNAME_PROCESSOR in
844 case "$UNAME_PROCESSOR" in
908845 amd64)
909846 UNAME_PROCESSOR=x86_64 ;;
910847 i386)
911848 UNAME_PROCESSOR=i586 ;;
912849 esac
913 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
914 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
915 ;;
850 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
851 exit ;;
916852 i*:CYGWIN*:*)
917 GUESS=$UNAME_MACHINE-pc-cygwin
918 ;;
853 echo "$UNAME_MACHINE"-pc-cygwin
854 exit ;;
919855 *:MINGW64*:*)
920 GUESS=$UNAME_MACHINE-pc-mingw64
921 ;;
856 echo "$UNAME_MACHINE"-pc-mingw64
857 exit ;;
922858 *:MINGW*:*)
923 GUESS=$UNAME_MACHINE-pc-mingw32
924 ;;
859 echo "$UNAME_MACHINE"-pc-mingw32
860 exit ;;
925861 *:MSYS*:*)
926 GUESS=$UNAME_MACHINE-pc-msys
927 ;;
862 echo "$UNAME_MACHINE"-pc-msys
863 exit ;;
928864 i*:PW*:*)
929 GUESS=$UNAME_MACHINE-pc-pw32
930 ;;
865 echo "$UNAME_MACHINE"-pc-pw32
866 exit ;;
931867 *:Interix*:*)
932 case $UNAME_MACHINE in
868 case "$UNAME_MACHINE" in
933869 x86)
934 GUESS=i586-pc-interix$UNAME_RELEASE
935 ;;
870 echo i586-pc-interix"$UNAME_RELEASE"
871 exit ;;
936872 authenticamd | genuineintel | EM64T)
937 GUESS=x86_64-unknown-interix$UNAME_RELEASE
938 ;;
873 echo x86_64-unknown-interix"$UNAME_RELEASE"
874 exit ;;
939875 IA64)
940 GUESS=ia64-unknown-interix$UNAME_RELEASE
941 ;;
876 echo ia64-unknown-interix"$UNAME_RELEASE"
877 exit ;;
942878 esac ;;
943879 i*:UWIN*:*)
944 GUESS=$UNAME_MACHINE-pc-uwin
945 ;;
880 echo "$UNAME_MACHINE"-pc-uwin
881 exit ;;
946882 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
947 GUESS=x86_64-pc-cygwin
948 ;;
883 echo x86_64-unknown-cygwin
884 exit ;;
949885 prep*:SunOS:5.*:*)
950 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
951 GUESS=powerpcle-unknown-solaris2$SUN_REL
952 ;;
886 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
887 exit ;;
953888 *:GNU:*:*)
954889 # the GNU system
955 GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
956 GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
957 GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
958 ;;
890 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
891 exit ;;
959892 *:GNU/*:*:*)
960893 # other systems with GNU libc and userland
961 GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
962 GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
963 GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
964 ;;
965 *:Minix:*:*)
966 GUESS=$UNAME_MACHINE-unknown-minix
967 ;;
894 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
895 exit ;;
896 i*86:Minix:*:*)
897 echo "$UNAME_MACHINE"-pc-minix
898 exit ;;
968899 aarch64:Linux:*:*)
969 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
970 ;;
900 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
901 exit ;;
971902 aarch64_be:Linux:*:*)
972903 UNAME_MACHINE=aarch64_be
973 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
974 ;;
904 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
905 exit ;;
975906 alpha:Linux:*:*)
976 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
907 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
977908 EV5) UNAME_MACHINE=alphaev5 ;;
978909 EV56) UNAME_MACHINE=alphaev56 ;;
979910 PCA56) UNAME_MACHINE=alphapca56 ;;
984915 esac
985916 objdump --private-headers /bin/sh | grep -q ld.so.1
986917 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
987 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
988 ;;
989 arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
990 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
991 ;;
918 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
919 exit ;;
920 arc:Linux:*:* | arceb:Linux:*:*)
921 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
922 exit ;;
992923 arm*:Linux:*:*)
993 set_cc_for_build
924 eval "$set_cc_for_build"
994925 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
995926 | grep -q __ARM_EABI__
996927 then
997 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
928 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
998929 else
999930 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
1000931 | grep -q __ARM_PCS_VFP
1001932 then
1002 GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
933 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
1003934 else
1004 GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
935 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
1005936 fi
1006937 fi
1007 ;;
938 exit ;;
1008939 avr32*:Linux:*:*)
1009 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1010 ;;
940 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
941 exit ;;
1011942 cris:Linux:*:*)
1012 GUESS=$UNAME_MACHINE-axis-linux-$LIBC
1013 ;;
943 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
944 exit ;;
1014945 crisv32:Linux:*:*)
1015 GUESS=$UNAME_MACHINE-axis-linux-$LIBC
1016 ;;
946 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
947 exit ;;
1017948 e2k:Linux:*:*)
1018 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1019 ;;
949 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
950 exit ;;
1020951 frv:Linux:*:*)
1021 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1022 ;;
952 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
953 exit ;;
1023954 hexagon:Linux:*:*)
1024 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1025 ;;
955 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
956 exit ;;
1026957 i*86:Linux:*:*)
1027 GUESS=$UNAME_MACHINE-pc-linux-$LIBC
1028 ;;
958 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
959 exit ;;
1029960 ia64:Linux:*:*)
1030 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1031 ;;
961 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
962 exit ;;
1032963 k1om:Linux:*:*)
1033 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1034 ;;
1035 loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
1036 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1037 ;;
964 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
965 exit ;;
1038966 m32r*:Linux:*:*)
1039 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1040 ;;
967 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
968 exit ;;
1041969 m68*:Linux:*:*)
1042 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1043 ;;
970 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
971 exit ;;
1044972 mips:Linux:*:* | mips64:Linux:*:*)
1045 set_cc_for_build
1046 IS_GLIBC=0
1047 test x"${LIBC}" = xgnu && IS_GLIBC=1
973 eval "$set_cc_for_build"
1048974 sed 's/^ //' << EOF > "$dummy.c"
1049975 #undef CPU
1050 #undef mips
1051 #undef mipsel
1052 #undef mips64
1053 #undef mips64el
1054 #if ${IS_GLIBC} && defined(_ABI64)
1055 LIBCABI=gnuabi64
1056 #else
1057 #if ${IS_GLIBC} && defined(_ABIN32)
1058 LIBCABI=gnuabin32
1059 #else
1060 LIBCABI=${LIBC}
1061 #endif
1062 #endif
1063
1064 #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1065 CPU=mipsisa64r6
1066 #else
1067 #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1068 CPU=mipsisa32r6
1069 #else
1070 #if defined(__mips64)
1071 CPU=mips64
1072 #else
1073 CPU=mips
1074 #endif
1075 #endif
1076 #endif
1077
976 #undef ${UNAME_MACHINE}
977 #undef ${UNAME_MACHINE}el
1078978 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
1079 MIPS_ENDIAN=el
979 CPU=${UNAME_MACHINE}el
1080980 #else
1081981 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
1082 MIPS_ENDIAN=
982 CPU=${UNAME_MACHINE}
1083983 #else
1084 MIPS_ENDIAN=
984 CPU=
1085985 #endif
1086986 #endif
1087987 EOF
1088 cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
1089 eval "$cc_set_vars"
1090 test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
988 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
989 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
1091990 ;;
1092991 mips64el:Linux:*:*)
1093 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1094 ;;
992 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
993 exit ;;
1095994 openrisc*:Linux:*:*)
1096 GUESS=or1k-unknown-linux-$LIBC
1097 ;;
995 echo or1k-unknown-linux-"$LIBC"
996 exit ;;
1098997 or32:Linux:*:* | or1k*:Linux:*:*)
1099 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1100 ;;
998 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
999 exit ;;
11011000 padre:Linux:*:*)
1102 GUESS=sparc-unknown-linux-$LIBC
1103 ;;
1001 echo sparc-unknown-linux-"$LIBC"
1002 exit ;;
11041003 parisc64:Linux:*:* | hppa64:Linux:*:*)
1105 GUESS=hppa64-unknown-linux-$LIBC
1106 ;;
1004 echo hppa64-unknown-linux-"$LIBC"
1005 exit ;;
11071006 parisc:Linux:*:* | hppa:Linux:*:*)
11081007 # Look for CPU level
11091008 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1110 PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
1111 PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
1112 *) GUESS=hppa-unknown-linux-$LIBC ;;
1009 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1010 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1011 *) echo hppa-unknown-linux-"$LIBC" ;;
11131012 esac
1114 ;;
1013 exit ;;
11151014 ppc64:Linux:*:*)
1116 GUESS=powerpc64-unknown-linux-$LIBC
1117 ;;
1015 echo powerpc64-unknown-linux-"$LIBC"
1016 exit ;;
11181017 ppc:Linux:*:*)
1119 GUESS=powerpc-unknown-linux-$LIBC
1120 ;;
1018 echo powerpc-unknown-linux-"$LIBC"
1019 exit ;;
11211020 ppc64le:Linux:*:*)
1122 GUESS=powerpc64le-unknown-linux-$LIBC
1123 ;;
1021 echo powerpc64le-unknown-linux-"$LIBC"
1022 exit ;;
11241023 ppcle:Linux:*:*)
1125 GUESS=powerpcle-unknown-linux-$LIBC
1126 ;;
1127 riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
1128 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1129 ;;
1024 echo powerpcle-unknown-linux-"$LIBC"
1025 exit ;;
1026 riscv32:Linux:*:* | riscv64:Linux:*:*)
1027 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1028 exit ;;
11301029 s390:Linux:*:* | s390x:Linux:*:*)
1131 GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
1132 ;;
1030 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
1031 exit ;;
11331032 sh64*:Linux:*:*)
1134 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1135 ;;
1033 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1034 exit ;;
11361035 sh*:Linux:*:*)
1137 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1138 ;;
1036 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1037 exit ;;
11391038 sparc:Linux:*:* | sparc64:Linux:*:*)
1140 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1141 ;;
1039 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1040 exit ;;
11421041 tile*:Linux:*:*)
1143 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1144 ;;
1042 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1043 exit ;;
11451044 vax:Linux:*:*)
1146 GUESS=$UNAME_MACHINE-dec-linux-$LIBC
1147 ;;
1045 echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
1046 exit ;;
11481047 x86_64:Linux:*:*)
1149 set_cc_for_build
1150 LIBCABI=$LIBC
1151 if test "$CC_FOR_BUILD" != no_compiler_found; then
1152 if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
1153 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1154 grep IS_X32 >/dev/null
1155 then
1156 LIBCABI=${LIBC}x32
1157 fi
1158 fi
1159 GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
1160 ;;
1048 if objdump -f /bin/sh | grep -q elf32-x86-64; then
1049 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
1050 else
1051 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
1052 fi
1053 exit ;;
11611054 xtensa*:Linux:*:*)
1162 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1163 ;;
1055 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1056 exit ;;
11641057 i*86:DYNIX/ptx:4*:*)
11651058 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
11661059 # earlier versions are messed up and put the nodename in both
11671060 # sysname and nodename.
1168 GUESS=i386-sequent-sysv4
1169 ;;
1061 echo i386-sequent-sysv4
1062 exit ;;
11701063 i*86:UNIX_SV:4.2MP:2.*)
11711064 # Unixware is an offshoot of SVR4, but it has its own version
11721065 # number series starting with 2...
11731066 # I am not positive that other SVR4 systems won't match this,
11741067 # I just have to hope. -- rms.
11751068 # Use sysv4.2uw... so that sysv4* matches it.
1176 GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
1177 ;;
1069 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
1070 exit ;;
11781071 i*86:OS/2:*:*)
11791072 # If we were able to find `uname', then EMX Unix compatibility
11801073 # is probably installed.
1181 GUESS=$UNAME_MACHINE-pc-os2-emx
1182 ;;
1074 echo "$UNAME_MACHINE"-pc-os2-emx
1075 exit ;;
11831076 i*86:XTS-300:*:STOP)
1184 GUESS=$UNAME_MACHINE-unknown-stop
1185 ;;
1077 echo "$UNAME_MACHINE"-unknown-stop
1078 exit ;;
11861079 i*86:atheos:*:*)
1187 GUESS=$UNAME_MACHINE-unknown-atheos
1188 ;;
1080 echo "$UNAME_MACHINE"-unknown-atheos
1081 exit ;;
11891082 i*86:syllable:*:*)
1190 GUESS=$UNAME_MACHINE-pc-syllable
1191 ;;
1083 echo "$UNAME_MACHINE"-pc-syllable
1084 exit ;;
11921085 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1193 GUESS=i386-unknown-lynxos$UNAME_RELEASE
1194 ;;
1086 echo i386-unknown-lynxos"$UNAME_RELEASE"
1087 exit ;;
11951088 i*86:*DOS:*:*)
1196 GUESS=$UNAME_MACHINE-pc-msdosdjgpp
1197 ;;
1089 echo "$UNAME_MACHINE"-pc-msdosdjgpp
1090 exit ;;
11981091 i*86:*:4.*:*)
11991092 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
12001093 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1201 GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
1094 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
12021095 else
1203 GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
1204 fi
1205 ;;
1096 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
1097 fi
1098 exit ;;
12061099 i*86:*:5:[678]*)
12071100 # UnixWare 7.x, OpenUNIX and OpenServer 6.
12081101 case `/bin/uname -X | grep "^Machine"` in
12101103 *Pentium) UNAME_MACHINE=i586 ;;
12111104 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
12121105 esac
1213 GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1214 ;;
1106 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
1107 exit ;;
12151108 i*86:*:3.2:*)
12161109 if test -f /usr/options/cb.name; then
12171110 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1218 GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
1111 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
12191112 elif /bin/uname -X 2>/dev/null >/dev/null ; then
12201113 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
12211114 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
12251118 && UNAME_MACHINE=i686
12261119 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
12271120 && UNAME_MACHINE=i686
1228 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
1121 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
12291122 else
1230 GUESS=$UNAME_MACHINE-pc-sysv32
1231 fi
1232 ;;
1123 echo "$UNAME_MACHINE"-pc-sysv32
1124 fi
1125 exit ;;
12331126 pc:*:*:*)
12341127 # Left here for compatibility:
12351128 # uname -m prints for DJGPP always 'pc', but it prints nothing about
12371130 # Note: whatever this is, it MUST be the same as what config.sub
12381131 # prints for the "djgpp" host, or else GDB configure will decide that
12391132 # this is a cross-build.
1240 GUESS=i586-pc-msdosdjgpp
1241 ;;
1133 echo i586-pc-msdosdjgpp
1134 exit ;;
12421135 Intel:Mach:3*:*)
1243 GUESS=i386-pc-mach3
1244 ;;
1136 echo i386-pc-mach3
1137 exit ;;
12451138 paragon:*:*:*)
1246 GUESS=i860-intel-osf1
1247 ;;
1139 echo i860-intel-osf1
1140 exit ;;
12481141 i860:*:4.*:*) # i860-SVR4
12491142 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1250 GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
1143 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
12511144 else # Add other i860-SVR4 vendors below as they are discovered.
1252 GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
1253 fi
1254 ;;
1145 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
1146 fi
1147 exit ;;
12551148 mini*:CTIX:SYS*5:*)
12561149 # "miniframe"
1257 GUESS=m68010-convergent-sysv
1258 ;;
1150 echo m68010-convergent-sysv
1151 exit ;;
12591152 mc68k:UNIX:SYSTEM5:3.51m)
1260 GUESS=m68k-convergent-sysv
1261 ;;
1153 echo m68k-convergent-sysv
1154 exit ;;
12621155 M680?0:D-NIX:5.3:*)
1263 GUESS=m68k-diab-dnix
1264 ;;
1156 echo m68k-diab-dnix
1157 exit ;;
12651158 M68*:*:R3V[5678]*:*)
12661159 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
12671160 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
12861179 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
12871180 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
12881181 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1289 GUESS=m68k-unknown-lynxos$UNAME_RELEASE
1290 ;;
1182 echo m68k-unknown-lynxos"$UNAME_RELEASE"
1183 exit ;;
12911184 mc68030:UNIX_System_V:4.*:*)
1292 GUESS=m68k-atari-sysv4
1293 ;;
1185 echo m68k-atari-sysv4
1186 exit ;;
12941187 TSUNAMI:LynxOS:2.*:*)
1295 GUESS=sparc-unknown-lynxos$UNAME_RELEASE
1296 ;;
1188 echo sparc-unknown-lynxos"$UNAME_RELEASE"
1189 exit ;;
12971190 rs6000:LynxOS:2.*:*)
1298 GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
1299 ;;
1191 echo rs6000-unknown-lynxos"$UNAME_RELEASE"
1192 exit ;;
13001193 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1301 GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
1302 ;;
1194 echo powerpc-unknown-lynxos"$UNAME_RELEASE"
1195 exit ;;
13031196 SM[BE]S:UNIX_SV:*:*)
1304 GUESS=mips-dde-sysv$UNAME_RELEASE
1305 ;;
1197 echo mips-dde-sysv"$UNAME_RELEASE"
1198 exit ;;
13061199 RM*:ReliantUNIX-*:*:*)
1307 GUESS=mips-sni-sysv4
1308 ;;
1200 echo mips-sni-sysv4
1201 exit ;;
13091202 RM*:SINIX-*:*:*)
1310 GUESS=mips-sni-sysv4
1311 ;;
1203 echo mips-sni-sysv4
1204 exit ;;
13121205 *:SINIX-*:*:*)
13131206 if uname -p 2>/dev/null >/dev/null ; then
13141207 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1315 GUESS=$UNAME_MACHINE-sni-sysv4
1208 echo "$UNAME_MACHINE"-sni-sysv4
13161209 else
1317 GUESS=ns32k-sni-sysv
1318 fi
1319 ;;
1210 echo ns32k-sni-sysv
1211 fi
1212 exit ;;
13201213 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
13211214 # says <Richard.M.Bartel@ccMail.Census.GOV>
1322 GUESS=i586-unisys-sysv4
1323 ;;
1215 echo i586-unisys-sysv4
1216 exit ;;
13241217 *:UNIX_System_V:4*:FTX*)
13251218 # From Gerald Hewes <hewes@openmarket.com>.
13261219 # How about differentiating between stratus architectures? -djm
1327 GUESS=hppa1.1-stratus-sysv4
1328 ;;
1220 echo hppa1.1-stratus-sysv4
1221 exit ;;
13291222 *:*:*:FTX*)
13301223 # From seanf@swdc.stratus.com.
1331 GUESS=i860-stratus-sysv4
1332 ;;
1224 echo i860-stratus-sysv4
1225 exit ;;
13331226 i*86:VOS:*:*)
13341227 # From Paul.Green@stratus.com.
1335 GUESS=$UNAME_MACHINE-stratus-vos
1336 ;;
1228 echo "$UNAME_MACHINE"-stratus-vos
1229 exit ;;
13371230 *:VOS:*:*)
13381231 # From Paul.Green@stratus.com.
1339 GUESS=hppa1.1-stratus-vos
1340 ;;
1232 echo hppa1.1-stratus-vos
1233 exit ;;
13411234 mc68*:A/UX:*:*)
1342 GUESS=m68k-apple-aux$UNAME_RELEASE
1343 ;;
1235 echo m68k-apple-aux"$UNAME_RELEASE"
1236 exit ;;
13441237 news*:NEWS-OS:6*:*)
1345 GUESS=mips-sony-newsos6
1346 ;;
1238 echo mips-sony-newsos6
1239 exit ;;
13471240 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1348 if test -d /usr/nec; then
1349 GUESS=mips-nec-sysv$UNAME_RELEASE
1241 if [ -d /usr/nec ]; then
1242 echo mips-nec-sysv"$UNAME_RELEASE"
13501243 else
1351 GUESS=mips-unknown-sysv$UNAME_RELEASE
1352 fi
1353 ;;
1244 echo mips-unknown-sysv"$UNAME_RELEASE"
1245 fi
1246 exit ;;
13541247 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1355 GUESS=powerpc-be-beos
1356 ;;
1248 echo powerpc-be-beos
1249 exit ;;
13571250 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1358 GUESS=powerpc-apple-beos
1359 ;;
1251 echo powerpc-apple-beos
1252 exit ;;
13601253 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1361 GUESS=i586-pc-beos
1362 ;;
1254 echo i586-pc-beos
1255 exit ;;
13631256 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1364 GUESS=i586-pc-haiku
1365 ;;
1257 echo i586-pc-haiku
1258 exit ;;
13661259 x86_64:Haiku:*:*)
1367 GUESS=x86_64-unknown-haiku
1368 ;;
1260 echo x86_64-unknown-haiku
1261 exit ;;
13691262 SX-4:SUPER-UX:*:*)
1370 GUESS=sx4-nec-superux$UNAME_RELEASE
1371 ;;
1263 echo sx4-nec-superux"$UNAME_RELEASE"
1264 exit ;;
13721265 SX-5:SUPER-UX:*:*)
1373 GUESS=sx5-nec-superux$UNAME_RELEASE
1374 ;;
1266 echo sx5-nec-superux"$UNAME_RELEASE"
1267 exit ;;
13751268 SX-6:SUPER-UX:*:*)
1376 GUESS=sx6-nec-superux$UNAME_RELEASE
1377 ;;
1269 echo sx6-nec-superux"$UNAME_RELEASE"
1270 exit ;;
13781271 SX-7:SUPER-UX:*:*)
1379 GUESS=sx7-nec-superux$UNAME_RELEASE
1380 ;;
1272 echo sx7-nec-superux"$UNAME_RELEASE"
1273 exit ;;
13811274 SX-8:SUPER-UX:*:*)
1382 GUESS=sx8-nec-superux$UNAME_RELEASE
1383 ;;
1275 echo sx8-nec-superux"$UNAME_RELEASE"
1276 exit ;;
13841277 SX-8R:SUPER-UX:*:*)
1385 GUESS=sx8r-nec-superux$UNAME_RELEASE
1386 ;;
1278 echo sx8r-nec-superux"$UNAME_RELEASE"
1279 exit ;;
13871280 SX-ACE:SUPER-UX:*:*)
1388 GUESS=sxace-nec-superux$UNAME_RELEASE
1389 ;;
1281 echo sxace-nec-superux"$UNAME_RELEASE"
1282 exit ;;
13901283 Power*:Rhapsody:*:*)
1391 GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
1392 ;;
1284 echo powerpc-apple-rhapsody"$UNAME_RELEASE"
1285 exit ;;
13931286 *:Rhapsody:*:*)
1394 GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
1395 ;;
1396 arm64:Darwin:*:*)
1397 GUESS=aarch64-apple-darwin$UNAME_RELEASE
1398 ;;
1287 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
1288 exit ;;
13991289 *:Darwin:*:*)
1400 UNAME_PROCESSOR=`uname -p`
1401 case $UNAME_PROCESSOR in
1402 unknown) UNAME_PROCESSOR=powerpc ;;
1403 esac
1404 if command -v xcode-select > /dev/null 2> /dev/null && \
1405 ! xcode-select --print-path > /dev/null 2> /dev/null ; then
1406 # Avoid executing cc if there is no toolchain installed as
1407 # cc will be a stub that puts up a graphical alert
1408 # prompting the user to install developer tools.
1409 CC_FOR_BUILD=no_compiler_found
1410 else
1411 set_cc_for_build
1412 fi
1413 if test "$CC_FOR_BUILD" != no_compiler_found; then
1414 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1415 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1416 grep IS_64BIT_ARCH >/dev/null
1417 then
1418 case $UNAME_PROCESSOR in
1419 i386) UNAME_PROCESSOR=x86_64 ;;
1420 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1421 esac
1422 fi
1423 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1424 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1425 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1426 grep IS_PPC >/dev/null
1427 then
1428 UNAME_PROCESSOR=powerpc
1290 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1291 eval "$set_cc_for_build"
1292 if test "$UNAME_PROCESSOR" = unknown ; then
1293 UNAME_PROCESSOR=powerpc
1294 fi
1295 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1296 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1297 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1298 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1299 grep IS_64BIT_ARCH >/dev/null
1300 then
1301 case $UNAME_PROCESSOR in
1302 i386) UNAME_PROCESSOR=x86_64 ;;
1303 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1304 esac
1305 fi
1306 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1307 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1308 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1309 grep IS_PPC >/dev/null
1310 then
1311 UNAME_PROCESSOR=powerpc
1312 fi
14291313 fi
14301314 elif test "$UNAME_PROCESSOR" = i386 ; then
1431 # uname -m returns i386 or x86_64
1432 UNAME_PROCESSOR=$UNAME_MACHINE
1433 fi
1434 GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
1435 ;;
1315 # Avoid executing cc on OS X 10.9, as it ships with a stub
1316 # that puts up a graphical alert prompting to install
1317 # developer tools. Any system running Mac OS X 10.7 or
1318 # later (Darwin 11 and later) is required to have a 64-bit
1319 # processor. This is not true of the ARM version of Darwin
1320 # that Apple uses in portable devices.
1321 UNAME_PROCESSOR=x86_64
1322 fi
1323 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
1324 exit ;;
14361325 *:procnto*:*:* | *:QNX:[0123456789]*:*)
14371326 UNAME_PROCESSOR=`uname -p`
14381327 if test "$UNAME_PROCESSOR" = x86; then
14391328 UNAME_PROCESSOR=i386
14401329 UNAME_MACHINE=pc
14411330 fi
1442 GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
1443 ;;
1331 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
1332 exit ;;
14441333 *:QNX:*:4*)
1445 GUESS=i386-pc-qnx
1446 ;;
1334 echo i386-pc-qnx
1335 exit ;;
14471336 NEO-*:NONSTOP_KERNEL:*:*)
1448 GUESS=neo-tandem-nsk$UNAME_RELEASE
1449 ;;
1337 echo neo-tandem-nsk"$UNAME_RELEASE"
1338 exit ;;
14501339 NSE-*:NONSTOP_KERNEL:*:*)
1451 GUESS=nse-tandem-nsk$UNAME_RELEASE
1452 ;;
1340 echo nse-tandem-nsk"$UNAME_RELEASE"
1341 exit ;;
14531342 NSR-*:NONSTOP_KERNEL:*:*)
1454 GUESS=nsr-tandem-nsk$UNAME_RELEASE
1455 ;;
1343 echo nsr-tandem-nsk"$UNAME_RELEASE"
1344 exit ;;
14561345 NSV-*:NONSTOP_KERNEL:*:*)
1457 GUESS=nsv-tandem-nsk$UNAME_RELEASE
1458 ;;
1346 echo nsv-tandem-nsk"$UNAME_RELEASE"
1347 exit ;;
14591348 NSX-*:NONSTOP_KERNEL:*:*)
1460 GUESS=nsx-tandem-nsk$UNAME_RELEASE
1461 ;;
1349 echo nsx-tandem-nsk"$UNAME_RELEASE"
1350 exit ;;
14621351 *:NonStop-UX:*:*)
1463 GUESS=mips-compaq-nonstopux
1464 ;;
1352 echo mips-compaq-nonstopux
1353 exit ;;
14651354 BS2000:POSIX*:*:*)
1466 GUESS=bs2000-siemens-sysv
1467 ;;
1355 echo bs2000-siemens-sysv
1356 exit ;;
14681357 DS/*:UNIX_System_V:*:*)
1469 GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
1470 ;;
1358 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
1359 exit ;;
14711360 *:Plan9:*:*)
14721361 # "uname -m" is not consistent, so use $cputype instead. 386
14731362 # is converted to i386 for consistency with other x86
14741363 # operating systems.
1475 if test "${cputype-}" = 386; then
1364 if test "$cputype" = 386; then
14761365 UNAME_MACHINE=i386
1477 elif test "x${cputype-}" != x; then
1478 UNAME_MACHINE=$cputype
1479 fi
1480 GUESS=$UNAME_MACHINE-unknown-plan9
1481 ;;
1366 else
1367 UNAME_MACHINE="$cputype"
1368 fi
1369 echo "$UNAME_MACHINE"-unknown-plan9
1370 exit ;;
14821371 *:TOPS-10:*:*)
1483 GUESS=pdp10-unknown-tops10
1484 ;;
1372 echo pdp10-unknown-tops10
1373 exit ;;
14851374 *:TENEX:*:*)
1486 GUESS=pdp10-unknown-tenex
1487 ;;
1375 echo pdp10-unknown-tenex
1376 exit ;;
14881377 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1489 GUESS=pdp10-dec-tops20
1490 ;;
1378 echo pdp10-dec-tops20
1379 exit ;;
14911380 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1492 GUESS=pdp10-xkl-tops20
1493 ;;
1381 echo pdp10-xkl-tops20
1382 exit ;;
14941383 *:TOPS-20:*:*)
1495 GUESS=pdp10-unknown-tops20
1496 ;;
1384 echo pdp10-unknown-tops20
1385 exit ;;
14971386 *:ITS:*:*)
1498 GUESS=pdp10-unknown-its
1499 ;;
1387 echo pdp10-unknown-its
1388 exit ;;
15001389 SEI:*:*:SEIUX)
1501 GUESS=mips-sei-seiux$UNAME_RELEASE
1502 ;;
1390 echo mips-sei-seiux"$UNAME_RELEASE"
1391 exit ;;
15031392 *:DragonFly:*:*)
1504 DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
1505 GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
1506 ;;
1393 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
1394 exit ;;
15071395 *:*VMS:*:*)
15081396 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1509 case $UNAME_MACHINE in
1510 A*) GUESS=alpha-dec-vms ;;
1511 I*) GUESS=ia64-dec-vms ;;
1512 V*) GUESS=vax-dec-vms ;;
1397 case "$UNAME_MACHINE" in
1398 A*) echo alpha-dec-vms ; exit ;;
1399 I*) echo ia64-dec-vms ; exit ;;
1400 V*) echo vax-dec-vms ; exit ;;
15131401 esac ;;
15141402 *:XENIX:*:SysV)
1515 GUESS=i386-pc-xenix
1516 ;;
1403 echo i386-pc-xenix
1404 exit ;;
15171405 i*86:skyos:*:*)
1518 SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
1519 GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
1520 ;;
1406 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
1407 exit ;;
15211408 i*86:rdos:*:*)
1522 GUESS=$UNAME_MACHINE-pc-rdos
1523 ;;
1524 *:AROS:*:*)
1525 GUESS=$UNAME_MACHINE-unknown-aros
1526 ;;
1409 echo "$UNAME_MACHINE"-pc-rdos
1410 exit ;;
1411 i*86:AROS:*:*)
1412 echo "$UNAME_MACHINE"-pc-aros
1413 exit ;;
15271414 x86_64:VMkernel:*:*)
1528 GUESS=$UNAME_MACHINE-unknown-esx
1529 ;;
1415 echo "$UNAME_MACHINE"-unknown-esx
1416 exit ;;
15301417 amd64:Isilon\ OneFS:*:*)
1531 GUESS=x86_64-unknown-onefs
1532 ;;
1533 *:Unleashed:*:*)
1534 GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
1535 ;;
1418 echo x86_64-unknown-onefs
1419 exit ;;
15361420 esac
15371421
1538 # Do we have a guess based on uname results?
1539 if test "x$GUESS" != x; then
1540 echo "$GUESS"
1541 exit
1542 fi
1543
1544 # No uname command or uname output not recognized.
1545 set_cc_for_build
1546 cat > "$dummy.c" <<EOF
1547 #ifdef _SEQUENT_
1548 #include <sys/types.h>
1549 #include <sys/utsname.h>
1550 #endif
1551 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1552 #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1553 #include <signal.h>
1554 #if defined(_SIZE_T_) || defined(SIGLOST)
1555 #include <sys/utsname.h>
1556 #endif
1557 #endif
1558 #endif
1559 main ()
1560 {
1561 #if defined (sony)
1562 #if defined (MIPSEB)
1563 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1564 I don't know.... */
1565 printf ("mips-sony-bsd\n"); exit (0);
1566 #else
1567 #include <sys/param.h>
1568 printf ("m68k-sony-newsos%s\n",
1569 #ifdef NEWSOS4
1570 "4"
1571 #else
1572 ""
1573 #endif
1574 ); exit (0);
1575 #endif
1576 #endif
1577
1578 #if defined (NeXT)
1579 #if !defined (__ARCHITECTURE__)
1580 #define __ARCHITECTURE__ "m68k"
1581 #endif
1582 int version;
1583 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1584 if (version < 4)
1585 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1586 else
1587 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1588 exit (0);
1589 #endif
1590
1591 #if defined (MULTIMAX) || defined (n16)
1592 #if defined (UMAXV)
1593 printf ("ns32k-encore-sysv\n"); exit (0);
1594 #else
1595 #if defined (CMU)
1596 printf ("ns32k-encore-mach\n"); exit (0);
1597 #else
1598 printf ("ns32k-encore-bsd\n"); exit (0);
1599 #endif
1600 #endif
1601 #endif
1602
1603 #if defined (__386BSD__)
1604 printf ("i386-pc-bsd\n"); exit (0);
1605 #endif
1606
1607 #if defined (sequent)
1608 #if defined (i386)
1609 printf ("i386-sequent-dynix\n"); exit (0);
1610 #endif
1611 #if defined (ns32000)
1612 printf ("ns32k-sequent-dynix\n"); exit (0);
1613 #endif
1614 #endif
1615
1616 #if defined (_SEQUENT_)
1617 struct utsname un;
1618
1619 uname(&un);
1620 if (strncmp(un.version, "V2", 2) == 0) {
1621 printf ("i386-sequent-ptx2\n"); exit (0);
1622 }
1623 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1624 printf ("i386-sequent-ptx1\n"); exit (0);
1625 }
1626 printf ("i386-sequent-ptx\n"); exit (0);
1627 #endif
1628
1629 #if defined (vax)
1630 #if !defined (ultrix)
1631 #include <sys/param.h>
1632 #if defined (BSD)
1633 #if BSD == 43
1634 printf ("vax-dec-bsd4.3\n"); exit (0);
1635 #else
1636 #if BSD == 199006
1637 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1638 #else
1639 printf ("vax-dec-bsd\n"); exit (0);
1640 #endif
1641 #endif
1642 #else
1643 printf ("vax-dec-bsd\n"); exit (0);
1644 #endif
1645 #else
1646 #if defined(_SIZE_T_) || defined(SIGLOST)
1647 struct utsname un;
1648 uname (&un);
1649 printf ("vax-dec-ultrix%s\n", un.release); exit (0);
1650 #else
1651 printf ("vax-dec-ultrix\n"); exit (0);
1652 #endif
1653 #endif
1654 #endif
1655 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1656 #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1657 #if defined(_SIZE_T_) || defined(SIGLOST)
1658 struct utsname *un;
1659 uname (&un);
1660 printf ("mips-dec-ultrix%s\n", un.release); exit (0);
1661 #else
1662 printf ("mips-dec-ultrix\n"); exit (0);
1663 #endif
1664 #endif
1665 #endif
1666
1667 #if defined (alliant) && defined (i860)
1668 printf ("i860-alliant-bsd\n"); exit (0);
1669 #endif
1670
1671 exit (1);
1672 }
1673 EOF
1674
1675 $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
1676 { echo "$SYSTEM_NAME"; exit; }
1677
1678 # Apollos put the system type in the environment.
1679 test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
1680
16811422 echo "$0: unable to guess system type" >&2
16821423
1683 case $UNAME_MACHINE:$UNAME_SYSTEM in
1424 case "$UNAME_MACHINE:$UNAME_SYSTEM" in
16841425 mips:Linux | mips64:Linux)
16851426 # If we got here on MIPS GNU/Linux, output extra information.
16861427 cat >&2 <<EOF
16971438 operating system you are using. If your script is old, overwrite *all*
16981439 copies of config.guess and config.sub with the latest versions from:
16991440
1700 https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
1441 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
17011442 and
1702 https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
1703 EOF
1704
1705 our_year=`echo $timestamp | sed 's,-.*,,'`
1706 thisyear=`date +%Y`
1707 # shellcheck disable=SC2003
1708 script_age=`expr "$thisyear" - "$our_year"`
1709 if test "$script_age" -lt 3 ; then
1710 cat >&2 <<EOF
1443 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
17111444
17121445 If $0 has already been updated, send the following data and any
17131446 information you think might be pertinent to config-patches@gnu.org to
17351468 UNAME_SYSTEM = "$UNAME_SYSTEM"
17361469 UNAME_VERSION = "$UNAME_VERSION"
17371470 EOF
1738 fi
17391471
17401472 exit 1
17411473
17421474 # Local variables:
1743 # eval: (add-hook 'before-save-hook 'time-stamp)
1475 # eval: (add-hook 'write-file-functions 'time-stamp)
17441476 # time-stamp-start: "timestamp='"
17451477 # time-stamp-format: "%:y-%02m-%02d"
17461478 # time-stamp-end: "'"
+1468
-1540
config.sub less more
00 #! /bin/sh
11 # Configuration validation subroutine script.
2 # Copyright 1992-2021 Free Software Foundation, Inc.
3
4 # shellcheck disable=SC2006,SC2268 # see below for rationale
5
6 timestamp='2021-07-03'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-22'
75
86 # This file is free software; you can redistribute it and/or modify it
97 # under the terms of the GNU General Public License as published by
3432 # Otherwise, we print the canonical config type on stdout and succeed.
3533
3634 # You can get the latest version of this script from:
37 # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
35 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
3836
3937 # This file is supposed to be the same for all GNU packages
4038 # and recognize all the CPU types, system types and aliases
5149 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
5250 # It is wrong to echo any other type of specification.
5351
54 # The "shellcheck disable" line above the timestamp inhibits complaints
55 # about features and limitations of the classic Bourne shell that were
56 # superseded or lifted in POSIX. However, this script identifies a wide
57 # variety of pre-POSIX systems that do not have POSIX shells at all, and
58 # even some reasonably current systems (Solaris 10 as case-in-point) still
59 # have a pre-POSIX /bin/sh.
60
6152 me=`echo "$0" | sed -e 's,.*/,,'`
6253
6354 usage="\
7566 version="\
7667 GNU config.sub ($timestamp)
7768
78 Copyright 1992-2021 Free Software Foundation, Inc.
69 Copyright 1992-2018 Free Software Foundation, Inc.
7970
8071 This is free software; see the source for copying conditions. There is NO
8172 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
9788 - ) # Use stdin as input.
9889 break ;;
9990 -* )
100 echo "$me: invalid option $1$help" >&2
91 echo "$me: invalid option $1$help"
10192 exit 1 ;;
10293
10394 *local*)
118109 exit 1;;
119110 esac
120111
121 # Split fields of configuration type
122 # shellcheck disable=SC2162
123 IFS="-" read field1 field2 field3 field4 <<EOF
124 $1
125 EOF
126
127 # Separate into logical components for further validation
128 case $1 in
129 *-*-*-*-*)
130 echo Invalid configuration \`"$1"\': more than four components >&2
131 exit 1
132 ;;
133 *-*-*-*)
134 basic_machine=$field1-$field2
135 basic_os=$field3-$field4
136 ;;
137 *-*-*)
138 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
139 # parts
140 maybe_os=$field2-$field3
141 case $maybe_os in
142 nto-qnx* | linux-* | uclinux-uclibc* \
143 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
144 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
145 | storm-chaos* | os2-emx* | rtmk-nova*)
146 basic_machine=$field1
147 basic_os=$maybe_os
148 ;;
149 android-linux)
150 basic_machine=$field1-unknown
151 basic_os=linux-android
152 ;;
153 *)
154 basic_machine=$field1-$field2
155 basic_os=$field3
156 ;;
157 esac
158 ;;
159 *-*)
160 # A lone config we happen to match not fitting any pattern
161 case $field1-$field2 in
162 decstation-3100)
163 basic_machine=mips-dec
164 basic_os=
165 ;;
166 *-*)
167 # Second component is usually, but not always the OS
168 case $field2 in
169 # Prevent following clause from handling this valid os
170 sun*os*)
171 basic_machine=$field1
172 basic_os=$field2
173 ;;
174 # Manufacturers
175 dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
176 | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
177 | unicom* | ibm* | next | hp | isi* | apollo | altos* \
178 | convergent* | ncr* | news | 32* | 3600* | 3100* \
179 | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
180 | ultra | tti* | harris | dolphin | highlevel | gould \
181 | cbm | ns | masscomp | apple | axis | knuth | cray \
182 | microblaze* | sim | cisco \
183 | oki | wec | wrs | winbond)
184 basic_machine=$field1-$field2
185 basic_os=
186 ;;
187 *)
188 basic_machine=$field1
189 basic_os=$field2
190 ;;
191 esac
192 ;;
193 esac
194 ;;
195 *)
196 # Convert single-component short-hands not valid as part of
197 # multi-component configurations.
198 case $field1 in
199 386bsd)
200 basic_machine=i386-pc
201 basic_os=bsd
202 ;;
203 a29khif)
204 basic_machine=a29k-amd
205 basic_os=udi
206 ;;
207 adobe68k)
208 basic_machine=m68010-adobe
209 basic_os=scout
210 ;;
211 alliant)
212 basic_machine=fx80-alliant
213 basic_os=
214 ;;
215 altos | altos3068)
216 basic_machine=m68k-altos
217 basic_os=
218 ;;
219 am29k)
220 basic_machine=a29k-none
221 basic_os=bsd
222 ;;
223 amdahl)
224 basic_machine=580-amdahl
225 basic_os=sysv
226 ;;
227 amiga)
228 basic_machine=m68k-unknown
229 basic_os=
230 ;;
231 amigaos | amigados)
232 basic_machine=m68k-unknown
233 basic_os=amigaos
234 ;;
235 amigaunix | amix)
236 basic_machine=m68k-unknown
237 basic_os=sysv4
238 ;;
239 apollo68)
240 basic_machine=m68k-apollo
241 basic_os=sysv
242 ;;
243 apollo68bsd)
244 basic_machine=m68k-apollo
245 basic_os=bsd
246 ;;
247 aros)
248 basic_machine=i386-pc
249 basic_os=aros
250 ;;
251 aux)
252 basic_machine=m68k-apple
253 basic_os=aux
254 ;;
255 balance)
256 basic_machine=ns32k-sequent
257 basic_os=dynix
258 ;;
259 blackfin)
260 basic_machine=bfin-unknown
261 basic_os=linux
262 ;;
263 cegcc)
264 basic_machine=arm-unknown
265 basic_os=cegcc
266 ;;
267 convex-c1)
268 basic_machine=c1-convex
269 basic_os=bsd
270 ;;
271 convex-c2)
272 basic_machine=c2-convex
273 basic_os=bsd
274 ;;
275 convex-c32)
276 basic_machine=c32-convex
277 basic_os=bsd
278 ;;
279 convex-c34)
280 basic_machine=c34-convex
281 basic_os=bsd
282 ;;
283 convex-c38)
284 basic_machine=c38-convex
285 basic_os=bsd
286 ;;
287 cray)
288 basic_machine=j90-cray
289 basic_os=unicos
290 ;;
291 crds | unos)
292 basic_machine=m68k-crds
293 basic_os=
294 ;;
295 da30)
296 basic_machine=m68k-da30
297 basic_os=
298 ;;
299 decstation | pmax | pmin | dec3100 | decstatn)
300 basic_machine=mips-dec
301 basic_os=
302 ;;
303 delta88)
304 basic_machine=m88k-motorola
305 basic_os=sysv3
306 ;;
307 dicos)
308 basic_machine=i686-pc
309 basic_os=dicos
310 ;;
311 djgpp)
312 basic_machine=i586-pc
313 basic_os=msdosdjgpp
314 ;;
315 ebmon29k)
316 basic_machine=a29k-amd
317 basic_os=ebmon
318 ;;
319 es1800 | OSE68k | ose68k | ose | OSE)
320 basic_machine=m68k-ericsson
321 basic_os=ose
322 ;;
323 gmicro)
324 basic_machine=tron-gmicro
325 basic_os=sysv
326 ;;
327 go32)
328 basic_machine=i386-pc
329 basic_os=go32
330 ;;
331 h8300hms)
332 basic_machine=h8300-hitachi
333 basic_os=hms
334 ;;
335 h8300xray)
336 basic_machine=h8300-hitachi
337 basic_os=xray
338 ;;
339 h8500hms)
340 basic_machine=h8500-hitachi
341 basic_os=hms
342 ;;
343 harris)
344 basic_machine=m88k-harris
345 basic_os=sysv3
346 ;;
347 hp300 | hp300hpux)
348 basic_machine=m68k-hp
349 basic_os=hpux
350 ;;
351 hp300bsd)
352 basic_machine=m68k-hp
353 basic_os=bsd
354 ;;
355 hppaosf)
356 basic_machine=hppa1.1-hp
357 basic_os=osf
358 ;;
359 hppro)
360 basic_machine=hppa1.1-hp
361 basic_os=proelf
362 ;;
363 i386mach)
364 basic_machine=i386-mach
365 basic_os=mach
366 ;;
367 isi68 | isi)
368 basic_machine=m68k-isi
369 basic_os=sysv
370 ;;
371 m68knommu)
372 basic_machine=m68k-unknown
373 basic_os=linux
374 ;;
375 magnum | m3230)
376 basic_machine=mips-mips
377 basic_os=sysv
378 ;;
379 merlin)
380 basic_machine=ns32k-utek
381 basic_os=sysv
382 ;;
383 mingw64)
384 basic_machine=x86_64-pc
385 basic_os=mingw64
386 ;;
387 mingw32)
388 basic_machine=i686-pc
389 basic_os=mingw32
390 ;;
391 mingw32ce)
392 basic_machine=arm-unknown
393 basic_os=mingw32ce
394 ;;
395 monitor)
396 basic_machine=m68k-rom68k
397 basic_os=coff
398 ;;
399 morphos)
400 basic_machine=powerpc-unknown
401 basic_os=morphos
402 ;;
403 moxiebox)
404 basic_machine=moxie-unknown
405 basic_os=moxiebox
406 ;;
407 msdos)
408 basic_machine=i386-pc
409 basic_os=msdos
410 ;;
411 msys)
412 basic_machine=i686-pc
413 basic_os=msys
414 ;;
415 mvs)
416 basic_machine=i370-ibm
417 basic_os=mvs
418 ;;
419 nacl)
420 basic_machine=le32-unknown
421 basic_os=nacl
422 ;;
423 ncr3000)
424 basic_machine=i486-ncr
425 basic_os=sysv4
426 ;;
427 netbsd386)
428 basic_machine=i386-pc
429 basic_os=netbsd
430 ;;
431 netwinder)
432 basic_machine=armv4l-rebel
433 basic_os=linux
434 ;;
435 news | news700 | news800 | news900)
436 basic_machine=m68k-sony
437 basic_os=newsos
438 ;;
439 news1000)
440 basic_machine=m68030-sony
441 basic_os=newsos
442 ;;
443 necv70)
444 basic_machine=v70-nec
445 basic_os=sysv
446 ;;
447 nh3000)
448 basic_machine=m68k-harris
449 basic_os=cxux
450 ;;
451 nh[45]000)
452 basic_machine=m88k-harris
453 basic_os=cxux
454 ;;
455 nindy960)
456 basic_machine=i960-intel
457 basic_os=nindy
458 ;;
459 mon960)
460 basic_machine=i960-intel
461 basic_os=mon960
462 ;;
463 nonstopux)
464 basic_machine=mips-compaq
465 basic_os=nonstopux
466 ;;
467 os400)
468 basic_machine=powerpc-ibm
469 basic_os=os400
470 ;;
471 OSE68000 | ose68000)
472 basic_machine=m68000-ericsson
473 basic_os=ose
474 ;;
475 os68k)
476 basic_machine=m68k-none
477 basic_os=os68k
478 ;;
479 paragon)
480 basic_machine=i860-intel
481 basic_os=osf
482 ;;
483 parisc)
484 basic_machine=hppa-unknown
485 basic_os=linux
486 ;;
487 psp)
488 basic_machine=mipsallegrexel-sony
489 basic_os=psp
490 ;;
491 pw32)
492 basic_machine=i586-unknown
493 basic_os=pw32
494 ;;
495 rdos | rdos64)
496 basic_machine=x86_64-pc
497 basic_os=rdos
498 ;;
499 rdos32)
500 basic_machine=i386-pc
501 basic_os=rdos
502 ;;
503 rom68k)
504 basic_machine=m68k-rom68k
505 basic_os=coff
506 ;;
507 sa29200)
508 basic_machine=a29k-amd
509 basic_os=udi
510 ;;
511 sei)
512 basic_machine=mips-sei
513 basic_os=seiux
514 ;;
515 sequent)
516 basic_machine=i386-sequent
517 basic_os=
518 ;;
519 sps7)
520 basic_machine=m68k-bull
521 basic_os=sysv2
522 ;;
523 st2000)
524 basic_machine=m68k-tandem
525 basic_os=
526 ;;
527 stratus)
528 basic_machine=i860-stratus
529 basic_os=sysv4
530 ;;
531 sun2)
532 basic_machine=m68000-sun
533 basic_os=
534 ;;
535 sun2os3)
536 basic_machine=m68000-sun
537 basic_os=sunos3
538 ;;
539 sun2os4)
540 basic_machine=m68000-sun
541 basic_os=sunos4
542 ;;
543 sun3)
544 basic_machine=m68k-sun
545 basic_os=
546 ;;
547 sun3os3)
548 basic_machine=m68k-sun
549 basic_os=sunos3
550 ;;
551 sun3os4)
552 basic_machine=m68k-sun
553 basic_os=sunos4
554 ;;
555 sun4)
556 basic_machine=sparc-sun
557 basic_os=
558 ;;
559 sun4os3)
560 basic_machine=sparc-sun
561 basic_os=sunos3
562 ;;
563 sun4os4)
564 basic_machine=sparc-sun
565 basic_os=sunos4
566 ;;
567 sun4sol2)
568 basic_machine=sparc-sun
569 basic_os=solaris2
570 ;;
571 sun386 | sun386i | roadrunner)
572 basic_machine=i386-sun
573 basic_os=
574 ;;
575 sv1)
576 basic_machine=sv1-cray
577 basic_os=unicos
578 ;;
579 symmetry)
580 basic_machine=i386-sequent
581 basic_os=dynix
582 ;;
583 t3e)
584 basic_machine=alphaev5-cray
585 basic_os=unicos
586 ;;
587 t90)
588 basic_machine=t90-cray
589 basic_os=unicos
590 ;;
591 toad1)
592 basic_machine=pdp10-xkl
593 basic_os=tops20
594 ;;
595 tpf)
596 basic_machine=s390x-ibm
597 basic_os=tpf
598 ;;
599 udi29k)
600 basic_machine=a29k-amd
601 basic_os=udi
602 ;;
603 ultra3)
604 basic_machine=a29k-nyu
605 basic_os=sym1
606 ;;
607 v810 | necv810)
608 basic_machine=v810-nec
609 basic_os=none
610 ;;
611 vaxv)
612 basic_machine=vax-dec
613 basic_os=sysv
614 ;;
615 vms)
616 basic_machine=vax-dec
617 basic_os=vms
618 ;;
619 vsta)
620 basic_machine=i386-pc
621 basic_os=vsta
622 ;;
623 vxworks960)
624 basic_machine=i960-wrs
625 basic_os=vxworks
626 ;;
627 vxworks68)
628 basic_machine=m68k-wrs
629 basic_os=vxworks
630 ;;
631 vxworks29k)
632 basic_machine=a29k-wrs
633 basic_os=vxworks
634 ;;
635 xbox)
636 basic_machine=i686-pc
637 basic_os=mingw32
638 ;;
639 ymp)
640 basic_machine=ymp-cray
641 basic_os=unicos
642 ;;
643 *)
644 basic_machine=$1
645 basic_os=
646 ;;
647 esac
648 ;;
112 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
113 # Here we must recognize all the valid KERNEL-OS combinations.
114 maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
115 case $maybe_os in
116 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
117 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
118 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
119 kopensolaris*-gnu* | cloudabi*-eabi* | \
120 storm-chaos* | os2-emx* | rtmk-nova*)
121 os=-$maybe_os
122 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
123 ;;
124 android-linux)
125 os=-linux-android
126 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
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 ;;
649134 esac
650135
651 # Decode 1-component or ad-hoc basic machines
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 | -microblaze*)
151 os=
152 basic_machine=$1
153 ;;
154 -bluegene*)
155 os=-cnk
156 ;;
157 -sim | -cisco | -oki | -wec | -winbond)
158 os=
159 basic_machine=$1
160 ;;
161 -scout)
162 ;;
163 -wrs)
164 os=-vxworks
165 basic_machine=$1
166 ;;
167 -chorusos*)
168 os=-chorusos
169 basic_machine=$1
170 ;;
171 -chorusrdb)
172 os=-chorusrdb
173 basic_machine=$1
174 ;;
175 -hiux*)
176 os=-hiuxwe2
177 ;;
178 -sco6)
179 os=-sco5v6
180 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
181 ;;
182 -sco5)
183 os=-sco3.2v5
184 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
185 ;;
186 -sco4)
187 os=-sco3.2v4
188 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
189 ;;
190 -sco3.2.[4-9]*)
191 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
192 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
193 ;;
194 -sco3.2v[4-9]*)
195 # Don't forget version if it is 3.2v4 or newer.
196 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
197 ;;
198 -sco5v6*)
199 # Don't forget version if it is 3.2v4 or newer.
200 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
201 ;;
202 -sco*)
203 os=-sco3.2v2
204 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
205 ;;
206 -udk*)
207 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
208 ;;
209 -isc)
210 os=-isc2.2
211 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
212 ;;
213 -clix*)
214 basic_machine=clipper-intergraph
215 ;;
216 -isc*)
217 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
218 ;;
219 -lynx*178)
220 os=-lynxos178
221 ;;
222 -lynx*5)
223 os=-lynxos5
224 ;;
225 -lynx*)
226 os=-lynxos
227 ;;
228 -ptx*)
229 basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
230 ;;
231 -psos*)
232 os=-psos
233 ;;
234 -mint | -mint[0-9]*)
235 basic_machine=m68k-atari
236 os=-mint
237 ;;
238 esac
239
240 # Decode aliases for certain CPU-COMPANY combinations.
652241 case $basic_machine in
653 # Here we handle the default manufacturer of certain CPU types. It is in
654 # some cases the only manufacturer, in others, it is the most popular.
655 w89k)
656 cpu=hppa1.1
657 vendor=winbond
658 ;;
659 op50n)
660 cpu=hppa1.1
661 vendor=oki
662 ;;
663 op60c)
664 cpu=hppa1.1
665 vendor=oki
666 ;;
667 ibm*)
668 cpu=i370
669 vendor=ibm
670 ;;
671 orion105)
672 cpu=clipper
673 vendor=highlevel
674 ;;
675 mac | mpw | mac-mpw)
676 cpu=m68k
677 vendor=apple
678 ;;
679 pmac | pmac-mpw)
680 cpu=powerpc
681 vendor=apple
682 ;;
683
684 # Recognize the various machine names and aliases which stand
685 # for a CPU type and a company and sometimes even an OS.
686 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
687 cpu=m68000
688 vendor=att
689 ;;
690 3b*)
691 cpu=we32k
692 vendor=att
693 ;;
694 bluegene*)
695 cpu=powerpc
696 vendor=ibm
697 basic_os=cnk
698 ;;
699 decsystem10* | dec10*)
700 cpu=pdp10
701 vendor=dec
702 basic_os=tops10
703 ;;
704 decsystem20* | dec20*)
705 cpu=pdp10
706 vendor=dec
707 basic_os=tops20
708 ;;
709 delta | 3300 | motorola-3300 | motorola-delta \
710 | 3300-motorola | delta-motorola)
711 cpu=m68k
712 vendor=motorola
713 ;;
714 dpx2*)
715 cpu=m68k
716 vendor=bull
717 basic_os=sysv3
718 ;;
719 encore | umax | mmax)
720 cpu=ns32k
721 vendor=encore
722 ;;
723 elxsi)
724 cpu=elxsi
725 vendor=elxsi
726 basic_os=${basic_os:-bsd}
727 ;;
728 fx2800)
729 cpu=i860
730 vendor=alliant
731 ;;
732 genix)
733 cpu=ns32k
734 vendor=ns
735 ;;
736 h3050r* | hiux*)
737 cpu=hppa1.1
738 vendor=hitachi
739 basic_os=hiuxwe2
740 ;;
741 hp3k9[0-9][0-9] | hp9[0-9][0-9])
742 cpu=hppa1.0
743 vendor=hp
744 ;;
745 hp9k2[0-9][0-9] | hp9k31[0-9])
746 cpu=m68000
747 vendor=hp
748 ;;
749 hp9k3[2-9][0-9])
750 cpu=m68k
751 vendor=hp
752 ;;
753 hp9k6[0-9][0-9] | hp6[0-9][0-9])
754 cpu=hppa1.0
755 vendor=hp
756 ;;
757 hp9k7[0-79][0-9] | hp7[0-79][0-9])
758 cpu=hppa1.1
759 vendor=hp
760 ;;
761 hp9k78[0-9] | hp78[0-9])
762 # FIXME: really hppa2.0-hp
763 cpu=hppa1.1
764 vendor=hp
765 ;;
766 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
767 # FIXME: really hppa2.0-hp
768 cpu=hppa1.1
769 vendor=hp
770 ;;
771 hp9k8[0-9][13679] | hp8[0-9][13679])
772 cpu=hppa1.1
773 vendor=hp
774 ;;
775 hp9k8[0-9][0-9] | hp8[0-9][0-9])
776 cpu=hppa1.0
777 vendor=hp
778 ;;
779 i*86v32)
780 cpu=`echo "$1" | sed -e 's/86.*/86/'`
781 vendor=pc
782 basic_os=sysv32
783 ;;
784 i*86v4*)
785 cpu=`echo "$1" | sed -e 's/86.*/86/'`
786 vendor=pc
787 basic_os=sysv4
788 ;;
789 i*86v)
790 cpu=`echo "$1" | sed -e 's/86.*/86/'`
791 vendor=pc
792 basic_os=sysv
793 ;;
794 i*86sol2)
795 cpu=`echo "$1" | sed -e 's/86.*/86/'`
796 vendor=pc
797 basic_os=solaris2
798 ;;
799 j90 | j90-cray)
800 cpu=j90
801 vendor=cray
802 basic_os=${basic_os:-unicos}
803 ;;
804 iris | iris4d)
805 cpu=mips
806 vendor=sgi
807 case $basic_os in
808 irix*)
809 ;;
810 *)
811 basic_os=irix4
812 ;;
813 esac
814 ;;
815 miniframe)
816 cpu=m68000
817 vendor=convergent
818 ;;
819 *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
820 cpu=m68k
821 vendor=atari
822 basic_os=mint
823 ;;
824 news-3600 | risc-news)
825 cpu=mips
826 vendor=sony
827 basic_os=newsos
828 ;;
829 next | m*-next)
830 cpu=m68k
831 vendor=next
832 case $basic_os in
833 openstep*)
834 ;;
835 nextstep*)
836 ;;
837 ns2*)
838 basic_os=nextstep2
839 ;;
840 *)
841 basic_os=nextstep3
842 ;;
843 esac
844 ;;
845 np1)
846 cpu=np1
847 vendor=gould
848 ;;
849 op50n-* | op60c-*)
850 cpu=hppa1.1
851 vendor=oki
852 basic_os=proelf
853 ;;
854 pa-hitachi)
855 cpu=hppa1.1
856 vendor=hitachi
857 basic_os=hiuxwe2
858 ;;
859 pbd)
860 cpu=sparc
861 vendor=tti
862 ;;
863 pbb)
864 cpu=m68k
865 vendor=tti
866 ;;
867 pc532)
868 cpu=ns32k
869 vendor=pc532
870 ;;
871 pn)
872 cpu=pn
873 vendor=gould
874 ;;
875 power)
876 cpu=power
877 vendor=ibm
878 ;;
879 ps2)
880 cpu=i386
881 vendor=ibm
882 ;;
883 rm[46]00)
884 cpu=mips
885 vendor=siemens
886 ;;
887 rtpc | rtpc-*)
888 cpu=romp
889 vendor=ibm
890 ;;
891 sde)
892 cpu=mipsisa32
893 vendor=sde
894 basic_os=${basic_os:-elf}
895 ;;
896 simso-wrs)
897 cpu=sparclite
898 vendor=wrs
899 basic_os=vxworks
900 ;;
901 tower | tower-32)
902 cpu=m68k
903 vendor=ncr
904 ;;
905 vpp*|vx|vx-*)
906 cpu=f301
907 vendor=fujitsu
908 ;;
909 w65)
910 cpu=w65
911 vendor=wdc
912 ;;
913 w89k-*)
914 cpu=hppa1.1
915 vendor=winbond
916 basic_os=proelf
917 ;;
918 none)
919 cpu=none
920 vendor=none
242 # Recognize the basic CPU types without company name.
243 # Some are omitted here because they have special meanings below.
244 1750a | 580 \
245 | a29k \
246 | aarch64 | aarch64_be \
247 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
248 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
249 | am33_2.0 \
250 | arc | arceb \
251 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
252 | avr | avr32 \
253 | ba \
254 | be32 | be64 \
255 | bfin \
256 | c4x | c8051 | clipper \
257 | d10v | d30v | dlx | dsp16xx \
258 | e2k | epiphany \
259 | fido | fr30 | frv | ft32 \
260 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
261 | hexagon \
262 | i370 | i860 | i960 | ia16 | ia64 \
263 | ip2k | iq2000 \
264 | k1om \
265 | le32 | le64 \
266 | lm32 \
267 | m32c | m32r | m32rle | m68000 | m68k | m88k \
268 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
269 | mips | mipsbe | mipseb | mipsel | mipsle \
270 | mips16 \
271 | mips64 | mips64el \
272 | mips64octeon | mips64octeonel \
273 | mips64orion | mips64orionel \
274 | mips64r5900 | mips64r5900el \
275 | mips64vr | mips64vrel \
276 | mips64vr4100 | mips64vr4100el \
277 | mips64vr4300 | mips64vr4300el \
278 | mips64vr5000 | mips64vr5000el \
279 | mips64vr5900 | mips64vr5900el \
280 | mipsisa32 | mipsisa32el \
281 | mipsisa32r2 | mipsisa32r2el \
282 | mipsisa32r6 | mipsisa32r6el \
283 | mipsisa64 | mipsisa64el \
284 | mipsisa64r2 | mipsisa64r2el \
285 | mipsisa64r6 | mipsisa64r6el \
286 | mipsisa64sb1 | mipsisa64sb1el \
287 | mipsisa64sr71k | mipsisa64sr71kel \
288 | mipsr5900 | mipsr5900el \
289 | mipstx39 | mipstx39el \
290 | mn10200 | mn10300 \
291 | moxie \
292 | mt \
293 | msp430 \
294 | nds32 | nds32le | nds32be \
295 | nios | nios2 | nios2eb | nios2el \
296 | ns16k | ns32k \
297 | open8 | or1k | or1knd | or32 \
298 | pdp10 | pj | pjl \
299 | powerpc | powerpc64 | powerpc64le | powerpcle \
300 | pru \
301 | pyramid \
302 | riscv32 | riscv64 \
303 | rl78 | rx \
304 | score \
305 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
306 | sh64 | sh64le \
307 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
308 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
309 | spu \
310 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
311 | ubicom32 \
312 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
313 | visium \
314 | wasm32 \
315 | x86 | xc16x | xstormy16 | xtensa \
316 | z8k | z80)
317 basic_machine=$basic_machine-unknown
318 ;;
319 c54x)
320 basic_machine=tic54x-unknown
321 ;;
322 c55x)
323 basic_machine=tic55x-unknown
324 ;;
325 c6x)
326 basic_machine=tic6x-unknown
921327 ;;
922328 leon|leon[3-9])
923 cpu=sparc
924 vendor=$basic_machine
925 ;;
926 leon-*|leon[3-9]-*)
927 cpu=sparc
928 vendor=`echo "$basic_machine" | sed 's/-.*//'`
929 ;;
930
931 *-*)
932 # shellcheck disable=SC2162
933 IFS="-" read cpu vendor <<EOF
934 $basic_machine
935 EOF
936 ;;
329 basic_machine=sparc-$basic_machine
330 ;;
331 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
332 basic_machine=$basic_machine-unknown
333 os=-none
334 ;;
335 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
336 ;;
337 ms1)
338 basic_machine=mt-unknown
339 ;;
340
341 strongarm | thumb | xscale)
342 basic_machine=arm-unknown
343 ;;
344 xgate)
345 basic_machine=$basic_machine-unknown
346 os=-none
347 ;;
348 xscaleeb)
349 basic_machine=armeb-unknown
350 ;;
351
352 xscaleel)
353 basic_machine=armel-unknown
354 ;;
355
937356 # We use `pc' rather than `unknown'
938357 # because (1) that's what they normally are, and
939358 # (2) the word "unknown" tends to confuse beginning users.
940359 i*86 | x86_64)
941 cpu=$basic_machine
942 vendor=pc
943 ;;
944 # These rules are duplicated from below for sake of the special case above;
945 # i.e. things that normalized to x86 arches should also default to "pc"
360 basic_machine=$basic_machine-pc
361 ;;
362 # Object if more than one company name word.
363 *-*-*)
364 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
365 exit 1
366 ;;
367 # Recognize the basic CPU types with company name.
368 580-* \
369 | a29k-* \
370 | aarch64-* | aarch64_be-* \
371 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
372 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
373 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
374 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
375 | avr-* | avr32-* \
376 | ba-* \
377 | be32-* | be64-* \
378 | bfin-* | bs2000-* \
379 | c[123]* | c30-* | [cjt]90-* | c4x-* \
380 | c8051-* | clipper-* | craynv-* | cydra-* \
381 | d10v-* | d30v-* | dlx-* \
382 | e2k-* | elxsi-* \
383 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
384 | h8300-* | h8500-* \
385 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
386 | hexagon-* \
387 | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
388 | ip2k-* | iq2000-* \
389 | k1om-* \
390 | le32-* | le64-* \
391 | lm32-* \
392 | m32c-* | m32r-* | m32rle-* \
393 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
394 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
395 | microblaze-* | microblazeel-* \
396 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
397 | mips16-* \
398 | mips64-* | mips64el-* \
399 | mips64octeon-* | mips64octeonel-* \
400 | mips64orion-* | mips64orionel-* \
401 | mips64r5900-* | mips64r5900el-* \
402 | mips64vr-* | mips64vrel-* \
403 | mips64vr4100-* | mips64vr4100el-* \
404 | mips64vr4300-* | mips64vr4300el-* \
405 | mips64vr5000-* | mips64vr5000el-* \
406 | mips64vr5900-* | mips64vr5900el-* \
407 | mipsisa32-* | mipsisa32el-* \
408 | mipsisa32r2-* | mipsisa32r2el-* \
409 | mipsisa32r6-* | mipsisa32r6el-* \
410 | mipsisa64-* | mipsisa64el-* \
411 | mipsisa64r2-* | mipsisa64r2el-* \
412 | mipsisa64r6-* | mipsisa64r6el-* \
413 | mipsisa64sb1-* | mipsisa64sb1el-* \
414 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
415 | mipsr5900-* | mipsr5900el-* \
416 | mipstx39-* | mipstx39el-* \
417 | mmix-* \
418 | mt-* \
419 | msp430-* \
420 | nds32-* | nds32le-* | nds32be-* \
421 | nios-* | nios2-* | nios2eb-* | nios2el-* \
422 | none-* | np1-* | ns16k-* | ns32k-* \
423 | open8-* \
424 | or1k*-* \
425 | orion-* \
426 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
427 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
428 | pru-* \
429 | pyramid-* \
430 | riscv32-* | riscv64-* \
431 | rl78-* | romp-* | rs6000-* | rx-* \
432 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
433 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
434 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
435 | sparclite-* \
436 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
437 | tahoe-* \
438 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
439 | tile*-* \
440 | tron-* \
441 | ubicom32-* \
442 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
443 | vax-* \
444 | visium-* \
445 | wasm32-* \
446 | we32k-* \
447 | x86-* | x86_64-* | xc16x-* | xps100-* \
448 | xstormy16-* | xtensa*-* \
449 | ymp-* \
450 | z8k-* | z80-*)
451 ;;
452 # Recognize the basic CPU types without company name, with glob match.
453 xtensa*)
454 basic_machine=$basic_machine-unknown
455 ;;
456 # Recognize the various machine names and aliases which stand
457 # for a CPU type and a company and sometimes even an OS.
458 386bsd)
459 basic_machine=i386-pc
460 os=-bsd
461 ;;
462 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
463 basic_machine=m68000-att
464 ;;
465 3b*)
466 basic_machine=we32k-att
467 ;;
468 a29khif)
469 basic_machine=a29k-amd
470 os=-udi
471 ;;
472 abacus)
473 basic_machine=abacus-unknown
474 ;;
475 adobe68k)
476 basic_machine=m68010-adobe
477 os=-scout
478 ;;
479 alliant | fx80)
480 basic_machine=fx80-alliant
481 ;;
482 altos | altos3068)
483 basic_machine=m68k-altos
484 ;;
485 am29k)
486 basic_machine=a29k-none
487 os=-bsd
488 ;;
489 amd64)
490 basic_machine=x86_64-pc
491 ;;
492 amd64-*)
493 basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
494 ;;
495 amdahl)
496 basic_machine=580-amdahl
497 os=-sysv
498 ;;
499 amiga | amiga-*)
500 basic_machine=m68k-unknown
501 ;;
502 amigaos | amigados)
503 basic_machine=m68k-unknown
504 os=-amigaos
505 ;;
506 amigaunix | amix)
507 basic_machine=m68k-unknown
508 os=-sysv4
509 ;;
510 apollo68)
511 basic_machine=m68k-apollo
512 os=-sysv
513 ;;
514 apollo68bsd)
515 basic_machine=m68k-apollo
516 os=-bsd
517 ;;
518 aros)
519 basic_machine=i386-pc
520 os=-aros
521 ;;
522 asmjs)
523 basic_machine=asmjs-unknown
524 ;;
525 aux)
526 basic_machine=m68k-apple
527 os=-aux
528 ;;
529 balance)
530 basic_machine=ns32k-sequent
531 os=-dynix
532 ;;
533 blackfin)
534 basic_machine=bfin-unknown
535 os=-linux
536 ;;
537 blackfin-*)
538 basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
539 os=-linux
540 ;;
541 bluegene*)
542 basic_machine=powerpc-ibm
543 os=-cnk
544 ;;
545 c54x-*)
546 basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
547 ;;
548 c55x-*)
549 basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
550 ;;
551 c6x-*)
552 basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
553 ;;
554 c90)
555 basic_machine=c90-cray
556 os=-unicos
557 ;;
558 cegcc)
559 basic_machine=arm-unknown
560 os=-cegcc
561 ;;
562 convex-c1)
563 basic_machine=c1-convex
564 os=-bsd
565 ;;
566 convex-c2)
567 basic_machine=c2-convex
568 os=-bsd
569 ;;
570 convex-c32)
571 basic_machine=c32-convex
572 os=-bsd
573 ;;
574 convex-c34)
575 basic_machine=c34-convex
576 os=-bsd
577 ;;
578 convex-c38)
579 basic_machine=c38-convex
580 os=-bsd
581 ;;
582 cray | j90)
583 basic_machine=j90-cray
584 os=-unicos
585 ;;
586 craynv)
587 basic_machine=craynv-cray
588 os=-unicosmp
589 ;;
590 cr16 | cr16-*)
591 basic_machine=cr16-unknown
592 os=-elf
593 ;;
594 crds | unos)
595 basic_machine=m68k-crds
596 ;;
597 crisv32 | crisv32-* | etraxfs*)
598 basic_machine=crisv32-axis
599 ;;
600 cris | cris-* | etrax*)
601 basic_machine=cris-axis
602 ;;
603 crx)
604 basic_machine=crx-unknown
605 os=-elf
606 ;;
607 da30 | da30-*)
608 basic_machine=m68k-da30
609 ;;
610 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
611 basic_machine=mips-dec
612 ;;
613 decsystem10* | dec10*)
614 basic_machine=pdp10-dec
615 os=-tops10
616 ;;
617 decsystem20* | dec20*)
618 basic_machine=pdp10-dec
619 os=-tops20
620 ;;
621 delta | 3300 | motorola-3300 | motorola-delta \
622 | 3300-motorola | delta-motorola)
623 basic_machine=m68k-motorola
624 ;;
625 delta88)
626 basic_machine=m88k-motorola
627 os=-sysv3
628 ;;
629 dicos)
630 basic_machine=i686-pc
631 os=-dicos
632 ;;
633 djgpp)
634 basic_machine=i586-pc
635 os=-msdosdjgpp
636 ;;
637 dpx20 | dpx20-*)
638 basic_machine=rs6000-bull
639 os=-bosx
640 ;;
641 dpx2*)
642 basic_machine=m68k-bull
643 os=-sysv3
644 ;;
645 e500v[12])
646 basic_machine=powerpc-unknown
647 os=$os"spe"
648 ;;
649 e500v[12]-*)
650 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
651 os=$os"spe"
652 ;;
653 ebmon29k)
654 basic_machine=a29k-amd
655 os=-ebmon
656 ;;
657 elxsi)
658 basic_machine=elxsi-elxsi
659 os=-bsd
660 ;;
661 encore | umax | mmax)
662 basic_machine=ns32k-encore
663 ;;
664 es1800 | OSE68k | ose68k | ose | OSE)
665 basic_machine=m68k-ericsson
666 os=-ose
667 ;;
668 fx2800)
669 basic_machine=i860-alliant
670 ;;
671 genix)
672 basic_machine=ns32k-ns
673 ;;
674 gmicro)
675 basic_machine=tron-gmicro
676 os=-sysv
677 ;;
678 go32)
679 basic_machine=i386-pc
680 os=-go32
681 ;;
682 h3050r* | hiux*)
683 basic_machine=hppa1.1-hitachi
684 os=-hiuxwe2
685 ;;
686 h8300hms)
687 basic_machine=h8300-hitachi
688 os=-hms
689 ;;
690 h8300xray)
691 basic_machine=h8300-hitachi
692 os=-xray
693 ;;
694 h8500hms)
695 basic_machine=h8500-hitachi
696 os=-hms
697 ;;
698 harris)
699 basic_machine=m88k-harris
700 os=-sysv3
701 ;;
702 hp300-*)
703 basic_machine=m68k-hp
704 ;;
705 hp300bsd)
706 basic_machine=m68k-hp
707 os=-bsd
708 ;;
709 hp300hpux)
710 basic_machine=m68k-hp
711 os=-hpux
712 ;;
713 hp3k9[0-9][0-9] | hp9[0-9][0-9])
714 basic_machine=hppa1.0-hp
715 ;;
716 hp9k2[0-9][0-9] | hp9k31[0-9])
717 basic_machine=m68000-hp
718 ;;
719 hp9k3[2-9][0-9])
720 basic_machine=m68k-hp
721 ;;
722 hp9k6[0-9][0-9] | hp6[0-9][0-9])
723 basic_machine=hppa1.0-hp
724 ;;
725 hp9k7[0-79][0-9] | hp7[0-79][0-9])
726 basic_machine=hppa1.1-hp
727 ;;
728 hp9k78[0-9] | hp78[0-9])
729 # FIXME: really hppa2.0-hp
730 basic_machine=hppa1.1-hp
731 ;;
732 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
733 # FIXME: really hppa2.0-hp
734 basic_machine=hppa1.1-hp
735 ;;
736 hp9k8[0-9][13679] | hp8[0-9][13679])
737 basic_machine=hppa1.1-hp
738 ;;
739 hp9k8[0-9][0-9] | hp8[0-9][0-9])
740 basic_machine=hppa1.0-hp
741 ;;
742 hppaosf)
743 basic_machine=hppa1.1-hp
744 os=-osf
745 ;;
746 hppro)
747 basic_machine=hppa1.1-hp
748 os=-proelf
749 ;;
750 i370-ibm* | ibm*)
751 basic_machine=i370-ibm
752 ;;
753 i*86v32)
754 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
755 os=-sysv32
756 ;;
757 i*86v4*)
758 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
759 os=-sysv4
760 ;;
761 i*86v)
762 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
763 os=-sysv
764 ;;
765 i*86sol2)
766 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
767 os=-solaris2
768 ;;
769 i386mach)
770 basic_machine=i386-mach
771 os=-mach
772 ;;
773 vsta)
774 basic_machine=i386-unknown
775 os=-vsta
776 ;;
777 iris | iris4d)
778 basic_machine=mips-sgi
779 case $os in
780 -irix*)
781 ;;
782 *)
783 os=-irix4
784 ;;
785 esac
786 ;;
787 isi68 | isi)
788 basic_machine=m68k-isi
789 os=-sysv
790 ;;
791 leon-*|leon[3-9]-*)
792 basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
793 ;;
794 m68knommu)
795 basic_machine=m68k-unknown
796 os=-linux
797 ;;
798 m68knommu-*)
799 basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
800 os=-linux
801 ;;
802 magnum | m3230)
803 basic_machine=mips-mips
804 os=-sysv
805 ;;
806 merlin)
807 basic_machine=ns32k-utek
808 os=-sysv
809 ;;
810 microblaze*)
811 basic_machine=microblaze-xilinx
812 ;;
813 mingw64)
814 basic_machine=x86_64-pc
815 os=-mingw64
816 ;;
817 mingw32)
818 basic_machine=i686-pc
819 os=-mingw32
820 ;;
821 mingw32ce)
822 basic_machine=arm-unknown
823 os=-mingw32ce
824 ;;
825 miniframe)
826 basic_machine=m68000-convergent
827 ;;
828 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
829 basic_machine=m68k-atari
830 os=-mint
831 ;;
832 mips3*-*)
833 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
834 ;;
835 mips3*)
836 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
837 ;;
838 monitor)
839 basic_machine=m68k-rom68k
840 os=-coff
841 ;;
842 morphos)
843 basic_machine=powerpc-unknown
844 os=-morphos
845 ;;
846 moxiebox)
847 basic_machine=moxie-unknown
848 os=-moxiebox
849 ;;
850 msdos)
851 basic_machine=i386-pc
852 os=-msdos
853 ;;
854 ms1-*)
855 basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
856 ;;
857 msys)
858 basic_machine=i686-pc
859 os=-msys
860 ;;
861 mvs)
862 basic_machine=i370-ibm
863 os=-mvs
864 ;;
865 nacl)
866 basic_machine=le32-unknown
867 os=-nacl
868 ;;
869 ncr3000)
870 basic_machine=i486-ncr
871 os=-sysv4
872 ;;
873 netbsd386)
874 basic_machine=i386-unknown
875 os=-netbsd
876 ;;
877 netwinder)
878 basic_machine=armv4l-rebel
879 os=-linux
880 ;;
881 news | news700 | news800 | news900)
882 basic_machine=m68k-sony
883 os=-newsos
884 ;;
885 news1000)
886 basic_machine=m68030-sony
887 os=-newsos
888 ;;
889 news-3600 | risc-news)
890 basic_machine=mips-sony
891 os=-newsos
892 ;;
893 necv70)
894 basic_machine=v70-nec
895 os=-sysv
896 ;;
897 next | m*-next)
898 basic_machine=m68k-next
899 case $os in
900 -nextstep* )
901 ;;
902 -ns2*)
903 os=-nextstep2
904 ;;
905 *)
906 os=-nextstep3
907 ;;
908 esac
909 ;;
910 nh3000)
911 basic_machine=m68k-harris
912 os=-cxux
913 ;;
914 nh[45]000)
915 basic_machine=m88k-harris
916 os=-cxux
917 ;;
918 nindy960)
919 basic_machine=i960-intel
920 os=-nindy
921 ;;
922 mon960)
923 basic_machine=i960-intel
924 os=-mon960
925 ;;
926 nonstopux)
927 basic_machine=mips-compaq
928 os=-nonstopux
929 ;;
930 np1)
931 basic_machine=np1-gould
932 ;;
933 neo-tandem)
934 basic_machine=neo-tandem
935 ;;
936 nse-tandem)
937 basic_machine=nse-tandem
938 ;;
939 nsr-tandem)
940 basic_machine=nsr-tandem
941 ;;
942 nsv-tandem)
943 basic_machine=nsv-tandem
944 ;;
945 nsx-tandem)
946 basic_machine=nsx-tandem
947 ;;
948 op50n-* | op60c-*)
949 basic_machine=hppa1.1-oki
950 os=-proelf
951 ;;
952 openrisc | openrisc-*)
953 basic_machine=or32-unknown
954 ;;
955 os400)
956 basic_machine=powerpc-ibm
957 os=-os400
958 ;;
959 OSE68000 | ose68000)
960 basic_machine=m68000-ericsson
961 os=-ose
962 ;;
963 os68k)
964 basic_machine=m68k-none
965 os=-os68k
966 ;;
967 pa-hitachi)
968 basic_machine=hppa1.1-hitachi
969 os=-hiuxwe2
970 ;;
971 paragon)
972 basic_machine=i860-intel
973 os=-osf
974 ;;
975 parisc)
976 basic_machine=hppa-unknown
977 os=-linux
978 ;;
979 parisc-*)
980 basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
981 os=-linux
982 ;;
983 pbd)
984 basic_machine=sparc-tti
985 ;;
986 pbb)
987 basic_machine=m68k-tti
988 ;;
989 pc532 | pc532-*)
990 basic_machine=ns32k-pc532
991 ;;
946992 pc98)
947 cpu=i386
948 vendor=pc
949 ;;
950 x64 | amd64)
951 cpu=x86_64
952 vendor=pc
953 ;;
954 # Recognize the basic CPU types without company name.
993 basic_machine=i386-pc
994 ;;
995 pc98-*)
996 basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
997 ;;
998 pentium | p5 | k5 | k6 | nexgen | viac3)
999 basic_machine=i586-pc
1000 ;;
1001 pentiumpro | p6 | 6x86 | athlon | athlon_*)
1002 basic_machine=i686-pc
1003 ;;
1004 pentiumii | pentium2 | pentiumiii | pentium3)
1005 basic_machine=i686-pc
1006 ;;
1007 pentium4)
1008 basic_machine=i786-pc
1009 ;;
1010 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1011 basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1012 ;;
1013 pentiumpro-* | p6-* | 6x86-* | athlon-*)
1014 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1015 ;;
1016 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1017 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1018 ;;
1019 pentium4-*)
1020 basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1021 ;;
1022 pn)
1023 basic_machine=pn-gould
1024 ;;
1025 power) basic_machine=power-ibm
1026 ;;
1027 ppc | ppcbe) basic_machine=powerpc-unknown
1028 ;;
1029 ppc-* | ppcbe-*)
1030 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1031 ;;
1032 ppcle | powerpclittle)
1033 basic_machine=powerpcle-unknown
1034 ;;
1035 ppcle-* | powerpclittle-*)
1036 basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1037 ;;
1038 ppc64) basic_machine=powerpc64-unknown
1039 ;;
1040 ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1041 ;;
1042 ppc64le | powerpc64little)
1043 basic_machine=powerpc64le-unknown
1044 ;;
1045 ppc64le-* | powerpc64little-*)
1046 basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1047 ;;
1048 ps2)
1049 basic_machine=i386-ibm
1050 ;;
1051 pw32)
1052 basic_machine=i586-unknown
1053 os=-pw32
1054 ;;
1055 rdos | rdos64)
1056 basic_machine=x86_64-pc
1057 os=-rdos
1058 ;;
1059 rdos32)
1060 basic_machine=i386-pc
1061 os=-rdos
1062 ;;
1063 rom68k)
1064 basic_machine=m68k-rom68k
1065 os=-coff
1066 ;;
1067 rm[46]00)
1068 basic_machine=mips-siemens
1069 ;;
1070 rtpc | rtpc-*)
1071 basic_machine=romp-ibm
1072 ;;
1073 s390 | s390-*)
1074 basic_machine=s390-ibm
1075 ;;
1076 s390x | s390x-*)
1077 basic_machine=s390x-ibm
1078 ;;
1079 sa29200)
1080 basic_machine=a29k-amd
1081 os=-udi
1082 ;;
1083 sb1)
1084 basic_machine=mipsisa64sb1-unknown
1085 ;;
1086 sb1el)
1087 basic_machine=mipsisa64sb1el-unknown
1088 ;;
1089 sde)
1090 basic_machine=mipsisa32-sde
1091 os=-elf
1092 ;;
1093 sei)
1094 basic_machine=mips-sei
1095 os=-seiux
1096 ;;
1097 sequent)
1098 basic_machine=i386-sequent
1099 ;;
1100 sh5el)
1101 basic_machine=sh5le-unknown
1102 ;;
1103 simso-wrs)
1104 basic_machine=sparclite-wrs
1105 os=-vxworks
1106 ;;
1107 sps7)
1108 basic_machine=m68k-bull
1109 os=-sysv2
1110 ;;
1111 spur)
1112 basic_machine=spur-unknown
1113 ;;
1114 st2000)
1115 basic_machine=m68k-tandem
1116 ;;
1117 stratus)
1118 basic_machine=i860-stratus
1119 os=-sysv4
1120 ;;
1121 strongarm-* | thumb-*)
1122 basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1123 ;;
1124 sun2)
1125 basic_machine=m68000-sun
1126 ;;
1127 sun2os3)
1128 basic_machine=m68000-sun
1129 os=-sunos3
1130 ;;
1131 sun2os4)
1132 basic_machine=m68000-sun
1133 os=-sunos4
1134 ;;
1135 sun3os3)
1136 basic_machine=m68k-sun
1137 os=-sunos3
1138 ;;
1139 sun3os4)
1140 basic_machine=m68k-sun
1141 os=-sunos4
1142 ;;
1143 sun4os3)
1144 basic_machine=sparc-sun
1145 os=-sunos3
1146 ;;
1147 sun4os4)
1148 basic_machine=sparc-sun
1149 os=-sunos4
1150 ;;
1151 sun4sol2)
1152 basic_machine=sparc-sun
1153 os=-solaris2
1154 ;;
1155 sun3 | sun3-*)
1156 basic_machine=m68k-sun
1157 ;;
1158 sun4)
1159 basic_machine=sparc-sun
1160 ;;
1161 sun386 | sun386i | roadrunner)
1162 basic_machine=i386-sun
1163 ;;
1164 sv1)
1165 basic_machine=sv1-cray
1166 os=-unicos
1167 ;;
1168 symmetry)
1169 basic_machine=i386-sequent
1170 os=-dynix
1171 ;;
1172 t3e)
1173 basic_machine=alphaev5-cray
1174 os=-unicos
1175 ;;
1176 t90)
1177 basic_machine=t90-cray
1178 os=-unicos
1179 ;;
1180 tile*)
1181 basic_machine=$basic_machine-unknown
1182 os=-linux-gnu
1183 ;;
1184 tx39)
1185 basic_machine=mipstx39-unknown
1186 ;;
1187 tx39el)
1188 basic_machine=mipstx39el-unknown
1189 ;;
1190 toad1)
1191 basic_machine=pdp10-xkl
1192 os=-tops20
1193 ;;
1194 tower | tower-32)
1195 basic_machine=m68k-ncr
1196 ;;
1197 tpf)
1198 basic_machine=s390x-ibm
1199 os=-tpf
1200 ;;
1201 udi29k)
1202 basic_machine=a29k-amd
1203 os=-udi
1204 ;;
1205 ultra3)
1206 basic_machine=a29k-nyu
1207 os=-sym1
1208 ;;
1209 v810 | necv810)
1210 basic_machine=v810-nec
1211 os=-none
1212 ;;
1213 vaxv)
1214 basic_machine=vax-dec
1215 os=-sysv
1216 ;;
1217 vms)
1218 basic_machine=vax-dec
1219 os=-vms
1220 ;;
1221 vpp*|vx|vx-*)
1222 basic_machine=f301-fujitsu
1223 ;;
1224 vxworks960)
1225 basic_machine=i960-wrs
1226 os=-vxworks
1227 ;;
1228 vxworks68)
1229 basic_machine=m68k-wrs
1230 os=-vxworks
1231 ;;
1232 vxworks29k)
1233 basic_machine=a29k-wrs
1234 os=-vxworks
1235 ;;
1236 w65*)
1237 basic_machine=w65-wdc
1238 os=-none
1239 ;;
1240 w89k-*)
1241 basic_machine=hppa1.1-winbond
1242 os=-proelf
1243 ;;
1244 x64)
1245 basic_machine=x86_64-pc
1246 ;;
1247 xbox)
1248 basic_machine=i686-pc
1249 os=-mingw32
1250 ;;
1251 xps | xps100)
1252 basic_machine=xps100-honeywell
1253 ;;
1254 xscale-* | xscalee[bl]-*)
1255 basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
1256 ;;
1257 ymp)
1258 basic_machine=ymp-cray
1259 os=-unicos
1260 ;;
1261 none)
1262 basic_machine=none-none
1263 os=-none
1264 ;;
1265
1266 # Here we handle the default manufacturer of certain CPU types. It is in
1267 # some cases the only manufacturer, in others, it is the most popular.
1268 w89k)
1269 basic_machine=hppa1.1-winbond
1270 ;;
1271 op50n)
1272 basic_machine=hppa1.1-oki
1273 ;;
1274 op60c)
1275 basic_machine=hppa1.1-oki
1276 ;;
1277 romp)
1278 basic_machine=romp-ibm
1279 ;;
1280 mmix)
1281 basic_machine=mmix-knuth
1282 ;;
1283 rs6000)
1284 basic_machine=rs6000-ibm
1285 ;;
1286 vax)
1287 basic_machine=vax-dec
1288 ;;
1289 pdp11)
1290 basic_machine=pdp11-dec
1291 ;;
1292 we32k)
1293 basic_machine=we32k-att
1294 ;;
1295 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1296 basic_machine=sh-unknown
1297 ;;
1298 cydra)
1299 basic_machine=cydra-cydrome
1300 ;;
1301 orion)
1302 basic_machine=orion-highlevel
1303 ;;
1304 orion105)
1305 basic_machine=clipper-highlevel
1306 ;;
1307 mac | mpw | mac-mpw)
1308 basic_machine=m68k-apple
1309 ;;
1310 pmac | pmac-mpw)
1311 basic_machine=powerpc-apple
1312 ;;
1313 *-unknown)
1314 # Make sure to match an already-canonicalized machine name.
1315 ;;
9551316 *)
956 cpu=$basic_machine
957 vendor=unknown
1317 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
1318 exit 1
9581319 ;;
9591320 esac
9601321
961 unset -v basic_machine
962
963 # Decode basic machines in the full and proper CPU-Company form.
964 case $cpu-$vendor in
965 # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
966 # some cases the only manufacturer, in others, it is the most popular.
967 craynv-unknown)
968 vendor=cray
969 basic_os=${basic_os:-unicosmp}
970 ;;
971 c90-unknown | c90-cray)
972 vendor=cray
973 basic_os=${Basic_os:-unicos}
974 ;;
975 fx80-unknown)
976 vendor=alliant
977 ;;
978 romp-unknown)
979 vendor=ibm
980 ;;
981 mmix-unknown)
982 vendor=knuth
983 ;;
984 microblaze-unknown | microblazeel-unknown)
985 vendor=xilinx
986 ;;
987 rs6000-unknown)
988 vendor=ibm
989 ;;
990 vax-unknown)
991 vendor=dec
992 ;;
993 pdp11-unknown)
994 vendor=dec
995 ;;
996 we32k-unknown)
997 vendor=att
998 ;;
999 cydra-unknown)
1000 vendor=cydrome
1001 ;;
1002 i370-ibm*)
1003 vendor=ibm
1004 ;;
1005 orion-unknown)
1006 vendor=highlevel
1007 ;;
1008 xps-unknown | xps100-unknown)
1009 cpu=xps100
1010 vendor=honeywell
1011 ;;
1012
1013 # Here we normalize CPU types with a missing or matching vendor
1014 dpx20-unknown | dpx20-bull)
1015 cpu=rs6000
1016 vendor=bull
1017 basic_os=${basic_os:-bosx}
1018 ;;
1019
1020 # Here we normalize CPU types irrespective of the vendor
1021 amd64-*)
1022 cpu=x86_64
1023 ;;
1024 blackfin-*)
1025 cpu=bfin
1026 basic_os=linux
1027 ;;
1028 c54x-*)
1029 cpu=tic54x
1030 ;;
1031 c55x-*)
1032 cpu=tic55x
1033 ;;
1034 c6x-*)
1035 cpu=tic6x
1036 ;;
1037 e500v[12]-*)
1038 cpu=powerpc
1039 basic_os=${basic_os}"spe"
1040 ;;
1041 mips3*-*)
1042 cpu=mips64
1043 ;;
1044 ms1-*)
1045 cpu=mt
1046 ;;
1047 m68knommu-*)
1048 cpu=m68k
1049 basic_os=linux
1050 ;;
1051 m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
1052 cpu=s12z
1053 ;;
1054 openrisc-*)
1055 cpu=or32
1056 ;;
1057 parisc-*)
1058 cpu=hppa
1059 basic_os=linux
1060 ;;
1061 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1062 cpu=i586
1063 ;;
1064 pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
1065 cpu=i686
1066 ;;
1067 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1068 cpu=i686
1069 ;;
1070 pentium4-*)
1071 cpu=i786
1072 ;;
1073 pc98-*)
1074 cpu=i386
1075 ;;
1076 ppc-* | ppcbe-*)
1077 cpu=powerpc
1078 ;;
1079 ppcle-* | powerpclittle-*)
1080 cpu=powerpcle
1081 ;;
1082 ppc64-*)
1083 cpu=powerpc64
1084 ;;
1085 ppc64le-* | powerpc64little-*)
1086 cpu=powerpc64le
1087 ;;
1088 sb1-*)
1089 cpu=mipsisa64sb1
1090 ;;
1091 sb1el-*)
1092 cpu=mipsisa64sb1el
1093 ;;
1094 sh5e[lb]-*)
1095 cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
1096 ;;
1097 spur-*)
1098 cpu=spur
1099 ;;
1100 strongarm-* | thumb-*)
1101 cpu=arm
1102 ;;
1103 tx39-*)
1104 cpu=mipstx39
1105 ;;
1106 tx39el-*)
1107 cpu=mipstx39el
1108 ;;
1109 x64-*)
1110 cpu=x86_64
1111 ;;
1112 xscale-* | xscalee[bl]-*)
1113 cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
1114 ;;
1115 arm64-*)
1116 cpu=aarch64
1117 ;;
1118
1119 # Recognize the canonical CPU Types that limit and/or modify the
1120 # company names they are paired with.
1121 cr16-*)
1122 basic_os=${basic_os:-elf}
1123 ;;
1124 crisv32-* | etraxfs*-*)
1125 cpu=crisv32
1126 vendor=axis
1127 ;;
1128 cris-* | etrax*-*)
1129 cpu=cris
1130 vendor=axis
1131 ;;
1132 crx-*)
1133 basic_os=${basic_os:-elf}
1134 ;;
1135 neo-tandem)
1136 cpu=neo
1137 vendor=tandem
1138 ;;
1139 nse-tandem)
1140 cpu=nse
1141 vendor=tandem
1142 ;;
1143 nsr-tandem)
1144 cpu=nsr
1145 vendor=tandem
1146 ;;
1147 nsv-tandem)
1148 cpu=nsv
1149 vendor=tandem
1150 ;;
1151 nsx-tandem)
1152 cpu=nsx
1153 vendor=tandem
1154 ;;
1155 mipsallegrexel-sony)
1156 cpu=mipsallegrexel
1157 vendor=sony
1158 ;;
1159 tile*-*)
1160 basic_os=${basic_os:-linux-gnu}
1161 ;;
1162
1322 # Here we canonicalize certain aliases for manufacturers.
1323 case $basic_machine in
1324 *-digital*)
1325 basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
1326 ;;
1327 *-commodore*)
1328 basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
1329 ;;
11631330 *)
1164 # Recognize the canonical CPU types that are allowed with any
1165 # company name.
1166 case $cpu in
1167 1750a | 580 \
1168 | a29k \
1169 | aarch64 | aarch64_be \
1170 | abacus \
1171 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
1172 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
1173 | alphapca5[67] | alpha64pca5[67] \
1174 | am33_2.0 \
1175 | amdgcn \
1176 | arc | arceb | arc32 | arc64 \
1177 | arm | arm[lb]e | arme[lb] | armv* \
1178 | avr | avr32 \
1179 | asmjs \
1180 | ba \
1181 | be32 | be64 \
1182 | bfin | bpf | bs2000 \
1183 | c[123]* | c30 | [cjt]90 | c4x \
1184 | c8051 | clipper | craynv | csky | cydra \
1185 | d10v | d30v | dlx | dsp16xx \
1186 | e2k | elxsi | epiphany \
1187 | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
1188 | h8300 | h8500 \
1189 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1190 | hexagon \
1191 | i370 | i*86 | i860 | i960 | ia16 | ia64 \
1192 | ip2k | iq2000 \
1193 | k1om \
1194 | le32 | le64 \
1195 | lm32 \
1196 | loongarch32 | loongarch64 | loongarchx32 \
1197 | m32c | m32r | m32rle \
1198 | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
1199 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
1200 | m88110 | m88k | maxq | mb | mcore | mep | metag \
1201 | microblaze | microblazeel \
1202 | mips | mipsbe | mipseb | mipsel | mipsle \
1203 | mips16 \
1204 | mips64 | mips64eb | mips64el \
1205 | mips64octeon | mips64octeonel \
1206 | mips64orion | mips64orionel \
1207 | mips64r5900 | mips64r5900el \
1208 | mips64vr | mips64vrel \
1209 | mips64vr4100 | mips64vr4100el \
1210 | mips64vr4300 | mips64vr4300el \
1211 | mips64vr5000 | mips64vr5000el \
1212 | mips64vr5900 | mips64vr5900el \
1213 | mipsisa32 | mipsisa32el \
1214 | mipsisa32r2 | mipsisa32r2el \
1215 | mipsisa32r3 | mipsisa32r3el \
1216 | mipsisa32r5 | mipsisa32r5el \
1217 | mipsisa32r6 | mipsisa32r6el \
1218 | mipsisa64 | mipsisa64el \
1219 | mipsisa64r2 | mipsisa64r2el \
1220 | mipsisa64r3 | mipsisa64r3el \
1221 | mipsisa64r5 | mipsisa64r5el \
1222 | mipsisa64r6 | mipsisa64r6el \
1223 | mipsisa64sb1 | mipsisa64sb1el \
1224 | mipsisa64sr71k | mipsisa64sr71kel \
1225 | mipsr5900 | mipsr5900el \
1226 | mipstx39 | mipstx39el \
1227 | mmix \
1228 | mn10200 | mn10300 \
1229 | moxie \
1230 | mt \
1231 | msp430 \
1232 | nds32 | nds32le | nds32be \
1233 | nfp \
1234 | nios | nios2 | nios2eb | nios2el \
1235 | none | np1 | ns16k | ns32k | nvptx \
1236 | open8 \
1237 | or1k* \
1238 | or32 \
1239 | orion \
1240 | picochip \
1241 | pdp10 | pdp11 | pj | pjl | pn | power \
1242 | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
1243 | pru \
1244 | pyramid \
1245 | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
1246 | rl78 | romp | rs6000 | rx \
1247 | s390 | s390x \
1248 | score \
1249 | sh | shl \
1250 | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
1251 | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
1252 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
1253 | sparclite \
1254 | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
1255 | spu \
1256 | tahoe \
1257 | thumbv7* \
1258 | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
1259 | tron \
1260 | ubicom32 \
1261 | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
1262 | vax \
1263 | visium \
1264 | w65 \
1265 | wasm32 | wasm64 \
1266 | we32k \
1267 | x86 | x86_64 | xc16x | xgate | xps100 \
1268 | xstormy16 | xtensa* \
1269 | ymp \
1270 | z8k | z80)
1271 ;;
1272
1273 *)
1274 echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
1275 exit 1
1276 ;;
1277 esac
12781331 ;;
12791332 esac
12801333
1281 # Here we canonicalize certain aliases for manufacturers.
1282 case $vendor in
1283 digital*)
1284 vendor=dec
1285 ;;
1286 commodore*)
1287 vendor=cbm
1288 ;;
1289 *)
1290 ;;
1291 esac
1292
12931334 # Decode manufacturer-specific aliases for certain operating systems.
12941335
1295 if test x$basic_os != x
1336 if [ x"$os" != x"" ]
12961337 then
1297
1298 # First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
1299 # set os.
1300 case $basic_os in
1301 gnu/linux*)
1302 kernel=linux
1303 os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
1304 ;;
1305 os2-emx)
1306 kernel=os2
1307 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
1308 ;;
1309 nto-qnx*)
1310 kernel=nto
1311 os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
1312 ;;
1313 *-*)
1314 # shellcheck disable=SC2162
1315 IFS="-" read kernel os <<EOF
1316 $basic_os
1317 EOF
1318 ;;
1319 # Default OS when just kernel was specified
1320 nto*)
1321 kernel=nto
1322 os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
1323 ;;
1324 linux*)
1325 kernel=linux
1326 os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
1327 ;;
1328 *)
1329 kernel=
1330 os=$basic_os
1331 ;;
1332 esac
1333
1334 # Now, normalize the OS (knowing we just have one component, it's not a kernel,
1335 # etc.)
13361338 case $os in
13371339 # First match some system type aliases that might get confused
13381340 # with valid system types.
1339 # solaris* is a basic system type, with this one exception.
1340 auroraux)
1341 os=auroraux
1342 ;;
1343 bluegene*)
1344 os=cnk
1345 ;;
1346 solaris1 | solaris1.*)
1347 os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
1348 ;;
1349 solaris)
1350 os=solaris2
1351 ;;
1352 unixware*)
1353 os=sysv4.2uw
1341 # -solaris* is a basic system type, with this one exception.
1342 -auroraux)
1343 os=-auroraux
1344 ;;
1345 -solaris1 | -solaris1.*)
1346 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1347 ;;
1348 -solaris)
1349 os=-solaris2
1350 ;;
1351 -unixware*)
1352 os=-sysv4.2uw
1353 ;;
1354 -gnu/linux*)
1355 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
13541356 ;;
13551357 # es1800 is here to avoid being matched by es* (a different OS)
1356 es1800*)
1357 os=ose
1358 ;;
1359 # Some version numbers need modification
1360 chorusos*)
1361 os=chorusos
1362 ;;
1363 isc)
1364 os=isc2.2
1365 ;;
1366 sco6)
1367 os=sco5v6
1368 ;;
1369 sco5)
1370 os=sco3.2v5
1371 ;;
1372 sco4)
1373 os=sco3.2v4
1374 ;;
1375 sco3.2.[4-9]*)
1376 os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
1377 ;;
1378 sco*v* | scout)
1379 # Don't match below
1380 ;;
1381 sco*)
1382 os=sco3.2v2
1383 ;;
1384 psos*)
1385 os=psos
1386 ;;
1387 qnx*)
1388 os=qnx
1389 ;;
1390 hiux*)
1391 os=hiuxwe2
1392 ;;
1393 lynx*178)
1394 os=lynxos178
1395 ;;
1396 lynx*5)
1397 os=lynxos5
1398 ;;
1399 lynxos*)
1400 # don't get caught up in next wildcard
1401 ;;
1402 lynx*)
1403 os=lynxos
1404 ;;
1405 mac[0-9]*)
1358 -es1800*)
1359 os=-ose
1360 ;;
1361 # Now accept the basic system types.
1362 # The portable systems comes first.
1363 # Each alternative MUST end in a * to match a version number.
1364 # -sysv* is not here because it comes later, after sysvr4.
1365 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1366 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1367 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1368 | -sym* | -kopensolaris* | -plan9* \
1369 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1370 | -aos* | -aros* | -cloudabi* | -sortix* \
1371 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1372 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1373 | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
1374 | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
1375 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1376 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1377 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1378 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1379 | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
1380 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1381 | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1382 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1383 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1384 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
1385 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1386 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1387 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1388 | -morphos* | -superux* | -rtmk* | -windiss* \
1389 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1390 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1391 | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
1392 | -midnightbsd*)
1393 # Remember, each alternative MUST END IN *, to match a version number.
1394 ;;
1395 -qnx*)
1396 case $basic_machine in
1397 x86-* | i*86-*)
1398 ;;
1399 *)
1400 os=-nto$os
1401 ;;
1402 esac
1403 ;;
1404 -nto-qnx*)
1405 ;;
1406 -nto*)
1407 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1408 ;;
1409 -sim | -xray | -os68k* | -v88r* \
1410 | -windows* | -osx | -abug | -netware* | -os9* \
1411 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1412 ;;
1413 -mac*)
14061414 os=`echo "$os" | sed -e 's|mac|macos|'`
14071415 ;;
1408 opened*)
1409 os=openedition
1410 ;;
1411 os400*)
1412 os=os400
1413 ;;
1414 sunos5*)
1416 -linux-dietlibc)
1417 os=-linux-dietlibc
1418 ;;
1419 -linux*)
1420 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1421 ;;
1422 -sunos5*)
14151423 os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
14161424 ;;
1417 sunos6*)
1425 -sunos6*)
14181426 os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
14191427 ;;
1420 wince*)
1421 os=wince
1422 ;;
1423 utek*)
1424 os=bsd
1425 ;;
1426 dynix*)
1427 os=bsd
1428 ;;
1429 acis*)
1430 os=aos
1431 ;;
1432 atheos*)
1433 os=atheos
1434 ;;
1435 syllable*)
1436 os=syllable
1437 ;;
1438 386bsd)
1439 os=bsd
1440 ;;
1441 ctix* | uts*)
1442 os=sysv
1443 ;;
1444 nova*)
1445 os=rtmk-nova
1446 ;;
1447 ns2)
1448 os=nextstep2
1428 -opened*)
1429 os=-openedition
1430 ;;
1431 -os400*)
1432 os=-os400
1433 ;;
1434 -wince*)
1435 os=-wince
1436 ;;
1437 -utek*)
1438 os=-bsd
1439 ;;
1440 -dynix*)
1441 os=-bsd
1442 ;;
1443 -acis*)
1444 os=-aos
1445 ;;
1446 -atheos*)
1447 os=-atheos
1448 ;;
1449 -syllable*)
1450 os=-syllable
1451 ;;
1452 -386bsd)
1453 os=-bsd
1454 ;;
1455 -ctix* | -uts*)
1456 os=-sysv
1457 ;;
1458 -nova*)
1459 os=-rtmk-nova
1460 ;;
1461 -ns2)
1462 os=-nextstep2
1463 ;;
1464 -nsk*)
1465 os=-nsk
14491466 ;;
14501467 # Preserve the version number of sinix5.
1451 sinix5.*)
1452 os=`echo "$os" | sed -e 's|sinix|sysv|'`
1453 ;;
1454 sinix*)
1455 os=sysv4
1456 ;;
1457 tpf*)
1458 os=tpf
1459 ;;
1460 triton*)
1461 os=sysv3
1462 ;;
1463 oss*)
1464 os=sysv3
1465 ;;
1466 svr4*)
1467 os=sysv4
1468 ;;
1469 svr3)
1470 os=sysv3
1471 ;;
1472 sysvr4)
1473 os=sysv4
1474 ;;
1475 ose*)
1476 os=ose
1477 ;;
1478 *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
1479 os=mint
1480 ;;
1481 dicos*)
1482 os=dicos
1483 ;;
1484 pikeos*)
1468 -sinix5.*)
1469 os=`echo $os | sed -e 's|sinix|sysv|'`
1470 ;;
1471 -sinix*)
1472 os=-sysv4
1473 ;;
1474 -tpf*)
1475 os=-tpf
1476 ;;
1477 -triton*)
1478 os=-sysv3
1479 ;;
1480 -oss*)
1481 os=-sysv3
1482 ;;
1483 -svr4*)
1484 os=-sysv4
1485 ;;
1486 -svr3)
1487 os=-sysv3
1488 ;;
1489 -sysvr4)
1490 os=-sysv4
1491 ;;
1492 # This must come after -sysvr4.
1493 -sysv*)
1494 ;;
1495 -ose*)
1496 os=-ose
1497 ;;
1498 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1499 os=-mint
1500 ;;
1501 -zvmoe)
1502 os=-zvmoe
1503 ;;
1504 -dicos*)
1505 os=-dicos
1506 ;;
1507 -pikeos*)
14851508 # Until real need of OS specific support for
14861509 # particular features comes up, bare metal
14871510 # configurations are quite functional.
1488 case $cpu in
1511 case $basic_machine in
14891512 arm*)
1490 os=eabi
1513 os=-eabi
14911514 ;;
14921515 *)
1493 os=elf
1516 os=-elf
14941517 ;;
14951518 esac
14961519 ;;
1520 -nacl*)
1521 ;;
1522 -ios)
1523 ;;
1524 -none)
1525 ;;
14971526 *)
1498 # No normalization, but not necessarily accepted, that comes below.
1527 # Get rid of the `-' at the beginning of $os.
1528 os=`echo $os | sed 's/[^-]*-//'`
1529 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
1530 exit 1
14991531 ;;
15001532 esac
1501
15021533 else
15031534
15041535 # Here we handle the default operating systems that come with various machines.
15111542 # will signal an error saying that MANUFACTURER isn't an operating
15121543 # system, and we'll never get to this point.
15131544
1514 kernel=
1515 case $cpu-$vendor in
1545 case $basic_machine in
15161546 score-*)
1517 os=elf
1547 os=-elf
15181548 ;;
15191549 spu-*)
1520 os=elf
1550 os=-elf
15211551 ;;
15221552 *-acorn)
1523 os=riscix1.2
1553 os=-riscix1.2
15241554 ;;
15251555 arm*-rebel)
1526 kernel=linux
1527 os=gnu
1556 os=-linux
15281557 ;;
15291558 arm*-semi)
1530 os=aout
1559 os=-aout
15311560 ;;
15321561 c4x-* | tic4x-*)
1533 os=coff
1562 os=-coff
15341563 ;;
15351564 c8051-*)
1536 os=elf
1537 ;;
1538 clipper-intergraph)
1539 os=clix
1565 os=-elf
15401566 ;;
15411567 hexagon-*)
1542 os=elf
1568 os=-elf
15431569 ;;
15441570 tic54x-*)
1545 os=coff
1571 os=-coff
15461572 ;;
15471573 tic55x-*)
1548 os=coff
1574 os=-coff
15491575 ;;
15501576 tic6x-*)
1551 os=coff
1577 os=-coff
15521578 ;;
15531579 # This must come before the *-dec entry.
15541580 pdp10-*)
1555 os=tops20
1581 os=-tops20
15561582 ;;
15571583 pdp11-*)
1558 os=none
1584 os=-none
15591585 ;;
15601586 *-dec | vax-*)
1561 os=ultrix4.2
1587 os=-ultrix4.2
15621588 ;;
15631589 m68*-apollo)
1564 os=domain
1590 os=-domain
15651591 ;;
15661592 i386-sun)
1567 os=sunos4.0.2
1593 os=-sunos4.0.2
15681594 ;;
15691595 m68000-sun)
1570 os=sunos3
1596 os=-sunos3
15711597 ;;
15721598 m68*-cisco)
1573 os=aout
1599 os=-aout
15741600 ;;
15751601 mep-*)
1576 os=elf
1602 os=-elf
15771603 ;;
15781604 mips*-cisco)
1579 os=elf
1605 os=-elf
15801606 ;;
15811607 mips*-*)
1582 os=elf
1608 os=-elf
15831609 ;;
15841610 or32-*)
1585 os=coff
1611 os=-coff
15861612 ;;
15871613 *-tti) # must be before sparc entry or we get the wrong os.
1588 os=sysv3
1614 os=-sysv3
15891615 ;;
15901616 sparc-* | *-sun)
1591 os=sunos4.1.1
1617 os=-sunos4.1.1
15921618 ;;
15931619 pru-*)
1594 os=elf
1620 os=-elf
15951621 ;;
15961622 *-be)
1597 os=beos
1623 os=-beos
15981624 ;;
15991625 *-ibm)
1600 os=aix
1626 os=-aix
16011627 ;;
16021628 *-knuth)
1603 os=mmixware
1629 os=-mmixware
16041630 ;;
16051631 *-wec)
1606 os=proelf
1632 os=-proelf
16071633 ;;
16081634 *-winbond)
1609 os=proelf
1635 os=-proelf
16101636 ;;
16111637 *-oki)
1612 os=proelf
1638 os=-proelf
16131639 ;;
16141640 *-hp)
1615 os=hpux
1641 os=-hpux
16161642 ;;
16171643 *-hitachi)
1618 os=hiux
1644 os=-hiux
16191645 ;;
16201646 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1621 os=sysv
1647 os=-sysv
16221648 ;;
16231649 *-cbm)
1624 os=amigaos
1650 os=-amigaos
16251651 ;;
16261652 *-dg)
1627 os=dgux
1653 os=-dgux
16281654 ;;
16291655 *-dolphin)
1630 os=sysv3
1656 os=-sysv3
16311657 ;;
16321658 m68k-ccur)
1633 os=rtu
1659 os=-rtu
16341660 ;;
16351661 m88k-omron*)
1636 os=luna
1662 os=-luna
16371663 ;;
16381664 *-next)
1639 os=nextstep
1665 os=-nextstep
16401666 ;;
16411667 *-sequent)
1642 os=ptx
1668 os=-ptx
16431669 ;;
16441670 *-crds)
1645 os=unos
1671 os=-unos
16461672 ;;
16471673 *-ns)
1648 os=genix
1674 os=-genix
16491675 ;;
16501676 i370-*)
1651 os=mvs
1677 os=-mvs
16521678 ;;
16531679 *-gould)
1654 os=sysv
1680 os=-sysv
16551681 ;;
16561682 *-highlevel)
1657 os=bsd
1683 os=-bsd
16581684 ;;
16591685 *-encore)
1660 os=bsd
1686 os=-bsd
16611687 ;;
16621688 *-sgi)
1663 os=irix
1689 os=-irix
16641690 ;;
16651691 *-siemens)
1666 os=sysv4
1692 os=-sysv4
16671693 ;;
16681694 *-masscomp)
1669 os=rtu
1695 os=-rtu
16701696 ;;
16711697 f30[01]-fujitsu | f700-fujitsu)
1672 os=uxpv
1698 os=-uxpv
16731699 ;;
16741700 *-rom68k)
1675 os=coff
1701 os=-coff
16761702 ;;
16771703 *-*bug)
1678 os=coff
1704 os=-coff
16791705 ;;
16801706 *-apple)
1681 os=macos
1707 os=-macos
16821708 ;;
16831709 *-atari*)
1684 os=mint
1685 ;;
1686 *-wrs)
1687 os=vxworks
1710 os=-mint
16881711 ;;
16891712 *)
1690 os=none
1713 os=-none
16911714 ;;
16921715 esac
1693
16941716 fi
1695
1696 # Now, validate our (potentially fixed-up) OS.
1697 case $os in
1698 # Sometimes we do "kernel-libc", so those need to count as OSes.
1699 musl* | newlib* | uclibc*)
1700 ;;
1701 # Likewise for "kernel-abi"
1702 eabi* | gnueabi*)
1703 ;;
1704 # VxWorks passes extra cpu info in the 4th filed.
1705 simlinux | simwindows | spe)
1706 ;;
1707 # Now accept the basic system types.
1708 # The portable systems comes first.
1709 # Each alternative MUST end in a * to match a version number.
1710 gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
1711 | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
1712 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1713 | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
1714 | hiux* | abug | nacl* | netware* | windows* \
1715 | os9* | macos* | osx* | ios* \
1716 | mpw* | magic* | mmixware* | mon960* | lnews* \
1717 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1718 | aos* | aros* | cloudabi* | sortix* | twizzler* \
1719 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1720 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1721 | mirbsd* | netbsd* | dicos* | openedition* | ose* \
1722 | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
1723 | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
1724 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1725 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
1726 | udi* | lites* | ieee* | go32* | aux* | hcos* \
1727 | chorusrdb* | cegcc* | glidix* | serenity* \
1728 | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
1729 | midipix* | mingw32* | mingw64* | mint* \
1730 | uxpv* | beos* | mpeix* | udk* | moxiebox* \
1731 | interix* | uwin* | mks* | rhapsody* | darwin* \
1732 | openstep* | oskit* | conix* | pw32* | nonstopux* \
1733 | storm-chaos* | tops10* | tenex* | tops20* | its* \
1734 | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
1735 | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
1736 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1737 | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1738 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1739 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1740 | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
1741 ;;
1742 # This one is extra strict with allowed versions
1743 sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
1744 # Don't forget version if it is 3.2v4 or newer.
1745 ;;
1746 none)
1747 ;;
1748 *)
1749 echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
1750 exit 1
1751 ;;
1752 esac
1753
1754 # As a final step for OS-related things, validate the OS-kernel combination
1755 # (given a valid OS), if there is a kernel.
1756 case $kernel-$os in
1757 linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
1758 ;;
1759 uclinux-uclibc* )
1760 ;;
1761 -dietlibc* | -newlib* | -musl* | -uclibc* )
1762 # These are just libc implementations, not actual OSes, and thus
1763 # require a kernel.
1764 echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
1765 exit 1
1766 ;;
1767 kfreebsd*-gnu* | kopensolaris*-gnu*)
1768 ;;
1769 vxworks-simlinux | vxworks-simwindows | vxworks-spe)
1770 ;;
1771 nto-qnx*)
1772 ;;
1773 os2-emx)
1774 ;;
1775 *-eabi* | *-gnueabi*)
1776 ;;
1777 -*)
1778 # Blank kernel with real OS is always fine.
1779 ;;
1780 *-*)
1781 echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
1782 exit 1
1783 ;;
1784 esac
17851717
17861718 # Here we handle the case where we know the os, and the CPU type, but not the
17871719 # manufacturer. We pick the logical manufacturer.
1788 case $vendor in
1789 unknown)
1790 case $cpu-$os in
1791 *-riscix*)
1720 vendor=unknown
1721 case $basic_machine in
1722 *-unknown)
1723 case $os in
1724 -riscix*)
17921725 vendor=acorn
17931726 ;;
1794 *-sunos*)
1727 -sunos*)
17951728 vendor=sun
17961729 ;;
1797 *-cnk* | *-aix*)
1730 -cnk*|-aix*)
17981731 vendor=ibm
17991732 ;;
1800 *-beos*)
1733 -beos*)
18011734 vendor=be
18021735 ;;
1803 *-hpux*)
1736 -hpux*)
18041737 vendor=hp
18051738 ;;
1806 *-mpeix*)
1739 -mpeix*)
18071740 vendor=hp
18081741 ;;
1809 *-hiux*)
1742 -hiux*)
18101743 vendor=hitachi
18111744 ;;
1812 *-unos*)
1745 -unos*)
18131746 vendor=crds
18141747 ;;
1815 *-dgux*)
1748 -dgux*)
18161749 vendor=dg
18171750 ;;
1818 *-luna*)
1751 -luna*)
18191752 vendor=omron
18201753 ;;
1821 *-genix*)
1754 -genix*)
18221755 vendor=ns
18231756 ;;
1824 *-clix*)
1825 vendor=intergraph
1826 ;;
1827 *-mvs* | *-opened*)
1757 -mvs* | -opened*)
18281758 vendor=ibm
18291759 ;;
1830 *-os400*)
1760 -os400*)
18311761 vendor=ibm
18321762 ;;
1833 s390-* | s390x-*)
1763 -ptx*)
1764 vendor=sequent
1765 ;;
1766 -tpf*)
18341767 vendor=ibm
18351768 ;;
1836 *-ptx*)
1837 vendor=sequent
1838 ;;
1839 *-tpf*)
1840 vendor=ibm
1841 ;;
1842 *-vxsim* | *-vxworks* | *-windiss*)
1769 -vxsim* | -vxworks* | -windiss*)
18431770 vendor=wrs
18441771 ;;
1845 *-aux*)
1772 -aux*)
18461773 vendor=apple
18471774 ;;
1848 *-hms*)
1775 -hms*)
18491776 vendor=hitachi
18501777 ;;
1851 *-mpw* | *-macos*)
1778 -mpw* | -macos*)
18521779 vendor=apple
18531780 ;;
1854 *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
1781 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
18551782 vendor=atari
18561783 ;;
1857 *-vos*)
1784 -vos*)
18581785 vendor=stratus
18591786 ;;
18601787 esac
1788 basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
18611789 ;;
18621790 esac
18631791
1864 echo "$cpu-$vendor-${kernel:+$kernel-}$os"
1792 echo "$basic_machine$os"
18651793 exit
18661794
18671795 # Local variables:
1868 # eval: (add-hook 'before-save-hook 'time-stamp)
1796 # eval: (add-hook 'write-file-functions 'time-stamp)
18691797 # time-stamp-start: "timestamp='"
18701798 # time-stamp-format: "%:y-%02m-%02d"
18711799 # time-stamp-end: "'"
58405840 lt_cv_deplibs_check_method=pass_all
58415841 ;;
58425842
5843 netbsd*)
5843 netbsd* | netbsdelf*-gnu)
58445844 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
58455845 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
58465846 else
62246224 fi
62256225
62266226 : ${AR=ar}
6227 : ${AR_FLAGS=cru}
6227 : ${AR_FLAGS=cr}
62286228
62296229
62306230
67486748 test $ac_status = 0; }; then
67496749 # Now try to grab the symbols.
67506750 nlist=conftest.nm
6751 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
6752 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
6753 ac_status=$?
6754 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6755 test $ac_status = 0; } && test -s "$nlist"; then
6751 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
6752 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
67566753 # Try sorting and uniquifying the output.
67576754 if sort "$nlist" | uniq > "$nlist"T; then
67586755 mv -f "$nlist"T "$nlist"
80478044 _LT_EOF
80488045 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
80498046 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
8050 echo "$AR cru libconftest.a conftest.o" >&5
8051 $AR cru libconftest.a conftest.o 2>&5
8047 echo "$AR cr libconftest.a conftest.o" >&5
8048 $AR cr libconftest.a conftest.o 2>&5
80528049 echo "$RANLIB libconftest.a" >&5
80538050 $RANLIB libconftest.a 2>&5
80548051 cat > conftest.c << _LT_EOF
80758072 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
80768073 darwin1.*)
80778074 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
8078 darwin*)
8079 case ${MACOSX_DEPLOYMENT_TARGET},$host in
8080 10.[012],*|,*powerpc*)
8075 darwin*) # darwin 5.x on
8076 # if running on 10.5 or later, the deployment target defaults
8077 # to the OS version, if on x86, and 10.4, the deployment
8078 # target defaults to 10.4. Don't you love it?
8079 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
8080 10.0,*86*-darwin8*|10.0,*-darwin[912]*)
8081 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
8082 10.[012][,.]*)
80818083 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
8082 *)
8084 10.*|11.*)
80838085 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
80848086 esac
80858087 ;;
89358937 ecc*)
89368938 lt_prog_compiler_wl='-Wl,'
89378939 lt_prog_compiler_pic='-KPIC'
8940 lt_prog_compiler_static='-static'
8941 ;;
8942 # flang / f18. f95 an alias for gfortran or flang on Debian
8943 flang* | f18* | f95*)
8944 lt_prog_compiler_wl='-Wl,'
8945 lt_prog_compiler_pic='-fPIC'
89388946 lt_prog_compiler_static='-static'
89398947 ;;
89408948 # icc used to be incompatible with GCC.
94189426 openbsd* | bitrig*)
94199427 with_gnu_ld=no
94209428 ;;
9429 linux* | k*bsd*-gnu | gnu*)
9430 link_all_deplibs=no
9431 ;;
94219432 esac
94229433
94239434 ld_shlibs=yes
96729683 fi
96739684 ;;
96749685
9675 netbsd*)
9686 netbsd* | netbsdelf*-gnu)
96769687 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
96779688 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
96789689 wlarc=
1034910360 if test yes = "$lt_cv_irix_exported_symbol"; then
1035010361 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
1035110362 fi
10363 link_all_deplibs=no
1035210364 else
1035310365 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
1035410366 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
1037010382 esac
1037110383 ;;
1037210384
10373 netbsd*)
10385 netbsd* | netbsdelf*-gnu)
1037410386 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
1037510387 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1037610388 else
1148711499 # people can always --disable-shared, the test was removed, and we
1148811500 # assume the GNU/Linux dynamic linker is in use.
1148911501 dynamic_linker='GNU/Linux ld.so'
11502 ;;
11503
11504 netbsdelf*-gnu)
11505 version_type=linux
11506 need_lib_prefix=no
11507 need_version=no
11508 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11509 soname_spec='${libname}${release}${shared_ext}$major'
11510 shlibpath_var=LD_LIBRARY_PATH
11511 shlibpath_overrides_runpath=no
11512 hardcode_into_libs=yes
11513 dynamic_linker='NetBSD ld.elf_so'
1149011514 ;;
1149111515
1149211516 netbsd*)
1668816712 cat <<_LT_EOF >> "$cfgfile"
1668916713 #! $SHELL
1669016714 # Generated automatically by $as_me ($PACKAGE) $VERSION
16691 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1669216715 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1669316716
1669416717 # Provide generalized library-building support services.
1111 nasm_verbose_0 = @echo " NASM " $@;
1212
1313 .asm.lo:
14 $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(AS) $(ASFLAGS) -I$(srcdir)/ -o $@ $< -prefer-non-pic
14 $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(top_srcdir)/ltnasm.sh $(AS) $(ASFLAGS) -I$(srcdir)/ -o $@ $<
1515
1616 SRC_INTEL = x86/rasterizer.asm x86/blend_bitmaps.asm x86/be_blur.asm x86/blur.asm x86/cpuid.asm \
1717 x86/cpuid.h
844844
845845
846846 .asm.lo:
847 $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(AS) $(ASFLAGS) -I$(srcdir)/ -o $@ $< -prefer-non-pic
847 $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(top_srcdir)/ltnasm.sh $(AS) $(ASFLAGS) -I$(srcdir)/ -o $@ $<
848848
849849 # Tell versions [3.59,3.63) of GNU make to not export all variables.
850850 # Otherwise a system limit (for SysV at least) may be exceeded.
362362 NEXT(p, token);
363363
364364 ALIAS(End, Duration) // temporarily store end timecode in event->Duration
365 ALIAS(Actor, Name) // both variants are used in files
365366 PARSE_START
366367 INTVAL(Layer)
367368 STYLEVAL(Style)
578579
579580 static bool format_line_compare(const char *fmt1, const char *fmt2)
580581 {
582 #define TOKEN_ALIAS1(token, name, alias) \
583 if (token ## _end - token ## _start == sizeof( #alias ) - 1 && \
584 !strncmp(token ## _start, #alias, sizeof( #alias ) - 1)) { \
585 token ## _start = #name; \
586 token ## _end = token ## _start + sizeof( #name ) - 1; \
587 }
588 #define TOKEN_ALIAS(name, alias) TOKEN_ALIAS1(tk1, name, alias) TOKEN_ALIAS1(tk2, name, alias)
589
581590 while (true) {
582591 const char *tk1_start, *tk2_start;
583592 const char *tk1_end, *tk2_end;
590599 advance_token_pos(&fmt1, &tk1_start, &tk1_end);
591600 advance_token_pos(&fmt2, &tk2_start, &tk2_end);
592601
602 TOKEN_ALIAS(Name, Actor)
593603 if ((tk1_end-tk1_start) != (tk2_end-tk2_start))
594604 return false;
595605 if (ass_strncasecmp(tk1_start, tk2_start, tk1_end-tk1_start))
596606 return false;
597607 }
598608 return *fmt1 == *fmt2;
609
610 #undef TOKEN_ALIAS
611 #undef TOKEN_ALIAS1
599612 }
600613
601614
394394 }
395395 }
396396
397 void ass_sub_bitmaps_c(uint8_t *dst, intptr_t dst_stride,
398 uint8_t *src, intptr_t src_stride,
399 intptr_t width, intptr_t height)
400 {
401 short out;
397 void ass_imul_bitmaps_c(uint8_t *dst, intptr_t dst_stride,
398 uint8_t *src, intptr_t src_stride,
399 intptr_t width, intptr_t height)
400 {
402401 uint8_t* end = dst + dst_stride * height;
403402 while (dst < end) {
404403 for (unsigned j = 0; j < width; ++j) {
405 out = dst[j] - src[j];
406 dst[j] = FFMAX(out, 0);
404 dst[j] = (dst[j] * (255 - src[j]) + 255) >> 8;
407405 }
408406 dst += dst_stride;
409407 src += src_stride;
6868 FillGenericTileFunc fill_generic;
6969
7070 // blend functions
71 BitmapBlendFunc add_bitmaps, sub_bitmaps;
71 BitmapBlendFunc add_bitmaps, imul_bitmaps;
7272 BitmapMulFunc mul_bitmaps;
7373
7474 // be blur function
3333 void DECORATE(add_bitmaps)(uint8_t *dst, intptr_t dst_stride,
3434 uint8_t *src, intptr_t src_stride,
3535 intptr_t width, intptr_t height);
36 void DECORATE(sub_bitmaps)(uint8_t *dst, intptr_t dst_stride,
37 uint8_t *src, intptr_t src_stride,
38 intptr_t width, intptr_t height);
36 void DECORATE(imul_bitmaps)(uint8_t *dst, intptr_t dst_stride,
37 uint8_t *src, intptr_t src_stride,
38 intptr_t width, intptr_t height);
3939 void DECORATE(mul_bitmaps)(uint8_t *dst, intptr_t dst_stride,
4040 uint8_t *src1, intptr_t src1_stride,
4141 uint8_t *src2, intptr_t src2_stride,
104104 #endif
105105
106106 .add_bitmaps = DECORATE(add_bitmaps),
107 .sub_bitmaps = DECORATE(sub_bitmaps),
107 .imul_bitmaps = DECORATE(imul_bitmaps),
108108 .mul_bitmaps = DECORATE(mul_bitmaps),
109109
110110 .be_blur = DECORATE(be_blur),
730730
731731 // Blend together
732732 memcpy(nbuffer, abuffer, ((ah - 1) * as) + aw);
733 render_priv->engine->sub_bitmaps(nbuffer + atop * as + aleft, as,
734 bbuffer + btop * bs + bleft, bs,
735 w, h);
733 render_priv->engine->imul_bitmaps(nbuffer + atop * as + aleft, as,
734 bbuffer + btop * bs + bleft, bs,
735 w, h);
736736 } else {
737737 // Regular clip
738738 if (ax + aw < bx || ay + ah < by || ax > bx + bw ||
5959 %endmacro
6060
6161 ;------------------------------------------------------------------------------
62 ; BLEND_BITMAPS 1:add/sub
62 ; ADD_BITMAPS
6363 ; void add_bitmaps(uint8_t *dst, intptr_t dst_stride,
6464 ; uint8_t *src, intptr_t src_stride,
6565 ; intptr_t width, intptr_t height);
66 ; void sub_bitmaps(uint8_t *dst, intptr_t dst_stride,
67 ; uint8_t *src, intptr_t src_stride,
68 ; intptr_t width, intptr_t height);
69 ;------------------------------------------------------------------------------
70
71 %macro BLEND_BITMAPS 1
72 %if ARCH_X86_64
73 cglobal %1_bitmaps, 6,8,3
66 ;------------------------------------------------------------------------------
67
68 %macro ADD_BITMAPS 0
69 %if ARCH_X86_64
70 cglobal add_bitmaps, 6,8,3
7471 DECLARE_REG_TMP 7
7572 %else
76 cglobal %1_bitmaps, 5,7,3
73 cglobal add_bitmaps, 5,7,3
7774 DECLARE_REG_TMP 5
7875 %endif
7976 lea r0, [r0 + r4]
9188 jmp .loop_entry
9289
9390 .width_loop:
94 p%1usb m0, m1
91 paddusb m0, m1
9592 movu [r0 + r4 - mmsize], m0
9693 .loop_entry:
9794 movu m0, [r0 + r4]
9996 add r4, mmsize
10097 jnc .width_loop
10198 pand m1, m2
102 p%1usb m0, m1
99 paddusb m0, m1
103100 movu [r0 + r4 - mmsize], m0
104101 add r0, r1
105102 add r2, r3
110107 %endmacro
111108
112109 INIT_XMM sse2
113 BLEND_BITMAPS add
114 BLEND_BITMAPS sub
110 ADD_BITMAPS
115111 INIT_YMM avx2
116 BLEND_BITMAPS add
117 BLEND_BITMAPS sub
112 ADD_BITMAPS
113
114 ;------------------------------------------------------------------------------
115 ; IMUL_BITMAPS
116 ; void imul_bitmaps(uint8_t *dst, intptr_t dst_stride,
117 ; uint8_t *src, intptr_t src_stride,
118 ; intptr_t width, intptr_t height);
119 ;------------------------------------------------------------------------------
120
121 %macro IMUL_BITMAPS 0
122 %if ARCH_X86_64
123 cglobal imul_bitmaps, 6,8,8
124 DECLARE_REG_TMP 7
125 %else
126 cglobal imul_bitmaps, 5,7,8
127 DECLARE_REG_TMP 5
128 %endif
129 lea r0, [r0 + r4]
130 lea r2, [r2 + r4]
131 neg r4
132 mov r6, r4
133 and r4, mmsize - 1
134 LOAD_EDGE_MASK 4, r4, t0
135 %if ARCH_X86_64 || !PIC
136 mova m5, [words_255]
137 %else
138 mov t0d, 255 * 0x10001
139 BCASTD 5, t0d
140 %endif
141 pxor m6, m6
142 pcmpeqb m7, m7
143 %if !ARCH_X86_64
144 mov r5, r5m
145 %endif
146 imul r5, r3
147 add r5, r2
148 mov r4, r6
149 jmp .loop_entry
150
151 .width_loop:
152 pxor m1, m7
153 punpckhbw m2, m0, m6
154 punpckhbw m3, m1, m6
155 punpcklbw m0, m6
156 punpcklbw m1, m6
157 pmullw m2, m3
158 pmullw m0, m1
159 paddw m2, m5
160 paddw m0, m5
161 psrlw m2, 8
162 psrlw m0, 8
163 packuswb m0, m2
164 movu [r0 + r4 - mmsize], m0
165 .loop_entry:
166 movu m0, [r0 + r4]
167 movu m1, [r2 + r4]
168 add r4, mmsize
169 jnc .width_loop
170 pand m1, m4
171 pxor m1, m7
172 punpckhbw m2, m0, m6
173 punpckhbw m3, m1, m6
174 punpcklbw m0, m6
175 punpcklbw m1, m6
176 pmullw m2, m3
177 pmullw m0, m1
178 paddw m2, m5
179 paddw m0, m5
180 psrlw m2, 8
181 psrlw m0, 8
182 packuswb m0, m2
183 movu [r0 + r4 - mmsize], m0
184 add r0, r1
185 add r2, r3
186 mov r4, r6
187 cmp r2, r5
188 jl .loop_entry
189 RET
190 %endmacro
191
192 INIT_XMM sse2
193 IMUL_BITMAPS
194 INIT_YMM avx2
195 IMUL_BITMAPS
118196
119197 ;------------------------------------------------------------------------------
120198 ; MUL_BITMAPS
3030
3131 PROGRAM=libtool
3232 PACKAGE=libtool
33 VERSION=2.4.6
33 VERSION="2.4.6 Debian-2.4.6-15"
3434 package_revision=2.4.6
3535
3636
386386 # putting '$debug_cmd' at the start of all your functions, you can get
387387 # bash to show function call trace with:
388388 #
389 # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
389 # debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
390390 debug_cmd=${debug_cmd-":"}
391391 exit_cmd=:
392392
13691369 #! /bin/sh
13701370
13711371 # Set a version string for this script.
1372 scriptversion=2014-01-07.03; # UTC
1372 scriptversion=2015-10-07.11; # UTC
13731373
13741374 # A portable, pluggable option parser for Bourne shell.
13751375 # Written by Gary V. Vaughan, 2010
15291529 {
15301530 $debug_cmd
15311531
1532 _G_rc_run_hooks=false
1533
15321534 case " $hookable_fns " in
15331535 *" $1 "*) ;;
15341536 *) func_fatal_error "'$1' does not support hook funcions.n" ;;
15371539 eval _G_hook_fns=\$$1_hooks; shift
15381540
15391541 for _G_hook in $_G_hook_fns; do
1540 eval $_G_hook '"$@"'
1541
1542 # store returned options list back into positional
1543 # parameters for next 'cmd' execution.
1544 eval _G_hook_result=\$${_G_hook}_result
1545 eval set dummy "$_G_hook_result"; shift
1542 if eval $_G_hook '"$@"'; then
1543 # store returned options list back into positional
1544 # parameters for next 'cmd' execution.
1545 eval _G_hook_result=\$${_G_hook}_result
1546 eval set dummy "$_G_hook_result"; shift
1547 _G_rc_run_hooks=:
1548 fi
15461549 done
15471550
1548 func_quote_for_eval ${1+"$@"}
1549 func_run_hooks_result=$func_quote_for_eval_result
1551 $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
15501552 }
15511553
15521554
15561558 ## --------------- ##
15571559
15581560 # In order to add your own option parsing hooks, you must accept the
1559 # full positional parameter list in your hook function, remove any
1560 # options that you action, and then pass back the remaining unprocessed
1561 # full positional parameter list in your hook function, you may remove/edit
1562 # any options that you action, and then pass back the remaining unprocessed
15611563 # options in '<hooked_function_name>_result', escaped suitably for
1562 # 'eval'. Like this:
1564 # 'eval'. In this case you also must return $EXIT_SUCCESS to let the
1565 # hook's caller know that it should pay attention to
1566 # '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
1567 # arguments are left untouched by the hook and therefore caller will ignore the
1568 # result variable.
1569 #
1570 # Like this:
15631571 #
15641572 # my_options_prep ()
15651573 # {
15691577 # usage_message=$usage_message'
15701578 # -s, --silent don'\''t print informational messages
15711579 # '
1572 #
1573 # func_quote_for_eval ${1+"$@"}
1574 # my_options_prep_result=$func_quote_for_eval_result
1580 # # No change in '$@' (ignored completely by this hook). There is
1581 # # no need to do the equivalent (but slower) action:
1582 # # func_quote_for_eval ${1+"$@"}
1583 # # my_options_prep_result=$func_quote_for_eval_result
1584 # false
15751585 # }
15761586 # func_add_hook func_options_prep my_options_prep
15771587 #
15801590 # {
15811591 # $debug_cmd
15821592 #
1593 # args_changed=false
1594 #
15831595 # # Note that for efficiency, we parse as many options as we can
15841596 # # recognise in a loop before passing the remainder back to the
15851597 # # caller on the first unrecognised argument we encounter.
15861598 # while test $# -gt 0; do
15871599 # opt=$1; shift
15881600 # case $opt in
1589 # --silent|-s) opt_silent=: ;;
1601 # --silent|-s) opt_silent=:
1602 # args_changed=:
1603 # ;;
15901604 # # Separate non-argument short options:
15911605 # -s*) func_split_short_opt "$_G_opt"
15921606 # set dummy "$func_split_short_opt_name" \
15931607 # "-$func_split_short_opt_arg" ${1+"$@"}
15941608 # shift
1609 # args_changed=:
15951610 # ;;
1596 # *) set dummy "$_G_opt" "$*"; shift; break ;;
1611 # *) # Make sure the first unrecognised option "$_G_opt"
1612 # # is added back to "$@", we could need that later
1613 # # if $args_changed is true.
1614 # set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
15971615 # esac
15981616 # done
15991617 #
1600 # func_quote_for_eval ${1+"$@"}
1601 # my_silent_option_result=$func_quote_for_eval_result
1618 # if $args_changed; then
1619 # func_quote_for_eval ${1+"$@"}
1620 # my_silent_option_result=$func_quote_for_eval_result
1621 # fi
1622 #
1623 # $args_changed
16021624 # }
16031625 # func_add_hook func_parse_options my_silent_option
16041626 #
16101632 # $opt_silent && $opt_verbose && func_fatal_help "\
16111633 # '--silent' and '--verbose' options are mutually exclusive."
16121634 #
1613 # func_quote_for_eval ${1+"$@"}
1614 # my_option_validation_result=$func_quote_for_eval_result
1635 # false
16151636 # }
16161637 # func_add_hook func_validate_options my_option_validation
16171638 #
1618 # You'll alse need to manually amend $usage_message to reflect the extra
1639 # You'll also need to manually amend $usage_message to reflect the extra
16191640 # options you parse. It's preferable to append if you can, so that
16201641 # multiple option parsing hooks can be added safely.
1642
1643
1644 # func_options_finish [ARG]...
1645 # ----------------------------
1646 # Finishing the option parse loop (call 'func_options' hooks ATM).
1647 func_options_finish ()
1648 {
1649 $debug_cmd
1650
1651 _G_func_options_finish_exit=false
1652 if func_run_hooks func_options ${1+"$@"}; then
1653 func_options_finish_result=$func_run_hooks_result
1654 _G_func_options_finish_exit=:
1655 fi
1656
1657 $_G_func_options_finish_exit
1658 }
16211659
16221660
16231661 # func_options [ARG]...
16291667 {
16301668 $debug_cmd
16311669
1632 func_options_prep ${1+"$@"}
1633 eval func_parse_options \
1634 ${func_options_prep_result+"$func_options_prep_result"}
1635 eval func_validate_options \
1636 ${func_parse_options_result+"$func_parse_options_result"}
1637
1638 eval func_run_hooks func_options \
1639 ${func_validate_options_result+"$func_validate_options_result"}
1640
1641 # save modified positional parameters for caller
1642 func_options_result=$func_run_hooks_result
1670 _G_rc_options=false
1671
1672 for my_func in options_prep parse_options validate_options options_finish
1673 do
1674 if eval func_$my_func '${1+"$@"}'; then
1675 eval _G_res_var='$'"func_${my_func}_result"
1676 eval set dummy "$_G_res_var" ; shift
1677 _G_rc_options=:
1678 fi
1679 done
1680
1681 # Save modified positional parameters for caller. As a top-level
1682 # options-parser function we always need to set the 'func_options_result'
1683 # variable (regardless the $_G_rc_options value).
1684 if $_G_rc_options; then
1685 func_options_result=$_G_res_var
1686 else
1687 func_quote_for_eval ${1+"$@"}
1688 func_options_result=$func_quote_for_eval_result
1689 fi
1690
1691 $_G_rc_options
16431692 }
16441693
16451694
16481697 # All initialisations required before starting the option parse loop.
16491698 # Note that when calling hook functions, we pass through the list of
16501699 # positional parameters. If a hook function modifies that list, and
1651 # needs to propogate that back to rest of this script, then the complete
1700 # needs to propagate that back to rest of this script, then the complete
16521701 # modified list must be put in 'func_run_hooks_result' before
1653 # returning.
1702 # returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
16541703 func_hookable func_options_prep
16551704 func_options_prep ()
16561705 {
16601709 opt_verbose=false
16611710 opt_warning_types=
16621711
1663 func_run_hooks func_options_prep ${1+"$@"}
1664
1665 # save modified positional parameters for caller
1666 func_options_prep_result=$func_run_hooks_result
1712 _G_rc_options_prep=false
1713 if func_run_hooks func_options_prep ${1+"$@"}; then
1714 _G_rc_options_prep=:
1715 # save modified positional parameters for caller
1716 func_options_prep_result=$func_run_hooks_result
1717 fi
1718
1719 $_G_rc_options_prep
16671720 }
16681721
16691722
16771730
16781731 func_parse_options_result=
16791732
1733 _G_rc_parse_options=false
16801734 # this just eases exit handling
16811735 while test $# -gt 0; do
16821736 # Defer to hook functions for initial option parsing, so they
16831737 # get priority in the event of reusing an option name.
1684 func_run_hooks func_parse_options ${1+"$@"}
1685
1686 # Adjust func_parse_options positional parameters to match
1687 eval set dummy "$func_run_hooks_result"; shift
1738 if func_run_hooks func_parse_options ${1+"$@"}; then
1739 eval set dummy "$func_run_hooks_result"; shift
1740 _G_rc_parse_options=:
1741 fi
16881742
16891743 # Break out of the loop if we already parsed every option.
16901744 test $# -gt 0 || break
16911745
1746 _G_match_parse_options=:
16921747 _G_opt=$1
16931748 shift
16941749 case $_G_opt in
17031758 ;;
17041759
17051760 --warnings|--warning|-W)
1706 test $# = 0 && func_missing_arg $_G_opt && break
1761 if test $# = 0 && func_missing_arg $_G_opt; then
1762 _G_rc_parse_options=:
1763 break
1764 fi
17071765 case " $warning_categories $1" in
17081766 *" $1 "*)
17091767 # trailing space prevents matching last $1 above
17561814 shift
17571815 ;;
17581816
1759 --) break ;;
1817 --) _G_rc_parse_options=: ; break ;;
17601818 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1761 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1819 *) set dummy "$_G_opt" ${1+"$@"}; shift
1820 _G_match_parse_options=false
1821 break
1822 ;;
17621823 esac
1824
1825 $_G_match_parse_options && _G_rc_parse_options=:
17631826 done
17641827
1765 # save modified positional parameters for caller
1766 func_quote_for_eval ${1+"$@"}
1767 func_parse_options_result=$func_quote_for_eval_result
1828
1829 if $_G_rc_parse_options; then
1830 # save modified positional parameters for caller
1831 func_quote_for_eval ${1+"$@"}
1832 func_parse_options_result=$func_quote_for_eval_result
1833 fi
1834
1835 $_G_rc_parse_options
17681836 }
17691837
17701838
17771845 {
17781846 $debug_cmd
17791847
1848 _G_rc_validate_options=false
1849
17801850 # Display all warnings if -W was not given.
17811851 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
17821852
1783 func_run_hooks func_validate_options ${1+"$@"}
1853 if func_run_hooks func_validate_options ${1+"$@"}; then
1854 # save modified positional parameters for caller
1855 func_validate_options_result=$func_run_hooks_result
1856 _G_rc_validate_options=:
1857 fi
17841858
17851859 # Bail if the options were screwed!
17861860 $exit_cmd $EXIT_FAILURE
17871861
1788 # save modified positional parameters for caller
1789 func_validate_options_result=$func_run_hooks_result
1862 $_G_rc_validate_options
17901863 }
17911864
17921865
20672140 compiler: $LTCC
20682141 compiler flags: $LTCFLAGS
20692142 linker: $LD (gnu? $with_gnu_ld)
2070 version: $progname (GNU libtool) 2.4.6
2143 version: $progname $scriptversion Debian-2.4.6-15
20712144 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
20722145 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
20732146
20742147 Report bugs to <bug-libtool@gnu.org>.
2075 GNU libtool home page: <http://www.gnu.org/software/libtool/>.
2148 GNU libtool home page: <http://www.gnu.org/s/libtool/>.
20762149 General help using GNU software: <http://www.gnu.org/gethelp/>."
20772150 exit 0
20782151 }
22692342 nonopt=
22702343 preserve_args=
22712344
2345 _G_rc_lt_options_prep=:
2346
22722347 # Shorthand for --mode=foo, only valid as the first argument
22732348 case $1 in
22742349 clean|clea|cle|cl)
22922367 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
22932368 shift; set dummy --mode uninstall ${1+"$@"}; shift
22942369 ;;
2370 *)
2371 _G_rc_lt_options_prep=false
2372 ;;
22952373 esac
22962374
2297 # Pass back the list of options.
2298 func_quote_for_eval ${1+"$@"}
2299 libtool_options_prep_result=$func_quote_for_eval_result
2375 if $_G_rc_lt_options_prep; then
2376 # Pass back the list of options.
2377 func_quote_for_eval ${1+"$@"}
2378 libtool_options_prep_result=$func_quote_for_eval_result
2379 fi
2380
2381 $_G_rc_lt_options_prep
23002382 }
23012383 func_add_hook func_options_prep libtool_options_prep
23022384
23082390 {
23092391 $debug_cmd
23102392
2393 _G_rc_lt_parse_options=false
2394
23112395 # Perform our own loop to consume as many options as possible in
23122396 # each iteration.
23132397 while test $# -gt 0; do
2398 _G_match_lt_parse_options=:
23142399 _G_opt=$1
23152400 shift
23162401 case $_G_opt in
23852470 func_append preserve_args " $_G_opt"
23862471 ;;
23872472
2388 # An option not handled by this hook function:
2389 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
2473 # An option not handled by this hook function:
2474 *) set dummy "$_G_opt" ${1+"$@"} ; shift
2475 _G_match_lt_parse_options=false
2476 break
2477 ;;
23902478 esac
2479 $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
23912480 done
23922481
2393
2394 # save modified positional parameters for caller
2395 func_quote_for_eval ${1+"$@"}
2396 libtool_parse_options_result=$func_quote_for_eval_result
2482 if $_G_rc_lt_parse_options; then
2483 # save modified positional parameters for caller
2484 func_quote_for_eval ${1+"$@"}
2485 libtool_parse_options_result=$func_quote_for_eval_result
2486 fi
2487
2488 $_G_rc_lt_parse_options
23972489 }
23982490 func_add_hook func_parse_options libtool_parse_options
23992491
72717363 # -tp=* Portland pgcc target processor selection
72727364 # --sysroot=* for sysroot support
72737365 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7366 # -specs=* GCC specs files
72747367 # -stdlib=* select c++ std lib with clang
7368 # -fsanitize=* Clang/GCC memory and address sanitizer
7369 # -fuse-ld=* Linker select flags for GCC
7370 # -static-* direct GCC to link specific libraries statically
7371 # -fcilkplus Cilk Plus language extension features for C/C++
72757372 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
72767373 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
7277 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
7374 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
7375 -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
72787376 func_quote_for_eval "$arg"
72797377 arg=$func_quote_for_eval_result
72807378 func_append compile_command " $arg"
75677665 case $pass in
75687666 dlopen) libs=$dlfiles ;;
75697667 dlpreopen) libs=$dlprefiles ;;
7570 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
7668 link)
7669 libs="$deplibs %DEPLIBS%"
7670 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
7671 ;;
75717672 esac
75727673 fi
75737674 if test lib,dlpreopen = "$linkmode,$pass"; then
78867987 # It is a libtool convenience library, so add in its objects.
78877988 func_append convenience " $ladir/$objdir/$old_library"
78887989 func_append old_convenience " $ladir/$objdir/$old_library"
7990 tmp_libs=
7991 for deplib in $dependency_libs; do
7992 deplibs="$deplib $deplibs"
7993 if $opt_preserve_dup_deps; then
7994 case "$tmp_libs " in
7995 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7996 esac
7997 fi
7998 func_append tmp_libs " $deplib"
7999 done
78898000 elif test prog != "$linkmode" && test lib != "$linkmode"; then
78908001 func_fatal_error "'$lib' is not a convenience library"
78918002 fi
7892 tmp_libs=
7893 for deplib in $dependency_libs; do
7894 deplibs="$deplib $deplibs"
7895 if $opt_preserve_dup_deps; then
7896 case "$tmp_libs " in
7897 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7898 esac
7899 fi
7900 func_append tmp_libs " $deplib"
7901 done
79028003 continue
79038004 fi # $pass = conv
79048005
88218922 age=$number_minor
88228923 revision=$number_minor
88238924 lt_irix_increment=no
8925 ;;
8926 *)
8927 func_fatal_configuration "$modename: unknown library version type '$version_type'"
88248928 ;;
88258929 esac
88268930 ;;
0 #!/bin/sh
1
2 # Translate libtool supplied C-compiler options for NASM.
3 # libtool treats NASM like the C compiler, and may supply -f… options
4 # which are interpreted as the output file format by NASM, causing errors.
5 # Notably libtool will set -DPIC -fPIC and -fno-common;
6 # we want to use -DPIC by translating it to -DPIC=1, but remove everything else
7 #
8 # Theoretically the way the filtering is done here in a plain POSIX shell script,
9 # does mess up if there were spaces in any argument. However this will never happen
10 # since neither our filenames nor options do not contain spaces and source paths
11 # are not allowed to contain spaces by configure.
12
13 cmd=""
14 while [ "$#" -gt 0 ] ; do
15 case "$1" in
16 # NASM accepts both -f format and -fformat,
17 # we always use the former, and libtool supplied
18 # C-compiler options will always use the latter.
19 -f) cmd="$cmd $1" ;;
20 -f*) : ;;
21 -DPIC) cmd="$cmd -DPIC=1" ;;
22 *) cmd="$cmd $1" ;;
23 esac
24 shift
25 done
26
27 exec $cmd
727727 cat <<_LT_EOF >> "$cfgfile"
728728 #! $SHELL
729729 # Generated automatically by $as_me ($PACKAGE) $VERSION
730 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
731730 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
732731
733732 # Provide generalized library-building support services.
10411040 _LT_EOF
10421041 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
10431042 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1044 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1045 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1043 echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1044 $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
10461045 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
10471046 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
10481047 cat > conftest.c << _LT_EOF
10661065 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10671066 darwin1.*)
10681067 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1069 darwin*)
1070 case ${MACOSX_DEPLOYMENT_TARGET},$host in
1071 10.[[012]],*|,*powerpc*)
1068 darwin*) # darwin 5.x on
1069 # if running on 10.5 or later, the deployment target defaults
1070 # to the OS version, if on x86, and 10.4, the deployment
1071 # target defaults to 10.4. Don't you love it?
1072 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1073 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
1074 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1075 10.[[012]][[,.]]*)
10721076 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1073 *)
1077 10.*|11.*)
10741078 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10751079 esac
10761080 ;;
14871491 m4_defun([_LT_PROG_AR],
14881492 [AC_CHECK_TOOLS(AR, [ar], false)
14891493 : ${AR=ar}
1490 : ${AR_FLAGS=cru}
1494 : ${AR_FLAGS=cr}
14911495 _LT_DECL([], [AR], [1], [The archiver])
14921496 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
14931497
28812885 dynamic_linker='GNU/Linux ld.so'
28822886 ;;
28832887
2888 netbsdelf*-gnu)
2889 version_type=linux
2890 need_lib_prefix=no
2891 need_version=no
2892 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2893 soname_spec='${libname}${release}${shared_ext}$major'
2894 shlibpath_var=LD_LIBRARY_PATH
2895 shlibpath_overrides_runpath=no
2896 hardcode_into_libs=yes
2897 dynamic_linker='NetBSD ld.elf_so'
2898 ;;
2899
28842900 netbsd*)
28852901 version_type=sunos
28862902 need_lib_prefix=no
35403556 lt_cv_deplibs_check_method=pass_all
35413557 ;;
35423558
3543 netbsd*)
3559 netbsd* | netbsdelf*-gnu)
35443560 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35453561 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35463562 else
40464062 if AC_TRY_EVAL(ac_compile); then
40474063 # Now try to grab the symbols.
40484064 nlist=conftest.nm
4049 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4065 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
4066 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
40504067 # Try sorting and uniquifying the output.
40514068 if sort "$nlist" | uniq > "$nlist"T; then
40524069 mv -f "$nlist"T "$nlist"
44184435 ;;
44194436 esac
44204437 ;;
4421 netbsd*)
4438 netbsd* | netbsdelf*-gnu)
44224439 ;;
44234440 *qnx* | *nto*)
44244441 # QNX uses GNU C++, but need to define -shared option too, otherwise
46864703 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
46874704 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
46884705 ;;
4706 # flang / f18. f95 an alias for gfortran or flang on Debian
4707 flang* | f18* | f95*)
4708 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4709 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4710 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4711 ;;
46894712 # icc used to be incompatible with GCC.
46904713 # ICC 10 doesn't accept -KPIC any more.
46914714 icc* | ifort*)
49304953 ;;
49314954 esac
49324955 ;;
4956 linux* | k*bsd*-gnu | gnu*)
4957 _LT_TAGVAR(link_all_deplibs, $1)=no
4958 ;;
49334959 *)
49344960 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49354961 ;;
49915017 ;;
49925018 openbsd* | bitrig*)
49935019 with_gnu_ld=no
5020 ;;
5021 linux* | k*bsd*-gnu | gnu*)
5022 _LT_TAGVAR(link_all_deplibs, $1)=no
49945023 ;;
49955024 esac
49965025
52465275 fi
52475276 ;;
52485277
5249 netbsd*)
5278 netbsd* | netbsdelf*-gnu)
52505279 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
52515280 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
52525281 wlarc=
57675796 if test yes = "$lt_cv_irix_exported_symbol"; then
57685797 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
57695798 fi
5799 _LT_TAGVAR(link_all_deplibs, $1)=no
57705800 else
57715801 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
57725802 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
57885818 esac
57895819 ;;
57905820
5791 netbsd*)
5821 netbsd* | netbsdelf*-gnu)
57925822 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
57935823 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
57945824 else
64146444 # Commands to make compiler produce verbose output that lists
64156445 # what "hidden" libraries, object files and flags are used when
64166446 # linking a shared library.
6417 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6447 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
64186448
64196449 else
64206450 GXX=no
67896819 # explicitly linking system object files so we need to strip them
67906820 # from the output so that they don't get included in the library
67916821 # dependencies.
6792 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6822 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
67936823 ;;
67946824 *)
67956825 if test yes = "$GXX"; then
68546884 # explicitly linking system object files so we need to strip them
68556885 # from the output so that they don't get included in the library
68566886 # dependencies.
6857 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6887 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
68586888 ;;
68596889 *)
68606890 if test yes = "$GXX"; then
71937223 # Commands to make compiler produce verbose output that lists
71947224 # what "hidden" libraries, object files and flags are used when
71957225 # linking a shared library.
7196 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7226 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
71977227
71987228 else
71997229 # FIXME: insert proper C++ library support
72777307 # Commands to make compiler produce verbose output that lists
72787308 # what "hidden" libraries, object files and flags are used when
72797309 # linking a shared library.
7280 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7310 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
72817311 else
72827312 # g++ 2.7 appears to require '-G' NOT '-shared' on this
72837313 # platform.
72887318 # Commands to make compiler produce verbose output that lists
72897319 # what "hidden" libraries, object files and flags are used when
72907320 # linking a shared library.
7291 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7321 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
72927322 fi
72937323
72947324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'