···11+commit fc79791bd8ec7adb88e206158484b940343c6765
22+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
33+Date: Wed Dec 4 13:19:49 2024 -0800
44+55+ xkbevd 1.1.6
66+77+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
88+99+commit df09a8bd9d4692612647c5054d8113f7b83ce961
1010+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
1111+Date: Mon Nov 11 11:06:39 2024 -0800
1212+1313+ Use _stricmp() instead of strcasecmp() on Windows
1414+1515+ v2: Exclude include of <strings.h> as well
1616+1717+ Fixes: e4bae5f ("Assume target platforms have strcasecmp now")
1818+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
1919+ Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/7>
2020+2121+commit 53fc60d2eb2c6e3847d2e6cb6e3d3f48eaa8e0d8
2222+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
2323+Date: Sun Jul 28 15:44:00 2024 -0700
2424+2525+ Accept --help & --version as aliases to -help & -version
2626+2727+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2828+ Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/6>
2929+3030+commit ab1024ef4bd01324d8506d069b465dacc9579165
3131+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
3232+Date: Sun Jul 28 15:23:33 2024 -0700
3333+3434+ evargs.c: constify pointer arguments that aren't modified
3535+3636+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
3737+ Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/6>
3838+3939+commit 1176594f37734c3f60a0932c1e666edb5179a702
4040+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
4141+Date: Sun Jul 28 15:12:49 2024 -0700
4242+4343+ evargs.c: Use standard strchr() instead of deprecated index()
4444+4545+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
4646+ Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/6>
4747+4848+commit 7685c5d538067e726723dd99ef8108d303a9ee1a
4949+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
5050+Date: Sun Jul 28 12:58:01 2024 -0700
5151+5252+ Remove detectableRepeat variable
5353+5454+ The only uses of it were in the code in the '#ifdef notyet' bits
5555+ removed a decade ago in commit 01774fb58330733858ff41ceabe2d646d127d4f3.
5656+5757+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
5858+ Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/6>
5959+6060+commit e4bae5f23e2c12d2771b93adc7c686d8f600b3a9
6161+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
6262+Date: Mon Apr 22 10:26:01 2024 -0700
6363+6464+ Assume target platforms have strcasecmp now
6565+6666+ It has been required since Unix98/SUSv2
6767+6868+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
6969+ Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/5>
7070+171commit ca8e535970c7bec44e02141113e31a42bb0a1c5e
272Author: Alan Coopersmith <alan.coopersmith@oracle.com>
373Date: Sat Nov 12 15:47:00 2022 -0800
···871941 configure cache, you cache it, and the cached value is probably wrong.
872942873943commit 6b1df45952ed9088b8f9db18afbd62f1ee84f59d
874874-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
944944+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
875945Date: Wed Jul 6 20:38:28 2005 +0000
876946877947 build system for xkbevd
···11#! /bin/sh
22# Wrapper for compilers which do not understand '-c -o'.
3344-scriptversion=2018-03-07.03; # UTC
44+scriptversion=2024-06-19.01; # UTC
5566-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
66+# Copyright (C) 1999-2024 Free Software Foundation, Inc.
77# Written by Tom Tromey <tromey@cygnus.com>.
88#
99# This program is free software; you can redistribute it and/or modify
···143143 # configure might choose to run compile as 'compile cc -o foo foo.c'.
144144 eat=1
145145 case $2 in
146146- *.o | *.[oO][bB][jJ])
146146+ *.o | *.lo | *.[oO][bB][jJ])
147147 func_file_conv "$2"
148148 set x "$@" -Fo"$file"
149149 shift
···248248right script to run: please start by reading the file 'INSTALL'.
249249250250Report bugs to <bug-automake@gnu.org>.
251251+GNU Automake home page: <https://www.gnu.org/software/automake/>.
252252+General help using GNU software: <https://www.gnu.org/gethelp/>.
251253EOF
252254 exit $?
253255 ;;
254256 -v | --v*)
255255- echo "compile $scriptversion"
257257+ echo "compile (GNU Automake) $scriptversion"
256258 exit $?
257259 ;;
258260 cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
261261+ clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
259262 icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
260263 func_cl_wrapper "$@" # Doesn't return...
261264 ;;
+1028-753
app/xkbevd/config.guess
···11#! /bin/sh
22# Attempt to guess a canonical system name.
33-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
44-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
55-# 2011, 2012 Free Software Foundation, Inc.
33+# Copyright 1992-2024 Free Software Foundation, Inc.
6477-timestamp='2012-09-25'
55+# shellcheck disable=SC2006,SC2268 # see below for rationale
66+77+timestamp='2024-01-01'
8899# This file is free software; you can redistribute it and/or modify it
1010# under the terms of the GNU General Public License as published by
1111-# the Free Software Foundation; either version 2 of the License, or
1111+# the Free Software Foundation, either version 3 of the License, or
1212# (at your option) any later version.
1313#
1414# This program is distributed in the hope that it will be useful, but
···1717# General Public License for more details.
1818#
1919# You should have received a copy of the GNU General Public License
2020-# along with this program; if not, see <http://www.gnu.org/licenses/>.
2020+# along with this program; if not, see <https://www.gnu.org/licenses/>.
2121#
2222# As a special exception to the GNU General Public License, if you
2323# distribute this file as part of a program that contains a
2424# configuration script generated by Autoconf, you may include it under
2525-# the same distribution terms that you use for the rest of that program.
2626-2727-2828-# Originally written by Per Bothner. Please send patches (context
2929-# diff format) to <config-patches@gnu.org> and include a ChangeLog
3030-# entry.
2525+# the same distribution terms that you use for the rest of that
2626+# program. This Exception is an additional permission under section 7
2727+# of the GNU General Public License, version 3 ("GPLv3").
3128#
3232-# This script attempts to guess a canonical system name similar to
3333-# config.sub. If it succeeds, it prints the system name on stdout, and
3434-# exits with 0. Otherwise, it exits with 1.
2929+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
3530#
3631# You can get the latest version of this script from:
3737-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
3232+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
3333+#
3434+# Please send patches to <config-patches@gnu.org>.
3535+3636+3737+# The "shellcheck disable" line above the timestamp inhibits complaints
3838+# about features and limitations of the classic Bourne shell that were
3939+# superseded or lifted in POSIX. However, this script identifies a wide
4040+# variety of pre-POSIX systems that do not have POSIX shells at all, and
4141+# even some reasonably current systems (Solaris 10 as case-in-point) still
4242+# have a pre-POSIX /bin/sh.
4343+38443945me=`echo "$0" | sed -e 's,.*/,,'`
40464147usage="\
4248Usage: $0 [OPTION]
43494444-Output the configuration name of the system \`$me' is run on.
5050+Output the configuration name of the system '$me' is run on.
45514646-Operation modes:
5252+Options:
4753 -h, --help print this help, then exit
4854 -t, --time-stamp print date of last modification, then exit
4955 -v, --version print version number, then exit
···5460GNU config.guess ($timestamp)
55615662Originally written by Per Bothner.
5757-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
5858-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
5959-Free Software Foundation, Inc.
6363+Copyright 1992-2024 Free Software Foundation, Inc.
60646165This is free software; see the source for copying conditions. There is NO
6266warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
63676468help="
6565-Try \`$me --help' for more information."
6969+Try '$me --help' for more information."
66706771# Parse command line
6872while test $# -gt 0 ; do
···9094 exit 1
9195fi
92969393-trap 'exit 1' 1 2 15
9797+# Just in case it came from the environment.
9898+GUESS=
949995100# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
96101# compiler to aid in system detection is discouraged as it requires
97102# temporary files to be created and, as you can see below, it is a
98103# headache to deal with in a portable fashion.
99104100100-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
101101-# use `HOST_CC' if defined, but it is deprecated.
105105+# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
106106+# use 'HOST_CC' if defined, but it is deprecated.
102107103108# Portable tmp directory creation inspired by the Autoconf team.
104109105105-set_cc_for_build='
106106-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107107-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
108108-: ${TMPDIR=/tmp} ;
109109- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110110- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111111- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112112- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
113113-dummy=$tmp/dummy ;
114114-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
115115-case $CC_FOR_BUILD,$HOST_CC,$CC in
116116- ,,) echo "int x;" > $dummy.c ;
117117- for c in cc gcc c89 c99 ; do
118118- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
119119- CC_FOR_BUILD="$c"; break ;
120120- fi ;
121121- done ;
122122- if test x"$CC_FOR_BUILD" = x ; then
123123- CC_FOR_BUILD=no_compiler_found ;
124124- fi
125125- ;;
126126- ,,*) CC_FOR_BUILD=$CC ;;
127127- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
128128-esac ; set_cc_for_build= ;'
110110+tmp=
111111+# shellcheck disable=SC2172
112112+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
113113+114114+set_cc_for_build() {
115115+ # prevent multiple calls if $tmp is already set
116116+ test "$tmp" && return 0
117117+ : "${TMPDIR=/tmp}"
118118+ # shellcheck disable=SC2039,SC3028
119119+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
120120+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
121121+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
122122+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
123123+ dummy=$tmp/dummy
124124+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
125125+ ,,) echo "int x;" > "$dummy.c"
126126+ for driver in cc gcc c89 c99 ; do
127127+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
128128+ CC_FOR_BUILD=$driver
129129+ break
130130+ fi
131131+ done
132132+ if test x"$CC_FOR_BUILD" = x ; then
133133+ CC_FOR_BUILD=no_compiler_found
134134+ fi
135135+ ;;
136136+ ,,*) CC_FOR_BUILD=$CC ;;
137137+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
138138+ esac
139139+}
129140130141# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
131142# (ghazi@noc.rutgers.edu 1994-08-24)
132132-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
143143+if test -f /.attbin/uname ; then
133144 PATH=$PATH:/.attbin ; export PATH
134145fi
135146136147UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
137148UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
138138-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
149149+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
139150UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140151152152+case $UNAME_SYSTEM in
153153+Linux|GNU|GNU/*)
154154+ LIBC=unknown
155155+156156+ set_cc_for_build
157157+ cat <<-EOF > "$dummy.c"
158158+ #if defined(__ANDROID__)
159159+ LIBC=android
160160+ #else
161161+ #include <features.h>
162162+ #if defined(__UCLIBC__)
163163+ LIBC=uclibc
164164+ #elif defined(__dietlibc__)
165165+ LIBC=dietlibc
166166+ #elif defined(__GLIBC__)
167167+ LIBC=gnu
168168+ #elif defined(__LLVM_LIBC__)
169169+ LIBC=llvm
170170+ #else
171171+ #include <stdarg.h>
172172+ /* First heuristic to detect musl libc. */
173173+ #ifdef __DEFINED_va_list
174174+ LIBC=musl
175175+ #endif
176176+ #endif
177177+ #endif
178178+ EOF
179179+ cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
180180+ eval "$cc_set_libc"
181181+182182+ # Second heuristic to detect musl libc.
183183+ if [ "$LIBC" = unknown ] &&
184184+ command -v ldd >/dev/null &&
185185+ ldd --version 2>&1 | grep -q ^musl; then
186186+ LIBC=musl
187187+ fi
188188+189189+ # If the system lacks a compiler, then just pick glibc.
190190+ # We could probably try harder.
191191+ if [ "$LIBC" = unknown ]; then
192192+ LIBC=gnu
193193+ fi
194194+ ;;
195195+esac
196196+141197# Note: order is significant - the case branches are not exclusive.
142198143143-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
199199+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
144200 *:NetBSD:*:*)
145201 # NetBSD (nbsd) targets should (where applicable) match one or
146202 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
···152208 #
153209 # Note: NetBSD doesn't particularly care about the vendor
154210 # portion of the name. We always set it to "unknown".
155155- sysctl="sysctl -n hw.machine_arch"
156156- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
157157- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
158158- case "${UNAME_MACHINE_ARCH}" in
211211+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
212212+ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
213213+ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
214214+ echo unknown)`
215215+ case $UNAME_MACHINE_ARCH in
216216+ aarch64eb) machine=aarch64_be-unknown ;;
159217 armeb) machine=armeb-unknown ;;
160218 arm*) machine=arm-unknown ;;
161219 sh3el) machine=shl-unknown ;;
162220 sh3eb) machine=sh-unknown ;;
163221 sh5el) machine=sh5le-unknown ;;
164164- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
222222+ earmv*)
223223+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
224224+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
225225+ machine=${arch}${endian}-unknown
226226+ ;;
227227+ *) machine=$UNAME_MACHINE_ARCH-unknown ;;
165228 esac
166229 # The Operating System including object format, if it has switched
167167- # to ELF recently, or will in the future.
168168- case "${UNAME_MACHINE_ARCH}" in
230230+ # to ELF recently (or will in the future) and ABI.
231231+ case $UNAME_MACHINE_ARCH in
232232+ earm*)
233233+ os=netbsdelf
234234+ ;;
169235 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
170170- eval $set_cc_for_build
236236+ set_cc_for_build
171237 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
172238 | grep -q __ELF__
173239 then
···182248 os=netbsd
183249 ;;
184250 esac
251251+ # Determine ABI tags.
252252+ case $UNAME_MACHINE_ARCH in
253253+ earm*)
254254+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
255255+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
256256+ ;;
257257+ esac
185258 # The OS release
186259 # Debian GNU/NetBSD machines have a different userland, and
187260 # thus, need a distinct triplet. However, they do not need
188261 # kernel version information, so it can be replaced with a
189262 # suitable tag, in the style of linux-gnu.
190190- case "${UNAME_VERSION}" in
263263+ case $UNAME_VERSION in
191264 Debian*)
192265 release='-gnu'
193266 ;;
194267 *)
195195- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
268268+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
196269 ;;
197270 esac
198271 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
199272 # contains redundant information, the shorter form:
200273 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
201201- echo "${machine}-${os}${release}"
202202- exit ;;
274274+ GUESS=$machine-${os}${release}${abi-}
275275+ ;;
203276 *:Bitrig:*:*)
204277 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
205205- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
206206- exit ;;
278278+ GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
279279+ ;;
207280 *:OpenBSD:*:*)
208281 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
209209- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
210210- exit ;;
282282+ GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
283283+ ;;
284284+ *:SecBSD:*:*)
285285+ UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
286286+ GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
287287+ ;;
288288+ *:LibertyBSD:*:*)
289289+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
290290+ GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
291291+ ;;
292292+ *:MidnightBSD:*:*)
293293+ GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
294294+ ;;
211295 *:ekkoBSD:*:*)
212212- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
213213- exit ;;
296296+ GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
297297+ ;;
214298 *:SolidBSD:*:*)
215215- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
216216- exit ;;
299299+ GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
300300+ ;;
301301+ *:OS108:*:*)
302302+ GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
303303+ ;;
217304 macppc:MirBSD:*:*)
218218- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
219219- exit ;;
305305+ GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
306306+ ;;
220307 *:MirBSD:*:*)
221221- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
222222- exit ;;
308308+ GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
309309+ ;;
310310+ *:Sortix:*:*)
311311+ GUESS=$UNAME_MACHINE-unknown-sortix
312312+ ;;
313313+ *:Twizzler:*:*)
314314+ GUESS=$UNAME_MACHINE-unknown-twizzler
315315+ ;;
316316+ *:Redox:*:*)
317317+ GUESS=$UNAME_MACHINE-unknown-redox
318318+ ;;
319319+ mips:OSF1:*.*)
320320+ GUESS=mips-dec-osf1
321321+ ;;
223322 alpha:OSF1:*:*)
323323+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
324324+ trap '' 0
224325 case $UNAME_RELEASE in
225326 *4.0)
226327 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
···234335 # covers most systems running today. This code pipes the CPU
235336 # types through head -n 1, so we only detect the type of CPU 0.
236337 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
237237- case "$ALPHA_CPU_TYPE" in
338338+ case $ALPHA_CPU_TYPE in
238339 "EV4 (21064)")
239239- UNAME_MACHINE="alpha" ;;
340340+ UNAME_MACHINE=alpha ;;
240341 "EV4.5 (21064)")
241241- UNAME_MACHINE="alpha" ;;
342342+ UNAME_MACHINE=alpha ;;
242343 "LCA4 (21066/21068)")
243243- UNAME_MACHINE="alpha" ;;
344344+ UNAME_MACHINE=alpha ;;
244345 "EV5 (21164)")
245245- UNAME_MACHINE="alphaev5" ;;
346346+ UNAME_MACHINE=alphaev5 ;;
246347 "EV5.6 (21164A)")
247247- UNAME_MACHINE="alphaev56" ;;
348348+ UNAME_MACHINE=alphaev56 ;;
248349 "EV5.6 (21164PC)")
249249- UNAME_MACHINE="alphapca56" ;;
350350+ UNAME_MACHINE=alphapca56 ;;
250351 "EV5.7 (21164PC)")
251251- UNAME_MACHINE="alphapca57" ;;
352352+ UNAME_MACHINE=alphapca57 ;;
252353 "EV6 (21264)")
253253- UNAME_MACHINE="alphaev6" ;;
354354+ UNAME_MACHINE=alphaev6 ;;
254355 "EV6.7 (21264A)")
255255- UNAME_MACHINE="alphaev67" ;;
356356+ UNAME_MACHINE=alphaev67 ;;
256357 "EV6.8CB (21264C)")
257257- UNAME_MACHINE="alphaev68" ;;
358358+ UNAME_MACHINE=alphaev68 ;;
258359 "EV6.8AL (21264B)")
259259- UNAME_MACHINE="alphaev68" ;;
360360+ UNAME_MACHINE=alphaev68 ;;
260361 "EV6.8CX (21264D)")
261261- UNAME_MACHINE="alphaev68" ;;
362362+ UNAME_MACHINE=alphaev68 ;;
262363 "EV6.9A (21264/EV69A)")
263263- UNAME_MACHINE="alphaev69" ;;
364364+ UNAME_MACHINE=alphaev69 ;;
264365 "EV7 (21364)")
265265- UNAME_MACHINE="alphaev7" ;;
366366+ UNAME_MACHINE=alphaev7 ;;
266367 "EV7.9 (21364A)")
267267- UNAME_MACHINE="alphaev79" ;;
368368+ UNAME_MACHINE=alphaev79 ;;
268369 esac
269370 # A Pn.n version is a patched version.
270371 # A Vn.n version is a released version.
271372 # A Tn.n version is a released field test version.
272373 # A Xn.n version is an unreleased experimental baselevel.
273374 # 1.2 uses "1.2" for uname -r.
274274- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
275275- # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
276276- exitcode=$?
277277- trap '' 0
278278- exit $exitcode ;;
279279- Alpha\ *:Windows_NT*:*)
280280- # How do we know it's Interix rather than the generic POSIX subsystem?
281281- # Should we change UNAME_MACHINE based on the output of uname instead
282282- # of the specific Alpha model?
283283- echo alpha-pc-interix
284284- exit ;;
285285- 21064:Windows_NT:50:3)
286286- echo alpha-dec-winnt3.5
287287- exit ;;
375375+ OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
376376+ GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
377377+ ;;
288378 Amiga*:UNIX_System_V:4.0:*)
289289- echo m68k-unknown-sysv4
290290- exit ;;
379379+ GUESS=m68k-unknown-sysv4
380380+ ;;
291381 *:[Aa]miga[Oo][Ss]:*:*)
292292- echo ${UNAME_MACHINE}-unknown-amigaos
293293- exit ;;
382382+ GUESS=$UNAME_MACHINE-unknown-amigaos
383383+ ;;
294384 *:[Mm]orph[Oo][Ss]:*:*)
295295- echo ${UNAME_MACHINE}-unknown-morphos
296296- exit ;;
385385+ GUESS=$UNAME_MACHINE-unknown-morphos
386386+ ;;
297387 *:OS/390:*:*)
298298- echo i370-ibm-openedition
299299- exit ;;
388388+ GUESS=i370-ibm-openedition
389389+ ;;
300390 *:z/VM:*:*)
301301- echo s390-ibm-zvmoe
302302- exit ;;
391391+ GUESS=s390-ibm-zvmoe
392392+ ;;
303393 *:OS400:*:*)
304304- echo powerpc-ibm-os400
305305- exit ;;
394394+ GUESS=powerpc-ibm-os400
395395+ ;;
306396 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
307307- echo arm-acorn-riscix${UNAME_RELEASE}
308308- exit ;;
397397+ GUESS=arm-acorn-riscix$UNAME_RELEASE
398398+ ;;
309399 arm*:riscos:*:*|arm*:RISCOS:*:*)
310310- echo arm-unknown-riscos
311311- exit ;;
400400+ GUESS=arm-unknown-riscos
401401+ ;;
312402 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
313313- echo hppa1.1-hitachi-hiuxmpp
314314- exit ;;
403403+ GUESS=hppa1.1-hitachi-hiuxmpp
404404+ ;;
315405 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
316406 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
317317- if test "`(/bin/universe) 2>/dev/null`" = att ; then
318318- echo pyramid-pyramid-sysv3
319319- else
320320- echo pyramid-pyramid-bsd
321321- fi
322322- exit ;;
407407+ case `(/bin/universe) 2>/dev/null` in
408408+ att) GUESS=pyramid-pyramid-sysv3 ;;
409409+ *) GUESS=pyramid-pyramid-bsd ;;
410410+ esac
411411+ ;;
323412 NILE*:*:*:dcosx)
324324- echo pyramid-pyramid-svr4
325325- exit ;;
413413+ GUESS=pyramid-pyramid-svr4
414414+ ;;
326415 DRS?6000:unix:4.0:6*)
327327- echo sparc-icl-nx6
328328- exit ;;
416416+ GUESS=sparc-icl-nx6
417417+ ;;
329418 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
330419 case `/usr/bin/uname -p` in
331331- sparc) echo sparc-icl-nx7; exit ;;
332332- esac ;;
420420+ sparc) GUESS=sparc-icl-nx7 ;;
421421+ esac
422422+ ;;
333423 s390x:SunOS:*:*)
334334- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335335- exit ;;
424424+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
425425+ GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
426426+ ;;
336427 sun4H:SunOS:5.*:*)
337337- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
338338- exit ;;
428428+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
429429+ GUESS=sparc-hal-solaris2$SUN_REL
430430+ ;;
339431 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
340340- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
341341- exit ;;
432432+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
433433+ GUESS=sparc-sun-solaris2$SUN_REL
434434+ ;;
342435 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
343343- echo i386-pc-auroraux${UNAME_RELEASE}
344344- exit ;;
436436+ GUESS=i386-pc-auroraux$UNAME_RELEASE
437437+ ;;
345438 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
346346- eval $set_cc_for_build
347347- SUN_ARCH="i386"
439439+ set_cc_for_build
440440+ SUN_ARCH=i386
348441 # If there is a compiler, see if it is configured for 64-bit objects.
349442 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
350443 # This test works for both compilers.
351351- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
444444+ if test "$CC_FOR_BUILD" != no_compiler_found; then
352445 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
353353- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
446446+ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
354447 grep IS_64BIT_ARCH >/dev/null
355448 then
356356- SUN_ARCH="x86_64"
449449+ SUN_ARCH=x86_64
357450 fi
358451 fi
359359- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
360360- exit ;;
452452+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
453453+ GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
454454+ ;;
361455 sun4*:SunOS:6*:*)
362456 # According to config.sub, this is the proper way to canonicalize
363457 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
364458 # it's likely to be more like Solaris than SunOS4.
365365- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
366366- exit ;;
459459+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
460460+ GUESS=sparc-sun-solaris3$SUN_REL
461461+ ;;
367462 sun4*:SunOS:*:*)
368368- case "`/usr/bin/arch -k`" in
463463+ case `/usr/bin/arch -k` in
369464 Series*|S4*)
370465 UNAME_RELEASE=`uname -v`
371466 ;;
372467 esac
373373- # Japanese Language versions have a version number like `4.1.3-JL'.
374374- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
375375- exit ;;
468468+ # Japanese Language versions have a version number like '4.1.3-JL'.
469469+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
470470+ GUESS=sparc-sun-sunos$SUN_REL
471471+ ;;
376472 sun3*:SunOS:*:*)
377377- echo m68k-sun-sunos${UNAME_RELEASE}
378378- exit ;;
473473+ GUESS=m68k-sun-sunos$UNAME_RELEASE
474474+ ;;
379475 sun*:*:4.2BSD:*)
380476 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
381381- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
382382- case "`/bin/arch`" in
477477+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
478478+ case `/bin/arch` in
383479 sun3)
384384- echo m68k-sun-sunos${UNAME_RELEASE}
480480+ GUESS=m68k-sun-sunos$UNAME_RELEASE
385481 ;;
386482 sun4)
387387- echo sparc-sun-sunos${UNAME_RELEASE}
483483+ GUESS=sparc-sun-sunos$UNAME_RELEASE
388484 ;;
389485 esac
390390- exit ;;
486486+ ;;
391487 aushp:SunOS:*:*)
392392- echo sparc-auspex-sunos${UNAME_RELEASE}
393393- exit ;;
488488+ GUESS=sparc-auspex-sunos$UNAME_RELEASE
489489+ ;;
394490 # The situation for MiNT is a little confusing. The machine name
395491 # can be virtually everything (everything which is not
396492 # "atarist" or "atariste" at least should have a processor
···400496 # MiNT. But MiNT is downward compatible to TOS, so this should
401497 # be no problem.
402498 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
403403- echo m68k-atari-mint${UNAME_RELEASE}
404404- exit ;;
499499+ GUESS=m68k-atari-mint$UNAME_RELEASE
500500+ ;;
405501 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
406406- echo m68k-atari-mint${UNAME_RELEASE}
407407- exit ;;
502502+ GUESS=m68k-atari-mint$UNAME_RELEASE
503503+ ;;
408504 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
409409- echo m68k-atari-mint${UNAME_RELEASE}
410410- exit ;;
505505+ GUESS=m68k-atari-mint$UNAME_RELEASE
506506+ ;;
411507 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
412412- echo m68k-milan-mint${UNAME_RELEASE}
413413- exit ;;
508508+ GUESS=m68k-milan-mint$UNAME_RELEASE
509509+ ;;
414510 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
415415- echo m68k-hades-mint${UNAME_RELEASE}
416416- exit ;;
511511+ GUESS=m68k-hades-mint$UNAME_RELEASE
512512+ ;;
417513 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
418418- echo m68k-unknown-mint${UNAME_RELEASE}
419419- exit ;;
514514+ GUESS=m68k-unknown-mint$UNAME_RELEASE
515515+ ;;
420516 m68k:machten:*:*)
421421- echo m68k-apple-machten${UNAME_RELEASE}
422422- exit ;;
517517+ GUESS=m68k-apple-machten$UNAME_RELEASE
518518+ ;;
423519 powerpc:machten:*:*)
424424- echo powerpc-apple-machten${UNAME_RELEASE}
425425- exit ;;
520520+ GUESS=powerpc-apple-machten$UNAME_RELEASE
521521+ ;;
426522 RISC*:Mach:*:*)
427427- echo mips-dec-mach_bsd4.3
428428- exit ;;
523523+ GUESS=mips-dec-mach_bsd4.3
524524+ ;;
429525 RISC*:ULTRIX:*:*)
430430- echo mips-dec-ultrix${UNAME_RELEASE}
431431- exit ;;
526526+ GUESS=mips-dec-ultrix$UNAME_RELEASE
527527+ ;;
432528 VAX*:ULTRIX*:*:*)
433433- echo vax-dec-ultrix${UNAME_RELEASE}
434434- exit ;;
529529+ GUESS=vax-dec-ultrix$UNAME_RELEASE
530530+ ;;
435531 2020:CLIX:*:* | 2430:CLIX:*:*)
436436- echo clipper-intergraph-clix${UNAME_RELEASE}
437437- exit ;;
532532+ GUESS=clipper-intergraph-clix$UNAME_RELEASE
533533+ ;;
438534 mips:*:*:UMIPS | mips:*:*:RISCos)
439439- eval $set_cc_for_build
440440- sed 's/^ //' << EOF >$dummy.c
535535+ set_cc_for_build
536536+ sed 's/^ //' << EOF > "$dummy.c"
441537#ifdef __cplusplus
442538#include <stdio.h> /* for printf() prototype */
443539 int main (int argc, char *argv[]) {
···446542#endif
447543 #if defined (host_mips) && defined (MIPSEB)
448544 #if defined (SYSTYPE_SYSV)
449449- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
545545+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
450546 #endif
451547 #if defined (SYSTYPE_SVR4)
452452- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
548548+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
453549 #endif
454550 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
455455- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
551551+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
456552 #endif
457553 #endif
458554 exit (-1);
459555 }
460556EOF
461461- $CC_FOR_BUILD -o $dummy $dummy.c &&
462462- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
463463- SYSTEM_NAME=`$dummy $dummyarg` &&
557557+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
558558+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
559559+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
464560 { echo "$SYSTEM_NAME"; exit; }
465465- echo mips-mips-riscos${UNAME_RELEASE}
466466- exit ;;
561561+ GUESS=mips-mips-riscos$UNAME_RELEASE
562562+ ;;
467563 Motorola:PowerMAX_OS:*:*)
468468- echo powerpc-motorola-powermax
469469- exit ;;
564564+ GUESS=powerpc-motorola-powermax
565565+ ;;
470566 Motorola:*:4.3:PL8-*)
471471- echo powerpc-harris-powermax
472472- exit ;;
567567+ GUESS=powerpc-harris-powermax
568568+ ;;
473569 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
474474- echo powerpc-harris-powermax
475475- exit ;;
570570+ GUESS=powerpc-harris-powermax
571571+ ;;
476572 Night_Hawk:Power_UNIX:*:*)
477477- echo powerpc-harris-powerunix
478478- exit ;;
573573+ GUESS=powerpc-harris-powerunix
574574+ ;;
479575 m88k:CX/UX:7*:*)
480480- echo m88k-harris-cxux7
481481- exit ;;
576576+ GUESS=m88k-harris-cxux7
577577+ ;;
482578 m88k:*:4*:R4*)
483483- echo m88k-motorola-sysv4
484484- exit ;;
579579+ GUESS=m88k-motorola-sysv4
580580+ ;;
485581 m88k:*:3*:R3*)
486486- echo m88k-motorola-sysv3
487487- exit ;;
582582+ GUESS=m88k-motorola-sysv3
583583+ ;;
488584 AViiON:dgux:*:*)
489585 # DG/UX returns AViiON for all architectures
490586 UNAME_PROCESSOR=`/usr/bin/uname -p`
491491- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
587587+ if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
492588 then
493493- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
494494- [ ${TARGET_BINARY_INTERFACE}x = x ]
589589+ if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
590590+ test "$TARGET_BINARY_INTERFACE"x = x
495591 then
496496- echo m88k-dg-dgux${UNAME_RELEASE}
592592+ GUESS=m88k-dg-dgux$UNAME_RELEASE
497593 else
498498- echo m88k-dg-dguxbcs${UNAME_RELEASE}
594594+ GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
499595 fi
500596 else
501501- echo i586-dg-dgux${UNAME_RELEASE}
597597+ GUESS=i586-dg-dgux$UNAME_RELEASE
502598 fi
503503- exit ;;
599599+ ;;
504600 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
505505- echo m88k-dolphin-sysv3
506506- exit ;;
601601+ GUESS=m88k-dolphin-sysv3
602602+ ;;
507603 M88*:*:R3*:*)
508604 # Delta 88k system running SVR3
509509- echo m88k-motorola-sysv3
510510- exit ;;
605605+ GUESS=m88k-motorola-sysv3
606606+ ;;
511607 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
512512- echo m88k-tektronix-sysv3
513513- exit ;;
608608+ GUESS=m88k-tektronix-sysv3
609609+ ;;
514610 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
515515- echo m68k-tektronix-bsd
516516- exit ;;
611611+ GUESS=m68k-tektronix-bsd
612612+ ;;
517613 *:IRIX*:*:*)
518518- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
519519- exit ;;
614614+ IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
615615+ GUESS=mips-sgi-irix$IRIX_REL
616616+ ;;
520617 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
521521- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
522522- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
618618+ GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
619619+ ;; # Note that: echo "'`uname -s`'" gives 'AIX '
523620 i*86:AIX:*:*)
524524- echo i386-ibm-aix
525525- exit ;;
621621+ GUESS=i386-ibm-aix
622622+ ;;
526623 ia64:AIX:*:*)
527527- if [ -x /usr/bin/oslevel ] ; then
624624+ if test -x /usr/bin/oslevel ; then
528625 IBM_REV=`/usr/bin/oslevel`
529626 else
530530- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
627627+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
531628 fi
532532- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
533533- exit ;;
629629+ GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
630630+ ;;
534631 *:AIX:2:3)
535632 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
536536- eval $set_cc_for_build
537537- sed 's/^ //' << EOF >$dummy.c
633633+ set_cc_for_build
634634+ sed 's/^ //' << EOF > "$dummy.c"
538635 #include <sys/systemcfg.h>
539636540637 main()
···545642 exit(0);
546643 }
547644EOF
548548- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
645645+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
549646 then
550550- echo "$SYSTEM_NAME"
647647+ GUESS=$SYSTEM_NAME
551648 else
552552- echo rs6000-ibm-aix3.2.5
649649+ GUESS=rs6000-ibm-aix3.2.5
553650 fi
554651 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
555555- echo rs6000-ibm-aix3.2.4
652652+ GUESS=rs6000-ibm-aix3.2.4
556653 else
557557- echo rs6000-ibm-aix3.2
654654+ GUESS=rs6000-ibm-aix3.2
558655 fi
559559- exit ;;
656656+ ;;
560657 *:AIX:*:[4567])
561658 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
562562- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
659659+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
563660 IBM_ARCH=rs6000
564661 else
565662 IBM_ARCH=powerpc
566663 fi
567567- if [ -x /usr/bin/oslevel ] ; then
568568- IBM_REV=`/usr/bin/oslevel`
664664+ if test -x /usr/bin/lslpp ; then
665665+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
666666+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
569667 else
570570- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
668668+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
571669 fi
572572- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
573573- exit ;;
670670+ GUESS=$IBM_ARCH-ibm-aix$IBM_REV
671671+ ;;
574672 *:AIX:*:*)
575575- echo rs6000-ibm-aix
576576- exit ;;
577577- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
578578- echo romp-ibm-bsd4.4
579579- exit ;;
673673+ GUESS=rs6000-ibm-aix
674674+ ;;
675675+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
676676+ GUESS=romp-ibm-bsd4.4
677677+ ;;
580678 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
581581- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
582582- exit ;; # report: romp-ibm BSD 4.3
679679+ GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
680680+ ;; # report: romp-ibm BSD 4.3
583681 *:BOSX:*:*)
584584- echo rs6000-bull-bosx
585585- exit ;;
682682+ GUESS=rs6000-bull-bosx
683683+ ;;
586684 DPX/2?00:B.O.S.:*:*)
587587- echo m68k-bull-sysv3
588588- exit ;;
685685+ GUESS=m68k-bull-sysv3
686686+ ;;
589687 9000/[34]??:4.3bsd:1.*:*)
590590- echo m68k-hp-bsd
591591- exit ;;
688688+ GUESS=m68k-hp-bsd
689689+ ;;
592690 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
593593- echo m68k-hp-bsd4.4
594594- exit ;;
691691+ GUESS=m68k-hp-bsd4.4
692692+ ;;
595693 9000/[34678]??:HP-UX:*:*)
596596- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
597597- case "${UNAME_MACHINE}" in
598598- 9000/31? ) HP_ARCH=m68000 ;;
599599- 9000/[34]?? ) HP_ARCH=m68k ;;
694694+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
695695+ case $UNAME_MACHINE in
696696+ 9000/31?) HP_ARCH=m68000 ;;
697697+ 9000/[34]??) HP_ARCH=m68k ;;
600698 9000/[678][0-9][0-9])
601601- if [ -x /usr/bin/getconf ]; then
699699+ if test -x /usr/bin/getconf; then
602700 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
603701 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
604604- case "${sc_cpu_version}" in
605605- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
606606- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
702702+ case $sc_cpu_version in
703703+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
704704+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
607705 532) # CPU_PA_RISC2_0
608608- case "${sc_kernel_bits}" in
609609- 32) HP_ARCH="hppa2.0n" ;;
610610- 64) HP_ARCH="hppa2.0w" ;;
611611- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
706706+ case $sc_kernel_bits in
707707+ 32) HP_ARCH=hppa2.0n ;;
708708+ 64) HP_ARCH=hppa2.0w ;;
709709+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
612710 esac ;;
613711 esac
614712 fi
615615- if [ "${HP_ARCH}" = "" ]; then
616616- eval $set_cc_for_build
617617- sed 's/^ //' << EOF >$dummy.c
713713+ if test "$HP_ARCH" = ""; then
714714+ set_cc_for_build
715715+ sed 's/^ //' << EOF > "$dummy.c"
618716619717 #define _HPUX_SOURCE
620718 #include <stdlib.h>
···647745 exit (0);
648746 }
649747EOF
650650- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
748748+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
651749 test -z "$HP_ARCH" && HP_ARCH=hppa
652750 fi ;;
653751 esac
654654- if [ ${HP_ARCH} = "hppa2.0w" ]
752752+ if test "$HP_ARCH" = hppa2.0w
655753 then
656656- eval $set_cc_for_build
754754+ set_cc_for_build
657755658756 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
659757 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
···664762 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
665763 # => hppa64-hp-hpux11.23
666764667667- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
765765+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
668766 grep -q __LP64__
669767 then
670670- HP_ARCH="hppa2.0w"
768768+ HP_ARCH=hppa2.0w
671769 else
672672- HP_ARCH="hppa64"
770770+ HP_ARCH=hppa64
673771 fi
674772 fi
675675- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
676676- exit ;;
773773+ GUESS=$HP_ARCH-hp-hpux$HPUX_REV
774774+ ;;
677775 ia64:HP-UX:*:*)
678678- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
679679- echo ia64-hp-hpux${HPUX_REV}
680680- exit ;;
776776+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
777777+ GUESS=ia64-hp-hpux$HPUX_REV
778778+ ;;
681779 3050*:HI-UX:*:*)
682682- eval $set_cc_for_build
683683- sed 's/^ //' << EOF >$dummy.c
780780+ set_cc_for_build
781781+ sed 's/^ //' << EOF > "$dummy.c"
684782 #include <unistd.h>
685783 int
686784 main ()
···705803 exit (0);
706804 }
707805EOF
708708- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
806806+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
709807 { echo "$SYSTEM_NAME"; exit; }
710710- echo unknown-hitachi-hiuxwe2
711711- exit ;;
712712- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
713713- echo hppa1.1-hp-bsd
714714- exit ;;
808808+ GUESS=unknown-hitachi-hiuxwe2
809809+ ;;
810810+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
811811+ GUESS=hppa1.1-hp-bsd
812812+ ;;
715813 9000/8??:4.3bsd:*:*)
716716- echo hppa1.0-hp-bsd
717717- exit ;;
814814+ GUESS=hppa1.0-hp-bsd
815815+ ;;
718816 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
719719- echo hppa1.0-hp-mpeix
720720- exit ;;
721721- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
722722- echo hppa1.1-hp-osf
723723- exit ;;
817817+ GUESS=hppa1.0-hp-mpeix
818818+ ;;
819819+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
820820+ GUESS=hppa1.1-hp-osf
821821+ ;;
724822 hp8??:OSF1:*:*)
725725- echo hppa1.0-hp-osf
726726- exit ;;
823823+ GUESS=hppa1.0-hp-osf
824824+ ;;
727825 i*86:OSF1:*:*)
728728- if [ -x /usr/sbin/sysversion ] ; then
729729- echo ${UNAME_MACHINE}-unknown-osf1mk
826826+ if test -x /usr/sbin/sysversion ; then
827827+ GUESS=$UNAME_MACHINE-unknown-osf1mk
730828 else
731731- echo ${UNAME_MACHINE}-unknown-osf1
829829+ GUESS=$UNAME_MACHINE-unknown-osf1
732830 fi
733733- exit ;;
831831+ ;;
734832 parisc*:Lites*:*:*)
735735- echo hppa1.1-hp-lites
736736- exit ;;
833833+ GUESS=hppa1.1-hp-lites
834834+ ;;
737835 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
738738- echo c1-convex-bsd
739739- exit ;;
836836+ GUESS=c1-convex-bsd
837837+ ;;
740838 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
741839 if getsysinfo -f scalar_acc
742840 then echo c32-convex-bsd
···744842 fi
745843 exit ;;
746844 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
747747- echo c34-convex-bsd
748748- exit ;;
845845+ GUESS=c34-convex-bsd
846846+ ;;
749847 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
750750- echo c38-convex-bsd
751751- exit ;;
848848+ GUESS=c38-convex-bsd
849849+ ;;
752850 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
753753- echo c4-convex-bsd
754754- exit ;;
851851+ GUESS=c4-convex-bsd
852852+ ;;
755853 CRAY*Y-MP:*:*:*)
756756- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
757757- exit ;;
854854+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
855855+ GUESS=ymp-cray-unicos$CRAY_REL
856856+ ;;
758857 CRAY*[A-Z]90:*:*:*)
759759- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
858858+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
760859 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
761860 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
762861 -e 's/\.[^.]*$/.X/'
763862 exit ;;
764863 CRAY*TS:*:*:*)
765765- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
766766- exit ;;
864864+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
865865+ GUESS=t90-cray-unicos$CRAY_REL
866866+ ;;
767867 CRAY*T3E:*:*:*)
768768- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
769769- exit ;;
868868+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
869869+ GUESS=alphaev5-cray-unicosmk$CRAY_REL
870870+ ;;
770871 CRAY*SV1:*:*:*)
771771- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
772772- exit ;;
872872+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
873873+ GUESS=sv1-cray-unicos$CRAY_REL
874874+ ;;
773875 *:UNICOS/mp:*:*)
774774- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
775775- exit ;;
876876+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
877877+ GUESS=craynv-cray-unicosmp$CRAY_REL
878878+ ;;
776879 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
777777- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
778778- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
779779- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
780780- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781781- exit ;;
880880+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
881881+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
882882+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
883883+ GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
884884+ ;;
782885 5000:UNIX_System_V:4.*:*)
783783- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
784784- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
785785- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
786786- exit ;;
886886+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
887887+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
888888+ GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
889889+ ;;
787890 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
788788- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
789789- exit ;;
891891+ GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
892892+ ;;
790893 sparc*:BSD/OS:*:*)
791791- echo sparc-unknown-bsdi${UNAME_RELEASE}
792792- exit ;;
894894+ GUESS=sparc-unknown-bsdi$UNAME_RELEASE
895895+ ;;
793896 *:BSD/OS:*:*)
794794- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
795795- exit ;;
897897+ GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
898898+ ;;
899899+ arm:FreeBSD:*:*)
900900+ UNAME_PROCESSOR=`uname -p`
901901+ set_cc_for_build
902902+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
903903+ | grep -q __ARM_PCS_VFP
904904+ then
905905+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
906906+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
907907+ else
908908+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
909909+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
910910+ fi
911911+ ;;
796912 *:FreeBSD:*:*)
797797- UNAME_PROCESSOR=`/usr/bin/uname -p`
798798- case ${UNAME_PROCESSOR} in
913913+ UNAME_PROCESSOR=`uname -p`
914914+ case $UNAME_PROCESSOR in
799915 amd64)
800800- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
801801- *)
802802- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
916916+ UNAME_PROCESSOR=x86_64 ;;
917917+ i386)
918918+ UNAME_PROCESSOR=i586 ;;
803919 esac
804804- exit ;;
920920+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
921921+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
922922+ ;;
805923 i*:CYGWIN*:*)
806806- echo ${UNAME_MACHINE}-pc-cygwin
807807- exit ;;
924924+ GUESS=$UNAME_MACHINE-pc-cygwin
925925+ ;;
808926 *:MINGW64*:*)
809809- echo ${UNAME_MACHINE}-pc-mingw64
810810- exit ;;
927927+ GUESS=$UNAME_MACHINE-pc-mingw64
928928+ ;;
811929 *:MINGW*:*)
812812- echo ${UNAME_MACHINE}-pc-mingw32
813813- exit ;;
814814- i*:MSYS*:*)
815815- echo ${UNAME_MACHINE}-pc-msys
816816- exit ;;
817817- i*:windows32*:*)
818818- # uname -m includes "-pc" on this system.
819819- echo ${UNAME_MACHINE}-mingw32
820820- exit ;;
930930+ GUESS=$UNAME_MACHINE-pc-mingw32
931931+ ;;
932932+ *:MSYS*:*)
933933+ GUESS=$UNAME_MACHINE-pc-msys
934934+ ;;
821935 i*:PW*:*)
822822- echo ${UNAME_MACHINE}-pc-pw32
823823- exit ;;
936936+ GUESS=$UNAME_MACHINE-pc-pw32
937937+ ;;
938938+ *:SerenityOS:*:*)
939939+ GUESS=$UNAME_MACHINE-pc-serenity
940940+ ;;
824941 *:Interix*:*)
825825- case ${UNAME_MACHINE} in
942942+ case $UNAME_MACHINE in
826943 x86)
827827- echo i586-pc-interix${UNAME_RELEASE}
828828- exit ;;
944944+ GUESS=i586-pc-interix$UNAME_RELEASE
945945+ ;;
829946 authenticamd | genuineintel | EM64T)
830830- echo x86_64-unknown-interix${UNAME_RELEASE}
831831- exit ;;
947947+ GUESS=x86_64-unknown-interix$UNAME_RELEASE
948948+ ;;
832949 IA64)
833833- echo ia64-unknown-interix${UNAME_RELEASE}
834834- exit ;;
950950+ GUESS=ia64-unknown-interix$UNAME_RELEASE
951951+ ;;
835952 esac ;;
836836- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
837837- echo i${UNAME_MACHINE}-pc-mks
838838- exit ;;
839839- 8664:Windows_NT:*)
840840- echo x86_64-pc-mks
841841- exit ;;
842842- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
843843- # How do we know it's Interix rather than the generic POSIX subsystem?
844844- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
845845- # UNAME_MACHINE based on the output of uname instead of i386?
846846- echo i586-pc-interix
847847- exit ;;
848953 i*:UWIN*:*)
849849- echo ${UNAME_MACHINE}-pc-uwin
850850- exit ;;
954954+ GUESS=$UNAME_MACHINE-pc-uwin
955955+ ;;
851956 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
852852- echo x86_64-unknown-cygwin
853853- exit ;;
854854- p*:CYGWIN*:*)
855855- echo powerpcle-unknown-cygwin
856856- exit ;;
957957+ GUESS=x86_64-pc-cygwin
958958+ ;;
857959 prep*:SunOS:5.*:*)
858858- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
859859- exit ;;
960960+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
961961+ GUESS=powerpcle-unknown-solaris2$SUN_REL
962962+ ;;
860963 *:GNU:*:*)
861964 # the GNU system
862862- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
863863- exit ;;
965965+ GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
966966+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
967967+ GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
968968+ ;;
864969 *:GNU/*:*:*)
865970 # other systems with GNU libc and userland
866866- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
867867- exit ;;
868868- i*86:Minix:*:*)
869869- echo ${UNAME_MACHINE}-pc-minix
870870- exit ;;
971971+ GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
972972+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
973973+ GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
974974+ ;;
975975+ x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
976976+ GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
977977+ ;;
978978+ *:[Mm]anagarm:*:*)
979979+ GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
980980+ ;;
981981+ *:Minix:*:*)
982982+ GUESS=$UNAME_MACHINE-unknown-minix
983983+ ;;
871984 aarch64:Linux:*:*)
872872- echo ${UNAME_MACHINE}-unknown-linux-gnu
873873- exit ;;
985985+ set_cc_for_build
986986+ CPU=$UNAME_MACHINE
987987+ LIBCABI=$LIBC
988988+ if test "$CC_FOR_BUILD" != no_compiler_found; then
989989+ ABI=64
990990+ sed 's/^ //' << EOF > "$dummy.c"
991991+ #ifdef __ARM_EABI__
992992+ #ifdef __ARM_PCS_VFP
993993+ ABI=eabihf
994994+ #else
995995+ ABI=eabi
996996+ #endif
997997+ #endif
998998+EOF
999999+ cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
10001000+ eval "$cc_set_abi"
10011001+ case $ABI in
10021002+ eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
10031003+ esac
10041004+ fi
10051005+ GUESS=$CPU-unknown-linux-$LIBCABI
10061006+ ;;
8741007 aarch64_be:Linux:*:*)
8751008 UNAME_MACHINE=aarch64_be
876876- echo ${UNAME_MACHINE}-unknown-linux-gnu
877877- exit ;;
10091009+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10101010+ ;;
8781011 alpha:Linux:*:*)
879879- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
10121012+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
8801013 EV5) UNAME_MACHINE=alphaev5 ;;
8811014 EV56) UNAME_MACHINE=alphaev56 ;;
8821015 PCA56) UNAME_MACHINE=alphapca56 ;;
···8861019 EV68*) UNAME_MACHINE=alphaev68 ;;
8871020 esac
8881021 objdump --private-headers /bin/sh | grep -q ld.so.1
889889- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
890890- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
891891- exit ;;
10221022+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
10231023+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10241024+ ;;
10251025+ arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
10261026+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10271027+ ;;
8921028 arm*:Linux:*:*)
893893- eval $set_cc_for_build
10291029+ set_cc_for_build
8941030 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
8951031 | grep -q __ARM_EABI__
8961032 then
897897- echo ${UNAME_MACHINE}-unknown-linux-gnu
10331033+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
8981034 else
8991035 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
9001036 | grep -q __ARM_PCS_VFP
9011037 then
902902- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
10381038+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
9031039 else
904904- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
10401040+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
9051041 fi
9061042 fi
907907- exit ;;
10431043+ ;;
9081044 avr32*:Linux:*:*)
909909- echo ${UNAME_MACHINE}-unknown-linux-gnu
910910- exit ;;
10451045+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10461046+ ;;
9111047 cris:Linux:*:*)
912912- echo ${UNAME_MACHINE}-axis-linux-gnu
913913- exit ;;
10481048+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
10491049+ ;;
9141050 crisv32:Linux:*:*)
915915- echo ${UNAME_MACHINE}-axis-linux-gnu
916916- exit ;;
10511051+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
10521052+ ;;
10531053+ e2k:Linux:*:*)
10541054+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10551055+ ;;
9171056 frv:Linux:*:*)
918918- echo ${UNAME_MACHINE}-unknown-linux-gnu
919919- exit ;;
10571057+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10581058+ ;;
9201059 hexagon:Linux:*:*)
921921- echo ${UNAME_MACHINE}-unknown-linux-gnu
922922- exit ;;
10601060+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10611061+ ;;
9231062 i*86:Linux:*:*)
924924- LIBC=gnu
925925- eval $set_cc_for_build
926926- sed 's/^ //' << EOF >$dummy.c
927927- #ifdef __dietlibc__
928928- LIBC=dietlibc
929929- #endif
930930-EOF
931931- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
932932- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
933933- exit ;;
10631063+ GUESS=$UNAME_MACHINE-pc-linux-$LIBC
10641064+ ;;
9341065 ia64:Linux:*:*)
935935- echo ${UNAME_MACHINE}-unknown-linux-gnu
936936- exit ;;
10661066+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10671067+ ;;
10681068+ k1om:Linux:*:*)
10691069+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10701070+ ;;
10711071+ kvx:Linux:*:*)
10721072+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10731073+ ;;
10741074+ kvx:cos:*:*)
10751075+ GUESS=$UNAME_MACHINE-unknown-cos
10761076+ ;;
10771077+ kvx:mbr:*:*)
10781078+ GUESS=$UNAME_MACHINE-unknown-mbr
10791079+ ;;
10801080+ loongarch32:Linux:*:* | loongarch64:Linux:*:*)
10811081+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10821082+ ;;
9371083 m32r*:Linux:*:*)
938938- echo ${UNAME_MACHINE}-unknown-linux-gnu
939939- exit ;;
10841084+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10851085+ ;;
9401086 m68*:Linux:*:*)
941941- echo ${UNAME_MACHINE}-unknown-linux-gnu
942942- exit ;;
10871087+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10881088+ ;;
9431089 mips:Linux:*:* | mips64:Linux:*:*)
944944- eval $set_cc_for_build
945945- sed 's/^ //' << EOF >$dummy.c
10901090+ set_cc_for_build
10911091+ IS_GLIBC=0
10921092+ test x"${LIBC}" = xgnu && IS_GLIBC=1
10931093+ sed 's/^ //' << EOF > "$dummy.c"
9461094 #undef CPU
947947- #undef ${UNAME_MACHINE}
948948- #undef ${UNAME_MACHINE}el
10951095+ #undef mips
10961096+ #undef mipsel
10971097+ #undef mips64
10981098+ #undef mips64el
10991099+ #if ${IS_GLIBC} && defined(_ABI64)
11001100+ LIBCABI=gnuabi64
11011101+ #else
11021102+ #if ${IS_GLIBC} && defined(_ABIN32)
11031103+ LIBCABI=gnuabin32
11041104+ #else
11051105+ LIBCABI=${LIBC}
11061106+ #endif
11071107+ #endif
11081108+11091109+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
11101110+ CPU=mipsisa64r6
11111111+ #else
11121112+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
11131113+ CPU=mipsisa32r6
11141114+ #else
11151115+ #if defined(__mips64)
11161116+ CPU=mips64
11171117+ #else
11181118+ CPU=mips
11191119+ #endif
11201120+ #endif
11211121+ #endif
11221122+9491123 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
950950- CPU=${UNAME_MACHINE}el
11241124+ MIPS_ENDIAN=el
9511125 #else
9521126 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
953953- CPU=${UNAME_MACHINE}
11271127+ MIPS_ENDIAN=
9541128 #else
955955- CPU=
11291129+ MIPS_ENDIAN=
9561130 #endif
9571131 #endif
9581132EOF
959959- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
960960- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
11331133+ cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
11341134+ eval "$cc_set_vars"
11351135+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
11361136+ ;;
11371137+ mips64el:Linux:*:*)
11381138+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11391139+ ;;
11401140+ openrisc*:Linux:*:*)
11411141+ GUESS=or1k-unknown-linux-$LIBC
9611142 ;;
962962- or32:Linux:*:*)
963963- echo ${UNAME_MACHINE}-unknown-linux-gnu
964964- exit ;;
11431143+ or32:Linux:*:* | or1k*:Linux:*:*)
11441144+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11451145+ ;;
9651146 padre:Linux:*:*)
966966- echo sparc-unknown-linux-gnu
967967- exit ;;
11471147+ GUESS=sparc-unknown-linux-$LIBC
11481148+ ;;
9681149 parisc64:Linux:*:* | hppa64:Linux:*:*)
969969- echo hppa64-unknown-linux-gnu
970970- exit ;;
11501150+ GUESS=hppa64-unknown-linux-$LIBC
11511151+ ;;
9711152 parisc:Linux:*:* | hppa:Linux:*:*)
9721153 # Look for CPU level
9731154 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
974974- PA7*) echo hppa1.1-unknown-linux-gnu ;;
975975- PA8*) echo hppa2.0-unknown-linux-gnu ;;
976976- *) echo hppa-unknown-linux-gnu ;;
11551155+ PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
11561156+ PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
11571157+ *) GUESS=hppa-unknown-linux-$LIBC ;;
9771158 esac
978978- exit ;;
11591159+ ;;
9791160 ppc64:Linux:*:*)
980980- echo powerpc64-unknown-linux-gnu
981981- exit ;;
11611161+ GUESS=powerpc64-unknown-linux-$LIBC
11621162+ ;;
9821163 ppc:Linux:*:*)
983983- echo powerpc-unknown-linux-gnu
984984- exit ;;
11641164+ GUESS=powerpc-unknown-linux-$LIBC
11651165+ ;;
11661166+ ppc64le:Linux:*:*)
11671167+ GUESS=powerpc64le-unknown-linux-$LIBC
11681168+ ;;
11691169+ ppcle:Linux:*:*)
11701170+ GUESS=powerpcle-unknown-linux-$LIBC
11711171+ ;;
11721172+ riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
11731173+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11741174+ ;;
9851175 s390:Linux:*:* | s390x:Linux:*:*)
986986- echo ${UNAME_MACHINE}-ibm-linux
987987- exit ;;
11761176+ GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
11771177+ ;;
9881178 sh64*:Linux:*:*)
989989- echo ${UNAME_MACHINE}-unknown-linux-gnu
990990- exit ;;
11791179+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11801180+ ;;
9911181 sh*:Linux:*:*)
992992- echo ${UNAME_MACHINE}-unknown-linux-gnu
993993- exit ;;
11821182+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11831183+ ;;
9941184 sparc:Linux:*:* | sparc64:Linux:*:*)
995995- echo ${UNAME_MACHINE}-unknown-linux-gnu
996996- exit ;;
11851185+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11861186+ ;;
9971187 tile*:Linux:*:*)
998998- echo ${UNAME_MACHINE}-unknown-linux-gnu
999999- exit ;;
11881188+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11891189+ ;;
10001190 vax:Linux:*:*)
10011001- echo ${UNAME_MACHINE}-dec-linux-gnu
10021002- exit ;;
11911191+ GUESS=$UNAME_MACHINE-dec-linux-$LIBC
11921192+ ;;
10031193 x86_64:Linux:*:*)
10041004- echo ${UNAME_MACHINE}-unknown-linux-gnu
10051005- exit ;;
11941194+ set_cc_for_build
11951195+ CPU=$UNAME_MACHINE
11961196+ LIBCABI=$LIBC
11971197+ if test "$CC_FOR_BUILD" != no_compiler_found; then
11981198+ ABI=64
11991199+ sed 's/^ //' << EOF > "$dummy.c"
12001200+ #ifdef __i386__
12011201+ ABI=x86
12021202+ #else
12031203+ #ifdef __ILP32__
12041204+ ABI=x32
12051205+ #endif
12061206+ #endif
12071207+EOF
12081208+ cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
12091209+ eval "$cc_set_abi"
12101210+ case $ABI in
12111211+ x86) CPU=i686 ;;
12121212+ x32) LIBCABI=${LIBC}x32 ;;
12131213+ esac
12141214+ fi
12151215+ GUESS=$CPU-pc-linux-$LIBCABI
12161216+ ;;
10061217 xtensa*:Linux:*:*)
10071007- echo ${UNAME_MACHINE}-unknown-linux-gnu
10081008- exit ;;
12181218+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
12191219+ ;;
10091220 i*86:DYNIX/ptx:4*:*)
10101221 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
10111222 # earlier versions are messed up and put the nodename in both
10121223 # sysname and nodename.
10131013- echo i386-sequent-sysv4
10141014- exit ;;
12241224+ GUESS=i386-sequent-sysv4
12251225+ ;;
10151226 i*86:UNIX_SV:4.2MP:2.*)
10161227 # Unixware is an offshoot of SVR4, but it has its own version
10171228 # number series starting with 2...
10181229 # I am not positive that other SVR4 systems won't match this,
10191230 # I just have to hope. -- rms.
10201231 # Use sysv4.2uw... so that sysv4* matches it.
10211021- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
10221022- exit ;;
12321232+ GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
12331233+ ;;
10231234 i*86:OS/2:*:*)
10241024- # If we were able to find `uname', then EMX Unix compatibility
12351235+ # If we were able to find 'uname', then EMX Unix compatibility
10251236 # is probably installed.
10261026- echo ${UNAME_MACHINE}-pc-os2-emx
10271027- exit ;;
12371237+ GUESS=$UNAME_MACHINE-pc-os2-emx
12381238+ ;;
10281239 i*86:XTS-300:*:STOP)
10291029- echo ${UNAME_MACHINE}-unknown-stop
10301030- exit ;;
12401240+ GUESS=$UNAME_MACHINE-unknown-stop
12411241+ ;;
10311242 i*86:atheos:*:*)
10321032- echo ${UNAME_MACHINE}-unknown-atheos
10331033- exit ;;
12431243+ GUESS=$UNAME_MACHINE-unknown-atheos
12441244+ ;;
10341245 i*86:syllable:*:*)
10351035- echo ${UNAME_MACHINE}-pc-syllable
10361036- exit ;;
12461246+ GUESS=$UNAME_MACHINE-pc-syllable
12471247+ ;;
10371248 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
10381038- echo i386-unknown-lynxos${UNAME_RELEASE}
10391039- exit ;;
12491249+ GUESS=i386-unknown-lynxos$UNAME_RELEASE
12501250+ ;;
10401251 i*86:*DOS:*:*)
10411041- echo ${UNAME_MACHINE}-pc-msdosdjgpp
10421042- exit ;;
10431043- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
10441044- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
12521252+ GUESS=$UNAME_MACHINE-pc-msdosdjgpp
12531253+ ;;
12541254+ i*86:*:4.*:*)
12551255+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
10451256 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
10461046- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
12571257+ GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
10471258 else
10481048- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
12591259+ GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
10491260 fi
10501050- exit ;;
12611261+ ;;
10511262 i*86:*:5:[678]*)
10521263 # UnixWare 7.x, OpenUNIX and OpenServer 6.
10531264 case `/bin/uname -X | grep "^Machine"` in
···10551266 *Pentium) UNAME_MACHINE=i586 ;;
10561267 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
10571268 esac
10581058- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
10591059- exit ;;
12691269+ GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
12701270+ ;;
10601271 i*86:*:3.2:*)
10611272 if test -f /usr/options/cb.name; then
10621273 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
10631063- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
12741274+ GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
10641275 elif /bin/uname -X 2>/dev/null >/dev/null ; then
10651276 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
10661277 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
···10701281 && UNAME_MACHINE=i686
10711282 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
10721283 && UNAME_MACHINE=i686
10731073- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
12841284+ GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
10741285 else
10751075- echo ${UNAME_MACHINE}-pc-sysv32
12861286+ GUESS=$UNAME_MACHINE-pc-sysv32
10761287 fi
10771077- exit ;;
12881288+ ;;
10781289 pc:*:*:*)
10791290 # Left here for compatibility:
10801291 # uname -m prints for DJGPP always 'pc', but it prints nothing about
10811292 # the processor, so we play safe by assuming i586.
10821293 # Note: whatever this is, it MUST be the same as what config.sub
10831083- # prints for the "djgpp" host, or else GDB configury will decide that
12941294+ # prints for the "djgpp" host, or else GDB configure will decide that
10841295 # this is a cross-build.
10851085- echo i586-pc-msdosdjgpp
10861086- exit ;;
12961296+ GUESS=i586-pc-msdosdjgpp
12971297+ ;;
10871298 Intel:Mach:3*:*)
10881088- echo i386-pc-mach3
10891089- exit ;;
12991299+ GUESS=i386-pc-mach3
13001300+ ;;
10901301 paragon:*:*:*)
10911091- echo i860-intel-osf1
10921092- exit ;;
13021302+ GUESS=i860-intel-osf1
13031303+ ;;
10931304 i860:*:4.*:*) # i860-SVR4
10941305 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
10951095- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
13061306+ GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
10961307 else # Add other i860-SVR4 vendors below as they are discovered.
10971097- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
13081308+ GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
10981309 fi
10991099- exit ;;
13101310+ ;;
11001311 mini*:CTIX:SYS*5:*)
11011312 # "miniframe"
11021102- echo m68010-convergent-sysv
11031103- exit ;;
13131313+ GUESS=m68010-convergent-sysv
13141314+ ;;
11041315 mc68k:UNIX:SYSTEM5:3.51m)
11051105- echo m68k-convergent-sysv
11061106- exit ;;
13161316+ GUESS=m68k-convergent-sysv
13171317+ ;;
11071318 M680?0:D-NIX:5.3:*)
11081108- echo m68k-diab-dnix
11091109- exit ;;
13191319+ GUESS=m68k-diab-dnix
13201320+ ;;
11101321 M68*:*:R3V[5678]*:*)
11111322 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
11121323 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)
···11141325 test -r /etc/.relid \
11151326 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11161327 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11171117- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
13281328+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11181329 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
11191119- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
13301330+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11201331 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
11211332 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11221333 && { echo i486-ncr-sysv4; exit; } ;;
···11251336 test -r /etc/.relid \
11261337 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11271338 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11281128- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
13391339+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11291340 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
11301130- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
13411341+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
11311342 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
11321132- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
13431343+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11331344 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
11341134- echo m68k-unknown-lynxos${UNAME_RELEASE}
11351135- exit ;;
13451345+ GUESS=m68k-unknown-lynxos$UNAME_RELEASE
13461346+ ;;
11361347 mc68030:UNIX_System_V:4.*:*)
11371137- echo m68k-atari-sysv4
11381138- exit ;;
13481348+ GUESS=m68k-atari-sysv4
13491349+ ;;
11391350 TSUNAMI:LynxOS:2.*:*)
11401140- echo sparc-unknown-lynxos${UNAME_RELEASE}
11411141- exit ;;
13511351+ GUESS=sparc-unknown-lynxos$UNAME_RELEASE
13521352+ ;;
11421353 rs6000:LynxOS:2.*:*)
11431143- echo rs6000-unknown-lynxos${UNAME_RELEASE}
11441144- exit ;;
13541354+ GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
13551355+ ;;
11451356 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
11461146- echo powerpc-unknown-lynxos${UNAME_RELEASE}
11471147- exit ;;
13571357+ GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
13581358+ ;;
11481359 SM[BE]S:UNIX_SV:*:*)
11491149- echo mips-dde-sysv${UNAME_RELEASE}
11501150- exit ;;
13601360+ GUESS=mips-dde-sysv$UNAME_RELEASE
13611361+ ;;
11511362 RM*:ReliantUNIX-*:*:*)
11521152- echo mips-sni-sysv4
11531153- exit ;;
13631363+ GUESS=mips-sni-sysv4
13641364+ ;;
11541365 RM*:SINIX-*:*:*)
11551155- echo mips-sni-sysv4
11561156- exit ;;
13661366+ GUESS=mips-sni-sysv4
13671367+ ;;
11571368 *:SINIX-*:*:*)
11581369 if uname -p 2>/dev/null >/dev/null ; then
11591370 UNAME_MACHINE=`(uname -p) 2>/dev/null`
11601160- echo ${UNAME_MACHINE}-sni-sysv4
13711371+ GUESS=$UNAME_MACHINE-sni-sysv4
11611372 else
11621162- echo ns32k-sni-sysv
13731373+ GUESS=ns32k-sni-sysv
11631374 fi
11641164- exit ;;
11651165- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
13751375+ ;;
13761376+ PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
11661377 # says <Richard.M.Bartel@ccMail.Census.GOV>
11671167- echo i586-unisys-sysv4
11681168- exit ;;
13781378+ GUESS=i586-unisys-sysv4
13791379+ ;;
11691380 *:UNIX_System_V:4*:FTX*)
11701381 # From Gerald Hewes <hewes@openmarket.com>.
11711382 # How about differentiating between stratus architectures? -djm
11721172- echo hppa1.1-stratus-sysv4
11731173- exit ;;
13831383+ GUESS=hppa1.1-stratus-sysv4
13841384+ ;;
11741385 *:*:*:FTX*)
11751386 # From seanf@swdc.stratus.com.
11761176- echo i860-stratus-sysv4
11771177- exit ;;
13871387+ GUESS=i860-stratus-sysv4
13881388+ ;;
11781389 i*86:VOS:*:*)
11791390 # From Paul.Green@stratus.com.
11801180- echo ${UNAME_MACHINE}-stratus-vos
11811181- exit ;;
13911391+ GUESS=$UNAME_MACHINE-stratus-vos
13921392+ ;;
11821393 *:VOS:*:*)
11831394 # From Paul.Green@stratus.com.
11841184- echo hppa1.1-stratus-vos
11851185- exit ;;
13951395+ GUESS=hppa1.1-stratus-vos
13961396+ ;;
11861397 mc68*:A/UX:*:*)
11871187- echo m68k-apple-aux${UNAME_RELEASE}
11881188- exit ;;
13981398+ GUESS=m68k-apple-aux$UNAME_RELEASE
13991399+ ;;
11891400 news*:NEWS-OS:6*:*)
11901190- echo mips-sony-newsos6
11911191- exit ;;
14011401+ GUESS=mips-sony-newsos6
14021402+ ;;
11921403 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
11931193- if [ -d /usr/nec ]; then
11941194- echo mips-nec-sysv${UNAME_RELEASE}
14041404+ if test -d /usr/nec; then
14051405+ GUESS=mips-nec-sysv$UNAME_RELEASE
11951406 else
11961196- echo mips-unknown-sysv${UNAME_RELEASE}
14071407+ GUESS=mips-unknown-sysv$UNAME_RELEASE
11971408 fi
11981198- exit ;;
14091409+ ;;
11991410 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
12001200- echo powerpc-be-beos
12011201- exit ;;
14111411+ GUESS=powerpc-be-beos
14121412+ ;;
12021413 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
12031203- echo powerpc-apple-beos
12041204- exit ;;
14141414+ GUESS=powerpc-apple-beos
14151415+ ;;
12051416 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
12061206- echo i586-pc-beos
12071207- exit ;;
14171417+ GUESS=i586-pc-beos
14181418+ ;;
12081419 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
12091209- echo i586-pc-haiku
12101210- exit ;;
12111211- x86_64:Haiku:*:*)
12121212- echo x86_64-unknown-haiku
12131213- exit ;;
14201420+ GUESS=i586-pc-haiku
14211421+ ;;
14221422+ ppc:Haiku:*:*) # Haiku running on Apple PowerPC
14231423+ GUESS=powerpc-apple-haiku
14241424+ ;;
14251425+ *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
14261426+ GUESS=$UNAME_MACHINE-unknown-haiku
14271427+ ;;
12141428 SX-4:SUPER-UX:*:*)
12151215- echo sx4-nec-superux${UNAME_RELEASE}
12161216- exit ;;
14291429+ GUESS=sx4-nec-superux$UNAME_RELEASE
14301430+ ;;
12171431 SX-5:SUPER-UX:*:*)
12181218- echo sx5-nec-superux${UNAME_RELEASE}
12191219- exit ;;
14321432+ GUESS=sx5-nec-superux$UNAME_RELEASE
14331433+ ;;
12201434 SX-6:SUPER-UX:*:*)
12211221- echo sx6-nec-superux${UNAME_RELEASE}
12221222- exit ;;
14351435+ GUESS=sx6-nec-superux$UNAME_RELEASE
14361436+ ;;
12231437 SX-7:SUPER-UX:*:*)
12241224- echo sx7-nec-superux${UNAME_RELEASE}
12251225- exit ;;
14381438+ GUESS=sx7-nec-superux$UNAME_RELEASE
14391439+ ;;
12261440 SX-8:SUPER-UX:*:*)
12271227- echo sx8-nec-superux${UNAME_RELEASE}
12281228- exit ;;
14411441+ GUESS=sx8-nec-superux$UNAME_RELEASE
14421442+ ;;
12291443 SX-8R:SUPER-UX:*:*)
12301230- echo sx8r-nec-superux${UNAME_RELEASE}
12311231- exit ;;
14441444+ GUESS=sx8r-nec-superux$UNAME_RELEASE
14451445+ ;;
14461446+ SX-ACE:SUPER-UX:*:*)
14471447+ GUESS=sxace-nec-superux$UNAME_RELEASE
14481448+ ;;
12321449 Power*:Rhapsody:*:*)
12331233- echo powerpc-apple-rhapsody${UNAME_RELEASE}
12341234- exit ;;
14501450+ GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
14511451+ ;;
12351452 *:Rhapsody:*:*)
12361236- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
12371237- exit ;;
14531453+ GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
14541454+ ;;
14551455+ arm64:Darwin:*:*)
14561456+ GUESS=aarch64-apple-darwin$UNAME_RELEASE
14571457+ ;;
12381458 *:Darwin:*:*)
12391239- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
14591459+ UNAME_PROCESSOR=`uname -p`
12401460 case $UNAME_PROCESSOR in
12411241- i386)
12421242- eval $set_cc_for_build
12431243- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
12441244- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
12451245- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
12461246- grep IS_64BIT_ARCH >/dev/null
12471247- then
12481248- UNAME_PROCESSOR="x86_64"
12491249- fi
12501250- fi ;;
12511461 unknown) UNAME_PROCESSOR=powerpc ;;
12521462 esac
12531253- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
12541254- exit ;;
14631463+ if command -v xcode-select > /dev/null 2> /dev/null && \
14641464+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
14651465+ # Avoid executing cc if there is no toolchain installed as
14661466+ # cc will be a stub that puts up a graphical alert
14671467+ # prompting the user to install developer tools.
14681468+ CC_FOR_BUILD=no_compiler_found
14691469+ else
14701470+ set_cc_for_build
14711471+ fi
14721472+ if test "$CC_FOR_BUILD" != no_compiler_found; then
14731473+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
14741474+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
14751475+ grep IS_64BIT_ARCH >/dev/null
14761476+ then
14771477+ case $UNAME_PROCESSOR in
14781478+ i386) UNAME_PROCESSOR=x86_64 ;;
14791479+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
14801480+ esac
14811481+ fi
14821482+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
14831483+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
14841484+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
14851485+ grep IS_PPC >/dev/null
14861486+ then
14871487+ UNAME_PROCESSOR=powerpc
14881488+ fi
14891489+ elif test "$UNAME_PROCESSOR" = i386 ; then
14901490+ # uname -m returns i386 or x86_64
14911491+ UNAME_PROCESSOR=$UNAME_MACHINE
14921492+ fi
14931493+ GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
14941494+ ;;
12551495 *:procnto*:*:* | *:QNX:[0123456789]*:*)
12561496 UNAME_PROCESSOR=`uname -p`
12571257- if test "$UNAME_PROCESSOR" = "x86"; then
14971497+ if test "$UNAME_PROCESSOR" = x86; then
12581498 UNAME_PROCESSOR=i386
12591499 UNAME_MACHINE=pc
12601500 fi
12611261- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
12621262- exit ;;
15011501+ GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
15021502+ ;;
12631503 *:QNX:*:4*)
12641264- echo i386-pc-qnx
12651265- exit ;;
12661266- NEO-?:NONSTOP_KERNEL:*:*)
12671267- echo neo-tandem-nsk${UNAME_RELEASE}
12681268- exit ;;
15041504+ GUESS=i386-pc-qnx
15051505+ ;;
15061506+ NEO-*:NONSTOP_KERNEL:*:*)
15071507+ GUESS=neo-tandem-nsk$UNAME_RELEASE
15081508+ ;;
12691509 NSE-*:NONSTOP_KERNEL:*:*)
12701270- echo nse-tandem-nsk${UNAME_RELEASE}
12711271- exit ;;
12721272- NSR-?:NONSTOP_KERNEL:*:*)
12731273- echo nsr-tandem-nsk${UNAME_RELEASE}
12741274- exit ;;
15101510+ GUESS=nse-tandem-nsk$UNAME_RELEASE
15111511+ ;;
15121512+ NSR-*:NONSTOP_KERNEL:*:*)
15131513+ GUESS=nsr-tandem-nsk$UNAME_RELEASE
15141514+ ;;
15151515+ NSV-*:NONSTOP_KERNEL:*:*)
15161516+ GUESS=nsv-tandem-nsk$UNAME_RELEASE
15171517+ ;;
15181518+ NSX-*:NONSTOP_KERNEL:*:*)
15191519+ GUESS=nsx-tandem-nsk$UNAME_RELEASE
15201520+ ;;
12751521 *:NonStop-UX:*:*)
12761276- echo mips-compaq-nonstopux
12771277- exit ;;
15221522+ GUESS=mips-compaq-nonstopux
15231523+ ;;
12781524 BS2000:POSIX*:*:*)
12791279- echo bs2000-siemens-sysv
12801280- exit ;;
15251525+ GUESS=bs2000-siemens-sysv
15261526+ ;;
12811527 DS/*:UNIX_System_V:*:*)
12821282- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
12831283- exit ;;
15281528+ GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
15291529+ ;;
12841530 *:Plan9:*:*)
12851531 # "uname -m" is not consistent, so use $cputype instead. 386
12861532 # is converted to i386 for consistency with other x86
12871533 # operating systems.
12881288- if test "$cputype" = "386"; then
15341534+ if test "${cputype-}" = 386; then
12891535 UNAME_MACHINE=i386
12901290- else
12911291- UNAME_MACHINE="$cputype"
15361536+ elif test "x${cputype-}" != x; then
15371537+ UNAME_MACHINE=$cputype
12921538 fi
12931293- echo ${UNAME_MACHINE}-unknown-plan9
12941294- exit ;;
15391539+ GUESS=$UNAME_MACHINE-unknown-plan9
15401540+ ;;
12951541 *:TOPS-10:*:*)
12961296- echo pdp10-unknown-tops10
12971297- exit ;;
15421542+ GUESS=pdp10-unknown-tops10
15431543+ ;;
12981544 *:TENEX:*:*)
12991299- echo pdp10-unknown-tenex
13001300- exit ;;
15451545+ GUESS=pdp10-unknown-tenex
15461546+ ;;
13011547 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
13021302- echo pdp10-dec-tops20
13031303- exit ;;
15481548+ GUESS=pdp10-dec-tops20
15491549+ ;;
13041550 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
13051305- echo pdp10-xkl-tops20
13061306- exit ;;
15511551+ GUESS=pdp10-xkl-tops20
15521552+ ;;
13071553 *:TOPS-20:*:*)
13081308- echo pdp10-unknown-tops20
13091309- exit ;;
15541554+ GUESS=pdp10-unknown-tops20
15551555+ ;;
13101556 *:ITS:*:*)
13111311- echo pdp10-unknown-its
13121312- exit ;;
15571557+ GUESS=pdp10-unknown-its
15581558+ ;;
13131559 SEI:*:*:SEIUX)
13141314- echo mips-sei-seiux${UNAME_RELEASE}
13151315- exit ;;
15601560+ GUESS=mips-sei-seiux$UNAME_RELEASE
15611561+ ;;
13161562 *:DragonFly:*:*)
13171317- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
13181318- exit ;;
15631563+ DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
15641564+ GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
15651565+ ;;
13191566 *:*VMS:*:*)
13201567 UNAME_MACHINE=`(uname -p) 2>/dev/null`
13211321- case "${UNAME_MACHINE}" in
13221322- A*) echo alpha-dec-vms ; exit ;;
13231323- I*) echo ia64-dec-vms ; exit ;;
13241324- V*) echo vax-dec-vms ; exit ;;
15681568+ case $UNAME_MACHINE in
15691569+ A*) GUESS=alpha-dec-vms ;;
15701570+ I*) GUESS=ia64-dec-vms ;;
15711571+ V*) GUESS=vax-dec-vms ;;
13251572 esac ;;
13261573 *:XENIX:*:SysV)
13271327- echo i386-pc-xenix
13281328- exit ;;
15741574+ GUESS=i386-pc-xenix
15751575+ ;;
13291576 i*86:skyos:*:*)
13301330- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
13311331- exit ;;
15771577+ SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
15781578+ GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
15791579+ ;;
13321580 i*86:rdos:*:*)
13331333- echo ${UNAME_MACHINE}-pc-rdos
13341334- exit ;;
13351335- i*86:AROS:*:*)
13361336- echo ${UNAME_MACHINE}-pc-aros
13371337- exit ;;
15811581+ GUESS=$UNAME_MACHINE-pc-rdos
15821582+ ;;
15831583+ i*86:Fiwix:*:*)
15841584+ GUESS=$UNAME_MACHINE-pc-fiwix
15851585+ ;;
15861586+ *:AROS:*:*)
15871587+ GUESS=$UNAME_MACHINE-unknown-aros
15881588+ ;;
13381589 x86_64:VMkernel:*:*)
13391339- echo ${UNAME_MACHINE}-unknown-esx
13401340- exit ;;
15901590+ GUESS=$UNAME_MACHINE-unknown-esx
15911591+ ;;
15921592+ amd64:Isilon\ OneFS:*:*)
15931593+ GUESS=x86_64-unknown-onefs
15941594+ ;;
15951595+ *:Unleashed:*:*)
15961596+ GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
15971597+ ;;
15981598+ *:Ironclad:*:*)
15991599+ GUESS=$UNAME_MACHINE-unknown-ironclad
16001600+ ;;
13411601esac
1342160213431343-eval $set_cc_for_build
13441344-cat >$dummy.c <<EOF
16031603+# Do we have a guess based on uname results?
16041604+if test "x$GUESS" != x; then
16051605+ echo "$GUESS"
16061606+ exit
16071607+fi
16081608+16091609+# No uname command or uname output not recognized.
16101610+set_cc_for_build
16111611+cat > "$dummy.c" <<EOF
13451612#ifdef _SEQUENT_
13461346-# include <sys/types.h>
13471347-# include <sys/utsname.h>
16131613+#include <sys/types.h>
16141614+#include <sys/utsname.h>
16151615+#endif
16161616+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
16171617+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
16181618+#include <signal.h>
16191619+#if defined(_SIZE_T_) || defined(SIGLOST)
16201620+#include <sys/utsname.h>
16211621+#endif
16221622+#endif
13481623#endif
13491624main ()
13501625{
···13571632#include <sys/param.h>
13581633 printf ("m68k-sony-newsos%s\n",
13591634#ifdef NEWSOS4
13601360- "4"
16351635+ "4"
13611636#else
13621362- ""
13631363-#endif
13641364- ); exit (0);
16371637+ ""
13651638#endif
16391639+ ); exit (0);
13661640#endif
13671367-13681368-#if defined (__arm) && defined (__acorn) && defined (__unix)
13691369- printf ("arm-acorn-riscix\n"); exit (0);
13701370-#endif
13711371-13721372-#if defined (hp300) && !defined (hpux)
13731373- printf ("m68k-hp-bsd\n"); exit (0);
13741641#endif
1375164213761643#if defined (NeXT)
···14121679#endif
1413168014141681#if defined (_SEQUENT_)
14151415- struct utsname un;
16821682+ struct utsname un;
1416168314171417- uname(&un);
14181418-14191419- if (strncmp(un.version, "V2", 2) == 0) {
14201420- printf ("i386-sequent-ptx2\n"); exit (0);
14211421- }
14221422- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
14231423- printf ("i386-sequent-ptx1\n"); exit (0);
14241424- }
14251425- printf ("i386-sequent-ptx\n"); exit (0);
14261426-16841684+ uname(&un);
16851685+ if (strncmp(un.version, "V2", 2) == 0) {
16861686+ printf ("i386-sequent-ptx2\n"); exit (0);
16871687+ }
16881688+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
16891689+ printf ("i386-sequent-ptx1\n"); exit (0);
16901690+ }
16911691+ printf ("i386-sequent-ptx\n"); exit (0);
14271692#endif
1428169314291694#if defined (vax)
14301430-# if !defined (ultrix)
14311431-# include <sys/param.h>
14321432-# if defined (BSD)
14331433-# if BSD == 43
14341434- printf ("vax-dec-bsd4.3\n"); exit (0);
14351435-# else
14361436-# if BSD == 199006
14371437- printf ("vax-dec-bsd4.3reno\n"); exit (0);
14381438-# else
14391439- printf ("vax-dec-bsd\n"); exit (0);
14401440-# endif
14411441-# endif
14421442-# else
14431443- printf ("vax-dec-bsd\n"); exit (0);
14441444-# endif
14451445-# else
14461446- printf ("vax-dec-ultrix\n"); exit (0);
14471447-# endif
16951695+#if !defined (ultrix)
16961696+#include <sys/param.h>
16971697+#if defined (BSD)
16981698+#if BSD == 43
16991699+ printf ("vax-dec-bsd4.3\n"); exit (0);
17001700+#else
17011701+#if BSD == 199006
17021702+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
17031703+#else
17041704+ printf ("vax-dec-bsd\n"); exit (0);
17051705+#endif
17061706+#endif
17071707+#else
17081708+ printf ("vax-dec-bsd\n"); exit (0);
17091709+#endif
17101710+#else
17111711+#if defined(_SIZE_T_) || defined(SIGLOST)
17121712+ struct utsname un;
17131713+ uname (&un);
17141714+ printf ("vax-dec-ultrix%s\n", un.release); exit (0);
17151715+#else
17161716+ printf ("vax-dec-ultrix\n"); exit (0);
17171717+#endif
17181718+#endif
17191719+#endif
17201720+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
17211721+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
17221722+#if defined(_SIZE_T_) || defined(SIGLOST)
17231723+ struct utsname *un;
17241724+ uname (&un);
17251725+ printf ("mips-dec-ultrix%s\n", un.release); exit (0);
17261726+#else
17271727+ printf ("mips-dec-ultrix\n"); exit (0);
17281728+#endif
17291729+#endif
14481730#endif
1449173114501732#if defined (alliant) && defined (i860)
···14551737}
14561738EOF
1457173914581458-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
17401740+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
14591741 { echo "$SYSTEM_NAME"; exit; }
1460174214611743# Apollos put the system type in the environment.
17441744+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
1462174514631463-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
17461746+echo "$0: unable to guess system type" >&2
1464174714651465-# Convex versions that predate uname can use getsysinfo(1)
17481748+case $UNAME_MACHINE:$UNAME_SYSTEM in
17491749+ mips:Linux | mips64:Linux)
17501750+ # If we got here on MIPS GNU/Linux, output extra information.
17511751+ cat >&2 <<EOF
1466175214671467-if [ -x /usr/convex/getsysinfo ]
14681468-then
14691469- case `getsysinfo -f cpu_type` in
14701470- c1*)
14711471- echo c1-convex-bsd
14721472- exit ;;
14731473- c2*)
14741474- if getsysinfo -f scalar_acc
14751475- then echo c32-convex-bsd
14761476- else echo c2-convex-bsd
14771477- fi
14781478- exit ;;
14791479- c34*)
14801480- echo c34-convex-bsd
14811481- exit ;;
14821482- c38*)
14831483- echo c38-convex-bsd
14841484- exit ;;
14851485- c4*)
14861486- echo c4-convex-bsd
14871487- exit ;;
14881488- esac
14891489-fi
17531753+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
17541754+the system type. Please install a C compiler and try again.
17551755+EOF
17561756+ ;;
17571757+esac
1490175814911759cat >&2 <<EOF
14921492-$0: unable to guess system type
1493176014941494-This script, last modified $timestamp, has failed to recognize
14951495-the operating system you are using. It is advised that you
14961496-download the most up to date version of the config scripts from
17611761+This script (version $timestamp), has failed to recognize the
17621762+operating system you are using. If your script is old, overwrite *all*
17631763+copies of config.guess and config.sub with the latest versions from:
1497176414981498- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
17651765+ https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
14991766and
15001500- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
17671767+ https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
17681768+EOF
1501176915021502-If the version you run ($0) is already up to date, please
15031503-send the following data and any information you think might be
15041504-pertinent to <config-patches@gnu.org> in order to provide the needed
15051505-information to handle your system.
17701770+our_year=`echo $timestamp | sed 's,-.*,,'`
17711771+thisyear=`date +%Y`
17721772+# shellcheck disable=SC2003
17731773+script_age=`expr "$thisyear" - "$our_year"`
17741774+if test "$script_age" -lt 3 ; then
17751775+ cat >&2 <<EOF
17761776+17771777+If $0 has already been updated, send the following data and any
17781778+information you think might be pertinent to config-patches@gnu.org to
17791779+provide the necessary information to handle your system.
1506178015071781config.guess timestamp = $timestamp
15081782···15211795/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
15221796/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1523179715241524-UNAME_MACHINE = ${UNAME_MACHINE}
15251525-UNAME_RELEASE = ${UNAME_RELEASE}
15261526-UNAME_SYSTEM = ${UNAME_SYSTEM}
15271527-UNAME_VERSION = ${UNAME_VERSION}
17981798+UNAME_MACHINE = "$UNAME_MACHINE"
17991799+UNAME_RELEASE = "$UNAME_RELEASE"
18001800+UNAME_SYSTEM = "$UNAME_SYSTEM"
18011801+UNAME_VERSION = "$UNAME_VERSION"
15281802EOF
18031803+fi
1529180415301805exit 1
1531180615321807# Local variables:
15331533-# eval: (add-hook 'write-file-hooks 'time-stamp)
18081808+# eval: (add-hook 'before-save-hook 'time-stamp)
15341809# time-stamp-start: "timestamp='"
15351810# time-stamp-format: "%:y-%02m-%02d"
15361811# time-stamp-end: "'"
+6-7
app/xkbevd/config.h.in
···33/* Define to 1 if you have the <inttypes.h> header file. */
44#undef HAVE_INTTYPES_H
5566-/* Define to 1 if you have the <memory.h> header file. */
77-#undef HAVE_MEMORY_H
88-96/* Define to 1 if you have the <stdint.h> header file. */
107#undef HAVE_STDINT_H
11899+/* Define to 1 if you have the <stdio.h> header file. */
1010+#undef HAVE_STDIO_H
1111+1212/* Define to 1 if you have the <stdlib.h> header file. */
1313#undef HAVE_STDLIB_H
1414-1515-/* Define to 1 if you have the `strcasecmp' function. */
1616-#undef HAVE_STRCASECMP
17141815/* Define to 1 if you have the <strings.h> header file. */
1916#undef HAVE_STRINGS_H
···6057/* Patch version of this package */
6158#undef PACKAGE_VERSION_PATCHLEVEL
62596363-/* Define to 1 if you have the ANSI C header files. */
6060+/* Define to 1 if all of the C90 standard headers exist (not just the ones
6161+ required in a freestanding environment). This macro is provided for
6262+ backward compatibility; new code need not use it. */
6463#undef STDC_HEADERS
65646665/* Version number of package */
···11#!/bin/sh
22# install - install a program, script, or datafile
3344-scriptversion=2011-11-20.07; # UTC
44+scriptversion=2020-11-14.01; # UTC
5566# This originates from X11R5 (mit/util/scripts/install.sh), which was
77# later released in X11R6 (xc/config/util/install.sh) with the
···4141# This script is compatible with the BSD install script, but was written
4242# from scratch.
43434444+tab=' '
4445nl='
4546'
4646-IFS=" "" $nl"
4747+IFS=" $tab$nl"
47484848-# set DOITPROG to echo to test this script
4949+# Set DOITPROG to "echo" to test this script.
49505050-# Don't use :- since 4.3BSD and earlier shells don't like it.
5151doit=${DOITPROG-}
5252-if test -z "$doit"; then
5353- doit_exec=exec
5454-else
5555- doit_exec=$doit
5656-fi
5252+doit_exec=${doit:-exec}
57535854# Put in absolute file names if you don't have them in your path;
5955# or use environment vars.
···6864rmprog=${RMPROG-rm}
6965stripprog=${STRIPPROG-strip}
70667171-posix_glob='?'
7272-initialize_posix_glob='
7373- test "$posix_glob" != "?" || {
7474- if (set -f) 2>/dev/null; then
7575- posix_glob=
7676- else
7777- posix_glob=:
7878- fi
7979- }
8080-'
8181-8267posix_mkdir=
83688469# Desired mode of installed file.
8570mode=0755
86717272+# Create dirs (including intermediate dirs) using mode 755.
7373+# This is like GNU 'install' as of coreutils 8.32 (2020).
7474+mkdir_umask=22
7575+7676+backupsuffix=
8777chgrpcmd=
8878chmodcmd=$chmodprog
8979chowncmd=
···9787dst_arg=
98889989copy_on_change=false
100100-no_target_directory=
9090+is_target_a_directory=possibly
1019110292usage="\
10393Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
···114104 --version display version info and exit.
115105116106 -c (ignored)
117117- -C install only if different (preserve the last data modification time)
107107+ -C install only if different (preserve data modification time)
118108 -d create directories instead of installing files.
119109 -g GROUP $chgrpprog installed files to GROUP.
120110 -m MODE $chmodprog installed files to MODE.
121111 -o USER $chownprog installed files to USER.
112112+ -p pass -p to $cpprog.
122113 -s $stripprog installed files.
114114+ -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
123115 -t DIRECTORY install into DIRECTORY.
124116 -T report an error if DSTFILE is a directory.
125117126118Environment variables override the default commands:
127119 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
128120 RMPROG STRIPPROG
121121+122122+By default, rm is invoked with -f; when overridden with RMPROG,
123123+it's up to you to specify -f if you want it.
124124+125125+If -S is not specified, no backups are attempted.
126126+127127+Email bug reports to bug-automake@gnu.org.
128128+Automake home page: https://www.gnu.org/software/automake/
129129"
130130131131while test $# -ne 0; do
···137137 -d) dir_arg=true;;
138138139139 -g) chgrpcmd="$chgrpprog $2"
140140- shift;;
140140+ shift;;
141141142142 --help) echo "$usage"; exit $?;;
143143144144 -m) mode=$2
145145- case $mode in
146146- *' '* | *' '* | *'
147147-'* | *'*'* | *'?'* | *'['*)
148148- echo "$0: invalid mode: $mode" >&2
149149- exit 1;;
150150- esac
151151- shift;;
145145+ case $mode in
146146+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
147147+ echo "$0: invalid mode: $mode" >&2
148148+ exit 1;;
149149+ esac
150150+ shift;;
152151153152 -o) chowncmd="$chownprog $2"
154154- shift;;
153153+ shift;;
154154+155155+ -p) cpprog="$cpprog -p";;
155156156157 -s) stripcmd=$stripprog;;
157158158158- -t) dst_arg=$2
159159- # Protect names problematic for 'test' and other utilities.
160160- case $dst_arg in
161161- -* | [=\(\)!]) dst_arg=./$dst_arg;;
162162- esac
163163- shift;;
159159+ -S) backupsuffix="$2"
160160+ shift;;
164161165165- -T) no_target_directory=true;;
162162+ -t)
163163+ is_target_a_directory=always
164164+ dst_arg=$2
165165+ # Protect names problematic for 'test' and other utilities.
166166+ case $dst_arg in
167167+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
168168+ esac
169169+ shift;;
170170+171171+ -T) is_target_a_directory=never;;
166172167173 --version) echo "$0 $scriptversion"; exit $?;;
168174169169- --) shift
170170- break;;
175175+ --) shift
176176+ break;;
171177172172- -*) echo "$0: invalid option: $1" >&2
173173- exit 1;;
178178+ -*) echo "$0: invalid option: $1" >&2
179179+ exit 1;;
174180175181 *) break;;
176182 esac
177183 shift
178184done
185185+186186+# We allow the use of options -d and -T together, by making -d
187187+# take the precedence; this is for compatibility with GNU install.
188188+189189+if test -n "$dir_arg"; then
190190+ if test -n "$dst_arg"; then
191191+ echo "$0: target directory not allowed when installing a directory." >&2
192192+ exit 1
193193+ fi
194194+fi
179195180196if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
181197 # When -d is used, all remaining arguments are directories to create.
···208224fi
209225210226if test -z "$dir_arg"; then
227227+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
228228+ if test ! -d "$dst_arg"; then
229229+ echo "$0: $dst_arg: Is not a directory." >&2
230230+ exit 1
231231+ fi
232232+ fi
233233+fi
234234+235235+if test -z "$dir_arg"; then
211236 do_exit='(exit $ret); exit $ret'
212237 trap "ret=129; $do_exit" 1
213238 trap "ret=130; $do_exit" 2
···223248224249 *[0-7])
225250 if test -z "$stripcmd"; then
226226- u_plus_rw=
251251+ u_plus_rw=
227252 else
228228- u_plus_rw='% 200'
253253+ u_plus_rw='% 200'
229254 fi
230255 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
231256 *)
232257 if test -z "$stripcmd"; then
233233- u_plus_rw=
258258+ u_plus_rw=
234259 else
235235- u_plus_rw=,u+rw
260260+ u_plus_rw=,u+rw
236261 fi
237262 cp_umask=$mode$u_plus_rw;;
238263 esac
···250275 dstdir=$dst
251276 test -d "$dstdir"
252277 dstdir_status=$?
278278+ # Don't chown directories that already exist.
279279+ if test $dstdir_status = 0; then
280280+ chowncmd=""
281281+ fi
253282 else
254283255284 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
···266295 fi
267296 dst=$dst_arg
268297269269- # If destination is a directory, append the input filename; won't work
270270- # if double slashes aren't ignored.
298298+ # If destination is a directory, append the input filename.
271299 if test -d "$dst"; then
272272- if test -n "$no_target_directory"; then
273273- echo "$0: $dst_arg: Is a directory" >&2
274274- exit 1
300300+ if test "$is_target_a_directory" = never; then
301301+ echo "$0: $dst_arg: Is a directory" >&2
302302+ exit 1
275303 fi
276304 dstdir=$dst
277277- dst=$dstdir/`basename "$src"`
305305+ dstbase=`basename "$src"`
306306+ case $dst in
307307+ */) dst=$dst$dstbase;;
308308+ *) dst=$dst/$dstbase;;
309309+ esac
278310 dstdir_status=0
279311 else
280280- # Prefer dirname, but fall back on a substitute if dirname fails.
281281- dstdir=`
282282- (dirname "$dst") 2>/dev/null ||
283283- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
284284- X"$dst" : 'X\(//\)[^/]' \| \
285285- X"$dst" : 'X\(//\)$' \| \
286286- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
287287- echo X"$dst" |
288288- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
289289- s//\1/
290290- q
291291- }
292292- /^X\(\/\/\)[^/].*/{
293293- s//\1/
294294- q
295295- }
296296- /^X\(\/\/\)$/{
297297- s//\1/
298298- q
299299- }
300300- /^X\(\/\).*/{
301301- s//\1/
302302- q
303303- }
304304- s/.*/./; q'
305305- `
306306-312312+ dstdir=`dirname "$dst"`
307313 test -d "$dstdir"
308314 dstdir_status=$?
309315 fi
310316 fi
317317+318318+ case $dstdir in
319319+ */) dstdirslash=$dstdir;;
320320+ *) dstdirslash=$dstdir/;;
321321+ esac
311322312323 obsolete_mkdir_used=false
313324314325 if test $dstdir_status != 0; then
315326 case $posix_mkdir in
316327 '')
317317- # Create intermediate dirs using mode 755 as modified by the umask.
318318- # This is like FreeBSD 'install' as of 1997-10-28.
319319- umask=`umask`
320320- case $stripcmd.$umask in
321321- # Optimize common cases.
322322- *[2367][2367]) mkdir_umask=$umask;;
323323- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
328328+ # With -d, create the new directory with the user-specified mode.
329329+ # Otherwise, rely on $mkdir_umask.
330330+ if test -n "$dir_arg"; then
331331+ mkdir_mode=-m$mode
332332+ else
333333+ mkdir_mode=
334334+ fi
335335+336336+ posix_mkdir=false
337337+ # The $RANDOM variable is not portable (e.g., dash). Use it
338338+ # here however when possible just to lower collision chance.
339339+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
324340325325- *[0-7])
326326- mkdir_umask=`expr $umask + 22 \
327327- - $umask % 100 % 40 + $umask % 20 \
328328- - $umask % 10 % 4 + $umask % 2
329329- `;;
330330- *) mkdir_umask=$umask,go-w;;
331331- esac
341341+ trap '
342342+ ret=$?
343343+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
344344+ exit $ret
345345+ ' 0
332346333333- # With -d, create the new directory with the user-specified mode.
334334- # Otherwise, rely on $mkdir_umask.
335335- if test -n "$dir_arg"; then
336336- mkdir_mode=-m$mode
347347+ # Because "mkdir -p" follows existing symlinks and we likely work
348348+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
349349+ # directory is successfully created first before we actually test
350350+ # 'mkdir -p'.
351351+ if (umask $mkdir_umask &&
352352+ $mkdirprog $mkdir_mode "$tmpdir" &&
353353+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
354354+ then
355355+ if test -z "$dir_arg" || {
356356+ # Check for POSIX incompatibilities with -m.
357357+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
358358+ # other-writable bit of parent directory when it shouldn't.
359359+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
360360+ test_tmpdir="$tmpdir/a"
361361+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
362362+ case $ls_ld_tmpdir in
363363+ d????-?r-*) different_mode=700;;
364364+ d????-?--*) different_mode=755;;
365365+ *) false;;
366366+ esac &&
367367+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
368368+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
369369+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
370370+ }
371371+ }
372372+ then posix_mkdir=:
373373+ fi
374374+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
337375 else
338338- mkdir_mode=
376376+ # Remove any dirs left behind by ancient mkdir implementations.
377377+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
339378 fi
340340-341341- posix_mkdir=false
342342- case $umask in
343343- *[123567][0-7][0-7])
344344- # POSIX mkdir -p sets u+wx bits regardless of umask, which
345345- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
346346- ;;
347347- *)
348348- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
349349- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
350350-351351- if (umask $mkdir_umask &&
352352- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
353353- then
354354- if test -z "$dir_arg" || {
355355- # Check for POSIX incompatibilities with -m.
356356- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
357357- # other-writable bit of parent directory when it shouldn't.
358358- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
359359- ls_ld_tmpdir=`ls -ld "$tmpdir"`
360360- case $ls_ld_tmpdir in
361361- d????-?r-*) different_mode=700;;
362362- d????-?--*) different_mode=755;;
363363- *) false;;
364364- esac &&
365365- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
366366- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
367367- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
368368- }
369369- }
370370- then posix_mkdir=:
371371- fi
372372- rmdir "$tmpdir/d" "$tmpdir"
373373- else
374374- # Remove any dirs left behind by ancient mkdir implementations.
375375- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
376376- fi
377377- trap '' 0;;
378378- esac;;
379379+ trap '' 0;;
379380 esac
380381381382 if
382383 $posix_mkdir && (
383383- umask $mkdir_umask &&
384384- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
384384+ umask $mkdir_umask &&
385385+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
385386 )
386387 then :
387388 else
388389389389- # The umask is ridiculous, or mkdir does not conform to POSIX,
390390+ # mkdir does not conform to POSIX,
390391 # or it failed possibly due to a race condition. Create the
391392 # directory the slow way, step by step, checking for races as we go.
392393393394 case $dstdir in
394394- /*) prefix='/';;
395395- [-=\(\)!]*) prefix='./';;
396396- *) prefix='';;
395395+ /*) prefix='/';;
396396+ [-=\(\)!]*) prefix='./';;
397397+ *) prefix='';;
397398 esac
398398-399399- eval "$initialize_posix_glob"
400399401400 oIFS=$IFS
402401 IFS=/
403403- $posix_glob set -f
402402+ set -f
404403 set fnord $dstdir
405404 shift
406406- $posix_glob set +f
405405+ set +f
407406 IFS=$oIFS
408407409408 prefixes=
410409411410 for d
412411 do
413413- test X"$d" = X && continue
412412+ test X"$d" = X && continue
414413415415- prefix=$prefix$d
416416- if test -d "$prefix"; then
417417- prefixes=
418418- else
419419- if $posix_mkdir; then
420420- (umask=$mkdir_umask &&
421421- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
422422- # Don't fail if two instances are running concurrently.
423423- test -d "$prefix" || exit 1
424424- else
425425- case $prefix in
426426- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
427427- *) qprefix=$prefix;;
428428- esac
429429- prefixes="$prefixes '$qprefix'"
430430- fi
431431- fi
432432- prefix=$prefix/
414414+ prefix=$prefix$d
415415+ if test -d "$prefix"; then
416416+ prefixes=
417417+ else
418418+ if $posix_mkdir; then
419419+ (umask $mkdir_umask &&
420420+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
421421+ # Don't fail if two instances are running concurrently.
422422+ test -d "$prefix" || exit 1
423423+ else
424424+ case $prefix in
425425+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
426426+ *) qprefix=$prefix;;
427427+ esac
428428+ prefixes="$prefixes '$qprefix'"
429429+ fi
430430+ fi
431431+ prefix=$prefix/
433432 done
434433435434 if test -n "$prefixes"; then
436436- # Don't fail if two instances are running concurrently.
437437- (umask $mkdir_umask &&
438438- eval "\$doit_exec \$mkdirprog $prefixes") ||
439439- test -d "$dstdir" || exit 1
440440- obsolete_mkdir_used=true
435435+ # Don't fail if two instances are running concurrently.
436436+ (umask $mkdir_umask &&
437437+ eval "\$doit_exec \$mkdirprog $prefixes") ||
438438+ test -d "$dstdir" || exit 1
439439+ obsolete_mkdir_used=true
441440 fi
442441 fi
443442 fi
···450449 else
451450452451 # Make a couple of temp file names in the proper directory.
453453- dsttmp=$dstdir/_inst.$$_
454454- rmtmp=$dstdir/_rm.$$_
452452+ dsttmp=${dstdirslash}_inst.$$_
453453+ rmtmp=${dstdirslash}_rm.$$_
455454456455 # Trap to clean up those temp files at exit.
457456 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
458457459458 # Copy the file name to the temp name.
460460- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
459459+ (umask $cp_umask &&
460460+ { test -z "$stripcmd" || {
461461+ # Create $dsttmp read-write so that cp doesn't create it read-only,
462462+ # which would cause strip to fail.
463463+ if test -z "$doit"; then
464464+ : >"$dsttmp" # No need to fork-exec 'touch'.
465465+ else
466466+ $doit touch "$dsttmp"
467467+ fi
468468+ }
469469+ } &&
470470+ $doit_exec $cpprog "$src" "$dsttmp") &&
461471462472 # and set any options; do chmod last to preserve setuid bits.
463473 #
···472482473483 # If -C, don't bother to copy if it wouldn't change the file.
474484 if $copy_on_change &&
475475- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
476476- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
477477-478478- eval "$initialize_posix_glob" &&
479479- $posix_glob set -f &&
485485+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
486486+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
487487+ set -f &&
480488 set X $old && old=:$2:$4:$5:$6 &&
481489 set X $new && new=:$2:$4:$5:$6 &&
482482- $posix_glob set +f &&
483483-490490+ set +f &&
484491 test "$old" = "$new" &&
485492 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
486493 then
487494 rm -f "$dsttmp"
488495 else
496496+ # If $backupsuffix is set, and the file being installed
497497+ # already exists, attempt a backup. Don't worry if it fails,
498498+ # e.g., if mv doesn't support -f.
499499+ if test -n "$backupsuffix" && test -f "$dst"; then
500500+ $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
501501+ fi
502502+489503 # Rename the file to the real destination.
490504 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
491505···493507 # to itself, or perhaps because mv is so ancient that it does not
494508 # support -f.
495509 {
496496- # Now remove or move aside any old file at destination location.
497497- # We try this two ways since rm can't unlink itself on some
498498- # systems and the destination file might be busy for other
499499- # reasons. In this case, the final cleanup might fail but the new
500500- # file should still install successfully.
501501- {
502502- test ! -f "$dst" ||
503503- $doit $rmcmd -f "$dst" 2>/dev/null ||
504504- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
505505- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
506506- } ||
507507- { echo "$0: cannot unlink or rename $dst" >&2
508508- (exit 1); exit 1
509509- }
510510- } &&
510510+ # Now remove or move aside any old file at destination location.
511511+ # We try this two ways since rm can't unlink itself on some
512512+ # systems and the destination file might be busy for other
513513+ # reasons. In this case, the final cleanup might fail but the new
514514+ # file should still install successfully.
515515+ {
516516+ test ! -f "$dst" ||
517517+ $doit $rmcmd "$dst" 2>/dev/null ||
518518+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
519519+ { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
520520+ } ||
521521+ { echo "$0: cannot unlink or rename $dst" >&2
522522+ (exit 1); exit 1
523523+ }
524524+ } &&
511525512512- # Now rename the file to the real destination.
513513- $doit $mvcmd "$dsttmp" "$dst"
526526+ # Now rename the file to the real destination.
527527+ $doit $mvcmd "$dsttmp" "$dst"
514528 }
515529 fi || exit 1
516530···519533done
520534521535# Local variables:
522522-# eval: (add-hook 'write-file-hooks 'time-stamp)
536536+# eval: (add-hook 'before-save-hook 'time-stamp)
523537# time-stamp-start: "scriptversion="
524538# time-stamp-format: "%:y-%02m-%02d.%02H"
525525-# time-stamp-time-zone: "UTC"
539539+# time-stamp-time-zone: "UTC0"
526540# time-stamp-end: "; # UTC"
527541# End: