Codebase list pkgconf / 6173649
Update upstream source from tag 'upstream/1.8.1' Update to upstream version '1.8.1' with Debian dir 594da24164a1203949aa03579091ddb385db388f Drop patches applied upstream. Andrej Shadura 1 year, 3 months ago
34 changed file(s) with 3863 addition(s) and 2932 deletion(s). Raw diff Collapse all Expand all
2121 libpkgconf/win-dirent.h \
2222 tests/lib-relocatable/lib/pkgconfig/foo.pc \
2323 tests/lib1/argv-parse-2.pc \
24 tests/lib1/billion-laughs.pc \
2425 tests/lib1/dos-lineendings.pc \
2526 tests/lib1/paren-quoting.pc \
2627 tests/lib1/argv-parse-3.pc \
0 # Makefile.in generated by automake 1.16.3 from Makefile.am.
0 # Makefile.in generated by automake 1.16.5 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2021 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
245245 unique=`for i in $$list; do \
246246 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
247247 done | $(am__uniquify_input)`
248 ETAGS = etags
249 CTAGS = ctags
250 CSCOPE = cscope
251248 AM_RECURSIVE_TARGETS = cscope
252249 am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Kyuafile.in \
253250 $(srcdir)/Makefile.in $(srcdir)/libpkgconf.pc.in \
254251 $(top_srcdir)/libpkgconf/config.h.in \
255252 $(top_srcdir)/tests/Kyuafile.in \
256253 $(top_srcdir)/tests/test_env.sh.in AUTHORS COPYING NEWS \
257 compile config.guess config.sub depcomp install-sh ltmain.sh \
258 missing
254 README.md compile config.guess config.sub depcomp install-sh \
255 ltmain.sh missing
259256 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
260257 distdir = $(PACKAGE)-$(VERSION)
261258 top_distdir = $(distdir)
288285 CFLAGS = @CFLAGS@
289286 CPP = @CPP@
290287 CPPFLAGS = @CPPFLAGS@
288 CSCOPE = @CSCOPE@
289 CTAGS = @CTAGS@
291290 CYGPATH_W = @CYGPATH_W@
292291 DEFS = @DEFS@
293292 DEPDIR = @DEPDIR@
298297 ECHO_N = @ECHO_N@
299298 ECHO_T = @ECHO_T@
300299 EGREP = @EGREP@
300 ETAGS = @ETAGS@
301301 EXEEXT = @EXEEXT@
302302 FGREP = @FGREP@
303 FILECMD = @FILECMD@
303304 GREP = @GREP@
304305 INSTALL = @INSTALL@
305306 INSTALL_DATA = @INSTALL_DATA@
411412 libpkgconf/win-dirent.h \
412413 tests/lib-relocatable/lib/pkgconfig/foo.pc \
413414 tests/lib1/argv-parse-2.pc \
415 tests/lib1/billion-laughs.pc \
414416 tests/lib1/dos-lineendings.pc \
415417 tests/lib1/paren-quoting.pc \
416418 tests/lib1/argv-parse-3.pc \
11391141 distclean-tags:
11401142 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
11411143 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
1142
11431144 distdir: $(BUILT_SOURCES)
11441145 $(MAKE) $(AM_MAKEFLAGS) distdir-am
11451146
00 Changes from previous version of pkgconf
11 ========================================
2
3 Changes from 1.8.0 to 1.8.1:
4 ----------------------------
5
6 * Fix a buffer overflow vulnerability involving very large variable expansions.
7 CVE-2023-24056
8
9 * Fix handling of tildes in version strings.
210
311 Changes from 1.7.4 to 1.8.0:
412 ----------------------------
0 # generated automatically by aclocal 1.16.3 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
0 # generated automatically by aclocal 1.16.5 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
33
44 # This file is free software; the Free Software Foundation
55 # gives unlimited permission to copy and/or distribute it,
1919 If you have problems, you may need to regenerate the build system entirely.
2020 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2121
22 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 # Copyright (C) 2002-2021 Free Software Foundation, Inc.
2323 #
2424 # This file is free software; the Free Software Foundation
2525 # gives unlimited permission to copy and/or distribute it,
3434 [am__api_version='1.16'
3535 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3636 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.16.3], [],
37 m4_if([$1], [1.16.5], [],
3838 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3939 ])
4040
5050 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5151 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5252 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.16.3])dnl
53 [AM_AUTOMAKE_VERSION([1.16.5])dnl
5454 m4_ifndef([AC_AUTOCONF_VERSION],
5555 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5656 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5757
5858 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
5959
60 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
60 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
6161 #
6262 # This file is free software; the Free Software Foundation
6363 # gives unlimited permission to copy and/or distribute it,
109109
110110 # AM_CONDITIONAL -*- Autoconf -*-
111111
112 # Copyright (C) 1997-2020 Free Software Foundation, Inc.
112 # Copyright (C) 1997-2021 Free Software Foundation, Inc.
113113 #
114114 # This file is free software; the Free Software Foundation
115115 # gives unlimited permission to copy and/or distribute it,
140140 Usually this means the macro was only invoked conditionally.]])
141141 fi])])
142142
143 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
143 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
144144 #
145145 # This file is free software; the Free Software Foundation
146146 # gives unlimited permission to copy and/or distribute it,
331331
332332 # Generate code to set up dependency tracking. -*- Autoconf -*-
333333
334 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
334 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
335335 #
336336 # This file is free software; the Free Software Foundation
337337 # gives unlimited permission to copy and/or distribute it,
399399
400400 # Do all the work for Automake. -*- Autoconf -*-
401401
402 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
402 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
403403 #
404404 # This file is free software; the Free Software Foundation
405405 # gives unlimited permission to copy and/or distribute it,
427427 # release and drop the old call support.
428428 AC_DEFUN([AM_INIT_AUTOMAKE],
429429 [AC_PREREQ([2.65])dnl
430 m4_ifdef([_$0_ALREADY_INIT],
431 [m4_fatal([$0 expanded multiple times
432 ]m4_defn([_$0_ALREADY_INIT]))],
433 [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
430434 dnl Autoconf wants to disallow AM_ names. We explicitly allow
431435 dnl the ones we care about.
432436 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
463467 [_AM_SET_OPTIONS([$1])dnl
464468 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
465469 m4_if(
466 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
470 m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
467471 [ok:ok],,
468472 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
469473 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
515519 [m4_define([AC_PROG_OBJCXX],
516520 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
517521 ])
522 # Variables for tags utilities; see am/tags.am
523 if test -z "$CTAGS"; then
524 CTAGS=ctags
525 fi
526 AC_SUBST([CTAGS])
527 if test -z "$ETAGS"; then
528 ETAGS=etags
529 fi
530 AC_SUBST([ETAGS])
531 if test -z "$CSCOPE"; then
532 CSCOPE=cscope
533 fi
534 AC_SUBST([CSCOPE])
535
518536 AC_REQUIRE([AM_SILENT_RULES])dnl
519537 dnl The testsuite driver may need to know about EXEEXT, so add the
520538 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
596614 done
597615 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
598616
599 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
617 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
600618 #
601619 # This file is free software; the Free Software Foundation
602620 # gives unlimited permission to copy and/or distribute it,
617635 fi
618636 AC_SUBST([install_sh])])
619637
620 # Copyright (C) 2003-2020 Free Software Foundation, Inc.
638 # Copyright (C) 2003-2021 Free Software Foundation, Inc.
621639 #
622640 # This file is free software; the Free Software Foundation
623641 # gives unlimited permission to copy and/or distribute it,
638656
639657 # Check to see how 'make' treats includes. -*- Autoconf -*-
640658
641 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
659 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
642660 #
643661 # This file is free software; the Free Software Foundation
644662 # gives unlimited permission to copy and/or distribute it,
681699
682700 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
683701
684 # Copyright (C) 1997-2020 Free Software Foundation, Inc.
702 # Copyright (C) 1997-2021 Free Software Foundation, Inc.
685703 #
686704 # This file is free software; the Free Software Foundation
687705 # gives unlimited permission to copy and/or distribute it,
715733
716734 # Helper functions for option handling. -*- Autoconf -*-
717735
718 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
736 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
719737 #
720738 # This file is free software; the Free Software Foundation
721739 # gives unlimited permission to copy and/or distribute it,
744762 AC_DEFUN([_AM_IF_OPTION],
745763 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
746764
747 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
765 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
748766 #
749767 # This file is free software; the Free Software Foundation
750768 # gives unlimited permission to copy and/or distribute it,
791809 # For backward compatibility.
792810 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
793811
794 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
812 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
795813 #
796814 # This file is free software; the Free Software Foundation
797815 # gives unlimited permission to copy and/or distribute it,
810828
811829 # Check to make sure that the build environment is sane. -*- Autoconf -*-
812830
813 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
831 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
814832 #
815833 # This file is free software; the Free Software Foundation
816834 # gives unlimited permission to copy and/or distribute it,
891909 rm -f conftest.file
892910 ])
893911
894 # Copyright (C) 2009-2020 Free Software Foundation, Inc.
912 # Copyright (C) 2009-2021 Free Software Foundation, Inc.
895913 #
896914 # This file is free software; the Free Software Foundation
897915 # gives unlimited permission to copy and/or distribute it,
951969 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
952970 ])
953971
954 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
972 # Copyright (C) 2001-2021 Free Software Foundation, Inc.
955973 #
956974 # This file is free software; the Free Software Foundation
957975 # gives unlimited permission to copy and/or distribute it,
979997 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
980998 AC_SUBST([INSTALL_STRIP_PROGRAM])])
981999
982 # Copyright (C) 2006-2020 Free Software Foundation, Inc.
1000 # Copyright (C) 2006-2021 Free Software Foundation, Inc.
9831001 #
9841002 # This file is free software; the Free Software Foundation
9851003 # gives unlimited permission to copy and/or distribute it,
9981016
9991017 # Check how to create a tarball. -*- Autoconf -*-
10001018
1001 # Copyright (C) 2004-2020 Free Software Foundation, Inc.
1019 # Copyright (C) 2004-2021 Free Software Foundation, Inc.
10021020 #
10031021 # This file is free software; the Free Software Foundation
10041022 # gives unlimited permission to copy and/or distribute it,
22
33 scriptversion=2018-03-07.03; # UTC
44
5 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
5 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
66 # Written by Tom Tromey <tromey@cygnus.com>.
77 #
88 # This program is free software; you can redistribute it and/or modify
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
2 # Copyright 1992-2015 Free Software Foundation, Inc.
3
4 timestamp='2015-01-01'
2 # Copyright 1992-2022 Free Software Foundation, Inc.
3
4 # shellcheck disable=SC2006,SC2268 # see below for rationale
5
6 timestamp='2022-01-09'
57
68 # This file is free software; you can redistribute it and/or modify it
79 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
10 # the Free Software Foundation, either version 3 of the License, or
911 # (at your option) any later version.
1012 #
1113 # This program is distributed in the hope that it will be useful, but
1416 # General Public License for more details.
1517 #
1618 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
19 # along with this program; if not, see <https://www.gnu.org/licenses/>.
1820 #
1921 # As a special exception to the GNU General Public License, if you
2022 # distribute this file as part of a program that contains a
2628 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
2729 #
2830 # You can get the latest version of this script from:
29 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
31 # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
3032 #
3133 # Please send patches to <config-patches@gnu.org>.
3234
3335
36 # The "shellcheck disable" line above the timestamp inhibits complaints
37 # about features and limitations of the classic Bourne shell that were
38 # superseded or lifted in POSIX. However, this script identifies a wide
39 # variety of pre-POSIX systems that do not have POSIX shells at all, and
40 # even some reasonably current systems (Solaris 10 as case-in-point) still
41 # have a pre-POSIX /bin/sh.
42
43
3444 me=`echo "$0" | sed -e 's,.*/,,'`
3545
3646 usage="\
3848
3949 Output the configuration name of the system \`$me' is run on.
4050
41 Operation modes:
51 Options:
4252 -h, --help print this help, then exit
4353 -t, --time-stamp print date of last modification, then exit
4454 -v, --version print version number, then exit
4959 GNU config.guess ($timestamp)
5060
5161 Originally written by Per Bothner.
52 Copyright 1992-2015 Free Software Foundation, Inc.
62 Copyright 1992-2022 Free Software Foundation, Inc.
5363
5464 This is free software; see the source for copying conditions. There is NO
5565 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
8393 exit 1
8494 fi
8595
86 trap 'exit 1' 1 2 15
96 # Just in case it came from the environment.
97 GUESS=
8798
8899 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
89100 # compiler to aid in system detection is discouraged as it requires
95106
96107 # Portable tmp directory creation inspired by the Autoconf team.
97108
98 set_cc_for_build='
99 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
100 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
101 : ${TMPDIR=/tmp} ;
102 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
103 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
104 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
105 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
106 dummy=$tmp/dummy ;
107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > $dummy.c ;
110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
112 CC_FOR_BUILD="$c"; break ;
113 fi ;
114 done ;
115 if test x"$CC_FOR_BUILD" = x ; then
116 CC_FOR_BUILD=no_compiler_found ;
117 fi
118 ;;
119 ,,*) CC_FOR_BUILD=$CC ;;
120 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
121 esac ; set_cc_for_build= ;'
109 tmp=
110 # shellcheck disable=SC2172
111 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
112
113 set_cc_for_build() {
114 # prevent multiple calls if $tmp is already set
115 test "$tmp" && return 0
116 : "${TMPDIR=/tmp}"
117 # shellcheck disable=SC2039,SC3028
118 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
119 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
120 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
121 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
122 dummy=$tmp/dummy
123 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
124 ,,) echo "int x;" > "$dummy.c"
125 for driver in cc gcc c89 c99 ; do
126 if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
127 CC_FOR_BUILD=$driver
128 break
129 fi
130 done
131 if test x"$CC_FOR_BUILD" = x ; then
132 CC_FOR_BUILD=no_compiler_found
133 fi
134 ;;
135 ,,*) CC_FOR_BUILD=$CC ;;
136 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
137 esac
138 }
122139
123140 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
124141 # (ghazi@noc.rutgers.edu 1994-08-24)
125 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
142 if test -f /.attbin/uname ; then
126143 PATH=$PATH:/.attbin ; export PATH
127144 fi
128145
129146 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
130147 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
148 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132149 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133150
134 case "${UNAME_SYSTEM}" in
151 case $UNAME_SYSTEM in
135152 Linux|GNU|GNU/*)
136 # If the system lacks a compiler, then just pick glibc.
137 # We could probably try harder.
138 LIBC=gnu
139
140 eval $set_cc_for_build
141 cat <<-EOF > $dummy.c
153 LIBC=unknown
154
155 set_cc_for_build
156 cat <<-EOF > "$dummy.c"
142157 #include <features.h>
143158 #if defined(__UCLIBC__)
144159 LIBC=uclibc
145160 #elif defined(__dietlibc__)
146161 LIBC=dietlibc
162 #elif defined(__GLIBC__)
163 LIBC=gnu
147164 #else
148 LIBC=gnu
165 #include <stdarg.h>
166 /* First heuristic to detect musl libc. */
167 #ifdef __DEFINED_va_list
168 LIBC=musl
169 #endif
149170 #endif
150171 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
172 cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
173 eval "$cc_set_libc"
174
175 # Second heuristic to detect musl libc.
176 if [ "$LIBC" = unknown ] &&
177 command -v ldd >/dev/null &&
178 ldd --version 2>&1 | grep -q ^musl; then
179 LIBC=musl
180 fi
181
182 # If the system lacks a compiler, then just pick glibc.
183 # We could probably try harder.
184 if [ "$LIBC" = unknown ]; then
185 LIBC=gnu
186 fi
152187 ;;
153188 esac
154189
155190 # Note: order is significant - the case branches are not exclusive.
156191
157 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
192 case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
158193 *:NetBSD:*:*)
159194 # NetBSD (nbsd) targets should (where applicable) match one or
160195 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
166201 #
167202 # Note: NetBSD doesn't particularly care about the vendor
168203 # portion of the name. We always set it to "unknown".
169 sysctl="sysctl -n hw.machine_arch"
170 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
171 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
172 case "${UNAME_MACHINE_ARCH}" in
204 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
205 /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
206 /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
207 echo unknown)`
208 case $UNAME_MACHINE_ARCH in
209 aarch64eb) machine=aarch64_be-unknown ;;
173210 armeb) machine=armeb-unknown ;;
174211 arm*) machine=arm-unknown ;;
175212 sh3el) machine=shl-unknown ;;
176213 sh3eb) machine=sh-unknown ;;
177214 sh5el) machine=sh5le-unknown ;;
178 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
215 earmv*)
216 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
217 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
218 machine=${arch}${endian}-unknown
219 ;;
220 *) machine=$UNAME_MACHINE_ARCH-unknown ;;
179221 esac
180222 # The Operating System including object format, if it has switched
181 # to ELF recently, or will in the future.
182 case "${UNAME_MACHINE_ARCH}" in
223 # to ELF recently (or will in the future) and ABI.
224 case $UNAME_MACHINE_ARCH in
225 earm*)
226 os=netbsdelf
227 ;;
183228 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
184 eval $set_cc_for_build
229 set_cc_for_build
185230 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
186231 | grep -q __ELF__
187232 then
196241 os=netbsd
197242 ;;
198243 esac
244 # Determine ABI tags.
245 case $UNAME_MACHINE_ARCH in
246 earm*)
247 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
248 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
249 ;;
250 esac
199251 # The OS release
200252 # Debian GNU/NetBSD machines have a different userland, and
201253 # thus, need a distinct triplet. However, they do not need
202254 # kernel version information, so it can be replaced with a
203255 # suitable tag, in the style of linux-gnu.
204 case "${UNAME_VERSION}" in
256 case $UNAME_VERSION in
205257 Debian*)
206258 release='-gnu'
207259 ;;
208260 *)
209 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
261 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
210262 ;;
211263 esac
212264 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
213265 # contains redundant information, the shorter form:
214266 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
215 echo "${machine}-${os}${release}"
216 exit ;;
267 GUESS=$machine-${os}${release}${abi-}
268 ;;
217269 *:Bitrig:*:*)
218270 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
219 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
220 exit ;;
271 GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
272 ;;
221273 *:OpenBSD:*:*)
222274 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
223 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
224 exit ;;
275 GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
276 ;;
277 *:SecBSD:*:*)
278 UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
279 GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
280 ;;
281 *:LibertyBSD:*:*)
282 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
283 GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
284 ;;
285 *:MidnightBSD:*:*)
286 GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
287 ;;
225288 *:ekkoBSD:*:*)
226 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
227 exit ;;
289 GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
290 ;;
228291 *:SolidBSD:*:*)
229 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
230 exit ;;
292 GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
293 ;;
294 *:OS108:*:*)
295 GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
296 ;;
231297 macppc:MirBSD:*:*)
232 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
233 exit ;;
298 GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
299 ;;
234300 *:MirBSD:*:*)
235 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
236 exit ;;
301 GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
302 ;;
303 *:Sortix:*:*)
304 GUESS=$UNAME_MACHINE-unknown-sortix
305 ;;
306 *:Twizzler:*:*)
307 GUESS=$UNAME_MACHINE-unknown-twizzler
308 ;;
309 *:Redox:*:*)
310 GUESS=$UNAME_MACHINE-unknown-redox
311 ;;
312 mips:OSF1:*.*)
313 GUESS=mips-dec-osf1
314 ;;
237315 alpha:OSF1:*:*)
316 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
317 trap '' 0
238318 case $UNAME_RELEASE in
239319 *4.0)
240320 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
248328 # covers most systems running today. This code pipes the CPU
249329 # types through head -n 1, so we only detect the type of CPU 0.
250330 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
251 case "$ALPHA_CPU_TYPE" in
331 case $ALPHA_CPU_TYPE in
252332 "EV4 (21064)")
253 UNAME_MACHINE="alpha" ;;
333 UNAME_MACHINE=alpha ;;
254334 "EV4.5 (21064)")
255 UNAME_MACHINE="alpha" ;;
335 UNAME_MACHINE=alpha ;;
256336 "LCA4 (21066/21068)")
257 UNAME_MACHINE="alpha" ;;
337 UNAME_MACHINE=alpha ;;
258338 "EV5 (21164)")
259 UNAME_MACHINE="alphaev5" ;;
339 UNAME_MACHINE=alphaev5 ;;
260340 "EV5.6 (21164A)")
261 UNAME_MACHINE="alphaev56" ;;
341 UNAME_MACHINE=alphaev56 ;;
262342 "EV5.6 (21164PC)")
263 UNAME_MACHINE="alphapca56" ;;
343 UNAME_MACHINE=alphapca56 ;;
264344 "EV5.7 (21164PC)")
265 UNAME_MACHINE="alphapca57" ;;
345 UNAME_MACHINE=alphapca57 ;;
266346 "EV6 (21264)")
267 UNAME_MACHINE="alphaev6" ;;
347 UNAME_MACHINE=alphaev6 ;;
268348 "EV6.7 (21264A)")
269 UNAME_MACHINE="alphaev67" ;;
349 UNAME_MACHINE=alphaev67 ;;
270350 "EV6.8CB (21264C)")
271 UNAME_MACHINE="alphaev68" ;;
351 UNAME_MACHINE=alphaev68 ;;
272352 "EV6.8AL (21264B)")
273 UNAME_MACHINE="alphaev68" ;;
353 UNAME_MACHINE=alphaev68 ;;
274354 "EV6.8CX (21264D)")
275 UNAME_MACHINE="alphaev68" ;;
355 UNAME_MACHINE=alphaev68 ;;
276356 "EV6.9A (21264/EV69A)")
277 UNAME_MACHINE="alphaev69" ;;
357 UNAME_MACHINE=alphaev69 ;;
278358 "EV7 (21364)")
279 UNAME_MACHINE="alphaev7" ;;
359 UNAME_MACHINE=alphaev7 ;;
280360 "EV7.9 (21364A)")
281 UNAME_MACHINE="alphaev79" ;;
361 UNAME_MACHINE=alphaev79 ;;
282362 esac
283363 # A Pn.n version is a patched version.
284364 # A Vn.n version is a released version.
285365 # A Tn.n version is a released field test version.
286366 # A Xn.n version is an unreleased experimental baselevel.
287367 # 1.2 uses "1.2" for uname -r.
288 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
289 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
290 exitcode=$?
291 trap '' 0
292 exit $exitcode ;;
293 Alpha\ *:Windows_NT*:*)
294 # How do we know it's Interix rather than the generic POSIX subsystem?
295 # Should we change UNAME_MACHINE based on the output of uname instead
296 # of the specific Alpha model?
297 echo alpha-pc-interix
298 exit ;;
299 21064:Windows_NT:50:3)
300 echo alpha-dec-winnt3.5
301 exit ;;
368 OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
369 GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
370 ;;
302371 Amiga*:UNIX_System_V:4.0:*)
303 echo m68k-unknown-sysv4
304 exit ;;
372 GUESS=m68k-unknown-sysv4
373 ;;
305374 *:[Aa]miga[Oo][Ss]:*:*)
306 echo ${UNAME_MACHINE}-unknown-amigaos
307 exit ;;
375 GUESS=$UNAME_MACHINE-unknown-amigaos
376 ;;
308377 *:[Mm]orph[Oo][Ss]:*:*)
309 echo ${UNAME_MACHINE}-unknown-morphos
310 exit ;;
378 GUESS=$UNAME_MACHINE-unknown-morphos
379 ;;
311380 *:OS/390:*:*)
312 echo i370-ibm-openedition
313 exit ;;
381 GUESS=i370-ibm-openedition
382 ;;
314383 *:z/VM:*:*)
315 echo s390-ibm-zvmoe
316 exit ;;
384 GUESS=s390-ibm-zvmoe
385 ;;
317386 *:OS400:*:*)
318 echo powerpc-ibm-os400
319 exit ;;
387 GUESS=powerpc-ibm-os400
388 ;;
320389 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
321 echo arm-acorn-riscix${UNAME_RELEASE}
322 exit ;;
390 GUESS=arm-acorn-riscix$UNAME_RELEASE
391 ;;
323392 arm*:riscos:*:*|arm*:RISCOS:*:*)
324 echo arm-unknown-riscos
325 exit ;;
393 GUESS=arm-unknown-riscos
394 ;;
326395 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
327 echo hppa1.1-hitachi-hiuxmpp
328 exit ;;
396 GUESS=hppa1.1-hitachi-hiuxmpp
397 ;;
329398 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
330399 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
331 if test "`(/bin/universe) 2>/dev/null`" = att ; then
332 echo pyramid-pyramid-sysv3
333 else
334 echo pyramid-pyramid-bsd
335 fi
336 exit ;;
400 case `(/bin/universe) 2>/dev/null` in
401 att) GUESS=pyramid-pyramid-sysv3 ;;
402 *) GUESS=pyramid-pyramid-bsd ;;
403 esac
404 ;;
337405 NILE*:*:*:dcosx)
338 echo pyramid-pyramid-svr4
339 exit ;;
406 GUESS=pyramid-pyramid-svr4
407 ;;
340408 DRS?6000:unix:4.0:6*)
341 echo sparc-icl-nx6
342 exit ;;
409 GUESS=sparc-icl-nx6
410 ;;
343411 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
344412 case `/usr/bin/uname -p` in
345 sparc) echo sparc-icl-nx7; exit ;;
346 esac ;;
413 sparc) GUESS=sparc-icl-nx7 ;;
414 esac
415 ;;
347416 s390x:SunOS:*:*)
348 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
349 exit ;;
417 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
418 GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
419 ;;
350420 sun4H:SunOS:5.*:*)
351 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
352 exit ;;
421 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
422 GUESS=sparc-hal-solaris2$SUN_REL
423 ;;
353424 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
354 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
355 exit ;;
425 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
426 GUESS=sparc-sun-solaris2$SUN_REL
427 ;;
356428 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
357 echo i386-pc-auroraux${UNAME_RELEASE}
358 exit ;;
429 GUESS=i386-pc-auroraux$UNAME_RELEASE
430 ;;
359431 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
360 eval $set_cc_for_build
361 SUN_ARCH="i386"
432 set_cc_for_build
433 SUN_ARCH=i386
362434 # If there is a compiler, see if it is configured for 64-bit objects.
363435 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
364436 # This test works for both compilers.
365 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
437 if test "$CC_FOR_BUILD" != no_compiler_found; then
366438 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
367 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
439 (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
368440 grep IS_64BIT_ARCH >/dev/null
369441 then
370 SUN_ARCH="x86_64"
442 SUN_ARCH=x86_64
371443 fi
372444 fi
373 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
374 exit ;;
445 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
446 GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
447 ;;
375448 sun4*:SunOS:6*:*)
376449 # According to config.sub, this is the proper way to canonicalize
377450 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
378451 # it's likely to be more like Solaris than SunOS4.
379 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
380 exit ;;
452 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
453 GUESS=sparc-sun-solaris3$SUN_REL
454 ;;
381455 sun4*:SunOS:*:*)
382 case "`/usr/bin/arch -k`" in
456 case `/usr/bin/arch -k` in
383457 Series*|S4*)
384458 UNAME_RELEASE=`uname -v`
385459 ;;
386460 esac
387461 # Japanese Language versions have a version number like `4.1.3-JL'.
388 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
389 exit ;;
462 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
463 GUESS=sparc-sun-sunos$SUN_REL
464 ;;
390465 sun3*:SunOS:*:*)
391 echo m68k-sun-sunos${UNAME_RELEASE}
392 exit ;;
466 GUESS=m68k-sun-sunos$UNAME_RELEASE
467 ;;
393468 sun*:*:4.2BSD:*)
394469 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
395 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
396 case "`/bin/arch`" in
470 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
471 case `/bin/arch` in
397472 sun3)
398 echo m68k-sun-sunos${UNAME_RELEASE}
473 GUESS=m68k-sun-sunos$UNAME_RELEASE
399474 ;;
400475 sun4)
401 echo sparc-sun-sunos${UNAME_RELEASE}
476 GUESS=sparc-sun-sunos$UNAME_RELEASE
402477 ;;
403478 esac
404 exit ;;
479 ;;
405480 aushp:SunOS:*:*)
406 echo sparc-auspex-sunos${UNAME_RELEASE}
407 exit ;;
481 GUESS=sparc-auspex-sunos$UNAME_RELEASE
482 ;;
408483 # The situation for MiNT is a little confusing. The machine name
409484 # can be virtually everything (everything which is not
410485 # "atarist" or "atariste" at least should have a processor
414489 # MiNT. But MiNT is downward compatible to TOS, so this should
415490 # be no problem.
416491 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
417 echo m68k-atari-mint${UNAME_RELEASE}
418 exit ;;
492 GUESS=m68k-atari-mint$UNAME_RELEASE
493 ;;
419494 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
420 echo m68k-atari-mint${UNAME_RELEASE}
421 exit ;;
495 GUESS=m68k-atari-mint$UNAME_RELEASE
496 ;;
422497 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
423 echo m68k-atari-mint${UNAME_RELEASE}
424 exit ;;
498 GUESS=m68k-atari-mint$UNAME_RELEASE
499 ;;
425500 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
426 echo m68k-milan-mint${UNAME_RELEASE}
427 exit ;;
501 GUESS=m68k-milan-mint$UNAME_RELEASE
502 ;;
428503 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
429 echo m68k-hades-mint${UNAME_RELEASE}
430 exit ;;
504 GUESS=m68k-hades-mint$UNAME_RELEASE
505 ;;
431506 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
432 echo m68k-unknown-mint${UNAME_RELEASE}
433 exit ;;
507 GUESS=m68k-unknown-mint$UNAME_RELEASE
508 ;;
434509 m68k:machten:*:*)
435 echo m68k-apple-machten${UNAME_RELEASE}
436 exit ;;
510 GUESS=m68k-apple-machten$UNAME_RELEASE
511 ;;
437512 powerpc:machten:*:*)
438 echo powerpc-apple-machten${UNAME_RELEASE}
439 exit ;;
513 GUESS=powerpc-apple-machten$UNAME_RELEASE
514 ;;
440515 RISC*:Mach:*:*)
441 echo mips-dec-mach_bsd4.3
442 exit ;;
516 GUESS=mips-dec-mach_bsd4.3
517 ;;
443518 RISC*:ULTRIX:*:*)
444 echo mips-dec-ultrix${UNAME_RELEASE}
445 exit ;;
519 GUESS=mips-dec-ultrix$UNAME_RELEASE
520 ;;
446521 VAX*:ULTRIX*:*:*)
447 echo vax-dec-ultrix${UNAME_RELEASE}
448 exit ;;
522 GUESS=vax-dec-ultrix$UNAME_RELEASE
523 ;;
449524 2020:CLIX:*:* | 2430:CLIX:*:*)
450 echo clipper-intergraph-clix${UNAME_RELEASE}
451 exit ;;
525 GUESS=clipper-intergraph-clix$UNAME_RELEASE
526 ;;
452527 mips:*:*:UMIPS | mips:*:*:RISCos)
453 eval $set_cc_for_build
454 sed 's/^ //' << EOF >$dummy.c
528 set_cc_for_build
529 sed 's/^ //' << EOF > "$dummy.c"
455530 #ifdef __cplusplus
456531 #include <stdio.h> /* for printf() prototype */
457532 int main (int argc, char *argv[]) {
460535 #endif
461536 #if defined (host_mips) && defined (MIPSEB)
462537 #if defined (SYSTYPE_SYSV)
463 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
538 printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
464539 #endif
465540 #if defined (SYSTYPE_SVR4)
466 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
541 printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
467542 #endif
468543 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
469 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
544 printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
470545 #endif
471546 #endif
472547 exit (-1);
473548 }
474549 EOF
475 $CC_FOR_BUILD -o $dummy $dummy.c &&
476 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
477 SYSTEM_NAME=`$dummy $dummyarg` &&
550 $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
551 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
552 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
478553 { echo "$SYSTEM_NAME"; exit; }
479 echo mips-mips-riscos${UNAME_RELEASE}
480 exit ;;
554 GUESS=mips-mips-riscos$UNAME_RELEASE
555 ;;
481556 Motorola:PowerMAX_OS:*:*)
482 echo powerpc-motorola-powermax
483 exit ;;
557 GUESS=powerpc-motorola-powermax
558 ;;
484559 Motorola:*:4.3:PL8-*)
485 echo powerpc-harris-powermax
486 exit ;;
560 GUESS=powerpc-harris-powermax
561 ;;
487562 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
488 echo powerpc-harris-powermax
489 exit ;;
563 GUESS=powerpc-harris-powermax
564 ;;
490565 Night_Hawk:Power_UNIX:*:*)
491 echo powerpc-harris-powerunix
492 exit ;;
566 GUESS=powerpc-harris-powerunix
567 ;;
493568 m88k:CX/UX:7*:*)
494 echo m88k-harris-cxux7
495 exit ;;
569 GUESS=m88k-harris-cxux7
570 ;;
496571 m88k:*:4*:R4*)
497 echo m88k-motorola-sysv4
498 exit ;;
572 GUESS=m88k-motorola-sysv4
573 ;;
499574 m88k:*:3*:R3*)
500 echo m88k-motorola-sysv3
501 exit ;;
575 GUESS=m88k-motorola-sysv3
576 ;;
502577 AViiON:dgux:*:*)
503578 # DG/UX returns AViiON for all architectures
504579 UNAME_PROCESSOR=`/usr/bin/uname -p`
505 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
580 if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
506581 then
507 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
508 [ ${TARGET_BINARY_INTERFACE}x = x ]
582 if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
583 test "$TARGET_BINARY_INTERFACE"x = x
509584 then
510 echo m88k-dg-dgux${UNAME_RELEASE}
585 GUESS=m88k-dg-dgux$UNAME_RELEASE
511586 else
512 echo m88k-dg-dguxbcs${UNAME_RELEASE}
587 GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
513588 fi
514589 else
515 echo i586-dg-dgux${UNAME_RELEASE}
516 fi
517 exit ;;
590 GUESS=i586-dg-dgux$UNAME_RELEASE
591 fi
592 ;;
518593 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
519 echo m88k-dolphin-sysv3
520 exit ;;
594 GUESS=m88k-dolphin-sysv3
595 ;;
521596 M88*:*:R3*:*)
522597 # Delta 88k system running SVR3
523 echo m88k-motorola-sysv3
524 exit ;;
598 GUESS=m88k-motorola-sysv3
599 ;;
525600 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
526 echo m88k-tektronix-sysv3
527 exit ;;
601 GUESS=m88k-tektronix-sysv3
602 ;;
528603 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
529 echo m68k-tektronix-bsd
530 exit ;;
604 GUESS=m68k-tektronix-bsd
605 ;;
531606 *:IRIX*:*:*)
532 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
533 exit ;;
607 IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
608 GUESS=mips-sgi-irix$IRIX_REL
609 ;;
534610 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
535 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
536 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
611 GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
612 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
537613 i*86:AIX:*:*)
538 echo i386-ibm-aix
539 exit ;;
614 GUESS=i386-ibm-aix
615 ;;
540616 ia64:AIX:*:*)
541 if [ -x /usr/bin/oslevel ] ; then
617 if test -x /usr/bin/oslevel ; then
542618 IBM_REV=`/usr/bin/oslevel`
543619 else
544 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
545 fi
546 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
547 exit ;;
620 IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
621 fi
622 GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
623 ;;
548624 *:AIX:2:3)
549625 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
550 eval $set_cc_for_build
551 sed 's/^ //' << EOF >$dummy.c
626 set_cc_for_build
627 sed 's/^ //' << EOF > "$dummy.c"
552628 #include <sys/systemcfg.h>
553629
554630 main()
559635 exit(0);
560636 }
561637 EOF
562 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
638 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
563639 then
564 echo "$SYSTEM_NAME"
640 GUESS=$SYSTEM_NAME
565641 else
566 echo rs6000-ibm-aix3.2.5
642 GUESS=rs6000-ibm-aix3.2.5
567643 fi
568644 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
569 echo rs6000-ibm-aix3.2.4
645 GUESS=rs6000-ibm-aix3.2.4
570646 else
571 echo rs6000-ibm-aix3.2
572 fi
573 exit ;;
647 GUESS=rs6000-ibm-aix3.2
648 fi
649 ;;
574650 *:AIX:*:[4567])
575651 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
576 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
652 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
577653 IBM_ARCH=rs6000
578654 else
579655 IBM_ARCH=powerpc
580656 fi
581 if [ -x /usr/bin/lslpp ] ; then
582 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
657 if test -x /usr/bin/lslpp ; then
658 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
583659 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
584660 else
585 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
586 fi
587 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
588 exit ;;
661 IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
662 fi
663 GUESS=$IBM_ARCH-ibm-aix$IBM_REV
664 ;;
589665 *:AIX:*:*)
590 echo rs6000-ibm-aix
591 exit ;;
592 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
593 echo romp-ibm-bsd4.4
594 exit ;;
666 GUESS=rs6000-ibm-aix
667 ;;
668 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
669 GUESS=romp-ibm-bsd4.4
670 ;;
595671 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
596 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
597 exit ;; # report: romp-ibm BSD 4.3
672 GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
673 ;; # report: romp-ibm BSD 4.3
598674 *:BOSX:*:*)
599 echo rs6000-bull-bosx
600 exit ;;
675 GUESS=rs6000-bull-bosx
676 ;;
601677 DPX/2?00:B.O.S.:*:*)
602 echo m68k-bull-sysv3
603 exit ;;
678 GUESS=m68k-bull-sysv3
679 ;;
604680 9000/[34]??:4.3bsd:1.*:*)
605 echo m68k-hp-bsd
606 exit ;;
681 GUESS=m68k-hp-bsd
682 ;;
607683 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
608 echo m68k-hp-bsd4.4
609 exit ;;
684 GUESS=m68k-hp-bsd4.4
685 ;;
610686 9000/[34678]??:HP-UX:*:*)
611 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
612 case "${UNAME_MACHINE}" in
613 9000/31? ) HP_ARCH=m68000 ;;
614 9000/[34]?? ) HP_ARCH=m68k ;;
687 HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
688 case $UNAME_MACHINE in
689 9000/31?) HP_ARCH=m68000 ;;
690 9000/[34]??) HP_ARCH=m68k ;;
615691 9000/[678][0-9][0-9])
616 if [ -x /usr/bin/getconf ]; then
692 if test -x /usr/bin/getconf; then
617693 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
618694 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
619 case "${sc_cpu_version}" in
620 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
621 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
695 case $sc_cpu_version in
696 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
697 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
622698 532) # CPU_PA_RISC2_0
623 case "${sc_kernel_bits}" in
624 32) HP_ARCH="hppa2.0n" ;;
625 64) HP_ARCH="hppa2.0w" ;;
626 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
699 case $sc_kernel_bits in
700 32) HP_ARCH=hppa2.0n ;;
701 64) HP_ARCH=hppa2.0w ;;
702 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
627703 esac ;;
628704 esac
629705 fi
630 if [ "${HP_ARCH}" = "" ]; then
631 eval $set_cc_for_build
632 sed 's/^ //' << EOF >$dummy.c
706 if test "$HP_ARCH" = ""; then
707 set_cc_for_build
708 sed 's/^ //' << EOF > "$dummy.c"
633709
634710 #define _HPUX_SOURCE
635711 #include <stdlib.h>
662738 exit (0);
663739 }
664740 EOF
665 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
741 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
666742 test -z "$HP_ARCH" && HP_ARCH=hppa
667743 fi ;;
668744 esac
669 if [ ${HP_ARCH} = "hppa2.0w" ]
745 if test "$HP_ARCH" = hppa2.0w
670746 then
671 eval $set_cc_for_build
747 set_cc_for_build
672748
673749 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
674750 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
679755 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
680756 # => hppa64-hp-hpux11.23
681757
682 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
758 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
683759 grep -q __LP64__
684760 then
685 HP_ARCH="hppa2.0w"
761 HP_ARCH=hppa2.0w
686762 else
687 HP_ARCH="hppa64"
763 HP_ARCH=hppa64
688764 fi
689765 fi
690 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
691 exit ;;
766 GUESS=$HP_ARCH-hp-hpux$HPUX_REV
767 ;;
692768 ia64:HP-UX:*:*)
693 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
694 echo ia64-hp-hpux${HPUX_REV}
695 exit ;;
769 HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
770 GUESS=ia64-hp-hpux$HPUX_REV
771 ;;
696772 3050*:HI-UX:*:*)
697 eval $set_cc_for_build
698 sed 's/^ //' << EOF >$dummy.c
773 set_cc_for_build
774 sed 's/^ //' << EOF > "$dummy.c"
699775 #include <unistd.h>
700776 int
701777 main ()
720796 exit (0);
721797 }
722798 EOF
723 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
799 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
724800 { echo "$SYSTEM_NAME"; exit; }
725 echo unknown-hitachi-hiuxwe2
726 exit ;;
727 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
728 echo hppa1.1-hp-bsd
729 exit ;;
801 GUESS=unknown-hitachi-hiuxwe2
802 ;;
803 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
804 GUESS=hppa1.1-hp-bsd
805 ;;
730806 9000/8??:4.3bsd:*:*)
731 echo hppa1.0-hp-bsd
732 exit ;;
807 GUESS=hppa1.0-hp-bsd
808 ;;
733809 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
734 echo hppa1.0-hp-mpeix
735 exit ;;
736 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
737 echo hppa1.1-hp-osf
738 exit ;;
810 GUESS=hppa1.0-hp-mpeix
811 ;;
812 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
813 GUESS=hppa1.1-hp-osf
814 ;;
739815 hp8??:OSF1:*:*)
740 echo hppa1.0-hp-osf
741 exit ;;
816 GUESS=hppa1.0-hp-osf
817 ;;
742818 i*86:OSF1:*:*)
743 if [ -x /usr/sbin/sysversion ] ; then
744 echo ${UNAME_MACHINE}-unknown-osf1mk
819 if test -x /usr/sbin/sysversion ; then
820 GUESS=$UNAME_MACHINE-unknown-osf1mk
745821 else
746 echo ${UNAME_MACHINE}-unknown-osf1
747 fi
748 exit ;;
822 GUESS=$UNAME_MACHINE-unknown-osf1
823 fi
824 ;;
749825 parisc*:Lites*:*:*)
750 echo hppa1.1-hp-lites
751 exit ;;
826 GUESS=hppa1.1-hp-lites
827 ;;
752828 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
753 echo c1-convex-bsd
754 exit ;;
829 GUESS=c1-convex-bsd
830 ;;
755831 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
756832 if getsysinfo -f scalar_acc
757833 then echo c32-convex-bsd
759835 fi
760836 exit ;;
761837 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
762 echo c34-convex-bsd
763 exit ;;
838 GUESS=c34-convex-bsd
839 ;;
764840 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
765 echo c38-convex-bsd
766 exit ;;
841 GUESS=c38-convex-bsd
842 ;;
767843 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
768 echo c4-convex-bsd
769 exit ;;
844 GUESS=c4-convex-bsd
845 ;;
770846 CRAY*Y-MP:*:*:*)
771 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
772 exit ;;
847 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
848 GUESS=ymp-cray-unicos$CRAY_REL
849 ;;
773850 CRAY*[A-Z]90:*:*:*)
774 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
851 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
775852 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
776853 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
777854 -e 's/\.[^.]*$/.X/'
778855 exit ;;
779856 CRAY*TS:*:*:*)
780 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
781 exit ;;
857 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
858 GUESS=t90-cray-unicos$CRAY_REL
859 ;;
782860 CRAY*T3E:*:*:*)
783 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
784 exit ;;
861 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
862 GUESS=alphaev5-cray-unicosmk$CRAY_REL
863 ;;
785864 CRAY*SV1:*:*:*)
786 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
787 exit ;;
865 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
866 GUESS=sv1-cray-unicos$CRAY_REL
867 ;;
788868 *:UNICOS/mp:*:*)
789 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
790 exit ;;
869 CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
870 GUESS=craynv-cray-unicosmp$CRAY_REL
871 ;;
791872 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
792 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
793 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
794 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
795 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
796 exit ;;
873 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
874 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
875 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
876 GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
877 ;;
797878 5000:UNIX_System_V:4.*:*)
798 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
799 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
800 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
801 exit ;;
879 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
880 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
881 GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
882 ;;
802883 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
803 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
804 exit ;;
884 GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
885 ;;
805886 sparc*:BSD/OS:*:*)
806 echo sparc-unknown-bsdi${UNAME_RELEASE}
807 exit ;;
887 GUESS=sparc-unknown-bsdi$UNAME_RELEASE
888 ;;
808889 *:BSD/OS:*:*)
809 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
810 exit ;;
890 GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
891 ;;
892 arm:FreeBSD:*:*)
893 UNAME_PROCESSOR=`uname -p`
894 set_cc_for_build
895 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
896 | grep -q __ARM_PCS_VFP
897 then
898 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
899 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
900 else
901 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
902 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
903 fi
904 ;;
811905 *:FreeBSD:*:*)
812906 UNAME_PROCESSOR=`/usr/bin/uname -p`
813 case ${UNAME_PROCESSOR} in
907 case $UNAME_PROCESSOR in
814908 amd64)
815 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
816 *)
817 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
909 UNAME_PROCESSOR=x86_64 ;;
910 i386)
911 UNAME_PROCESSOR=i586 ;;
818912 esac
819 exit ;;
913 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
914 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
915 ;;
820916 i*:CYGWIN*:*)
821 echo ${UNAME_MACHINE}-pc-cygwin
822 exit ;;
917 GUESS=$UNAME_MACHINE-pc-cygwin
918 ;;
823919 *:MINGW64*:*)
824 echo ${UNAME_MACHINE}-pc-mingw64
825 exit ;;
920 GUESS=$UNAME_MACHINE-pc-mingw64
921 ;;
826922 *:MINGW*:*)
827 echo ${UNAME_MACHINE}-pc-mingw32
828 exit ;;
923 GUESS=$UNAME_MACHINE-pc-mingw32
924 ;;
829925 *:MSYS*:*)
830 echo ${UNAME_MACHINE}-pc-msys
831 exit ;;
832 i*:windows32*:*)
833 # uname -m includes "-pc" on this system.
834 echo ${UNAME_MACHINE}-mingw32
835 exit ;;
926 GUESS=$UNAME_MACHINE-pc-msys
927 ;;
836928 i*:PW*:*)
837 echo ${UNAME_MACHINE}-pc-pw32
838 exit ;;
929 GUESS=$UNAME_MACHINE-pc-pw32
930 ;;
931 *:SerenityOS:*:*)
932 GUESS=$UNAME_MACHINE-pc-serenity
933 ;;
839934 *:Interix*:*)
840 case ${UNAME_MACHINE} in
935 case $UNAME_MACHINE in
841936 x86)
842 echo i586-pc-interix${UNAME_RELEASE}
843 exit ;;
937 GUESS=i586-pc-interix$UNAME_RELEASE
938 ;;
844939 authenticamd | genuineintel | EM64T)
845 echo x86_64-unknown-interix${UNAME_RELEASE}
846 exit ;;
940 GUESS=x86_64-unknown-interix$UNAME_RELEASE
941 ;;
847942 IA64)
848 echo ia64-unknown-interix${UNAME_RELEASE}
849 exit ;;
943 GUESS=ia64-unknown-interix$UNAME_RELEASE
944 ;;
850945 esac ;;
851 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
852 echo i${UNAME_MACHINE}-pc-mks
853 exit ;;
854 8664:Windows_NT:*)
855 echo x86_64-pc-mks
856 exit ;;
857 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
858 # How do we know it's Interix rather than the generic POSIX subsystem?
859 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
860 # UNAME_MACHINE based on the output of uname instead of i386?
861 echo i586-pc-interix
862 exit ;;
863946 i*:UWIN*:*)
864 echo ${UNAME_MACHINE}-pc-uwin
865 exit ;;
947 GUESS=$UNAME_MACHINE-pc-uwin
948 ;;
866949 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
867 echo x86_64-unknown-cygwin
868 exit ;;
869 p*:CYGWIN*:*)
870 echo powerpcle-unknown-cygwin
871 exit ;;
950 GUESS=x86_64-pc-cygwin
951 ;;
872952 prep*:SunOS:5.*:*)
873 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
874 exit ;;
953 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
954 GUESS=powerpcle-unknown-solaris2$SUN_REL
955 ;;
875956 *:GNU:*:*)
876957 # the GNU system
877 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
878 exit ;;
958 GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
959 GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
960 GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
961 ;;
879962 *:GNU/*:*:*)
880963 # other systems with GNU libc and userland
881 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
882 exit ;;
883 i*86:Minix:*:*)
884 echo ${UNAME_MACHINE}-pc-minix
885 exit ;;
964 GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
965 GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
966 GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
967 ;;
968 *:Minix:*:*)
969 GUESS=$UNAME_MACHINE-unknown-minix
970 ;;
886971 aarch64:Linux:*:*)
887 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
888 exit ;;
972 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
973 ;;
889974 aarch64_be:Linux:*:*)
890975 UNAME_MACHINE=aarch64_be
891 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
892 exit ;;
976 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
977 ;;
893978 alpha:Linux:*:*)
894 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
979 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
895980 EV5) UNAME_MACHINE=alphaev5 ;;
896981 EV56) UNAME_MACHINE=alphaev56 ;;
897982 PCA56) UNAME_MACHINE=alphapca56 ;;
901986 EV68*) UNAME_MACHINE=alphaev68 ;;
902987 esac
903988 objdump --private-headers /bin/sh | grep -q ld.so.1
904 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
905 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
906 exit ;;
907 arc:Linux:*:* | arceb:Linux:*:*)
908 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
909 exit ;;
989 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
990 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
991 ;;
992 arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
993 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
994 ;;
910995 arm*:Linux:*:*)
911 eval $set_cc_for_build
996 set_cc_for_build
912997 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
913998 | grep -q __ARM_EABI__
914999 then
915 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1000 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
9161001 else
9171002 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
9181003 | grep -q __ARM_PCS_VFP
9191004 then
920 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
1005 GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
9211006 else
922 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
1007 GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
9231008 fi
9241009 fi
925 exit ;;
1010 ;;
9261011 avr32*:Linux:*:*)
927 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
928 exit ;;
1012 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1013 ;;
9291014 cris:Linux:*:*)
930 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
931 exit ;;
1015 GUESS=$UNAME_MACHINE-axis-linux-$LIBC
1016 ;;
9321017 crisv32:Linux:*:*)
933 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
934 exit ;;
1018 GUESS=$UNAME_MACHINE-axis-linux-$LIBC
1019 ;;
1020 e2k:Linux:*:*)
1021 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1022 ;;
9351023 frv:Linux:*:*)
936 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
937 exit ;;
1024 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1025 ;;
9381026 hexagon:Linux:*:*)
939 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
940 exit ;;
1027 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1028 ;;
9411029 i*86:Linux:*:*)
942 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
943 exit ;;
1030 GUESS=$UNAME_MACHINE-pc-linux-$LIBC
1031 ;;
9441032 ia64:Linux:*:*)
945 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
946 exit ;;
1033 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1034 ;;
1035 k1om:Linux:*:*)
1036 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1037 ;;
1038 loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
1039 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1040 ;;
9471041 m32r*:Linux:*:*)
948 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
949 exit ;;
1042 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1043 ;;
9501044 m68*:Linux:*:*)
951 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
952 exit ;;
1045 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1046 ;;
9531047 mips:Linux:*:* | mips64:Linux:*:*)
954 eval $set_cc_for_build
955 sed 's/^ //' << EOF >$dummy.c
1048 set_cc_for_build
1049 IS_GLIBC=0
1050 test x"${LIBC}" = xgnu && IS_GLIBC=1
1051 sed 's/^ //' << EOF > "$dummy.c"
9561052 #undef CPU
957 #undef ${UNAME_MACHINE}
958 #undef ${UNAME_MACHINE}el
1053 #undef mips
1054 #undef mipsel
1055 #undef mips64
1056 #undef mips64el
1057 #if ${IS_GLIBC} && defined(_ABI64)
1058 LIBCABI=gnuabi64
1059 #else
1060 #if ${IS_GLIBC} && defined(_ABIN32)
1061 LIBCABI=gnuabin32
1062 #else
1063 LIBCABI=${LIBC}
1064 #endif
1065 #endif
1066
1067 #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1068 CPU=mipsisa64r6
1069 #else
1070 #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1071 CPU=mipsisa32r6
1072 #else
1073 #if defined(__mips64)
1074 CPU=mips64
1075 #else
1076 CPU=mips
1077 #endif
1078 #endif
1079 #endif
1080
9591081 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
960 CPU=${UNAME_MACHINE}el
1082 MIPS_ENDIAN=el
9611083 #else
9621084 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
963 CPU=${UNAME_MACHINE}
1085 MIPS_ENDIAN=
9641086 #else
965 CPU=
1087 MIPS_ENDIAN=
9661088 #endif
9671089 #endif
9681090 EOF
969 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
970 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
1091 cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
1092 eval "$cc_set_vars"
1093 test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
1094 ;;
1095 mips64el:Linux:*:*)
1096 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
9711097 ;;
9721098 openrisc*:Linux:*:*)
973 echo or1k-unknown-linux-${LIBC}
974 exit ;;
1099 GUESS=or1k-unknown-linux-$LIBC
1100 ;;
9751101 or32:Linux:*:* | or1k*:Linux:*:*)
976 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
977 exit ;;
1102 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1103 ;;
9781104 padre:Linux:*:*)
979 echo sparc-unknown-linux-${LIBC}
980 exit ;;
1105 GUESS=sparc-unknown-linux-$LIBC
1106 ;;
9811107 parisc64:Linux:*:* | hppa64:Linux:*:*)
982 echo hppa64-unknown-linux-${LIBC}
983 exit ;;
1108 GUESS=hppa64-unknown-linux-$LIBC
1109 ;;
9841110 parisc:Linux:*:* | hppa:Linux:*:*)
9851111 # Look for CPU level
9861112 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
987 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
988 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
989 *) echo hppa-unknown-linux-${LIBC} ;;
1113 PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
1114 PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
1115 *) GUESS=hppa-unknown-linux-$LIBC ;;
9901116 esac
991 exit ;;
1117 ;;
9921118 ppc64:Linux:*:*)
993 echo powerpc64-unknown-linux-${LIBC}
994 exit ;;
1119 GUESS=powerpc64-unknown-linux-$LIBC
1120 ;;
9951121 ppc:Linux:*:*)
996 echo powerpc-unknown-linux-${LIBC}
997 exit ;;
1122 GUESS=powerpc-unknown-linux-$LIBC
1123 ;;
9981124 ppc64le:Linux:*:*)
999 echo powerpc64le-unknown-linux-${LIBC}
1000 exit ;;
1125 GUESS=powerpc64le-unknown-linux-$LIBC
1126 ;;
10011127 ppcle:Linux:*:*)
1002 echo powerpcle-unknown-linux-${LIBC}
1003 exit ;;
1128 GUESS=powerpcle-unknown-linux-$LIBC
1129 ;;
1130 riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
1131 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1132 ;;
10041133 s390:Linux:*:* | s390x:Linux:*:*)
1005 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1006 exit ;;
1134 GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
1135 ;;
10071136 sh64*:Linux:*:*)
1008 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1009 exit ;;
1137 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1138 ;;
10101139 sh*:Linux:*:*)
1011 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1012 exit ;;
1140 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1141 ;;
10131142 sparc:Linux:*:* | sparc64:Linux:*:*)
1014 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1015 exit ;;
1143 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1144 ;;
10161145 tile*:Linux:*:*)
1017 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1018 exit ;;
1146 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1147 ;;
10191148 vax:Linux:*:*)
1020 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1021 exit ;;
1149 GUESS=$UNAME_MACHINE-dec-linux-$LIBC
1150 ;;
10221151 x86_64:Linux:*:*)
1023 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1024 exit ;;
1152 set_cc_for_build
1153 LIBCABI=$LIBC
1154 if test "$CC_FOR_BUILD" != no_compiler_found; then
1155 if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
1156 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1157 grep IS_X32 >/dev/null
1158 then
1159 LIBCABI=${LIBC}x32
1160 fi
1161 fi
1162 GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
1163 ;;
10251164 xtensa*:Linux:*:*)
1026 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1027 exit ;;
1165 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1166 ;;
10281167 i*86:DYNIX/ptx:4*:*)
10291168 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
10301169 # earlier versions are messed up and put the nodename in both
10311170 # sysname and nodename.
1032 echo i386-sequent-sysv4
1033 exit ;;
1171 GUESS=i386-sequent-sysv4
1172 ;;
10341173 i*86:UNIX_SV:4.2MP:2.*)
10351174 # Unixware is an offshoot of SVR4, but it has its own version
10361175 # number series starting with 2...
10371176 # I am not positive that other SVR4 systems won't match this,
10381177 # I just have to hope. -- rms.
10391178 # Use sysv4.2uw... so that sysv4* matches it.
1040 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1041 exit ;;
1179 GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
1180 ;;
10421181 i*86:OS/2:*:*)
10431182 # If we were able to find `uname', then EMX Unix compatibility
10441183 # is probably installed.
1045 echo ${UNAME_MACHINE}-pc-os2-emx
1046 exit ;;
1184 GUESS=$UNAME_MACHINE-pc-os2-emx
1185 ;;
10471186 i*86:XTS-300:*:STOP)
1048 echo ${UNAME_MACHINE}-unknown-stop
1049 exit ;;
1187 GUESS=$UNAME_MACHINE-unknown-stop
1188 ;;
10501189 i*86:atheos:*:*)
1051 echo ${UNAME_MACHINE}-unknown-atheos
1052 exit ;;
1190 GUESS=$UNAME_MACHINE-unknown-atheos
1191 ;;
10531192 i*86:syllable:*:*)
1054 echo ${UNAME_MACHINE}-pc-syllable
1055 exit ;;
1193 GUESS=$UNAME_MACHINE-pc-syllable
1194 ;;
10561195 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1057 echo i386-unknown-lynxos${UNAME_RELEASE}
1058 exit ;;
1196 GUESS=i386-unknown-lynxos$UNAME_RELEASE
1197 ;;
10591198 i*86:*DOS:*:*)
1060 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1061 exit ;;
1062 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1063 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1199 GUESS=$UNAME_MACHINE-pc-msdosdjgpp
1200 ;;
1201 i*86:*:4.*:*)
1202 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
10641203 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1065 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1204 GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
10661205 else
1067 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1068 fi
1069 exit ;;
1206 GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
1207 fi
1208 ;;
10701209 i*86:*:5:[678]*)
10711210 # UnixWare 7.x, OpenUNIX and OpenServer 6.
10721211 case `/bin/uname -X | grep "^Machine"` in
10741213 *Pentium) UNAME_MACHINE=i586 ;;
10751214 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
10761215 esac
1077 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1078 exit ;;
1216 GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1217 ;;
10791218 i*86:*:3.2:*)
10801219 if test -f /usr/options/cb.name; then
10811220 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1082 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1221 GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
10831222 elif /bin/uname -X 2>/dev/null >/dev/null ; then
10841223 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
10851224 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
10891228 && UNAME_MACHINE=i686
10901229 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
10911230 && UNAME_MACHINE=i686
1092 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1231 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
10931232 else
1094 echo ${UNAME_MACHINE}-pc-sysv32
1095 fi
1096 exit ;;
1233 GUESS=$UNAME_MACHINE-pc-sysv32
1234 fi
1235 ;;
10971236 pc:*:*:*)
10981237 # Left here for compatibility:
10991238 # uname -m prints for DJGPP always 'pc', but it prints nothing about
11001239 # the processor, so we play safe by assuming i586.
11011240 # Note: whatever this is, it MUST be the same as what config.sub
1102 # prints for the "djgpp" host, or else GDB configury will decide that
1241 # prints for the "djgpp" host, or else GDB configure will decide that
11031242 # this is a cross-build.
1104 echo i586-pc-msdosdjgpp
1105 exit ;;
1243 GUESS=i586-pc-msdosdjgpp
1244 ;;
11061245 Intel:Mach:3*:*)
1107 echo i386-pc-mach3
1108 exit ;;
1246 GUESS=i386-pc-mach3
1247 ;;
11091248 paragon:*:*:*)
1110 echo i860-intel-osf1
1111 exit ;;
1249 GUESS=i860-intel-osf1
1250 ;;
11121251 i860:*:4.*:*) # i860-SVR4
11131252 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1114 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1253 GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
11151254 else # Add other i860-SVR4 vendors below as they are discovered.
1116 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1117 fi
1118 exit ;;
1255 GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
1256 fi
1257 ;;
11191258 mini*:CTIX:SYS*5:*)
11201259 # "miniframe"
1121 echo m68010-convergent-sysv
1122 exit ;;
1260 GUESS=m68010-convergent-sysv
1261 ;;
11231262 mc68k:UNIX:SYSTEM5:3.51m)
1124 echo m68k-convergent-sysv
1125 exit ;;
1263 GUESS=m68k-convergent-sysv
1264 ;;
11261265 M680?0:D-NIX:5.3:*)
1127 echo m68k-diab-dnix
1128 exit ;;
1266 GUESS=m68k-diab-dnix
1267 ;;
11291268 M68*:*:R3V[5678]*:*)
11301269 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
11311270 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)
11331272 test -r /etc/.relid \
11341273 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11351274 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1136 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1275 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11371276 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1138 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1277 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11391278 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
11401279 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11411280 && { echo i486-ncr-sysv4; exit; } ;;
11441283 test -r /etc/.relid \
11451284 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11461285 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1147 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1286 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11481287 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1149 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1288 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
11501289 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1151 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1290 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11521291 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1153 echo m68k-unknown-lynxos${UNAME_RELEASE}
1154 exit ;;
1292 GUESS=m68k-unknown-lynxos$UNAME_RELEASE
1293 ;;
11551294 mc68030:UNIX_System_V:4.*:*)
1156 echo m68k-atari-sysv4
1157 exit ;;
1295 GUESS=m68k-atari-sysv4
1296 ;;
11581297 TSUNAMI:LynxOS:2.*:*)
1159 echo sparc-unknown-lynxos${UNAME_RELEASE}
1160 exit ;;
1298 GUESS=sparc-unknown-lynxos$UNAME_RELEASE
1299 ;;
11611300 rs6000:LynxOS:2.*:*)
1162 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1163 exit ;;
1301 GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
1302 ;;
11641303 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1165 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1166 exit ;;
1304 GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
1305 ;;
11671306 SM[BE]S:UNIX_SV:*:*)
1168 echo mips-dde-sysv${UNAME_RELEASE}
1169 exit ;;
1307 GUESS=mips-dde-sysv$UNAME_RELEASE
1308 ;;
11701309 RM*:ReliantUNIX-*:*:*)
1171 echo mips-sni-sysv4
1172 exit ;;
1310 GUESS=mips-sni-sysv4
1311 ;;
11731312 RM*:SINIX-*:*:*)
1174 echo mips-sni-sysv4
1175 exit ;;
1313 GUESS=mips-sni-sysv4
1314 ;;
11761315 *:SINIX-*:*:*)
11771316 if uname -p 2>/dev/null >/dev/null ; then
11781317 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1179 echo ${UNAME_MACHINE}-sni-sysv4
1318 GUESS=$UNAME_MACHINE-sni-sysv4
11801319 else
1181 echo ns32k-sni-sysv
1182 fi
1183 exit ;;
1320 GUESS=ns32k-sni-sysv
1321 fi
1322 ;;
11841323 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
11851324 # says <Richard.M.Bartel@ccMail.Census.GOV>
1186 echo i586-unisys-sysv4
1187 exit ;;
1325 GUESS=i586-unisys-sysv4
1326 ;;
11881327 *:UNIX_System_V:4*:FTX*)
11891328 # From Gerald Hewes <hewes@openmarket.com>.
11901329 # How about differentiating between stratus architectures? -djm
1191 echo hppa1.1-stratus-sysv4
1192 exit ;;
1330 GUESS=hppa1.1-stratus-sysv4
1331 ;;
11931332 *:*:*:FTX*)
11941333 # From seanf@swdc.stratus.com.
1195 echo i860-stratus-sysv4
1196 exit ;;
1334 GUESS=i860-stratus-sysv4
1335 ;;
11971336 i*86:VOS:*:*)
11981337 # From Paul.Green@stratus.com.
1199 echo ${UNAME_MACHINE}-stratus-vos
1200 exit ;;
1338 GUESS=$UNAME_MACHINE-stratus-vos
1339 ;;
12011340 *:VOS:*:*)
12021341 # From Paul.Green@stratus.com.
1203 echo hppa1.1-stratus-vos
1204 exit ;;
1342 GUESS=hppa1.1-stratus-vos
1343 ;;
12051344 mc68*:A/UX:*:*)
1206 echo m68k-apple-aux${UNAME_RELEASE}
1207 exit ;;
1345 GUESS=m68k-apple-aux$UNAME_RELEASE
1346 ;;
12081347 news*:NEWS-OS:6*:*)
1209 echo mips-sony-newsos6
1210 exit ;;
1348 GUESS=mips-sony-newsos6
1349 ;;
12111350 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1212 if [ -d /usr/nec ]; then
1213 echo mips-nec-sysv${UNAME_RELEASE}
1351 if test -d /usr/nec; then
1352 GUESS=mips-nec-sysv$UNAME_RELEASE
12141353 else
1215 echo mips-unknown-sysv${UNAME_RELEASE}
1216 fi
1217 exit ;;
1354 GUESS=mips-unknown-sysv$UNAME_RELEASE
1355 fi
1356 ;;
12181357 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1219 echo powerpc-be-beos
1220 exit ;;
1358 GUESS=powerpc-be-beos
1359 ;;
12211360 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1222 echo powerpc-apple-beos
1223 exit ;;
1361 GUESS=powerpc-apple-beos
1362 ;;
12241363 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1225 echo i586-pc-beos
1226 exit ;;
1364 GUESS=i586-pc-beos
1365 ;;
12271366 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1228 echo i586-pc-haiku
1229 exit ;;
1367 GUESS=i586-pc-haiku
1368 ;;
12301369 x86_64:Haiku:*:*)
1231 echo x86_64-unknown-haiku
1232 exit ;;
1370 GUESS=x86_64-unknown-haiku
1371 ;;
12331372 SX-4:SUPER-UX:*:*)
1234 echo sx4-nec-superux${UNAME_RELEASE}
1235 exit ;;
1373 GUESS=sx4-nec-superux$UNAME_RELEASE
1374 ;;
12361375 SX-5:SUPER-UX:*:*)
1237 echo sx5-nec-superux${UNAME_RELEASE}
1238 exit ;;
1376 GUESS=sx5-nec-superux$UNAME_RELEASE
1377 ;;
12391378 SX-6:SUPER-UX:*:*)
1240 echo sx6-nec-superux${UNAME_RELEASE}
1241 exit ;;
1379 GUESS=sx6-nec-superux$UNAME_RELEASE
1380 ;;
12421381 SX-7:SUPER-UX:*:*)
1243 echo sx7-nec-superux${UNAME_RELEASE}
1244 exit ;;
1382 GUESS=sx7-nec-superux$UNAME_RELEASE
1383 ;;
12451384 SX-8:SUPER-UX:*:*)
1246 echo sx8-nec-superux${UNAME_RELEASE}
1247 exit ;;
1385 GUESS=sx8-nec-superux$UNAME_RELEASE
1386 ;;
12481387 SX-8R:SUPER-UX:*:*)
1249 echo sx8r-nec-superux${UNAME_RELEASE}
1250 exit ;;
1388 GUESS=sx8r-nec-superux$UNAME_RELEASE
1389 ;;
1390 SX-ACE:SUPER-UX:*:*)
1391 GUESS=sxace-nec-superux$UNAME_RELEASE
1392 ;;
12511393 Power*:Rhapsody:*:*)
1252 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1253 exit ;;
1394 GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
1395 ;;
12541396 *:Rhapsody:*:*)
1255 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1256 exit ;;
1397 GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
1398 ;;
1399 arm64:Darwin:*:*)
1400 GUESS=aarch64-apple-darwin$UNAME_RELEASE
1401 ;;
12571402 *:Darwin:*:*)
1258 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1259 eval $set_cc_for_build
1260 if test "$UNAME_PROCESSOR" = unknown ; then
1261 UNAME_PROCESSOR=powerpc
1262 fi
1263 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1264 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1265 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1266 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1267 grep IS_64BIT_ARCH >/dev/null
1268 then
1269 case $UNAME_PROCESSOR in
1270 i386) UNAME_PROCESSOR=x86_64 ;;
1271 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1272 esac
1273 fi
1403 UNAME_PROCESSOR=`uname -p`
1404 case $UNAME_PROCESSOR in
1405 unknown) UNAME_PROCESSOR=powerpc ;;
1406 esac
1407 if command -v xcode-select > /dev/null 2> /dev/null && \
1408 ! xcode-select --print-path > /dev/null 2> /dev/null ; then
1409 # Avoid executing cc if there is no toolchain installed as
1410 # cc will be a stub that puts up a graphical alert
1411 # prompting the user to install developer tools.
1412 CC_FOR_BUILD=no_compiler_found
1413 else
1414 set_cc_for_build
1415 fi
1416 if test "$CC_FOR_BUILD" != no_compiler_found; then
1417 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1418 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1419 grep IS_64BIT_ARCH >/dev/null
1420 then
1421 case $UNAME_PROCESSOR in
1422 i386) UNAME_PROCESSOR=x86_64 ;;
1423 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1424 esac
1425 fi
1426 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1427 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1428 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1429 grep IS_PPC >/dev/null
1430 then
1431 UNAME_PROCESSOR=powerpc
12741432 fi
12751433 elif test "$UNAME_PROCESSOR" = i386 ; then
1276 # Avoid executing cc on OS X 10.9, as it ships with a stub
1277 # that puts up a graphical alert prompting to install
1278 # developer tools. Any system running Mac OS X 10.7 or
1279 # later (Darwin 11 and later) is required to have a 64-bit
1280 # processor. This is not true of the ARM version of Darwin
1281 # that Apple uses in portable devices.
1282 UNAME_PROCESSOR=x86_64
1283 fi
1284 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1285 exit ;;
1434 # uname -m returns i386 or x86_64
1435 UNAME_PROCESSOR=$UNAME_MACHINE
1436 fi
1437 GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
1438 ;;
12861439 *:procnto*:*:* | *:QNX:[0123456789]*:*)
12871440 UNAME_PROCESSOR=`uname -p`
1288 if test "$UNAME_PROCESSOR" = "x86"; then
1441 if test "$UNAME_PROCESSOR" = x86; then
12891442 UNAME_PROCESSOR=i386
12901443 UNAME_MACHINE=pc
12911444 fi
1292 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1293 exit ;;
1445 GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
1446 ;;
12941447 *:QNX:*:4*)
1295 echo i386-pc-qnx
1296 exit ;;
1297 NEO-?:NONSTOP_KERNEL:*:*)
1298 echo neo-tandem-nsk${UNAME_RELEASE}
1299 exit ;;
1448 GUESS=i386-pc-qnx
1449 ;;
1450 NEO-*:NONSTOP_KERNEL:*:*)
1451 GUESS=neo-tandem-nsk$UNAME_RELEASE
1452 ;;
13001453 NSE-*:NONSTOP_KERNEL:*:*)
1301 echo nse-tandem-nsk${UNAME_RELEASE}
1302 exit ;;
1303 NSR-?:NONSTOP_KERNEL:*:*)
1304 echo nsr-tandem-nsk${UNAME_RELEASE}
1305 exit ;;
1454 GUESS=nse-tandem-nsk$UNAME_RELEASE
1455 ;;
1456 NSR-*:NONSTOP_KERNEL:*:*)
1457 GUESS=nsr-tandem-nsk$UNAME_RELEASE
1458 ;;
1459 NSV-*:NONSTOP_KERNEL:*:*)
1460 GUESS=nsv-tandem-nsk$UNAME_RELEASE
1461 ;;
1462 NSX-*:NONSTOP_KERNEL:*:*)
1463 GUESS=nsx-tandem-nsk$UNAME_RELEASE
1464 ;;
13061465 *:NonStop-UX:*:*)
1307 echo mips-compaq-nonstopux
1308 exit ;;
1466 GUESS=mips-compaq-nonstopux
1467 ;;
13091468 BS2000:POSIX*:*:*)
1310 echo bs2000-siemens-sysv
1311 exit ;;
1469 GUESS=bs2000-siemens-sysv
1470 ;;
13121471 DS/*:UNIX_System_V:*:*)
1313 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1314 exit ;;
1472 GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
1473 ;;
13151474 *:Plan9:*:*)
13161475 # "uname -m" is not consistent, so use $cputype instead. 386
13171476 # is converted to i386 for consistency with other x86
13181477 # operating systems.
1319 if test "$cputype" = "386"; then
1478 if test "${cputype-}" = 386; then
13201479 UNAME_MACHINE=i386
1321 else
1322 UNAME_MACHINE="$cputype"
1323 fi
1324 echo ${UNAME_MACHINE}-unknown-plan9
1325 exit ;;
1480 elif test "x${cputype-}" != x; then
1481 UNAME_MACHINE=$cputype
1482 fi
1483 GUESS=$UNAME_MACHINE-unknown-plan9
1484 ;;
13261485 *:TOPS-10:*:*)
1327 echo pdp10-unknown-tops10
1328 exit ;;
1486 GUESS=pdp10-unknown-tops10
1487 ;;
13291488 *:TENEX:*:*)
1330 echo pdp10-unknown-tenex
1331 exit ;;
1489 GUESS=pdp10-unknown-tenex
1490 ;;
13321491 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1333 echo pdp10-dec-tops20
1334 exit ;;
1492 GUESS=pdp10-dec-tops20
1493 ;;
13351494 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1336 echo pdp10-xkl-tops20
1337 exit ;;
1495 GUESS=pdp10-xkl-tops20
1496 ;;
13381497 *:TOPS-20:*:*)
1339 echo pdp10-unknown-tops20
1340 exit ;;
1498 GUESS=pdp10-unknown-tops20
1499 ;;
13411500 *:ITS:*:*)
1342 echo pdp10-unknown-its
1343 exit ;;
1501 GUESS=pdp10-unknown-its
1502 ;;
13441503 SEI:*:*:SEIUX)
1345 echo mips-sei-seiux${UNAME_RELEASE}
1346 exit ;;
1504 GUESS=mips-sei-seiux$UNAME_RELEASE
1505 ;;
13471506 *:DragonFly:*:*)
1348 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1349 exit ;;
1507 DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
1508 GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
1509 ;;
13501510 *:*VMS:*:*)
13511511 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1352 case "${UNAME_MACHINE}" in
1353 A*) echo alpha-dec-vms ; exit ;;
1354 I*) echo ia64-dec-vms ; exit ;;
1355 V*) echo vax-dec-vms ; exit ;;
1512 case $UNAME_MACHINE in
1513 A*) GUESS=alpha-dec-vms ;;
1514 I*) GUESS=ia64-dec-vms ;;
1515 V*) GUESS=vax-dec-vms ;;
13561516 esac ;;
13571517 *:XENIX:*:SysV)
1358 echo i386-pc-xenix
1359 exit ;;
1518 GUESS=i386-pc-xenix
1519 ;;
13601520 i*86:skyos:*:*)
1361 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1362 exit ;;
1521 SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
1522 GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
1523 ;;
13631524 i*86:rdos:*:*)
1364 echo ${UNAME_MACHINE}-pc-rdos
1365 exit ;;
1366 i*86:AROS:*:*)
1367 echo ${UNAME_MACHINE}-pc-aros
1368 exit ;;
1525 GUESS=$UNAME_MACHINE-pc-rdos
1526 ;;
1527 i*86:Fiwix:*:*)
1528 GUESS=$UNAME_MACHINE-pc-fiwix
1529 ;;
1530 *:AROS:*:*)
1531 GUESS=$UNAME_MACHINE-unknown-aros
1532 ;;
13691533 x86_64:VMkernel:*:*)
1370 echo ${UNAME_MACHINE}-unknown-esx
1371 exit ;;
1534 GUESS=$UNAME_MACHINE-unknown-esx
1535 ;;
1536 amd64:Isilon\ OneFS:*:*)
1537 GUESS=x86_64-unknown-onefs
1538 ;;
1539 *:Unleashed:*:*)
1540 GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
1541 ;;
13721542 esac
13731543
1544 # Do we have a guess based on uname results?
1545 if test "x$GUESS" != x; then
1546 echo "$GUESS"
1547 exit
1548 fi
1549
1550 # No uname command or uname output not recognized.
1551 set_cc_for_build
1552 cat > "$dummy.c" <<EOF
1553 #ifdef _SEQUENT_
1554 #include <sys/types.h>
1555 #include <sys/utsname.h>
1556 #endif
1557 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1558 #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1559 #include <signal.h>
1560 #if defined(_SIZE_T_) || defined(SIGLOST)
1561 #include <sys/utsname.h>
1562 #endif
1563 #endif
1564 #endif
1565 main ()
1566 {
1567 #if defined (sony)
1568 #if defined (MIPSEB)
1569 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1570 I don't know.... */
1571 printf ("mips-sony-bsd\n"); exit (0);
1572 #else
1573 #include <sys/param.h>
1574 printf ("m68k-sony-newsos%s\n",
1575 #ifdef NEWSOS4
1576 "4"
1577 #else
1578 ""
1579 #endif
1580 ); exit (0);
1581 #endif
1582 #endif
1583
1584 #if defined (NeXT)
1585 #if !defined (__ARCHITECTURE__)
1586 #define __ARCHITECTURE__ "m68k"
1587 #endif
1588 int version;
1589 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1590 if (version < 4)
1591 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1592 else
1593 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1594 exit (0);
1595 #endif
1596
1597 #if defined (MULTIMAX) || defined (n16)
1598 #if defined (UMAXV)
1599 printf ("ns32k-encore-sysv\n"); exit (0);
1600 #else
1601 #if defined (CMU)
1602 printf ("ns32k-encore-mach\n"); exit (0);
1603 #else
1604 printf ("ns32k-encore-bsd\n"); exit (0);
1605 #endif
1606 #endif
1607 #endif
1608
1609 #if defined (__386BSD__)
1610 printf ("i386-pc-bsd\n"); exit (0);
1611 #endif
1612
1613 #if defined (sequent)
1614 #if defined (i386)
1615 printf ("i386-sequent-dynix\n"); exit (0);
1616 #endif
1617 #if defined (ns32000)
1618 printf ("ns32k-sequent-dynix\n"); exit (0);
1619 #endif
1620 #endif
1621
1622 #if defined (_SEQUENT_)
1623 struct utsname un;
1624
1625 uname(&un);
1626 if (strncmp(un.version, "V2", 2) == 0) {
1627 printf ("i386-sequent-ptx2\n"); exit (0);
1628 }
1629 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1630 printf ("i386-sequent-ptx1\n"); exit (0);
1631 }
1632 printf ("i386-sequent-ptx\n"); exit (0);
1633 #endif
1634
1635 #if defined (vax)
1636 #if !defined (ultrix)
1637 #include <sys/param.h>
1638 #if defined (BSD)
1639 #if BSD == 43
1640 printf ("vax-dec-bsd4.3\n"); exit (0);
1641 #else
1642 #if BSD == 199006
1643 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1644 #else
1645 printf ("vax-dec-bsd\n"); exit (0);
1646 #endif
1647 #endif
1648 #else
1649 printf ("vax-dec-bsd\n"); exit (0);
1650 #endif
1651 #else
1652 #if defined(_SIZE_T_) || defined(SIGLOST)
1653 struct utsname un;
1654 uname (&un);
1655 printf ("vax-dec-ultrix%s\n", un.release); exit (0);
1656 #else
1657 printf ("vax-dec-ultrix\n"); exit (0);
1658 #endif
1659 #endif
1660 #endif
1661 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1662 #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1663 #if defined(_SIZE_T_) || defined(SIGLOST)
1664 struct utsname *un;
1665 uname (&un);
1666 printf ("mips-dec-ultrix%s\n", un.release); exit (0);
1667 #else
1668 printf ("mips-dec-ultrix\n"); exit (0);
1669 #endif
1670 #endif
1671 #endif
1672
1673 #if defined (alliant) && defined (i860)
1674 printf ("i860-alliant-bsd\n"); exit (0);
1675 #endif
1676
1677 exit (1);
1678 }
1679 EOF
1680
1681 $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
1682 { echo "$SYSTEM_NAME"; exit; }
1683
1684 # Apollos put the system type in the environment.
1685 test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
1686
1687 echo "$0: unable to guess system type" >&2
1688
1689 case $UNAME_MACHINE:$UNAME_SYSTEM in
1690 mips:Linux | mips64:Linux)
1691 # If we got here on MIPS GNU/Linux, output extra information.
1692 cat >&2 <<EOF
1693
1694 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1695 the system type. Please install a C compiler and try again.
1696 EOF
1697 ;;
1698 esac
1699
13741700 cat >&2 <<EOF
1375 $0: unable to guess system type
1376
1377 This script, last modified $timestamp, has failed to recognize
1378 the operating system you are using. It is advised that you
1379 download the most up to date version of the config scripts from
1380
1381 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1701
1702 This script (version $timestamp), has failed to recognize the
1703 operating system you are using. If your script is old, overwrite *all*
1704 copies of config.guess and config.sub with the latest versions from:
1705
1706 https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
13821707 and
1383 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1384
1385 If the version you run ($0) is already up to date, please
1386 send the following data and any information you think might be
1387 pertinent to <config-patches@gnu.org> in order to provide the needed
1388 information to handle your system.
1708 https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
1709 EOF
1710
1711 our_year=`echo $timestamp | sed 's,-.*,,'`
1712 thisyear=`date +%Y`
1713 # shellcheck disable=SC2003
1714 script_age=`expr "$thisyear" - "$our_year"`
1715 if test "$script_age" -lt 3 ; then
1716 cat >&2 <<EOF
1717
1718 If $0 has already been updated, send the following data and any
1719 information you think might be pertinent to config-patches@gnu.org to
1720 provide the necessary information to handle your system.
13891721
13901722 config.guess timestamp = $timestamp
13911723
14041736 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
14051737 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
14061738
1407 UNAME_MACHINE = ${UNAME_MACHINE}
1408 UNAME_RELEASE = ${UNAME_RELEASE}
1409 UNAME_SYSTEM = ${UNAME_SYSTEM}
1410 UNAME_VERSION = ${UNAME_VERSION}
1739 UNAME_MACHINE = "$UNAME_MACHINE"
1740 UNAME_RELEASE = "$UNAME_RELEASE"
1741 UNAME_SYSTEM = "$UNAME_SYSTEM"
1742 UNAME_VERSION = "$UNAME_VERSION"
14111743 EOF
1744 fi
14121745
14131746 exit 1
14141747
14151748 # Local variables:
1416 # eval: (add-hook 'write-file-hooks 'time-stamp)
1749 # eval: (add-hook 'before-save-hook 'time-stamp)
14171750 # time-stamp-start: "timestamp='"
14181751 # time-stamp-format: "%:y-%02m-%02d"
14191752 # time-stamp-end: "'"
+1591
-1508
config.sub less more
00 #! /bin/sh
11 # Configuration validation subroutine script.
2 # Copyright 1992-2015 Free Software Foundation, Inc.
3
4 timestamp='2015-01-01'
2 # Copyright 1992-2021 Free Software Foundation, Inc.
3
4 # shellcheck disable=SC2006,SC2268 # see below for rationale
5
6 timestamp='2021-12-25'
57
68 # This file is free software; you can redistribute it and/or modify it
79 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
10 # the Free Software Foundation, either version 3 of the License, or
911 # (at your option) any later version.
1012 #
1113 # This program is distributed in the hope that it will be useful, but
1416 # General Public License for more details.
1517 #
1618 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
19 # along with this program; if not, see <https://www.gnu.org/licenses/>.
1820 #
1921 # As a special exception to the GNU General Public License, if you
2022 # distribute this file as part of a program that contains a
3234 # Otherwise, we print the canonical config type on stdout and succeed.
3335
3436 # You can get the latest version of this script from:
35 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
37 # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
3638
3739 # This file is supposed to be the same for all GNU packages
3840 # and recognize all the CPU types, system types and aliases
4951 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
5052 # It is wrong to echo any other type of specification.
5153
54 # The "shellcheck disable" line above the timestamp inhibits complaints
55 # about features and limitations of the classic Bourne shell that were
56 # superseded or lifted in POSIX. However, this script identifies a wide
57 # variety of pre-POSIX systems that do not have POSIX shells at all, and
58 # even some reasonably current systems (Solaris 10 as case-in-point) still
59 # have a pre-POSIX /bin/sh.
60
5261 me=`echo "$0" | sed -e 's,.*/,,'`
5362
5463 usage="\
55 Usage: $0 [OPTION] CPU-MFR-OPSYS
56 $0 [OPTION] ALIAS
64 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
5765
5866 Canonicalize a configuration name.
5967
60 Operation modes:
68 Options:
6169 -h, --help print this help, then exit
6270 -t, --time-stamp print date of last modification, then exit
6371 -v, --version print version number, then exit
6775 version="\
6876 GNU config.sub ($timestamp)
6977
70 Copyright 1992-2015 Free Software Foundation, Inc.
78 Copyright 1992-2021 Free Software Foundation, Inc.
7179
7280 This is free software; see the source for copying conditions. There is NO
7381 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
8997 - ) # Use stdin as input.
9098 break ;;
9199 -* )
92 echo "$me: invalid option $1$help"
100 echo "$me: invalid option $1$help" >&2
93101 exit 1 ;;
94102
95103 *local*)
96104 # First pass through any local machine types.
97 echo $1
105 echo "$1"
98106 exit ;;
99107
100108 * )
110118 exit 1;;
111119 esac
112120
113 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
114 # Here we must recognize all the valid KERNEL-OS combinations.
115 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
116 case $maybe_os in
117 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
118 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119 knetbsd*-gnu* | netbsd*-gnu* | \
120 kopensolaris*-gnu* | \
121 storm-chaos* | os2-emx* | rtmk-nova*)
122 os=-$maybe_os
123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
124 ;;
125 android-linux)
126 os=-linux-android
127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
128 ;;
129 *)
130 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131 if [ $basic_machine != $1 ]
132 then os=`echo $1 | sed 's/.*-/-/'`
133 else os=; fi
134 ;;
121 # Split fields of configuration type
122 # shellcheck disable=SC2162
123 saved_IFS=$IFS
124 IFS="-" read field1 field2 field3 field4 <<EOF
125 $1
126 EOF
127 IFS=$saved_IFS
128
129 # Separate into logical components for further validation
130 case $1 in
131 *-*-*-*-*)
132 echo Invalid configuration \`"$1"\': more than four components >&2
133 exit 1
134 ;;
135 *-*-*-*)
136 basic_machine=$field1-$field2
137 basic_os=$field3-$field4
138 ;;
139 *-*-*)
140 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
141 # parts
142 maybe_os=$field2-$field3
143 case $maybe_os in
144 nto-qnx* | linux-* | uclinux-uclibc* \
145 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
146 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
147 | storm-chaos* | os2-emx* | rtmk-nova*)
148 basic_machine=$field1
149 basic_os=$maybe_os
150 ;;
151 android-linux)
152 basic_machine=$field1-unknown
153 basic_os=linux-android
154 ;;
155 *)
156 basic_machine=$field1-$field2
157 basic_os=$field3
158 ;;
159 esac
160 ;;
161 *-*)
162 # A lone config we happen to match not fitting any pattern
163 case $field1-$field2 in
164 decstation-3100)
165 basic_machine=mips-dec
166 basic_os=
167 ;;
168 *-*)
169 # Second component is usually, but not always the OS
170 case $field2 in
171 # Prevent following clause from handling this valid os
172 sun*os*)
173 basic_machine=$field1
174 basic_os=$field2
175 ;;
176 zephyr*)
177 basic_machine=$field1-unknown
178 basic_os=$field2
179 ;;
180 # Manufacturers
181 dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
182 | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
183 | unicom* | ibm* | next | hp | isi* | apollo | altos* \
184 | convergent* | ncr* | news | 32* | 3600* | 3100* \
185 | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
186 | ultra | tti* | harris | dolphin | highlevel | gould \
187 | cbm | ns | masscomp | apple | axis | knuth | cray \
188 | microblaze* | sim | cisco \
189 | oki | wec | wrs | winbond)
190 basic_machine=$field1-$field2
191 basic_os=
192 ;;
193 *)
194 basic_machine=$field1
195 basic_os=$field2
196 ;;
197 esac
198 ;;
199 esac
200 ;;
201 *)
202 # Convert single-component short-hands not valid as part of
203 # multi-component configurations.
204 case $field1 in
205 386bsd)
206 basic_machine=i386-pc
207 basic_os=bsd
208 ;;
209 a29khif)
210 basic_machine=a29k-amd
211 basic_os=udi
212 ;;
213 adobe68k)
214 basic_machine=m68010-adobe
215 basic_os=scout
216 ;;
217 alliant)
218 basic_machine=fx80-alliant
219 basic_os=
220 ;;
221 altos | altos3068)
222 basic_machine=m68k-altos
223 basic_os=
224 ;;
225 am29k)
226 basic_machine=a29k-none
227 basic_os=bsd
228 ;;
229 amdahl)
230 basic_machine=580-amdahl
231 basic_os=sysv
232 ;;
233 amiga)
234 basic_machine=m68k-unknown
235 basic_os=
236 ;;
237 amigaos | amigados)
238 basic_machine=m68k-unknown
239 basic_os=amigaos
240 ;;
241 amigaunix | amix)
242 basic_machine=m68k-unknown
243 basic_os=sysv4
244 ;;
245 apollo68)
246 basic_machine=m68k-apollo
247 basic_os=sysv
248 ;;
249 apollo68bsd)
250 basic_machine=m68k-apollo
251 basic_os=bsd
252 ;;
253 aros)
254 basic_machine=i386-pc
255 basic_os=aros
256 ;;
257 aux)
258 basic_machine=m68k-apple
259 basic_os=aux
260 ;;
261 balance)
262 basic_machine=ns32k-sequent
263 basic_os=dynix
264 ;;
265 blackfin)
266 basic_machine=bfin-unknown
267 basic_os=linux
268 ;;
269 cegcc)
270 basic_machine=arm-unknown
271 basic_os=cegcc
272 ;;
273 convex-c1)
274 basic_machine=c1-convex
275 basic_os=bsd
276 ;;
277 convex-c2)
278 basic_machine=c2-convex
279 basic_os=bsd
280 ;;
281 convex-c32)
282 basic_machine=c32-convex
283 basic_os=bsd
284 ;;
285 convex-c34)
286 basic_machine=c34-convex
287 basic_os=bsd
288 ;;
289 convex-c38)
290 basic_machine=c38-convex
291 basic_os=bsd
292 ;;
293 cray)
294 basic_machine=j90-cray
295 basic_os=unicos
296 ;;
297 crds | unos)
298 basic_machine=m68k-crds
299 basic_os=
300 ;;
301 da30)
302 basic_machine=m68k-da30
303 basic_os=
304 ;;
305 decstation | pmax | pmin | dec3100 | decstatn)
306 basic_machine=mips-dec
307 basic_os=
308 ;;
309 delta88)
310 basic_machine=m88k-motorola
311 basic_os=sysv3
312 ;;
313 dicos)
314 basic_machine=i686-pc
315 basic_os=dicos
316 ;;
317 djgpp)
318 basic_machine=i586-pc
319 basic_os=msdosdjgpp
320 ;;
321 ebmon29k)
322 basic_machine=a29k-amd
323 basic_os=ebmon
324 ;;
325 es1800 | OSE68k | ose68k | ose | OSE)
326 basic_machine=m68k-ericsson
327 basic_os=ose
328 ;;
329 gmicro)
330 basic_machine=tron-gmicro
331 basic_os=sysv
332 ;;
333 go32)
334 basic_machine=i386-pc
335 basic_os=go32
336 ;;
337 h8300hms)
338 basic_machine=h8300-hitachi
339 basic_os=hms
340 ;;
341 h8300xray)
342 basic_machine=h8300-hitachi
343 basic_os=xray
344 ;;
345 h8500hms)
346 basic_machine=h8500-hitachi
347 basic_os=hms
348 ;;
349 harris)
350 basic_machine=m88k-harris
351 basic_os=sysv3
352 ;;
353 hp300 | hp300hpux)
354 basic_machine=m68k-hp
355 basic_os=hpux
356 ;;
357 hp300bsd)
358 basic_machine=m68k-hp
359 basic_os=bsd
360 ;;
361 hppaosf)
362 basic_machine=hppa1.1-hp
363 basic_os=osf
364 ;;
365 hppro)
366 basic_machine=hppa1.1-hp
367 basic_os=proelf
368 ;;
369 i386mach)
370 basic_machine=i386-mach
371 basic_os=mach
372 ;;
373 isi68 | isi)
374 basic_machine=m68k-isi
375 basic_os=sysv
376 ;;
377 m68knommu)
378 basic_machine=m68k-unknown
379 basic_os=linux
380 ;;
381 magnum | m3230)
382 basic_machine=mips-mips
383 basic_os=sysv
384 ;;
385 merlin)
386 basic_machine=ns32k-utek
387 basic_os=sysv
388 ;;
389 mingw64)
390 basic_machine=x86_64-pc
391 basic_os=mingw64
392 ;;
393 mingw32)
394 basic_machine=i686-pc
395 basic_os=mingw32
396 ;;
397 mingw32ce)
398 basic_machine=arm-unknown
399 basic_os=mingw32ce
400 ;;
401 monitor)
402 basic_machine=m68k-rom68k
403 basic_os=coff
404 ;;
405 morphos)
406 basic_machine=powerpc-unknown
407 basic_os=morphos
408 ;;
409 moxiebox)
410 basic_machine=moxie-unknown
411 basic_os=moxiebox
412 ;;
413 msdos)
414 basic_machine=i386-pc
415 basic_os=msdos
416 ;;
417 msys)
418 basic_machine=i686-pc
419 basic_os=msys
420 ;;
421 mvs)
422 basic_machine=i370-ibm
423 basic_os=mvs
424 ;;
425 nacl)
426 basic_machine=le32-unknown
427 basic_os=nacl
428 ;;
429 ncr3000)
430 basic_machine=i486-ncr
431 basic_os=sysv4
432 ;;
433 netbsd386)
434 basic_machine=i386-pc
435 basic_os=netbsd
436 ;;
437 netwinder)
438 basic_machine=armv4l-rebel
439 basic_os=linux
440 ;;
441 news | news700 | news800 | news900)
442 basic_machine=m68k-sony
443 basic_os=newsos
444 ;;
445 news1000)
446 basic_machine=m68030-sony
447 basic_os=newsos
448 ;;
449 necv70)
450 basic_machine=v70-nec
451 basic_os=sysv
452 ;;
453 nh3000)
454 basic_machine=m68k-harris
455 basic_os=cxux
456 ;;
457 nh[45]000)
458 basic_machine=m88k-harris
459 basic_os=cxux
460 ;;
461 nindy960)
462 basic_machine=i960-intel
463 basic_os=nindy
464 ;;
465 mon960)
466 basic_machine=i960-intel
467 basic_os=mon960
468 ;;
469 nonstopux)
470 basic_machine=mips-compaq
471 basic_os=nonstopux
472 ;;
473 os400)
474 basic_machine=powerpc-ibm
475 basic_os=os400
476 ;;
477 OSE68000 | ose68000)
478 basic_machine=m68000-ericsson
479 basic_os=ose
480 ;;
481 os68k)
482 basic_machine=m68k-none
483 basic_os=os68k
484 ;;
485 paragon)
486 basic_machine=i860-intel
487 basic_os=osf
488 ;;
489 parisc)
490 basic_machine=hppa-unknown
491 basic_os=linux
492 ;;
493 psp)
494 basic_machine=mipsallegrexel-sony
495 basic_os=psp
496 ;;
497 pw32)
498 basic_machine=i586-unknown
499 basic_os=pw32
500 ;;
501 rdos | rdos64)
502 basic_machine=x86_64-pc
503 basic_os=rdos
504 ;;
505 rdos32)
506 basic_machine=i386-pc
507 basic_os=rdos
508 ;;
509 rom68k)
510 basic_machine=m68k-rom68k
511 basic_os=coff
512 ;;
513 sa29200)
514 basic_machine=a29k-amd
515 basic_os=udi
516 ;;
517 sei)
518 basic_machine=mips-sei
519 basic_os=seiux
520 ;;
521 sequent)
522 basic_machine=i386-sequent
523 basic_os=
524 ;;
525 sps7)
526 basic_machine=m68k-bull
527 basic_os=sysv2
528 ;;
529 st2000)
530 basic_machine=m68k-tandem
531 basic_os=
532 ;;
533 stratus)
534 basic_machine=i860-stratus
535 basic_os=sysv4
536 ;;
537 sun2)
538 basic_machine=m68000-sun
539 basic_os=
540 ;;
541 sun2os3)
542 basic_machine=m68000-sun
543 basic_os=sunos3
544 ;;
545 sun2os4)
546 basic_machine=m68000-sun
547 basic_os=sunos4
548 ;;
549 sun3)
550 basic_machine=m68k-sun
551 basic_os=
552 ;;
553 sun3os3)
554 basic_machine=m68k-sun
555 basic_os=sunos3
556 ;;
557 sun3os4)
558 basic_machine=m68k-sun
559 basic_os=sunos4
560 ;;
561 sun4)
562 basic_machine=sparc-sun
563 basic_os=
564 ;;
565 sun4os3)
566 basic_machine=sparc-sun
567 basic_os=sunos3
568 ;;
569 sun4os4)
570 basic_machine=sparc-sun
571 basic_os=sunos4
572 ;;
573 sun4sol2)
574 basic_machine=sparc-sun
575 basic_os=solaris2
576 ;;
577 sun386 | sun386i | roadrunner)
578 basic_machine=i386-sun
579 basic_os=
580 ;;
581 sv1)
582 basic_machine=sv1-cray
583 basic_os=unicos
584 ;;
585 symmetry)
586 basic_machine=i386-sequent
587 basic_os=dynix
588 ;;
589 t3e)
590 basic_machine=alphaev5-cray
591 basic_os=unicos
592 ;;
593 t90)
594 basic_machine=t90-cray
595 basic_os=unicos
596 ;;
597 toad1)
598 basic_machine=pdp10-xkl
599 basic_os=tops20
600 ;;
601 tpf)
602 basic_machine=s390x-ibm
603 basic_os=tpf
604 ;;
605 udi29k)
606 basic_machine=a29k-amd
607 basic_os=udi
608 ;;
609 ultra3)
610 basic_machine=a29k-nyu
611 basic_os=sym1
612 ;;
613 v810 | necv810)
614 basic_machine=v810-nec
615 basic_os=none
616 ;;
617 vaxv)
618 basic_machine=vax-dec
619 basic_os=sysv
620 ;;
621 vms)
622 basic_machine=vax-dec
623 basic_os=vms
624 ;;
625 vsta)
626 basic_machine=i386-pc
627 basic_os=vsta
628 ;;
629 vxworks960)
630 basic_machine=i960-wrs
631 basic_os=vxworks
632 ;;
633 vxworks68)
634 basic_machine=m68k-wrs
635 basic_os=vxworks
636 ;;
637 vxworks29k)
638 basic_machine=a29k-wrs
639 basic_os=vxworks
640 ;;
641 xbox)
642 basic_machine=i686-pc
643 basic_os=mingw32
644 ;;
645 ymp)
646 basic_machine=ymp-cray
647 basic_os=unicos
648 ;;
649 *)
650 basic_machine=$1
651 basic_os=
652 ;;
653 esac
654 ;;
135655 esac
136656
137 ### Let's recognize common machines as not being operating systems so
138 ### that things like config.sub decstation-3100 work. We also
139 ### recognize some manufacturers as not being operating systems, so we
140 ### can provide default operating systems below.
141 case $os in
142 -sun*os*)
143 # Prevent following clause from handling this invalid input.
144 ;;
145 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
146 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
147 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray | -microblaze*)
152 os=
153 basic_machine=$1
154 ;;
155 -bluegene*)
156 os=-cnk
157 ;;
158 -sim | -cisco | -oki | -wec | -winbond)
159 os=
160 basic_machine=$1
161 ;;
162 -scout)
163 ;;
164 -wrs)
165 os=-vxworks
166 basic_machine=$1
167 ;;
168 -chorusos*)
169 os=-chorusos
170 basic_machine=$1
171 ;;
172 -chorusrdb)
173 os=-chorusrdb
174 basic_machine=$1
175 ;;
176 -hiux*)
177 os=-hiuxwe2
178 ;;
179 -sco6)
180 os=-sco5v6
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182 ;;
183 -sco5)
184 os=-sco3.2v5
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186 ;;
187 -sco4)
188 os=-sco3.2v4
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 ;;
191 -sco3.2.[4-9]*)
192 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194 ;;
195 -sco3.2v[4-9]*)
196 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198 ;;
199 -sco5v6*)
200 # Don't forget version if it is 3.2v4 or newer.
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202 ;;
203 -sco*)
204 os=-sco3.2v2
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 ;;
207 -udk*)
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
209 ;;
210 -isc)
211 os=-isc2.2
212 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
213 ;;
214 -clix*)
215 basic_machine=clipper-intergraph
216 ;;
217 -isc*)
218 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
219 ;;
220 -lynx*178)
221 os=-lynxos178
222 ;;
223 -lynx*5)
224 os=-lynxos5
225 ;;
226 -lynx*)
227 os=-lynxos
228 ;;
229 -ptx*)
230 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
231 ;;
232 -windowsnt*)
233 os=`echo $os | sed -e 's/windowsnt/winnt/'`
234 ;;
235 -psos*)
236 os=-psos
237 ;;
238 -mint | -mint[0-9]*)
239 basic_machine=m68k-atari
240 os=-mint
241 ;;
242 esac
243
244 # Decode aliases for certain CPU-COMPANY combinations.
657 # Decode 1-component or ad-hoc basic machines
245658 case $basic_machine in
246 # Recognize the basic CPU types without company name.
247 # Some are omitted here because they have special meanings below.
248 1750a | 580 \
249 | a29k \
250 | aarch64 | aarch64_be \
251 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
252 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
253 | am33_2.0 \
254 | arc | arceb \
255 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
256 | avr | avr32 \
257 | be32 | be64 \
258 | bfin \
259 | c4x | c8051 | clipper \
260 | d10v | d30v | dlx | dsp16xx \
261 | epiphany \
262 | fido | fr30 | frv | ft32 \
263 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
264 | hexagon \
265 | i370 | i860 | i960 | ia64 \
266 | ip2k | iq2000 \
267 | k1om \
268 | le32 | le64 \
269 | lm32 \
270 | m32c | m32r | m32rle | m68000 | m68k | m88k \
271 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
272 | mips | mipsbe | mipseb | mipsel | mipsle \
273 | mips16 \
274 | mips64 | mips64el \
275 | mips64octeon | mips64octeonel \
276 | mips64orion | mips64orionel \
277 | mips64r5900 | mips64r5900el \
278 | mips64vr | mips64vrel \
279 | mips64vr4100 | mips64vr4100el \
280 | mips64vr4300 | mips64vr4300el \
281 | mips64vr5000 | mips64vr5000el \
282 | mips64vr5900 | mips64vr5900el \
283 | mipsisa32 | mipsisa32el \
284 | mipsisa32r2 | mipsisa32r2el \
285 | mipsisa32r6 | mipsisa32r6el \
286 | mipsisa64 | mipsisa64el \
287 | mipsisa64r2 | mipsisa64r2el \
288 | mipsisa64r6 | mipsisa64r6el \
289 | mipsisa64sb1 | mipsisa64sb1el \
290 | mipsisa64sr71k | mipsisa64sr71kel \
291 | mipsr5900 | mipsr5900el \
292 | mipstx39 | mipstx39el \
293 | mn10200 | mn10300 \
294 | moxie \
295 | mt \
296 | msp430 \
297 | nds32 | nds32le | nds32be \
298 | nios | nios2 | nios2eb | nios2el \
299 | ns16k | ns32k \
300 | open8 | or1k | or1knd | or32 \
301 | pdp10 | pdp11 | pj | pjl \
302 | powerpc | powerpc64 | powerpc64le | powerpcle \
303 | pyramid \
304 | riscv32 | riscv64 \
305 | rl78 | rx \
306 | score \
307 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
308 | sh64 | sh64le \
309 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
310 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
311 | spu \
312 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
313 | ubicom32 \
314 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
315 | visium \
316 | we32k \
317 | x86 | xc16x | xstormy16 | xtensa \
318 | z8k | z80)
319 basic_machine=$basic_machine-unknown
320 ;;
321 c54x)
322 basic_machine=tic54x-unknown
323 ;;
324 c55x)
325 basic_machine=tic55x-unknown
326 ;;
327 c6x)
328 basic_machine=tic6x-unknown
659 # Here we handle the default manufacturer of certain CPU types. It is in
660 # some cases the only manufacturer, in others, it is the most popular.
661 w89k)
662 cpu=hppa1.1
663 vendor=winbond
664 ;;
665 op50n)
666 cpu=hppa1.1
667 vendor=oki
668 ;;
669 op60c)
670 cpu=hppa1.1
671 vendor=oki
672 ;;
673 ibm*)
674 cpu=i370
675 vendor=ibm
676 ;;
677 orion105)
678 cpu=clipper
679 vendor=highlevel
680 ;;
681 mac | mpw | mac-mpw)
682 cpu=m68k
683 vendor=apple
684 ;;
685 pmac | pmac-mpw)
686 cpu=powerpc
687 vendor=apple
688 ;;
689
690 # Recognize the various machine names and aliases which stand
691 # for a CPU type and a company and sometimes even an OS.
692 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
693 cpu=m68000
694 vendor=att
695 ;;
696 3b*)
697 cpu=we32k
698 vendor=att
699 ;;
700 bluegene*)
701 cpu=powerpc
702 vendor=ibm
703 basic_os=cnk
704 ;;
705 decsystem10* | dec10*)
706 cpu=pdp10
707 vendor=dec
708 basic_os=tops10
709 ;;
710 decsystem20* | dec20*)
711 cpu=pdp10
712 vendor=dec
713 basic_os=tops20
714 ;;
715 delta | 3300 | motorola-3300 | motorola-delta \
716 | 3300-motorola | delta-motorola)
717 cpu=m68k
718 vendor=motorola
719 ;;
720 dpx2*)
721 cpu=m68k
722 vendor=bull
723 basic_os=sysv3
724 ;;
725 encore | umax | mmax)
726 cpu=ns32k
727 vendor=encore
728 ;;
729 elxsi)
730 cpu=elxsi
731 vendor=elxsi
732 basic_os=${basic_os:-bsd}
733 ;;
734 fx2800)
735 cpu=i860
736 vendor=alliant
737 ;;
738 genix)
739 cpu=ns32k
740 vendor=ns
741 ;;
742 h3050r* | hiux*)
743 cpu=hppa1.1
744 vendor=hitachi
745 basic_os=hiuxwe2
746 ;;
747 hp3k9[0-9][0-9] | hp9[0-9][0-9])
748 cpu=hppa1.0
749 vendor=hp
750 ;;
751 hp9k2[0-9][0-9] | hp9k31[0-9])
752 cpu=m68000
753 vendor=hp
754 ;;
755 hp9k3[2-9][0-9])
756 cpu=m68k
757 vendor=hp
758 ;;
759 hp9k6[0-9][0-9] | hp6[0-9][0-9])
760 cpu=hppa1.0
761 vendor=hp
762 ;;
763 hp9k7[0-79][0-9] | hp7[0-79][0-9])
764 cpu=hppa1.1
765 vendor=hp
766 ;;
767 hp9k78[0-9] | hp78[0-9])
768 # FIXME: really hppa2.0-hp
769 cpu=hppa1.1
770 vendor=hp
771 ;;
772 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
773 # FIXME: really hppa2.0-hp
774 cpu=hppa1.1
775 vendor=hp
776 ;;
777 hp9k8[0-9][13679] | hp8[0-9][13679])
778 cpu=hppa1.1
779 vendor=hp
780 ;;
781 hp9k8[0-9][0-9] | hp8[0-9][0-9])
782 cpu=hppa1.0
783 vendor=hp
784 ;;
785 i*86v32)
786 cpu=`echo "$1" | sed -e 's/86.*/86/'`
787 vendor=pc
788 basic_os=sysv32
789 ;;
790 i*86v4*)
791 cpu=`echo "$1" | sed -e 's/86.*/86/'`
792 vendor=pc
793 basic_os=sysv4
794 ;;
795 i*86v)
796 cpu=`echo "$1" | sed -e 's/86.*/86/'`
797 vendor=pc
798 basic_os=sysv
799 ;;
800 i*86sol2)
801 cpu=`echo "$1" | sed -e 's/86.*/86/'`
802 vendor=pc
803 basic_os=solaris2
804 ;;
805 j90 | j90-cray)
806 cpu=j90
807 vendor=cray
808 basic_os=${basic_os:-unicos}
809 ;;
810 iris | iris4d)
811 cpu=mips
812 vendor=sgi
813 case $basic_os in
814 irix*)
815 ;;
816 *)
817 basic_os=irix4
818 ;;
819 esac
820 ;;
821 miniframe)
822 cpu=m68000
823 vendor=convergent
824 ;;
825 *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
826 cpu=m68k
827 vendor=atari
828 basic_os=mint
829 ;;
830 news-3600 | risc-news)
831 cpu=mips
832 vendor=sony
833 basic_os=newsos
834 ;;
835 next | m*-next)
836 cpu=m68k
837 vendor=next
838 case $basic_os in
839 openstep*)
840 ;;
841 nextstep*)
842 ;;
843 ns2*)
844 basic_os=nextstep2
845 ;;
846 *)
847 basic_os=nextstep3
848 ;;
849 esac
850 ;;
851 np1)
852 cpu=np1
853 vendor=gould
854 ;;
855 op50n-* | op60c-*)
856 cpu=hppa1.1
857 vendor=oki
858 basic_os=proelf
859 ;;
860 pa-hitachi)
861 cpu=hppa1.1
862 vendor=hitachi
863 basic_os=hiuxwe2
864 ;;
865 pbd)
866 cpu=sparc
867 vendor=tti
868 ;;
869 pbb)
870 cpu=m68k
871 vendor=tti
872 ;;
873 pc532)
874 cpu=ns32k
875 vendor=pc532
876 ;;
877 pn)
878 cpu=pn
879 vendor=gould
880 ;;
881 power)
882 cpu=power
883 vendor=ibm
884 ;;
885 ps2)
886 cpu=i386
887 vendor=ibm
888 ;;
889 rm[46]00)
890 cpu=mips
891 vendor=siemens
892 ;;
893 rtpc | rtpc-*)
894 cpu=romp
895 vendor=ibm
896 ;;
897 sde)
898 cpu=mipsisa32
899 vendor=sde
900 basic_os=${basic_os:-elf}
901 ;;
902 simso-wrs)
903 cpu=sparclite
904 vendor=wrs
905 basic_os=vxworks
906 ;;
907 tower | tower-32)
908 cpu=m68k
909 vendor=ncr
910 ;;
911 vpp*|vx|vx-*)
912 cpu=f301
913 vendor=fujitsu
914 ;;
915 w65)
916 cpu=w65
917 vendor=wdc
918 ;;
919 w89k-*)
920 cpu=hppa1.1
921 vendor=winbond
922 basic_os=proelf
923 ;;
924 none)
925 cpu=none
926 vendor=none
329927 ;;
330928 leon|leon[3-9])
331 basic_machine=sparc-$basic_machine
332 ;;
333 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
334 basic_machine=$basic_machine-unknown
335 os=-none
336 ;;
337 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
338 ;;
339 ms1)
340 basic_machine=mt-unknown
341 ;;
342
343 strongarm | thumb | xscale)
344 basic_machine=arm-unknown
345 ;;
346 xgate)
347 basic_machine=$basic_machine-unknown
348 os=-none
349 ;;
350 xscaleeb)
351 basic_machine=armeb-unknown
352 ;;
353
354 xscaleel)
355 basic_machine=armel-unknown
356 ;;
357
929 cpu=sparc
930 vendor=$basic_machine
931 ;;
932 leon-*|leon[3-9]-*)
933 cpu=sparc
934 vendor=`echo "$basic_machine" | sed 's/-.*//'`
935 ;;
936
937 *-*)
938 # shellcheck disable=SC2162
939 saved_IFS=$IFS
940 IFS="-" read cpu vendor <<EOF
941 $basic_machine
942 EOF
943 IFS=$saved_IFS
944 ;;
358945 # We use `pc' rather than `unknown'
359946 # because (1) that's what they normally are, and
360947 # (2) the word "unknown" tends to confuse beginning users.
361948 i*86 | x86_64)
362 basic_machine=$basic_machine-pc
363 ;;
364 # Object if more than one company name word.
365 *-*-*)
366 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
367 exit 1
368 ;;
369 # Recognize the basic CPU types with company name.
370 580-* \
371 | a29k-* \
372 | aarch64-* | aarch64_be-* \
373 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
374 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
375 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
376 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
377 | avr-* | avr32-* \
378 | be32-* | be64-* \
379 | bfin-* | bs2000-* \
380 | c[123]* | c30-* | [cjt]90-* | c4x-* \
381 | c8051-* | clipper-* | craynv-* | cydra-* \
382 | d10v-* | d30v-* | dlx-* \
383 | elxsi-* \
384 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
385 | h8300-* | h8500-* \
386 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
387 | hexagon-* \
388 | i*86-* | i860-* | i960-* | ia64-* \
389 | ip2k-* | iq2000-* \
390 | k1om-* \
391 | le32-* | le64-* \
392 | lm32-* \
393 | m32c-* | m32r-* | m32rle-* \
394 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
395 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
396 | microblaze-* | microblazeel-* \
397 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
398 | mips16-* \
399 | mips64-* | mips64el-* \
400 | mips64octeon-* | mips64octeonel-* \
401 | mips64orion-* | mips64orionel-* \
402 | mips64r5900-* | mips64r5900el-* \
403 | mips64vr-* | mips64vrel-* \
404 | mips64vr4100-* | mips64vr4100el-* \
405 | mips64vr4300-* | mips64vr4300el-* \
406 | mips64vr5000-* | mips64vr5000el-* \
407 | mips64vr5900-* | mips64vr5900el-* \
408 | mipsisa32-* | mipsisa32el-* \
409 | mipsisa32r2-* | mipsisa32r2el-* \
410 | mipsisa32r6-* | mipsisa32r6el-* \
411 | mipsisa64-* | mipsisa64el-* \
412 | mipsisa64r2-* | mipsisa64r2el-* \
413 | mipsisa64r6-* | mipsisa64r6el-* \
414 | mipsisa64sb1-* | mipsisa64sb1el-* \
415 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
416 | mipsr5900-* | mipsr5900el-* \
417 | mipstx39-* | mipstx39el-* \
418 | mmix-* \
419 | mt-* \
420 | msp430-* \
421 | nds32-* | nds32le-* | nds32be-* \
422 | nios-* | nios2-* | nios2eb-* | nios2el-* \
423 | none-* | np1-* | ns16k-* | ns32k-* \
424 | open8-* \
425 | or1k*-* \
426 | orion-* \
427 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
428 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
429 | pyramid-* \
430 | rl78-* | romp-* | rs6000-* | rx-* \
431 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
432 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
433 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
434 | sparclite-* \
435 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
436 | tahoe-* \
437 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
438 | tile*-* \
439 | tron-* \
440 | ubicom32-* \
441 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
442 | vax-* \
443 | visium-* \
444 | we32k-* \
445 | x86-* | x86_64-* | xc16x-* | xps100-* \
446 | xstormy16-* | xtensa*-* \
447 | ymp-* \
448 | z8k-* | z80-*)
449 ;;
450 # Recognize the basic CPU types without company name, with glob match.
451 xtensa*)
452 basic_machine=$basic_machine-unknown
453 ;;
454 # Recognize the various machine names and aliases which stand
455 # for a CPU type and a company and sometimes even an OS.
949 cpu=$basic_machine
950 vendor=pc
951 ;;
952 # These rules are duplicated from below for sake of the special case above;
953 # i.e. things that normalized to x86 arches should also default to "pc"
954 pc98)
955 cpu=i386
956 vendor=pc
957 ;;
958 x64 | amd64)
959 cpu=x86_64
960 vendor=pc
961 ;;
962 # Recognize the basic CPU types without company name.
963 *)
964 cpu=$basic_machine
965 vendor=unknown
966 ;;
967 esac
968
969 unset -v basic_machine
970
971 # Decode basic machines in the full and proper CPU-Company form.
972 case $cpu-$vendor in
973 # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
974 # some cases the only manufacturer, in others, it is the most popular.
975 craynv-unknown)
976 vendor=cray
977 basic_os=${basic_os:-unicosmp}
978 ;;
979 c90-unknown | c90-cray)
980 vendor=cray
981 basic_os=${Basic_os:-unicos}
982 ;;
983 fx80-unknown)
984 vendor=alliant
985 ;;
986 romp-unknown)
987 vendor=ibm
988 ;;
989 mmix-unknown)
990 vendor=knuth
991 ;;
992 microblaze-unknown | microblazeel-unknown)
993 vendor=xilinx
994 ;;
995 rs6000-unknown)
996 vendor=ibm
997 ;;
998 vax-unknown)
999 vendor=dec
1000 ;;
1001 pdp11-unknown)
1002 vendor=dec
1003 ;;
1004 we32k-unknown)
1005 vendor=att
1006 ;;
1007 cydra-unknown)
1008 vendor=cydrome
1009 ;;
1010 i370-ibm*)
1011 vendor=ibm
1012 ;;
1013 orion-unknown)
1014 vendor=highlevel
1015 ;;
1016 xps-unknown | xps100-unknown)
1017 cpu=xps100
1018 vendor=honeywell
1019 ;;
1020
1021 # Here we normalize CPU types with a missing or matching vendor
1022 armh-unknown | armh-alt)
1023 cpu=armv7l
1024 vendor=alt
1025 basic_os=${basic_os:-linux-gnueabihf}
1026 ;;
1027 dpx20-unknown | dpx20-bull)
1028 cpu=rs6000
1029 vendor=bull
1030 basic_os=${basic_os:-bosx}
1031 ;;
1032
1033 # Here we normalize CPU types irrespective of the vendor
1034 amd64-*)
1035 cpu=x86_64
1036 ;;
1037 blackfin-*)
1038 cpu=bfin
1039 basic_os=linux
1040 ;;
1041 c54x-*)
1042 cpu=tic54x
1043 ;;
1044 c55x-*)
1045 cpu=tic55x
1046 ;;
1047 c6x-*)
1048 cpu=tic6x
1049 ;;
1050 e500v[12]-*)
1051 cpu=powerpc
1052 basic_os=${basic_os}"spe"
1053 ;;
1054 mips3*-*)
1055 cpu=mips64
1056 ;;
1057 ms1-*)
1058 cpu=mt
1059 ;;
1060 m68knommu-*)
1061 cpu=m68k
1062 basic_os=linux
1063 ;;
1064 m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
1065 cpu=s12z
1066 ;;
1067 openrisc-*)
1068 cpu=or32
1069 ;;
1070 parisc-*)
1071 cpu=hppa
1072 basic_os=linux
1073 ;;
1074 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1075 cpu=i586
1076 ;;
1077 pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
1078 cpu=i686
1079 ;;
1080 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1081 cpu=i686
1082 ;;
1083 pentium4-*)
1084 cpu=i786
1085 ;;
1086 pc98-*)
1087 cpu=i386
1088 ;;
1089 ppc-* | ppcbe-*)
1090 cpu=powerpc
1091 ;;
1092 ppcle-* | powerpclittle-*)
1093 cpu=powerpcle
1094 ;;
1095 ppc64-*)
1096 cpu=powerpc64
1097 ;;
1098 ppc64le-* | powerpc64little-*)
1099 cpu=powerpc64le
1100 ;;
1101 sb1-*)
1102 cpu=mipsisa64sb1
1103 ;;
1104 sb1el-*)
1105 cpu=mipsisa64sb1el
1106 ;;
1107 sh5e[lb]-*)
1108 cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
1109 ;;
1110 spur-*)
1111 cpu=spur
1112 ;;
1113 strongarm-* | thumb-*)
1114 cpu=arm
1115 ;;
1116 tx39-*)
1117 cpu=mipstx39
1118 ;;
1119 tx39el-*)
1120 cpu=mipstx39el
1121 ;;
1122 x64-*)
1123 cpu=x86_64
1124 ;;
1125 xscale-* | xscalee[bl]-*)
1126 cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
1127 ;;
1128 arm64-* | aarch64le-*)
1129 cpu=aarch64
1130 ;;
1131
1132 # Recognize the canonical CPU Types that limit and/or modify the
1133 # company names they are paired with.
1134 cr16-*)
1135 basic_os=${basic_os:-elf}
1136 ;;
1137 crisv32-* | etraxfs*-*)
1138 cpu=crisv32
1139 vendor=axis
1140 ;;
1141 cris-* | etrax*-*)
1142 cpu=cris
1143 vendor=axis
1144 ;;
1145 crx-*)
1146 basic_os=${basic_os:-elf}
1147 ;;
1148 neo-tandem)
1149 cpu=neo
1150 vendor=tandem
1151 ;;
1152 nse-tandem)
1153 cpu=nse
1154 vendor=tandem
1155 ;;
1156 nsr-tandem)
1157 cpu=nsr
1158 vendor=tandem
1159 ;;
1160 nsv-tandem)
1161 cpu=nsv
1162 vendor=tandem
1163 ;;
1164 nsx-tandem)
1165 cpu=nsx
1166 vendor=tandem
1167 ;;
1168 mipsallegrexel-sony)
1169 cpu=mipsallegrexel
1170 vendor=sony
1171 ;;
1172 tile*-*)
1173 basic_os=${basic_os:-linux-gnu}
1174 ;;
1175
1176 *)
1177 # Recognize the canonical CPU types that are allowed with any
1178 # company name.
1179 case $cpu in
1180 1750a | 580 \
1181 | a29k \
1182 | aarch64 | aarch64_be \
1183 | abacus \
1184 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
1185 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
1186 | alphapca5[67] | alpha64pca5[67] \
1187 | am33_2.0 \
1188 | amdgcn \
1189 | arc | arceb | arc32 | arc64 \
1190 | arm | arm[lb]e | arme[lb] | armv* \
1191 | avr | avr32 \
1192 | asmjs \
1193 | ba \
1194 | be32 | be64 \
1195 | bfin | bpf | bs2000 \
1196 | c[123]* | c30 | [cjt]90 | c4x \
1197 | c8051 | clipper | craynv | csky | cydra \
1198 | d10v | d30v | dlx | dsp16xx \
1199 | e2k | elxsi | epiphany \
1200 | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
1201 | h8300 | h8500 \
1202 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1203 | hexagon \
1204 | i370 | i*86 | i860 | i960 | ia16 | ia64 \
1205 | ip2k | iq2000 \
1206 | k1om \
1207 | le32 | le64 \
1208 | lm32 \
1209 | loongarch32 | loongarch64 | loongarchx32 \
1210 | m32c | m32r | m32rle \
1211 | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
1212 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
1213 | m88110 | m88k | maxq | mb | mcore | mep | metag \
1214 | microblaze | microblazeel \
1215 | mips | mipsbe | mipseb | mipsel | mipsle \
1216 | mips16 \
1217 | mips64 | mips64eb | mips64el \
1218 | mips64octeon | mips64octeonel \
1219 | mips64orion | mips64orionel \
1220 | mips64r5900 | mips64r5900el \
1221 | mips64vr | mips64vrel \
1222 | mips64vr4100 | mips64vr4100el \
1223 | mips64vr4300 | mips64vr4300el \
1224 | mips64vr5000 | mips64vr5000el \
1225 | mips64vr5900 | mips64vr5900el \
1226 | mipsisa32 | mipsisa32el \
1227 | mipsisa32r2 | mipsisa32r2el \
1228 | mipsisa32r3 | mipsisa32r3el \
1229 | mipsisa32r5 | mipsisa32r5el \
1230 | mipsisa32r6 | mipsisa32r6el \
1231 | mipsisa64 | mipsisa64el \
1232 | mipsisa64r2 | mipsisa64r2el \
1233 | mipsisa64r3 | mipsisa64r3el \
1234 | mipsisa64r5 | mipsisa64r5el \
1235 | mipsisa64r6 | mipsisa64r6el \
1236 | mipsisa64sb1 | mipsisa64sb1el \
1237 | mipsisa64sr71k | mipsisa64sr71kel \
1238 | mipsr5900 | mipsr5900el \
1239 | mipstx39 | mipstx39el \
1240 | mmix \
1241 | mn10200 | mn10300 \
1242 | moxie \
1243 | mt \
1244 | msp430 \
1245 | nds32 | nds32le | nds32be \
1246 | nfp \
1247 | nios | nios2 | nios2eb | nios2el \
1248 | none | np1 | ns16k | ns32k | nvptx \
1249 | open8 \
1250 | or1k* \
1251 | or32 \
1252 | orion \
1253 | picochip \
1254 | pdp10 | pdp11 | pj | pjl | pn | power \
1255 | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
1256 | pru \
1257 | pyramid \
1258 | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
1259 | rl78 | romp | rs6000 | rx \
1260 | s390 | s390x \
1261 | score \
1262 | sh | shl \
1263 | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
1264 | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
1265 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
1266 | sparclite \
1267 | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
1268 | spu \
1269 | tahoe \
1270 | thumbv7* \
1271 | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
1272 | tron \
1273 | ubicom32 \
1274 | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
1275 | vax \
1276 | visium \
1277 | w65 \
1278 | wasm32 | wasm64 \
1279 | we32k \
1280 | x86 | x86_64 | xc16x | xgate | xps100 \
1281 | xstormy16 | xtensa* \
1282 | ymp \
1283 | z8k | z80)
1284 ;;
1285
1286 *)
1287 echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
1288 exit 1
1289 ;;
1290 esac
1291 ;;
1292 esac
1293
1294 # Here we canonicalize certain aliases for manufacturers.
1295 case $vendor in
1296 digital*)
1297 vendor=dec
1298 ;;
1299 commodore*)
1300 vendor=cbm
1301 ;;
1302 *)
1303 ;;
1304 esac
1305
1306 # Decode manufacturer-specific aliases for certain operating systems.
1307
1308 if test x$basic_os != x
1309 then
1310
1311 # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
1312 # set os.
1313 case $basic_os in
1314 gnu/linux*)
1315 kernel=linux
1316 os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
1317 ;;
1318 os2-emx)
1319 kernel=os2
1320 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
1321 ;;
1322 nto-qnx*)
1323 kernel=nto
1324 os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
1325 ;;
1326 *-*)
1327 # shellcheck disable=SC2162
1328 saved_IFS=$IFS
1329 IFS="-" read kernel os <<EOF
1330 $basic_os
1331 EOF
1332 IFS=$saved_IFS
1333 ;;
1334 # Default OS when just kernel was specified
1335 nto*)
1336 kernel=nto
1337 os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
1338 ;;
1339 linux*)
1340 kernel=linux
1341 os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
1342 ;;
1343 *)
1344 kernel=
1345 os=$basic_os
1346 ;;
1347 esac
1348
1349 # Now, normalize the OS (knowing we just have one component, it's not a kernel,
1350 # etc.)
1351 case $os in
1352 # First match some system type aliases that might get confused
1353 # with valid system types.
1354 # solaris* is a basic system type, with this one exception.
1355 auroraux)
1356 os=auroraux
1357 ;;
1358 bluegene*)
1359 os=cnk
1360 ;;
1361 solaris1 | solaris1.*)
1362 os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
1363 ;;
1364 solaris)
1365 os=solaris2
1366 ;;
1367 unixware*)
1368 os=sysv4.2uw
1369 ;;
1370 # es1800 is here to avoid being matched by es* (a different OS)
1371 es1800*)
1372 os=ose
1373 ;;
1374 # Some version numbers need modification
1375 chorusos*)
1376 os=chorusos
1377 ;;
1378 isc)
1379 os=isc2.2
1380 ;;
1381 sco6)
1382 os=sco5v6
1383 ;;
1384 sco5)
1385 os=sco3.2v5
1386 ;;
1387 sco4)
1388 os=sco3.2v4
1389 ;;
1390 sco3.2.[4-9]*)
1391 os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
1392 ;;
1393 sco*v* | scout)
1394 # Don't match below
1395 ;;
1396 sco*)
1397 os=sco3.2v2
1398 ;;
1399 psos*)
1400 os=psos
1401 ;;
1402 qnx*)
1403 os=qnx
1404 ;;
1405 hiux*)
1406 os=hiuxwe2
1407 ;;
1408 lynx*178)
1409 os=lynxos178
1410 ;;
1411 lynx*5)
1412 os=lynxos5
1413 ;;
1414 lynxos*)
1415 # don't get caught up in next wildcard
1416 ;;
1417 lynx*)
1418 os=lynxos
1419 ;;
1420 mac[0-9]*)
1421 os=`echo "$os" | sed -e 's|mac|macos|'`
1422 ;;
1423 opened*)
1424 os=openedition
1425 ;;
1426 os400*)
1427 os=os400
1428 ;;
1429 sunos5*)
1430 os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
1431 ;;
1432 sunos6*)
1433 os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
1434 ;;
1435 wince*)
1436 os=wince
1437 ;;
1438 utek*)
1439 os=bsd
1440 ;;
1441 dynix*)
1442 os=bsd
1443 ;;
1444 acis*)
1445 os=aos
1446 ;;
1447 atheos*)
1448 os=atheos
1449 ;;
1450 syllable*)
1451 os=syllable
1452 ;;
4561453 386bsd)
457 basic_machine=i386-unknown
458 os=-bsd
459 ;;
460 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
461 basic_machine=m68000-att
462 ;;
463 3b*)
464 basic_machine=we32k-att
465 ;;
466 a29khif)
467 basic_machine=a29k-amd
468 os=-udi
469 ;;
470 abacus)
471 basic_machine=abacus-unknown
472 ;;
473 adobe68k)
474 basic_machine=m68010-adobe
475 os=-scout
476 ;;
477 alliant | fx80)
478 basic_machine=fx80-alliant
479 ;;
480 altos | altos3068)
481 basic_machine=m68k-altos
482 ;;
483 am29k)
484 basic_machine=a29k-none
485 os=-bsd
486 ;;
487 amd64)
488 basic_machine=x86_64-pc
489 ;;
490 amd64-*)
491 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
492 ;;
493 amdahl)
494 basic_machine=580-amdahl
495 os=-sysv
496 ;;
497 amiga | amiga-*)
498 basic_machine=m68k-unknown
499 ;;
500 amigaos | amigados)
501 basic_machine=m68k-unknown
502 os=-amigaos
503 ;;
504 amigaunix | amix)
505 basic_machine=m68k-unknown
506 os=-sysv4
507 ;;
508 apollo68)
509 basic_machine=m68k-apollo
510 os=-sysv
511 ;;
512 apollo68bsd)
513 basic_machine=m68k-apollo
514 os=-bsd
515 ;;
516 aros)
517 basic_machine=i386-pc
518 os=-aros
519 ;;
520 aux)
521 basic_machine=m68k-apple
522 os=-aux
523 ;;
524 balance)
525 basic_machine=ns32k-sequent
526 os=-dynix
527 ;;
528 blackfin)
529 basic_machine=bfin-unknown
530 os=-linux
531 ;;
532 blackfin-*)
533 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
534 os=-linux
535 ;;
536 bluegene*)
537 basic_machine=powerpc-ibm
538 os=-cnk
539 ;;
540 c54x-*)
541 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
542 ;;
543 c55x-*)
544 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
545 ;;
546 c6x-*)
547 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
548 ;;
549 c90)
550 basic_machine=c90-cray
551 os=-unicos
552 ;;
553 cegcc)
554 basic_machine=arm-unknown
555 os=-cegcc
556 ;;
557 convex-c1)
558 basic_machine=c1-convex
559 os=-bsd
560 ;;
561 convex-c2)
562 basic_machine=c2-convex
563 os=-bsd
564 ;;
565 convex-c32)
566 basic_machine=c32-convex
567 os=-bsd
568 ;;
569 convex-c34)
570 basic_machine=c34-convex
571 os=-bsd
572 ;;
573 convex-c38)
574 basic_machine=c38-convex
575 os=-bsd
576 ;;
577 cray | j90)
578 basic_machine=j90-cray
579 os=-unicos
580 ;;
581 craynv)
582 basic_machine=craynv-cray
583 os=-unicosmp
584 ;;
585 cr16 | cr16-*)
586 basic_machine=cr16-unknown
587 os=-elf
588 ;;
589 crds | unos)
590 basic_machine=m68k-crds
591 ;;
592 crisv32 | crisv32-* | etraxfs*)
593 basic_machine=crisv32-axis
594 ;;
595 cris | cris-* | etrax*)
596 basic_machine=cris-axis
597 ;;
598 crx)
599 basic_machine=crx-unknown
600 os=-elf
601 ;;
602 da30 | da30-*)
603 basic_machine=m68k-da30
604 ;;
605 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
606 basic_machine=mips-dec
607 ;;
608 decsystem10* | dec10*)
609 basic_machine=pdp10-dec
610 os=-tops10
611 ;;
612 decsystem20* | dec20*)
613 basic_machine=pdp10-dec
614 os=-tops20
615 ;;
616 delta | 3300 | motorola-3300 | motorola-delta \
617 | 3300-motorola | delta-motorola)
618 basic_machine=m68k-motorola
619 ;;
620 delta88)
621 basic_machine=m88k-motorola
622 os=-sysv3
623 ;;
624 dicos)
625 basic_machine=i686-pc
626 os=-dicos
627 ;;
628 djgpp)
629 basic_machine=i586-pc
630 os=-msdosdjgpp
631 ;;
632 dpx20 | dpx20-*)
633 basic_machine=rs6000-bull
634 os=-bosx
635 ;;
636 dpx2* | dpx2*-bull)
637 basic_machine=m68k-bull
638 os=-sysv3
639 ;;
640 ebmon29k)
641 basic_machine=a29k-amd
642 os=-ebmon
643 ;;
644 elxsi)
645 basic_machine=elxsi-elxsi
646 os=-bsd
647 ;;
648 encore | umax | mmax)
649 basic_machine=ns32k-encore
650 ;;
651 es1800 | OSE68k | ose68k | ose | OSE)
652 basic_machine=m68k-ericsson
653 os=-ose
654 ;;
655 fx2800)
656 basic_machine=i860-alliant
657 ;;
658 genix)
659 basic_machine=ns32k-ns
660 ;;
661 gmicro)
662 basic_machine=tron-gmicro
663 os=-sysv
664 ;;
665 go32)
666 basic_machine=i386-pc
667 os=-go32
668 ;;
669 h3050r* | hiux*)
670 basic_machine=hppa1.1-hitachi
671 os=-hiuxwe2
672 ;;
673 h8300hms)
674 basic_machine=h8300-hitachi
675 os=-hms
676 ;;
677 h8300xray)
678 basic_machine=h8300-hitachi
679 os=-xray
680 ;;
681 h8500hms)
682 basic_machine=h8500-hitachi
683 os=-hms
684 ;;
685 harris)
686 basic_machine=m88k-harris
687 os=-sysv3
688 ;;
689 hp300-*)
690 basic_machine=m68k-hp
691 ;;
692 hp300bsd)
693 basic_machine=m68k-hp
694 os=-bsd
695 ;;
696 hp300hpux)
697 basic_machine=m68k-hp
698 os=-hpux
699 ;;
700 hp3k9[0-9][0-9] | hp9[0-9][0-9])
701 basic_machine=hppa1.0-hp
702 ;;
703 hp9k2[0-9][0-9] | hp9k31[0-9])
704 basic_machine=m68000-hp
705 ;;
706 hp9k3[2-9][0-9])
707 basic_machine=m68k-hp
708 ;;
709 hp9k6[0-9][0-9] | hp6[0-9][0-9])
710 basic_machine=hppa1.0-hp
711 ;;
712 hp9k7[0-79][0-9] | hp7[0-79][0-9])
713 basic_machine=hppa1.1-hp
714 ;;
715 hp9k78[0-9] | hp78[0-9])
716 # FIXME: really hppa2.0-hp
717 basic_machine=hppa1.1-hp
718 ;;
719 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
720 # FIXME: really hppa2.0-hp
721 basic_machine=hppa1.1-hp
722 ;;
723 hp9k8[0-9][13679] | hp8[0-9][13679])
724 basic_machine=hppa1.1-hp
725 ;;
726 hp9k8[0-9][0-9] | hp8[0-9][0-9])
727 basic_machine=hppa1.0-hp
728 ;;
729 hppa-next)
730 os=-nextstep3
731 ;;
732 hppaosf)
733 basic_machine=hppa1.1-hp
734 os=-osf
735 ;;
736 hppro)
737 basic_machine=hppa1.1-hp
738 os=-proelf
739 ;;
740 i370-ibm* | ibm*)
741 basic_machine=i370-ibm
742 ;;
743 i*86v32)
744 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
745 os=-sysv32
746 ;;
747 i*86v4*)
748 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
749 os=-sysv4
750 ;;
751 i*86v)
752 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
753 os=-sysv
754 ;;
755 i*86sol2)
756 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
757 os=-solaris2
758 ;;
759 i386mach)
760 basic_machine=i386-mach
761 os=-mach
762 ;;
763 i386-vsta | vsta)
764 basic_machine=i386-unknown
765 os=-vsta
766 ;;
767 iris | iris4d)
768 basic_machine=mips-sgi
769 case $os in
770 -irix*)
1454 os=bsd
1455 ;;
1456 ctix* | uts*)
1457 os=sysv
1458 ;;
1459 nova*)
1460 os=rtmk-nova
1461 ;;
1462 ns2)
1463 os=nextstep2
1464 ;;
1465 # Preserve the version number of sinix5.
1466 sinix5.*)
1467 os=`echo "$os" | sed -e 's|sinix|sysv|'`
1468 ;;
1469 sinix*)
1470 os=sysv4
1471 ;;
1472 tpf*)
1473 os=tpf
1474 ;;
1475 triton*)
1476 os=sysv3
1477 ;;
1478 oss*)
1479 os=sysv3
1480 ;;
1481 svr4*)
1482 os=sysv4
1483 ;;
1484 svr3)
1485 os=sysv3
1486 ;;
1487 sysvr4)
1488 os=sysv4
1489 ;;
1490 ose*)
1491 os=ose
1492 ;;
1493 *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
1494 os=mint
1495 ;;
1496 dicos*)
1497 os=dicos
1498 ;;
1499 pikeos*)
1500 # Until real need of OS specific support for
1501 # particular features comes up, bare metal
1502 # configurations are quite functional.
1503 case $cpu in
1504 arm*)
1505 os=eabi
7711506 ;;
7721507 *)
773 os=-irix4
1508 os=elf
7741509 ;;
7751510 esac
7761511 ;;
777 isi68 | isi)
778 basic_machine=m68k-isi
779 os=-sysv
780 ;;
781 leon-*|leon[3-9]-*)
782 basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
783 ;;
784 m68knommu)
785 basic_machine=m68k-unknown
786 os=-linux
787 ;;
788 m68knommu-*)
789 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
790 os=-linux
791 ;;
792 m88k-omron*)
793 basic_machine=m88k-omron
794 ;;
795 magnum | m3230)
796 basic_machine=mips-mips
797 os=-sysv
798 ;;
799 merlin)
800 basic_machine=ns32k-utek
801 os=-sysv
802 ;;
803 microblaze*)
804 basic_machine=microblaze-xilinx
805 ;;
806 mingw64)
807 basic_machine=x86_64-pc
808 os=-mingw64
809 ;;
810 mingw32)
811 basic_machine=i686-pc
812 os=-mingw32
813 ;;
814 mingw32ce)
815 basic_machine=arm-unknown
816 os=-mingw32ce
817 ;;
818 miniframe)
819 basic_machine=m68000-convergent
820 ;;
821 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
822 basic_machine=m68k-atari
823 os=-mint
824 ;;
825 mips3*-*)
826 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
827 ;;
828 mips3*)
829 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
830 ;;
831 monitor)
832 basic_machine=m68k-rom68k
833 os=-coff
834 ;;
835 morphos)
836 basic_machine=powerpc-unknown
837 os=-morphos
838 ;;
839 moxiebox)
840 basic_machine=moxie-unknown
841 os=-moxiebox
842 ;;
843 msdos)
844 basic_machine=i386-pc
845 os=-msdos
846 ;;
847 ms1-*)
848 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
849 ;;
850 msys)
851 basic_machine=i686-pc
852 os=-msys
853 ;;
854 mvs)
855 basic_machine=i370-ibm
856 os=-mvs
857 ;;
858 nacl)
859 basic_machine=le32-unknown
860 os=-nacl
861 ;;
862 ncr3000)
863 basic_machine=i486-ncr
864 os=-sysv4
865 ;;
866 netbsd386)
867 basic_machine=i386-unknown
868 os=-netbsd
869 ;;
870 netwinder)
871 basic_machine=armv4l-rebel
872 os=-linux
873 ;;
874 news | news700 | news800 | news900)
875 basic_machine=m68k-sony
876 os=-newsos
877 ;;
878 news1000)
879 basic_machine=m68030-sony
880 os=-newsos
881 ;;
882 news-3600 | risc-news)
883 basic_machine=mips-sony
884 os=-newsos
885 ;;
886 necv70)
887 basic_machine=v70-nec
888 os=-sysv
889 ;;
890 next | m*-next )
891 basic_machine=m68k-next
892 case $os in
893 -nextstep* )
894 ;;
895 -ns2*)
896 os=-nextstep2
897 ;;
898 *)
899 os=-nextstep3
900 ;;
901 esac
902 ;;
903 nh3000)
904 basic_machine=m68k-harris
905 os=-cxux
906 ;;
907 nh[45]000)
908 basic_machine=m88k-harris
909 os=-cxux
910 ;;
911 nindy960)
912 basic_machine=i960-intel
913 os=-nindy
914 ;;
915 mon960)
916 basic_machine=i960-intel
917 os=-mon960
918 ;;
919 nonstopux)
920 basic_machine=mips-compaq
921 os=-nonstopux
922 ;;
923 np1)
924 basic_machine=np1-gould
925 ;;
926 neo-tandem)
927 basic_machine=neo-tandem
928 ;;
929 nse-tandem)
930 basic_machine=nse-tandem
931 ;;
932 nsr-tandem)
933 basic_machine=nsr-tandem
934 ;;
935 op50n-* | op60c-*)
936 basic_machine=hppa1.1-oki
937 os=-proelf
938 ;;
939 openrisc | openrisc-*)
940 basic_machine=or32-unknown
941 ;;
942 os400)
943 basic_machine=powerpc-ibm
944 os=-os400
945 ;;
946 OSE68000 | ose68000)
947 basic_machine=m68000-ericsson
948 os=-ose
949 ;;
950 os68k)
951 basic_machine=m68k-none
952 os=-os68k
953 ;;
954 pa-hitachi)
955 basic_machine=hppa1.1-hitachi
956 os=-hiuxwe2
957 ;;
958 paragon)
959 basic_machine=i860-intel
960 os=-osf
961 ;;
962 parisc)
963 basic_machine=hppa-unknown
964 os=-linux
965 ;;
966 parisc-*)
967 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
968 os=-linux
969 ;;
970 pbd)
971 basic_machine=sparc-tti
972 ;;
973 pbb)
974 basic_machine=m68k-tti
975 ;;
976 pc532 | pc532-*)
977 basic_machine=ns32k-pc532
978 ;;
979 pc98)
980 basic_machine=i386-pc
981 ;;
982 pc98-*)
983 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
984 ;;
985 pentium | p5 | k5 | k6 | nexgen | viac3)
986 basic_machine=i586-pc
987 ;;
988 pentiumpro | p6 | 6x86 | athlon | athlon_*)
989 basic_machine=i686-pc
990 ;;
991 pentiumii | pentium2 | pentiumiii | pentium3)
992 basic_machine=i686-pc
993 ;;
994 pentium4)
995 basic_machine=i786-pc
996 ;;
997 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
998 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
999 ;;
1000 pentiumpro-* | p6-* | 6x86-* | athlon-*)
1001 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1002 ;;
1003 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1004 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1005 ;;
1006 pentium4-*)
1007 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1008 ;;
1009 pn)
1010 basic_machine=pn-gould
1011 ;;
1012 power) basic_machine=power-ibm
1013 ;;
1014 ppc | ppcbe) basic_machine=powerpc-unknown
1015 ;;
1016 ppc-* | ppcbe-*)
1017 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1018 ;;
1019 ppcle | powerpclittle | ppc-le | powerpc-little)
1020 basic_machine=powerpcle-unknown
1021 ;;
1022 ppcle-* | powerpclittle-*)
1023 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1024 ;;
1025 ppc64) basic_machine=powerpc64-unknown
1026 ;;
1027 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1028 ;;
1029 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1030 basic_machine=powerpc64le-unknown
1031 ;;
1032 ppc64le-* | powerpc64little-*)
1033 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1034 ;;
1035 ps2)
1036 basic_machine=i386-ibm
1037 ;;
1038 pw32)
1039 basic_machine=i586-unknown
1040 os=-pw32
1041 ;;
1042 rdos | rdos64)
1043 basic_machine=x86_64-pc
1044 os=-rdos
1045 ;;
1046 rdos32)
1047 basic_machine=i386-pc
1048 os=-rdos
1049 ;;
1050 rom68k)
1051 basic_machine=m68k-rom68k
1052 os=-coff
1053 ;;
1054 rm[46]00)
1055 basic_machine=mips-siemens
1056 ;;
1057 rtpc | rtpc-*)
1058 basic_machine=romp-ibm
1059 ;;
1060 s390 | s390-*)
1061 basic_machine=s390-ibm
1062 ;;
1063 s390x | s390x-*)
1064 basic_machine=s390x-ibm
1065 ;;
1066 sa29200)
1067 basic_machine=a29k-amd
1068 os=-udi
1069 ;;
1070 sb1)
1071 basic_machine=mipsisa64sb1-unknown
1072 ;;
1073 sb1el)
1074 basic_machine=mipsisa64sb1el-unknown
1075 ;;
1076 sde)
1077 basic_machine=mipsisa32-sde
1078 os=-elf
1079 ;;
1080 sei)
1081 basic_machine=mips-sei
1082 os=-seiux
1083 ;;
1084 sequent)
1085 basic_machine=i386-sequent
1086 ;;
1087 sh)
1088 basic_machine=sh-hitachi
1089 os=-hms
1090 ;;
1091 sh5el)
1092 basic_machine=sh5le-unknown
1093 ;;
1094 sh64)
1095 basic_machine=sh64-unknown
1096 ;;
1097 sparclite-wrs | simso-wrs)
1098 basic_machine=sparclite-wrs
1099 os=-vxworks
1100 ;;
1101 sps7)
1102 basic_machine=m68k-bull
1103 os=-sysv2
1104 ;;
1105 spur)
1106 basic_machine=spur-unknown
1107 ;;
1108 st2000)
1109 basic_machine=m68k-tandem
1110 ;;
1111 stratus)
1112 basic_machine=i860-stratus
1113 os=-sysv4
1114 ;;
1115 strongarm-* | thumb-*)
1116 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1117 ;;
1118 sun2)
1119 basic_machine=m68000-sun
1120 ;;
1121 sun2os3)
1122 basic_machine=m68000-sun
1123 os=-sunos3
1124 ;;
1125 sun2os4)
1126 basic_machine=m68000-sun
1127 os=-sunos4
1128 ;;
1129 sun3os3)
1130 basic_machine=m68k-sun
1131 os=-sunos3
1132 ;;
1133 sun3os4)
1134 basic_machine=m68k-sun
1135 os=-sunos4
1136 ;;
1137 sun4os3)
1138 basic_machine=sparc-sun
1139 os=-sunos3
1140 ;;
1141 sun4os4)
1142 basic_machine=sparc-sun
1143 os=-sunos4
1144 ;;
1145 sun4sol2)
1146 basic_machine=sparc-sun
1147 os=-solaris2
1148 ;;
1149 sun3 | sun3-*)
1150 basic_machine=m68k-sun
1151 ;;
1152 sun4)
1153 basic_machine=sparc-sun
1154 ;;
1155 sun386 | sun386i | roadrunner)
1156 basic_machine=i386-sun
1157 ;;
1158 sv1)
1159 basic_machine=sv1-cray
1160 os=-unicos
1161 ;;
1162 symmetry)
1163 basic_machine=i386-sequent
1164 os=-dynix
1165 ;;
1166 t3e)
1167 basic_machine=alphaev5-cray
1168 os=-unicos
1169 ;;
1170 t90)
1171 basic_machine=t90-cray
1172 os=-unicos
1173 ;;
1174 tile*)
1175 basic_machine=$basic_machine-unknown
1176 os=-linux-gnu
1177 ;;
1178 tx39)
1179 basic_machine=mipstx39-unknown
1180 ;;
1181 tx39el)
1182 basic_machine=mipstx39el-unknown
1183 ;;
1184 toad1)
1185 basic_machine=pdp10-xkl
1186 os=-tops20
1187 ;;
1188 tower | tower-32)
1189 basic_machine=m68k-ncr
1190 ;;
1191 tpf)
1192 basic_machine=s390x-ibm
1193 os=-tpf
1194 ;;
1195 udi29k)
1196 basic_machine=a29k-amd
1197 os=-udi
1198 ;;
1199 ultra3)
1200 basic_machine=a29k-nyu
1201 os=-sym1
1202 ;;
1203 v810 | necv810)
1204 basic_machine=v810-nec
1205 os=-none
1206 ;;
1207 vaxv)
1208 basic_machine=vax-dec
1209 os=-sysv
1210 ;;
1211 vms)
1212 basic_machine=vax-dec
1213 os=-vms
1214 ;;
1215 vpp*|vx|vx-*)
1216 basic_machine=f301-fujitsu
1217 ;;
1218 vxworks960)
1219 basic_machine=i960-wrs
1220 os=-vxworks
1221 ;;
1222 vxworks68)
1223 basic_machine=m68k-wrs
1224 os=-vxworks
1225 ;;
1226 vxworks29k)
1227 basic_machine=a29k-wrs
1228 os=-vxworks
1229 ;;
1230 w65*)
1231 basic_machine=w65-wdc
1232 os=-none
1233 ;;
1234 w89k-*)
1235 basic_machine=hppa1.1-winbond
1236 os=-proelf
1237 ;;
1238 xbox)
1239 basic_machine=i686-pc
1240 os=-mingw32
1241 ;;
1242 xps | xps100)
1243 basic_machine=xps100-honeywell
1244 ;;
1245 xscale-* | xscalee[bl]-*)
1246 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1247 ;;
1248 ymp)
1249 basic_machine=ymp-cray
1250 os=-unicos
1251 ;;
1252 z8k-*-coff)
1253 basic_machine=z8k-unknown
1254 os=-sim
1255 ;;
1256 z80-*-coff)
1257 basic_machine=z80-unknown
1258 os=-sim
1259 ;;
1260 none)
1261 basic_machine=none-none
1262 os=-none
1263 ;;
1264
1265 # Here we handle the default manufacturer of certain CPU types. It is in
1266 # some cases the only manufacturer, in others, it is the most popular.
1267 w89k)
1268 basic_machine=hppa1.1-winbond
1269 ;;
1270 op50n)
1271 basic_machine=hppa1.1-oki
1272 ;;
1273 op60c)
1274 basic_machine=hppa1.1-oki
1275 ;;
1276 romp)
1277 basic_machine=romp-ibm
1278 ;;
1279 mmix)
1280 basic_machine=mmix-knuth
1281 ;;
1282 rs6000)
1283 basic_machine=rs6000-ibm
1284 ;;
1285 vax)
1286 basic_machine=vax-dec
1287 ;;
1288 pdp10)
1289 # there are many clones, so DEC is not a safe bet
1290 basic_machine=pdp10-unknown
1291 ;;
1292 pdp11)
1293 basic_machine=pdp11-dec
1294 ;;
1295 we32k)
1296 basic_machine=we32k-att
1297 ;;
1298 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1299 basic_machine=sh-unknown
1300 ;;
1301 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1302 basic_machine=sparc-sun
1303 ;;
1304 cydra)
1305 basic_machine=cydra-cydrome
1306 ;;
1307 orion)
1308 basic_machine=orion-highlevel
1309 ;;
1310 orion105)
1311 basic_machine=clipper-highlevel
1312 ;;
1313 mac | mpw | mac-mpw)
1314 basic_machine=m68k-apple
1315 ;;
1316 pmac | pmac-mpw)
1317 basic_machine=powerpc-apple
1318 ;;
1319 *-unknown)
1320 # Make sure to match an already-canonicalized machine name.
1321 ;;
13221512 *)
1323 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1324 exit 1
1513 # No normalization, but not necessarily accepted, that comes below.
13251514 ;;
13261515 esac
13271516
1328 # Here we canonicalize certain aliases for manufacturers.
1329 case $basic_machine in
1330 *-digital*)
1331 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1332 ;;
1333 *-commodore*)
1334 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1335 ;;
1336 *)
1337 ;;
1338 esac
1339
1340 # Decode manufacturer-specific aliases for certain operating systems.
1341
1342 if [ x"$os" != x"" ]
1343 then
1344 case $os in
1345 # First match some system type aliases
1346 # that might get confused with valid system types.
1347 # -solaris* is a basic system type, with this one exception.
1348 -auroraux)
1349 os=-auroraux
1350 ;;
1351 -solaris1 | -solaris1.*)
1352 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1353 ;;
1354 -solaris)
1355 os=-solaris2
1356 ;;
1357 -svr4*)
1358 os=-sysv4
1359 ;;
1360 -unixware*)
1361 os=-sysv4.2uw
1362 ;;
1363 -gnu/linux*)
1364 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1365 ;;
1366 # First accept the basic system types.
1367 # The portable systems comes first.
1368 # Each alternative MUST END IN A *, to match a version number.
1369 # -sysv* is not here because it comes later, after sysvr4.
1370 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1371 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1372 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1373 | -sym* | -kopensolaris* | -plan9* \
1374 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1375 | -aos* | -aros* \
1376 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1377 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1378 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1379 | -bitrig* | -openbsd* | -solidbsd* \
1380 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1381 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1382 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1383 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1384 | -chorusos* | -chorusrdb* | -cegcc* \
1385 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1386 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1387 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1388 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1389 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1390 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1391 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1392 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1393 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1394 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1395 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1396 # Remember, each alternative MUST END IN *, to match a version number.
1397 ;;
1398 -qnx*)
1399 case $basic_machine in
1400 x86-* | i*86-*)
1401 ;;
1402 *)
1403 os=-nto$os
1404 ;;
1405 esac
1406 ;;
1407 -nto-qnx*)
1408 ;;
1409 -nto*)
1410 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1411 ;;
1412 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1413 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1414 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1415 ;;
1416 -mac*)
1417 os=`echo $os | sed -e 's|mac|macos|'`
1418 ;;
1419 -linux-dietlibc)
1420 os=-linux-dietlibc
1421 ;;
1422 -linux*)
1423 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1424 ;;
1425 -sunos5*)
1426 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1427 ;;
1428 -sunos6*)
1429 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1430 ;;
1431 -opened*)
1432 os=-openedition
1433 ;;
1434 -os400*)
1435 os=-os400
1436 ;;
1437 -wince*)
1438 os=-wince
1439 ;;
1440 -osfrose*)
1441 os=-osfrose
1442 ;;
1443 -osf*)
1444 os=-osf
1445 ;;
1446 -utek*)
1447 os=-bsd
1448 ;;
1449 -dynix*)
1450 os=-bsd
1451 ;;
1452 -acis*)
1453 os=-aos
1454 ;;
1455 -atheos*)
1456 os=-atheos
1457 ;;
1458 -syllable*)
1459 os=-syllable
1460 ;;
1461 -386bsd)
1462 os=-bsd
1463 ;;
1464 -ctix* | -uts*)
1465 os=-sysv
1466 ;;
1467 -nova*)
1468 os=-rtmk-nova
1469 ;;
1470 -ns2 )
1471 os=-nextstep2
1472 ;;
1473 -nsk*)
1474 os=-nsk
1475 ;;
1476 # Preserve the version number of sinix5.
1477 -sinix5.*)
1478 os=`echo $os | sed -e 's|sinix|sysv|'`
1479 ;;
1480 -sinix*)
1481 os=-sysv4
1482 ;;
1483 -tpf*)
1484 os=-tpf
1485 ;;
1486 -triton*)
1487 os=-sysv3
1488 ;;
1489 -oss*)
1490 os=-sysv3
1491 ;;
1492 -svr4)
1493 os=-sysv4
1494 ;;
1495 -svr3)
1496 os=-sysv3
1497 ;;
1498 -sysvr4)
1499 os=-sysv4
1500 ;;
1501 # This must come after -sysvr4.
1502 -sysv*)
1503 ;;
1504 -ose*)
1505 os=-ose
1506 ;;
1507 -es1800*)
1508 os=-ose
1509 ;;
1510 -xenix)
1511 os=-xenix
1512 ;;
1513 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1514 os=-mint
1515 ;;
1516 -aros*)
1517 os=-aros
1518 ;;
1519 -zvmoe)
1520 os=-zvmoe
1521 ;;
1522 -dicos*)
1523 os=-dicos
1524 ;;
1525 -nacl*)
1526 ;;
1527 -none)
1528 ;;
1529 *)
1530 # Get rid of the `-' at the beginning of $os.
1531 os=`echo $os | sed 's/[^-]*-//'`
1532 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1533 exit 1
1534 ;;
1535 esac
15361517 else
15371518
15381519 # Here we handle the default operating systems that come with various machines.
15451526 # will signal an error saying that MANUFACTURER isn't an operating
15461527 # system, and we'll never get to this point.
15471528
1548 case $basic_machine in
1529 kernel=
1530 case $cpu-$vendor in
15491531 score-*)
1550 os=-elf
1532 os=elf
15511533 ;;
15521534 spu-*)
1553 os=-elf
1535 os=elf
15541536 ;;
15551537 *-acorn)
1556 os=-riscix1.2
1538 os=riscix1.2
15571539 ;;
15581540 arm*-rebel)
1559 os=-linux
1541 kernel=linux
1542 os=gnu
15601543 ;;
15611544 arm*-semi)
1562 os=-aout
1545 os=aout
15631546 ;;
15641547 c4x-* | tic4x-*)
1565 os=-coff
1548 os=coff
15661549 ;;
15671550 c8051-*)
1568 os=-elf
1551 os=elf
1552 ;;
1553 clipper-intergraph)
1554 os=clix
15691555 ;;
15701556 hexagon-*)
1571 os=-elf
1557 os=elf
15721558 ;;
15731559 tic54x-*)
1574 os=-coff
1560 os=coff
15751561 ;;
15761562 tic55x-*)
1577 os=-coff
1563 os=coff
15781564 ;;
15791565 tic6x-*)
1580 os=-coff
1566 os=coff
15811567 ;;
15821568 # This must come before the *-dec entry.
15831569 pdp10-*)
1584 os=-tops20
1570 os=tops20
15851571 ;;
15861572 pdp11-*)
1587 os=-none
1573 os=none
15881574 ;;
15891575 *-dec | vax-*)
1590 os=-ultrix4.2
1576 os=ultrix4.2
15911577 ;;
15921578 m68*-apollo)
1593 os=-domain
1579 os=domain
15941580 ;;
15951581 i386-sun)
1596 os=-sunos4.0.2
1582 os=sunos4.0.2
15971583 ;;
15981584 m68000-sun)
1599 os=-sunos3
1585 os=sunos3
16001586 ;;
16011587 m68*-cisco)
1602 os=-aout
1588 os=aout
16031589 ;;
16041590 mep-*)
1605 os=-elf
1591 os=elf
16061592 ;;
16071593 mips*-cisco)
1608 os=-elf
1594 os=elf
16091595 ;;
16101596 mips*-*)
1611 os=-elf
1597 os=elf
16121598 ;;
16131599 or32-*)
1614 os=-coff
1600 os=coff
16151601 ;;
16161602 *-tti) # must be before sparc entry or we get the wrong os.
1617 os=-sysv3
1603 os=sysv3
16181604 ;;
16191605 sparc-* | *-sun)
1620 os=-sunos4.1.1
1606 os=sunos4.1.1
1607 ;;
1608 pru-*)
1609 os=elf
16211610 ;;
16221611 *-be)
1623 os=-beos
1624 ;;
1625 *-haiku)
1626 os=-haiku
1612 os=beos
16271613 ;;
16281614 *-ibm)
1629 os=-aix
1615 os=aix
16301616 ;;
16311617 *-knuth)
1632 os=-mmixware
1618 os=mmixware
16331619 ;;
16341620 *-wec)
1635 os=-proelf
1621 os=proelf
16361622 ;;
16371623 *-winbond)
1638 os=-proelf
1624 os=proelf
16391625 ;;
16401626 *-oki)
1641 os=-proelf
1627 os=proelf
16421628 ;;
16431629 *-hp)
1644 os=-hpux
1630 os=hpux
16451631 ;;
16461632 *-hitachi)
1647 os=-hiux
1633 os=hiux
16481634 ;;
16491635 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1650 os=-sysv
1636 os=sysv
16511637 ;;
16521638 *-cbm)
1653 os=-amigaos
1639 os=amigaos
16541640 ;;
16551641 *-dg)
1656 os=-dgux
1642 os=dgux
16571643 ;;
16581644 *-dolphin)
1659 os=-sysv3
1645 os=sysv3
16601646 ;;
16611647 m68k-ccur)
1662 os=-rtu
1648 os=rtu
16631649 ;;
16641650 m88k-omron*)
1665 os=-luna
1666 ;;
1667 *-next )
1668 os=-nextstep
1651 os=luna
1652 ;;
1653 *-next)
1654 os=nextstep
16691655 ;;
16701656 *-sequent)
1671 os=-ptx
1657 os=ptx
16721658 ;;
16731659 *-crds)
1674 os=-unos
1660 os=unos
16751661 ;;
16761662 *-ns)
1677 os=-genix
1663 os=genix
16781664 ;;
16791665 i370-*)
1680 os=-mvs
1681 ;;
1682 *-next)
1683 os=-nextstep3
1666 os=mvs
16841667 ;;
16851668 *-gould)
1686 os=-sysv
1669 os=sysv
16871670 ;;
16881671 *-highlevel)
1689 os=-bsd
1672 os=bsd
16901673 ;;
16911674 *-encore)
1692 os=-bsd
1675 os=bsd
16931676 ;;
16941677 *-sgi)
1695 os=-irix
1678 os=irix
16961679 ;;
16971680 *-siemens)
1698 os=-sysv4
1681 os=sysv4
16991682 ;;
17001683 *-masscomp)
1701 os=-rtu
1684 os=rtu
17021685 ;;
17031686 f30[01]-fujitsu | f700-fujitsu)
1704 os=-uxpv
1687 os=uxpv
17051688 ;;
17061689 *-rom68k)
1707 os=-coff
1690 os=coff
17081691 ;;
17091692 *-*bug)
1710 os=-coff
1693 os=coff
17111694 ;;
17121695 *-apple)
1713 os=-macos
1696 os=macos
17141697 ;;
17151698 *-atari*)
1716 os=-mint
1699 os=mint
1700 ;;
1701 *-wrs)
1702 os=vxworks
17171703 ;;
17181704 *)
1719 os=-none
1705 os=none
17201706 ;;
17211707 esac
1708
17221709 fi
1710
1711 # Now, validate our (potentially fixed-up) OS.
1712 case $os in
1713 # Sometimes we do "kernel-libc", so those need to count as OSes.
1714 musl* | newlib* | relibc* | uclibc*)
1715 ;;
1716 # Likewise for "kernel-abi"
1717 eabi* | gnueabi*)
1718 ;;
1719 # VxWorks passes extra cpu info in the 4th filed.
1720 simlinux | simwindows | spe)
1721 ;;
1722 # Now accept the basic system types.
1723 # The portable systems comes first.
1724 # Each alternative MUST end in a * to match a version number.
1725 gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
1726 | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
1727 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1728 | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
1729 | hiux* | abug | nacl* | netware* | windows* \
1730 | os9* | macos* | osx* | ios* \
1731 | mpw* | magic* | mmixware* | mon960* | lnews* \
1732 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1733 | aos* | aros* | cloudabi* | sortix* | twizzler* \
1734 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1735 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1736 | mirbsd* | netbsd* | dicos* | openedition* | ose* \
1737 | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
1738 | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
1739 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1740 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
1741 | udi* | lites* | ieee* | go32* | aux* | hcos* \
1742 | chorusrdb* | cegcc* | glidix* | serenity* \
1743 | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
1744 | midipix* | mingw32* | mingw64* | mint* \
1745 | uxpv* | beos* | mpeix* | udk* | moxiebox* \
1746 | interix* | uwin* | mks* | rhapsody* | darwin* \
1747 | openstep* | oskit* | conix* | pw32* | nonstopux* \
1748 | storm-chaos* | tops10* | tenex* | tops20* | its* \
1749 | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
1750 | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
1751 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1752 | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1753 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1754 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1755 | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
1756 | fiwix* )
1757 ;;
1758 # This one is extra strict with allowed versions
1759 sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
1760 # Don't forget version if it is 3.2v4 or newer.
1761 ;;
1762 none)
1763 ;;
1764 *)
1765 echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
1766 exit 1
1767 ;;
1768 esac
1769
1770 # As a final step for OS-related things, validate the OS-kernel combination
1771 # (given a valid OS), if there is a kernel.
1772 case $kernel-$os in
1773 linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
1774 | linux-musl* | linux-relibc* | linux-uclibc* )
1775 ;;
1776 uclinux-uclibc* )
1777 ;;
1778 -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
1779 # These are just libc implementations, not actual OSes, and thus
1780 # require a kernel.
1781 echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
1782 exit 1
1783 ;;
1784 kfreebsd*-gnu* | kopensolaris*-gnu*)
1785 ;;
1786 vxworks-simlinux | vxworks-simwindows | vxworks-spe)
1787 ;;
1788 nto-qnx*)
1789 ;;
1790 os2-emx)
1791 ;;
1792 *-eabi* | *-gnueabi*)
1793 ;;
1794 -*)
1795 # Blank kernel with real OS is always fine.
1796 ;;
1797 *-*)
1798 echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
1799 exit 1
1800 ;;
1801 esac
17231802
17241803 # Here we handle the case where we know the os, and the CPU type, but not the
17251804 # manufacturer. We pick the logical manufacturer.
1726 vendor=unknown
1727 case $basic_machine in
1728 *-unknown)
1729 case $os in
1730 -riscix*)
1805 case $vendor in
1806 unknown)
1807 case $cpu-$os in
1808 *-riscix*)
17311809 vendor=acorn
17321810 ;;
1733 -sunos*)
1811 *-sunos*)
17341812 vendor=sun
17351813 ;;
1736 -cnk*|-aix*)
1814 *-cnk* | *-aix*)
17371815 vendor=ibm
17381816 ;;
1739 -beos*)
1817 *-beos*)
17401818 vendor=be
17411819 ;;
1742 -hpux*)
1820 *-hpux*)
17431821 vendor=hp
17441822 ;;
1745 -mpeix*)
1823 *-mpeix*)
17461824 vendor=hp
17471825 ;;
1748 -hiux*)
1826 *-hiux*)
17491827 vendor=hitachi
17501828 ;;
1751 -unos*)
1829 *-unos*)
17521830 vendor=crds
17531831 ;;
1754 -dgux*)
1832 *-dgux*)
17551833 vendor=dg
17561834 ;;
1757 -luna*)
1835 *-luna*)
17581836 vendor=omron
17591837 ;;
1760 -genix*)
1838 *-genix*)
17611839 vendor=ns
17621840 ;;
1763 -mvs* | -opened*)
1841 *-clix*)
1842 vendor=intergraph
1843 ;;
1844 *-mvs* | *-opened*)
17641845 vendor=ibm
17651846 ;;
1766 -os400*)
1847 *-os400*)
17671848 vendor=ibm
17681849 ;;
1769 -ptx*)
1850 s390-* | s390x-*)
1851 vendor=ibm
1852 ;;
1853 *-ptx*)
17701854 vendor=sequent
17711855 ;;
1772 -tpf*)
1856 *-tpf*)
17731857 vendor=ibm
17741858 ;;
1775 -vxsim* | -vxworks* | -windiss*)
1859 *-vxsim* | *-vxworks* | *-windiss*)
17761860 vendor=wrs
17771861 ;;
1778 -aux*)
1862 *-aux*)
17791863 vendor=apple
17801864 ;;
1781 -hms*)
1865 *-hms*)
17821866 vendor=hitachi
17831867 ;;
1784 -mpw* | -macos*)
1868 *-mpw* | *-macos*)
17851869 vendor=apple
17861870 ;;
1787 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1871 *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
17881872 vendor=atari
17891873 ;;
1790 -vos*)
1874 *-vos*)
17911875 vendor=stratus
17921876 ;;
17931877 esac
1794 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
17951878 ;;
17961879 esac
17971880
1798 echo $basic_machine$os
1881 echo "$cpu-$vendor-${kernel:+$kernel-}$os"
17991882 exit
18001883
18011884 # Local variables:
1802 # eval: (add-hook 'write-file-hooks 'time-stamp)
1885 # eval: (add-hook 'before-save-hook 'time-stamp)
18031886 # time-stamp-start: "timestamp='"
18041887 # time-stamp-format: "%:y-%02m-%02d"
18051888 # time-stamp-end: "'"
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.71 for pkgconf 1.8.0.
2 # Generated by GNU Autoconf 2.71 for pkgconf 1.8.1.
33 #
44 # Report bugs to <https://github.com/pkgconf/pkgconf/issues/new>.
55 #
620620 # Identity of this package.
621621 PACKAGE_NAME='pkgconf'
622622 PACKAGE_TARNAME='pkgconf'
623 PACKAGE_VERSION='1.8.0'
624 PACKAGE_STRING='pkgconf 1.8.0'
623 PACKAGE_VERSION='1.8.1'
624 PACKAGE_STRING='pkgconf 1.8.1'
625625 PACKAGE_BUGREPORT='https://github.com/pkgconf/pkgconf/issues/new'
626626 PACKAGE_URL=''
627627
679679 AR
680680 DLLTOOL
681681 OBJDUMP
682 FILECMD
682683 LN_S
683684 NM
684685 ac_ct_DUMPBIN
701702 AM_DEFAULT_VERBOSITY
702703 AM_DEFAULT_V
703704 AM_V
705 CSCOPE
706 ETAGS
707 CTAGS
704708 am__fastdepCC_FALSE
705709 am__fastdepCC_TRUE
706710 CCDEPMODE
13571361 # Omit some internal or obsolete options to make the list less imposing.
13581362 # This message is too long to be a string in the A/UX 3.1 sh.
13591363 cat <<_ACEOF
1360 \`configure' configures pkgconf 1.8.0 to adapt to many kinds of systems.
1364 \`configure' configures pkgconf 1.8.1 to adapt to many kinds of systems.
13611365
13621366 Usage: $0 [OPTION]... [VAR=VALUE]...
13631367
14281432
14291433 if test -n "$ac_init_help"; then
14301434 case $ac_init_help in
1431 short | recursive ) echo "Configuration of pkgconf 1.8.0:";;
1435 short | recursive ) echo "Configuration of pkgconf 1.8.1:";;
14321436 esac
14331437 cat <<\_ACEOF
14341438
15481552 test -n "$ac_init_help" && exit $ac_status
15491553 if $ac_init_version; then
15501554 cat <<\_ACEOF
1551 pkgconf configure 1.8.0
1555 pkgconf configure 1.8.1
15521556 generated by GNU Autoconf 2.71
15531557
15541558 Copyright (C) 2021 Free Software Foundation, Inc.
18041808 This file contains any messages produced by compilers while
18051809 running configure, to aid debugging if configure makes a mistake.
18061810
1807 It was created by pkgconf $as_me 1.8.0, which was
1811 It was created by pkgconf $as_me 1.8.1, which was
18081812 generated by GNU Autoconf 2.71. Invocation command line was
18091813
18101814 $ $0$ac_configure_args_raw
44444448
44454449 # Define the identity of the package.
44464450 PACKAGE='pkgconf'
4447 VERSION='1.8.0'
4451 VERSION='1.8.1'
44484452
44494453
44504454 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
46194623 fi
46204624
46214625
4626 # Variables for tags utilities; see am/tags.am
4627 if test -z "$CTAGS"; then
4628 CTAGS=ctags
4629 fi
4630
4631 if test -z "$ETAGS"; then
4632 ETAGS=etags
4633 fi
4634
4635 if test -z "$CSCOPE"; then
4636 CSCOPE=cscope
4637 fi
4638
4639
46224640
46234641 # POSIX will say in a future version that running "rm -f" with no argument
46244642 # is OK; and we want to be able to make that assumption in our Makefile
47114729
47124730
47134731
4714 macro_version='2.4.6'
4715 macro_revision='2.4.6'
4732 macro_version='2.4.7'
4733 macro_revision='2.4.7'
47164734
47174735
47184736
53405358 mingw*) lt_bad_file=conftest.nm/nofile ;;
53415359 *) lt_bad_file=/dev/null ;;
53425360 esac
5343 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
5361 case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
53445362 *$lt_bad_file* | *'Invalid file or object type'*)
53455363 lt_cv_path_NM="$tmp_nm -B"
53465364 break 2
53475365 ;;
53485366 *)
5349 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5367 case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
53505368 */dev/null*)
53515369 lt_cv_path_NM="$tmp_nm -p"
53525370 break 2
54845502 fi
54855503 fi
54865504
5487 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
5505 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
54885506 *COFF*)
54895507 DUMPBIN="$DUMPBIN -symbols -headers"
54905508 ;;
55885606 lt_cv_sys_max_cmd_len=8192;
55895607 ;;
55905608
5591 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
5609 bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
55925610 # This has been around since 386BSD, at least. Likely further.
55935611 if test -x /sbin/sysctl; then
55945612 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
56315649 sysv5* | sco5v6* | sysv4.2uw2*)
56325650 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
56335651 if test -n "$kargmax"; then
5634 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
5652 lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'`
56355653 else
56365654 lt_cv_sys_max_cmd_len=32768
56375655 fi
58375855
58385856
58395857 if test -n "$ac_tool_prefix"; then
5858 # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
5859 set dummy ${ac_tool_prefix}file; ac_word=$2
5860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5861 printf %s "checking for $ac_word... " >&6; }
5862 if test ${ac_cv_prog_FILECMD+y}
5863 then :
5864 printf %s "(cached) " >&6
5865 else $as_nop
5866 if test -n "$FILECMD"; then
5867 ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
5868 else
5869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5870 for as_dir in $PATH
5871 do
5872 IFS=$as_save_IFS
5873 case $as_dir in #(((
5874 '') as_dir=./ ;;
5875 */) ;;
5876 *) as_dir=$as_dir/ ;;
5877 esac
5878 for ac_exec_ext in '' $ac_executable_extensions; do
5879 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5880 ac_cv_prog_FILECMD="${ac_tool_prefix}file"
5881 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5882 break 2
5883 fi
5884 done
5885 done
5886 IFS=$as_save_IFS
5887
5888 fi
5889 fi
5890 FILECMD=$ac_cv_prog_FILECMD
5891 if test -n "$FILECMD"; then
5892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
5893 printf "%s\n" "$FILECMD" >&6; }
5894 else
5895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5896 printf "%s\n" "no" >&6; }
5897 fi
5898
5899
5900 fi
5901 if test -z "$ac_cv_prog_FILECMD"; then
5902 ac_ct_FILECMD=$FILECMD
5903 # Extract the first word of "file", so it can be a program name with args.
5904 set dummy file; ac_word=$2
5905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5906 printf %s "checking for $ac_word... " >&6; }
5907 if test ${ac_cv_prog_ac_ct_FILECMD+y}
5908 then :
5909 printf %s "(cached) " >&6
5910 else $as_nop
5911 if test -n "$ac_ct_FILECMD"; then
5912 ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
5913 else
5914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5915 for as_dir in $PATH
5916 do
5917 IFS=$as_save_IFS
5918 case $as_dir in #(((
5919 '') as_dir=./ ;;
5920 */) ;;
5921 *) as_dir=$as_dir/ ;;
5922 esac
5923 for ac_exec_ext in '' $ac_executable_extensions; do
5924 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5925 ac_cv_prog_ac_ct_FILECMD="file"
5926 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5927 break 2
5928 fi
5929 done
5930 done
5931 IFS=$as_save_IFS
5932
5933 fi
5934 fi
5935 ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
5936 if test -n "$ac_ct_FILECMD"; then
5937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
5938 printf "%s\n" "$ac_ct_FILECMD" >&6; }
5939 else
5940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5941 printf "%s\n" "no" >&6; }
5942 fi
5943
5944 if test "x$ac_ct_FILECMD" = x; then
5945 FILECMD=":"
5946 else
5947 case $cross_compiling:$ac_tool_warned in
5948 yes:)
5949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5950 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5951 ac_tool_warned=yes ;;
5952 esac
5953 FILECMD=$ac_ct_FILECMD
5954 fi
5955 else
5956 FILECMD="$ac_cv_prog_FILECMD"
5957 fi
5958
5959
5960
5961
5962
5963
5964
5965 if test -n "$ac_tool_prefix"; then
58405966 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
58415967 set dummy ${ac_tool_prefix}objdump; ac_word=$2
58425968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59796105
59806106 bsdi[45]*)
59816107 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5982 lt_cv_file_magic_cmd='/usr/bin/file -L'
6108 lt_cv_file_magic_cmd='$FILECMD -L'
59836109 lt_cv_file_magic_test_file=/shlib/libc.so
59846110 ;;
59856111
60136139 lt_cv_deplibs_check_method=pass_all
60146140 ;;
60156141
6016 freebsd* | dragonfly*)
6142 freebsd* | dragonfly* | midnightbsd*)
60176143 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
60186144 case $host_cpu in
60196145 i*86 )
60206146 # Not sure whether the presence of OpenBSD here was a mistake.
60216147 # Let's accept both of them until this is cleared up.
60226148 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6023 lt_cv_file_magic_cmd=/usr/bin/file
6149 lt_cv_file_magic_cmd=$FILECMD
60246150 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
60256151 ;;
60266152 esac
60346160 ;;
60356161
60366162 hpux10.20* | hpux11*)
6037 lt_cv_file_magic_cmd=/usr/bin/file
6163 lt_cv_file_magic_cmd=$FILECMD
60386164 case $host_cpu in
60396165 ia64*)
60406166 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
60816207
60826208 newos6*)
60836209 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6084 lt_cv_file_magic_cmd=/usr/bin/file
6210 lt_cv_file_magic_cmd=$FILECMD
60856211 lt_cv_file_magic_test_file=/usr/lib/libnls.so
60866212 ;;
60876213
64546580 fi
64556581
64566582 : ${AR=ar}
6457 : ${AR_FLAGS=cru}
6458
6459
6460
6461
6462
6583
6584
6585
6586
6587
6588
6589 # Use ARFLAGS variable as AR's operation code to sync the variable naming with
6590 # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
6591 # higher priority because thats what people were doing historically (setting
6592 # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
6593 # variable obsoleted/removed.
6594
6595 test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
6596 lt_ar_flags=$AR_FLAGS
6597
6598
6599
6600
6601
6602
6603 # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
6604 # by AR_FLAGS because that was never working and AR_FLAGS is about to die.
64636605
64646606
64656607
68777019
68787020 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
68797021 # Gets list of data symbols to import.
6880 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
7022 lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
68817023 # Adjust the below global symbol transforms to fixup imported variables.
68827024 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
68837025 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
68957037 # Transform an extracted symbol line into a proper C declaration.
68967038 # Some systems (esp. on ia64) link data and code symbols differently,
68977039 # so use this general approach.
6898 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
7040 lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
68997041 $lt_cdecl_hook\
69007042 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
69017043 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
69027044
69037045 # Transform an extracted symbol line into symbol name and symbol address
6904 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
7046 lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
69057047 $lt_c_name_hook\
69067048 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
69077049 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
69087050
69097051 # Transform an extracted symbol line into symbol name with lib prefix and
69107052 # symbol address.
6911 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
7053 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
69127054 $lt_c_name_lib_hook\
69137055 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
69147056 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
69327074 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
69337075 # Fake it for dumpbin and say T for any non-static function,
69347076 # D for any global variable and I for any imported variable.
6935 # Also find C++ and __fastcall symbols from MSVC++,
7077 # Also find C++ and __fastcall symbols from MSVC++ or ICC,
69367078 # which start with @ or ?.
69377079 lt_cv_sys_global_symbol_pipe="$AWK '"\
69387080 " {last_section=section; section=\$ 3};"\
69507092 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
69517093 " ' prfx=^$ac_symprfx"
69527094 else
6953 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7095 lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
69547096 fi
6955 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
7097 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
69567098
69577099 # Check to see that the pipe works correctly.
69587100 pipe_works=no
71557297 fi
71567298 ;; #(
71577299 /*)
7158 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
7300 lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
71597301 ;; #(
71607302 no|'')
71617303 ;; #(
72807422 ac_status=$?
72817423 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
72827424 test $ac_status = 0; }; then
7283 case `/usr/bin/file conftest.$ac_objext` in
7425 case `$FILECMD conftest.$ac_objext` in
72847426 *ELF-32*)
72857427 HPUX_IA64_MODE=32
72867428 ;;
73017443 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
73027444 test $ac_status = 0; }; then
73037445 if test yes = "$lt_cv_prog_gnu_ld"; then
7304 case `/usr/bin/file conftest.$ac_objext` in
7446 case `$FILECMD conftest.$ac_objext` in
73057447 *32-bit*)
73067448 LD="${LD-ld} -melf32bsmip"
73077449 ;;
73137455 ;;
73147456 esac
73157457 else
7316 case `/usr/bin/file conftest.$ac_objext` in
7458 case `$FILECMD conftest.$ac_objext` in
73177459 *32-bit*)
73187460 LD="${LD-ld} -32"
73197461 ;;
73397481 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
73407482 test $ac_status = 0; }; then
73417483 emul=elf
7342 case `/usr/bin/file conftest.$ac_objext` in
7484 case `$FILECMD conftest.$ac_objext` in
73437485 *32-bit*)
73447486 emul="${emul}32"
73457487 ;;
73477489 emul="${emul}64"
73487490 ;;
73497491 esac
7350 case `/usr/bin/file conftest.$ac_objext` in
7492 case `$FILECMD conftest.$ac_objext` in
73517493 *MSB*)
73527494 emul="${emul}btsmip"
73537495 ;;
73557497 emul="${emul}ltsmip"
73567498 ;;
73577499 esac
7358 case `/usr/bin/file conftest.$ac_objext` in
7500 case `$FILECMD conftest.$ac_objext` in
73597501 *N32*)
73607502 emul="${emul}n32"
73617503 ;;
73797521 ac_status=$?
73807522 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
73817523 test $ac_status = 0; }; then
7382 case `/usr/bin/file conftest.o` in
7524 case `$FILECMD conftest.o` in
73837525 *32-bit*)
73847526 case $host in
73857527 x86_64-*kfreebsd*-gnu)
73867528 LD="${LD-ld} -m elf_i386_fbsd"
73877529 ;;
73887530 x86_64-*linux*)
7389 case `/usr/bin/file conftest.o` in
7531 case `$FILECMD conftest.o` in
73907532 *x86-64*)
73917533 LD="${LD-ld} -m elf32_x86_64"
73927534 ;;
74947636 ac_status=$?
74957637 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
74967638 test $ac_status = 0; }; then
7497 case `/usr/bin/file conftest.o` in
7639 case `$FILECMD conftest.o` in
74987640 *64-bit*)
74997641 case $lt_cv_prog_gnu_ld in
75007642 yes*)
82778419 _LT_EOF
82788420 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
82798421 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
8280 echo "$AR cru libconftest.a conftest.o" >&5
8281 $AR cru libconftest.a conftest.o 2>&5
8422 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
8423 $AR $AR_FLAGS libconftest.a conftest.o 2>&5
82828424 echo "$RANLIB libconftest.a" >&5
82838425 $RANLIB libconftest.a 2>&5
82848426 cat > conftest.c << _LT_EOF
83058447 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
83068448 darwin1.*)
83078449 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
8308 darwin*) # darwin 5.x on
8309 # if running on 10.5 or later, the deployment target defaults
8310 # to the OS version, if on x86, and 10.4, the deployment
8311 # target defaults to 10.4. Don't you love it?
8312 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
8313 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
8314 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
8315 10.[012][,.]*)
8316 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
8317 10.*)
8318 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
8450 darwin*)
8451 case $MACOSX_DEPLOYMENT_TARGET,$host in
8452 10.[012],*|,*powerpc*-darwin[5-8]*)
8453 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
8454 *)
8455 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
83198456 esac
83208457 ;;
83218458 esac
86748811 ofile=libtool
86758812 can_build_shared=yes
86768813
8677 # All known linkers require a '.a' archive for static linking (except MSVC,
8678 # which needs '.lib').
8814 # All known linkers require a '.a' archive for static linking (except MSVC and
8815 # ICC, which need '.lib').
86798816 libext=a
86808817
86818818 with_gnu_ld=$lt_cv_prog_gnu_ld
91879324 lt_prog_compiler_static='-qstaticlink'
91889325 ;;
91899326 *)
9190 case `$CC -V 2>&1 | sed 5q` in
9327 case `$CC -V 2>&1 | $SED 5q` in
91919328 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
91929329 # Sun Fortran 8.3 passes all unrecognized flags to the linker
91939330 lt_prog_compiler_pic='-KPIC'
96109747
96119748 case $host_os in
96129749 cygwin* | mingw* | pw32* | cegcc*)
9613 # FIXME: the MSVC++ port hasn't been tested in a loooong time
9750 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
96149751 # When not using gcc, we currently assume that we are using
9615 # Microsoft Visual C++.
9752 # Microsoft Visual C++ or Intel C++ Compiler.
96169753 if test yes != "$GCC"; then
96179754 with_gnu_ld=no
96189755 fi
96199756 ;;
96209757 interix*)
9621 # we just hope/assume this is gcc and not c89 (= MSVC++)
9758 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
96229759 with_gnu_ld=yes
96239760 ;;
96249761 openbsd* | bitrig*)
96709807 whole_archive_flag_spec=
96719808 fi
96729809 supports_anon_versioning=no
9673 case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
9810 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
96749811 *GNU\ gold*) supports_anon_versioning=yes ;;
96759812 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
96769813 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
97829919 emximp -o $lib $output_objdir/$libname.def'
97839920 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
97849921 enable_shared_with_static_runtimes=yes
9922 file_list_spec='@'
97859923 ;;
97869924
97879925 interix[3-9]*)
97969934 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
97979935 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
97989936 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9799 archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9937 archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
98009938 ;;
98019939
98029940 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
98399977 compiler_needs_object=yes
98409978 ;;
98419979 esac
9842 case `$CC -V 2>&1 | sed 5q` in
9980 case `$CC -V 2>&1 | $SED 5q` in
98439981 *Sun\ C*) # Sun C 5.9
98449982 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
98459983 compiler_needs_object=yes
98519989
98529990 if test yes = "$supports_anon_versioning"; then
98539991 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9854 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9992 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
98559993 echo "local: *; };" >> $output_objdir/$libname.ver~
98569994 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
98579995 fi
986710005 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
986810006 if test yes = "$supports_anon_versioning"; then
986910007 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9870 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10008 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
987110009 echo "local: *; };" >> $output_objdir/$libname.ver~
987210010 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
987310011 fi
999910137 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
1000010138 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
1000110139 else
10002 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
10140 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
1000310141 fi
1000410142 aix_use_runtimelinking=no
1000510143
1027010408
1027110409 cygwin* | mingw* | pw32* | cegcc*)
1027210410 # When not using gcc, we currently assume that we are using
10273 # Microsoft Visual C++.
10411 # Microsoft Visual C++ or Intel C++ Compiler.
1027410412 # hardcode_libdir_flag_spec is actually meaningless, as there is
1027510413 # no search path for DLLs.
1027610414 case $cc_basename in
10277 cl*)
10278 # Native MSVC
10415 cl* | icl*)
10416 # Native MSVC or ICC
1027910417 hardcode_libdir_flag_spec=' '
1028010418 allow_undefined_flag=unsupported
1028110419 always_export_symbols=yes
1031610454 fi'
1031710455 ;;
1031810456 *)
10319 # Assume MSVC wrapper
10457 # Assume MSVC and ICC wrapper
1032010458 hardcode_libdir_flag_spec=' '
1032110459 allow_undefined_flag=unsupported
1032210460 # Tell ltmain to make .lib files, not .a files.
1035710495 output_verbose_link_cmd=func_echo_all
1035810496 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
1035910497 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
10360 archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
10361 module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
10498 archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
10499 module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
1036210500
1036310501 else
1036410502 ld_shlibs=no
1039210530 ;;
1039310531
1039410532 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10395 freebsd* | dragonfly*)
10533 freebsd* | dragonfly* | midnightbsd*)
1039610534 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
1039710535 hardcode_libdir_flag_spec='-R$libdir'
1039810536 hardcode_direct=yes
1064310781 emximp -o $lib $output_objdir/$libname.def'
1064410782 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
1064510783 enable_shared_with_static_runtimes=yes
10784 file_list_spec='@'
1064610785 ;;
1064710786
1064810787 osf3*)
1133511474 case $host_os in
1133611475 cygwin*)
1133711476 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
11338 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
11477 soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1133911478
1134011479 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
1134111480 ;;
1134511484 ;;
1134611485 pw32*)
1134711486 # pw32 DLLs use 'pw' prefix rather than 'lib'
11348 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
11487 library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1134911488 ;;
1135011489 esac
1135111490 dynamic_linker='Win32 ld.exe'
1135211491 ;;
1135311492
11354 *,cl*)
11355 # Native MSVC
11493 *,cl* | *,icl*)
11494 # Native MSVC or ICC
1135611495 libname_spec='$name'
1135711496 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1135811497 library_names_spec='$libname.dll.lib'
1137111510 done
1137211511 IFS=$lt_save_ifs
1137311512 # Convert to MSYS style.
11374 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
11513 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
1137511514 ;;
1137611515 cygwin*)
1137711516 # Convert to unix form, then to dos form, then back to unix form
1140811547 ;;
1140911548
1141011549 *)
11411 # Assume MSVC wrapper
11550 # Assume MSVC and ICC wrapper
1141211551 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
1141311552 dynamic_linker='Win32 ld.exe'
1141411553 ;;
1144111580 shlibpath_var=LD_LIBRARY_PATH
1144211581 ;;
1144311582
11444 freebsd* | dragonfly*)
11583 freebsd* | dragonfly* | midnightbsd*)
1144511584 # DragonFly does not have aout. When/if they implement a new
1144611585 # versioning mechanism, adjust this.
1144711586 if test -x /usr/bin/objformat; then
1259412733 old_striplib=
1259512734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
1259612735 printf %s "checking whether stripping libraries is possible... " >&6; }
12597 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
12598 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
12599 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
12600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12736 if test -z "$STRIP"; then
12737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12738 printf "%s\n" "no" >&6; }
12739 else
12740 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
12741 old_striplib="$STRIP --strip-debug"
12742 striplib="$STRIP --strip-unneeded"
12743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1260112744 printf "%s\n" "yes" >&6; }
12602 else
12603 # FIXME - insert some real tests, host_os isn't really good enough
12604 case $host_os in
12605 darwin*)
12606 if test -n "$STRIP"; then
12745 else
12746 case $host_os in
12747 darwin*)
12748 # FIXME - insert some real tests, host_os isn't really good enough
1260712749 striplib="$STRIP -x"
1260812750 old_striplib="$STRIP -S"
1260912751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1261012752 printf "%s\n" "yes" >&6; }
12611 else
12753 ;;
12754 freebsd*)
12755 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
12756 old_striplib="$STRIP --strip-debug"
12757 striplib="$STRIP --strip-unneeded"
12758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12759 printf "%s\n" "yes" >&6; }
12760 else
12761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12762 printf "%s\n" "no" >&6; }
12763 fi
12764 ;;
12765 *)
1261212766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
1261312767 printf "%s\n" "no" >&6; }
12614 fi
12615 ;;
12616 *)
12617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12618 printf "%s\n" "no" >&6; }
12619 ;;
12620 esac
12768 ;;
12769 esac
12770 fi
1262112771 fi
1262212772
1262312773
1442214572 # report actual input values of CONFIG_FILES etc. instead of their
1442314573 # values after options handling.
1442414574 ac_log="
14425 This file was extended by pkgconf $as_me 1.8.0, which was
14575 This file was extended by pkgconf $as_me 1.8.1, which was
1442614576 generated by GNU Autoconf 2.71. Invocation command line was
1442714577
1442814578 CONFIG_FILES = $CONFIG_FILES
1449014640 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1449114641 ac_cs_config='$ac_cs_config_escaped'
1449214642 ac_cs_version="\\
14493 pkgconf config.status 1.8.0
14643 pkgconf config.status 1.8.1
1449414644 configured by $0, generated by GNU Autoconf 2.71,
1449514645 with options \\"\$ac_cs_config\\"
1449614646
1465314803 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
1465414804 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
1465514805 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
14806 FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`'
1465614807 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
1465714808 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
1465814809 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
1466114812 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
1466214813 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
1466314814 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
14815 lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
1466414816 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
1466514817 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
1466614818 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
1478114933 lt_SP2NL \
1478214934 lt_NL2SP \
1478314935 reload_flag \
14936 FILECMD \
1478414937 OBJDUMP \
1478514938 deplibs_check_method \
1478614939 file_magic_cmd \
1478914942 DLLTOOL \
1479014943 sharedlib_from_linklib_cmd \
1479114944 AR \
14792 AR_FLAGS \
1479314945 archiver_list_spec \
1479414946 STRIP \
1479514947 RANLIB \
1573615888 # convert \$build files to toolchain format.
1573715889 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
1573815890
15891 # A file(cmd) program that detects file types.
15892 FILECMD=$lt_FILECMD
15893
1573915894 # An object symbol dumper.
1574015895 OBJDUMP=$lt_OBJDUMP
1574115896
1576015915 # The archiver.
1576115916 AR=$lt_AR
1576215917
15918 # Flags to create an archive (by configure).
15919 lt_ar_flags=$lt_ar_flags
15920
1576315921 # Flags to create an archive.
15764 AR_FLAGS=$lt_AR_FLAGS
15922 AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
1576515923
1576615924 # How to feed a file listing to the archiver.
1576715925 archiver_list_spec=$lt_archiver_list_spec
1613716295 # if finds mixed CR/LF and LF-only lines. Since sed operates in
1613816296 # text mode, it properly converts lines to CR/LF. This bash problem
1613916297 # is reportedly fixed, but why not run on old versions too?
16140 sed '$q' "$ltmain" >> "$cfgfile" \
16298 $SED '$q' "$ltmain" >> "$cfgfile" \
1614116299 || (rm -f "$cfgfile"; exit 1)
1614216300
1614316301 mv -f "$cfgfile" "$ofile" ||
1111 dnl from the use of this software.
1212
1313 AC_PREREQ([2.68])
14 AC_INIT([pkgconf], [1.8.0], [https://github.com/pkgconf/pkgconf/issues/new])
14 AC_INIT([pkgconf], [1.8.1], [https://github.com/pkgconf/pkgconf/issues/new])
1515 AC_CONFIG_SRCDIR([cli/main.c])
1616 AC_CONFIG_MACRO_DIR([m4])
1717 AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
+0
-42
debian/patches/ignore-whitespace-indentation.patch less more
0 From: Timo Röhling <roehling@debian.org>
1 Date: Fri, 30 Sep 2022 15:33:47 +0200
2 Subject: Ignore whitespace indentation
3
4 Bug: https://github.com/pkgconf/pkgconf/issues/265
5 Bug-Debian: https://bugs.debian.org/1016922
6 ---
7 libpkgconf/parser.c | 11 +++++++++--
8 1 file changed, 9 insertions(+), 2 deletions(-)
9
10 diff --git a/libpkgconf/parser.c b/libpkgconf/parser.c
11 index 7ac9362..da376c6 100644
12 --- a/libpkgconf/parser.c
13 +++ b/libpkgconf/parser.c
14 @@ -44,10 +44,18 @@ pkgconf_parser_parse(FILE *f, void *data, const pkgconf_parser_operand_func_t *o
15 lineno++;
16
17 p = readbuf;
18 + while (*p && isspace((unsigned int)*p))
19 + p++;
20 + if (*p && p != readbuf)
21 + {
22 + warnfunc(data, "%s:" SIZE_FMT_SPECIFIER ": warning: whitespace encountered while parsing key section\n",
23 + filename, lineno);
24 + warned_key_whitespace = true;
25 + }
26 + key = p;
27 while (*p && (isalpha((unsigned int)*p) || isdigit((unsigned int)*p) || *p == '_' || *p == '.'))
28 p++;
29
30 - key = readbuf;
31 if (!isalpha((unsigned int)*key) && !isdigit((unsigned int)*p))
32 continue;
33
34 @@ -89,7 +97,6 @@ pkgconf_parser_parse(FILE *f, void *data, const pkgconf_parser_operand_func_t *o
35 *p = '\0';
36 p--;
37 }
38 -
39 if (ops[(unsigned char) op])
40 ops[(unsigned char) op](data, lineno, key, value);
41 }
+0
-34
debian/patches/pkg.m4/0002-pkg.m4-PKG_CHECK_MODULES-provides-modversion.patch less more
0 From: Mattias Hansson <mattias.hansson@assaabloy.com>
1 Date: Fri, 8 Oct 2021 11:05:42 +0200
2 Subject: pkg.m4: PKG_CHECK_MODULES provides modversion
3
4 Projects using PKG_CHECK_MODULES wants to add dependency versions to
5 their binaries. Currently, the projects have to resolve dependency
6 versions themselves when using pkgconf.
7
8 With this patch PKG_CHECK_MODULES now defines a $PKG_VERSION variable
9 that represents `--modversion`.
10 ---
11 pkg.m4 | 2 ++
12 1 file changed, 2 insertions(+)
13
14 diff --git a/pkg.m4 b/pkg.m4
15 index d3f228e..dd58c0b 100644
16 --- a/pkg.m4
17 +++ b/pkg.m4
18 @@ -146,6 +146,7 @@ AC_MSG_CHECKING([for $1])
19
20 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
21 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
22 +_PKG_CONFIG([$1][_VERSION], [modversion], [$2])
23
24 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
25 and $1[]_LIBS to avoid the need to call pkg-config.
26 @@ -186,6 +187,7 @@ To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
27 else
28 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
29 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
30 + $1[]_VERSION=$pkg_cv_[]$1[]_VERSION
31 AC_MSG_RESULT([yes])
32 $3
33 fi[]dnl
3030 1 file changed, 5 insertions(+), 5 deletions(-)
3131
3232 diff --git a/pkg.m4 b/pkg.m4
33 index dd58c0b..64828eb 100644
33 index d3f228e..c88ef6f 100644
3434 --- a/pkg.m4
3535 +++ b/pkg.m4
3636 @@ -1,5 +1,5 @@
0 ignore-whitespace-indentation.patch
10 sysroot_dir-logic.patch
21 pkg.m4/0001-pkg.m4-Unified-indentation-in-PKG_CHECK_MODULES.patch
3 # pkg.m4/0002-pkg.m4-PKG_CHECK_MODULES-provides-modversion.patch
42 pkg.m4/0003-trivial-sync-of-pkg.m4-from-freedesktop.patch
66 1 file changed, 3 insertions(+), 6 deletions(-)
77
88 diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c
9 index f71f508..913e6f3 100644
9 index 0150852..3b21cbd 100644
1010 --- a/libpkgconf/pkg.c
1111 +++ b/libpkgconf/pkg.c
1212 @@ -406,15 +406,12 @@ pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE *
22
33 scriptversion=2018-03-07.03; # UTC
44
5 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
5 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
66
77 # This program is free software; you can redistribute it and/or modify
88 # it under the terms of the GNU General Public License as published by
7575
7676 :param char* a: The first version to compare in the pair.
7777 :param char* b: The second version to compare in the pair.
78 :return: -1 if the first version is greater, 0 if both versions are equal, 1 if the second version is greater.
78 :return: -1 if the first version is less than, 0 if both versions are equal, 1 if the second version is less than.
7979 :rtype: int
8080
8181 .. c:function:: pkgconf_pkg_t *pkgconf_builtin_pkg_get(const char *name)
00 #!/bin/sh
11 # install - install a program, script, or datafile
22
3 scriptversion=2013-12-25.23; # UTC
3 scriptversion=2020-11-14.01; # UTC
44
55 # This originates from X11R5 (mit/util/scripts/install.sh), which was
66 # later released in X11R6 (xc/config/util/install.sh) with the
6868 # Desired mode of installed file.
6969 mode=0755
7070
71 # Create dirs (including intermediate dirs) using mode 755.
72 # This is like GNU 'install' as of coreutils 8.32 (2020).
73 mkdir_umask=22
74
75 backupsuffix=
7176 chgrpcmd=
7277 chmodcmd=$chmodprog
7378 chowncmd=
98103 --version display version info and exit.
99104
100105 -c (ignored)
101 -C install only if different (preserve the last data modification time)
106 -C install only if different (preserve data modification time)
102107 -d create directories instead of installing files.
103108 -g GROUP $chgrpprog installed files to GROUP.
104109 -m MODE $chmodprog installed files to MODE.
105110 -o USER $chownprog installed files to USER.
111 -p pass -p to $cpprog.
106112 -s $stripprog installed files.
113 -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
107114 -t DIRECTORY install into DIRECTORY.
108115 -T report an error if DSTFILE is a directory.
109116
110117 Environment variables override the default commands:
111118 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
112119 RMPROG STRIPPROG
120
121 By default, rm is invoked with -f; when overridden with RMPROG,
122 it's up to you to specify -f if you want it.
123
124 If -S is not specified, no backups are attempted.
125
126 Email bug reports to bug-automake@gnu.org.
127 Automake home page: https://www.gnu.org/software/automake/
113128 "
114129
115130 while test $# -ne 0; do
136151 -o) chowncmd="$chownprog $2"
137152 shift;;
138153
154 -p) cpprog="$cpprog -p";;
155
139156 -s) stripcmd=$stripprog;;
157
158 -S) backupsuffix="$2"
159 shift;;
140160
141161 -t)
142162 is_target_a_directory=always
254274 dstdir=$dst
255275 test -d "$dstdir"
256276 dstdir_status=$?
277 # Don't chown directories that already exist.
278 if test $dstdir_status = 0; then
279 chowncmd=""
280 fi
257281 else
258282
259283 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
270294 fi
271295 dst=$dst_arg
272296
273 # If destination is a directory, append the input filename; won't work
274 # if double slashes aren't ignored.
297 # If destination is a directory, append the input filename.
275298 if test -d "$dst"; then
276299 if test "$is_target_a_directory" = never; then
277300 echo "$0: $dst_arg: Is a directory" >&2
278301 exit 1
279302 fi
280303 dstdir=$dst
281 dst=$dstdir/`basename "$src"`
304 dstbase=`basename "$src"`
305 case $dst in
306 */) dst=$dst$dstbase;;
307 *) dst=$dst/$dstbase;;
308 esac
282309 dstdir_status=0
283310 else
284311 dstdir=`dirname "$dst"`
287314 fi
288315 fi
289316
317 case $dstdir in
318 */) dstdirslash=$dstdir;;
319 *) dstdirslash=$dstdir/;;
320 esac
321
290322 obsolete_mkdir_used=false
291323
292324 if test $dstdir_status != 0; then
293325 case $posix_mkdir in
294326 '')
295 # Create intermediate dirs using mode 755 as modified by the umask.
296 # This is like FreeBSD 'install' as of 1997-10-28.
297 umask=`umask`
298 case $stripcmd.$umask in
299 # Optimize common cases.
300 *[2367][2367]) mkdir_umask=$umask;;
301 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
302
303 *[0-7])
304 mkdir_umask=`expr $umask + 22 \
305 - $umask % 100 % 40 + $umask % 20 \
306 - $umask % 10 % 4 + $umask % 2
307 `;;
308 *) mkdir_umask=$umask,go-w;;
309 esac
310
311327 # With -d, create the new directory with the user-specified mode.
312328 # Otherwise, rely on $mkdir_umask.
313329 if test -n "$dir_arg"; then
317333 fi
318334
319335 posix_mkdir=false
320 case $umask in
321 *[123567][0-7][0-7])
322 # POSIX mkdir -p sets u+wx bits regardless of umask, which
323 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
324 ;;
325 *)
326 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
327 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
328
329 if (umask $mkdir_umask &&
330 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
331 then
332 if test -z "$dir_arg" || {
333 # Check for POSIX incompatibilities with -m.
334 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
335 # other-writable bit of parent directory when it shouldn't.
336 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
337 ls_ld_tmpdir=`ls -ld "$tmpdir"`
338 case $ls_ld_tmpdir in
339 d????-?r-*) different_mode=700;;
340 d????-?--*) different_mode=755;;
341 *) false;;
342 esac &&
343 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
344 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
345 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
346 }
347 }
348 then posix_mkdir=:
349 fi
350 rmdir "$tmpdir/d" "$tmpdir"
351 else
352 # Remove any dirs left behind by ancient mkdir implementations.
353 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
354 fi
355 trap '' 0;;
356 esac;;
336 # The $RANDOM variable is not portable (e.g., dash). Use it
337 # here however when possible just to lower collision chance.
338 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
339
340 trap '
341 ret=$?
342 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
343 exit $ret
344 ' 0
345
346 # Because "mkdir -p" follows existing symlinks and we likely work
347 # directly in world-writeable /tmp, make sure that the '$tmpdir'
348 # directory is successfully created first before we actually test
349 # 'mkdir -p'.
350 if (umask $mkdir_umask &&
351 $mkdirprog $mkdir_mode "$tmpdir" &&
352 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
353 then
354 if test -z "$dir_arg" || {
355 # Check for POSIX incompatibilities with -m.
356 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
357 # other-writable bit of parent directory when it shouldn't.
358 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
359 test_tmpdir="$tmpdir/a"
360 ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
361 case $ls_ld_tmpdir in
362 d????-?r-*) different_mode=700;;
363 d????-?--*) different_mode=755;;
364 *) false;;
365 esac &&
366 $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
367 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
368 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
369 }
370 }
371 then posix_mkdir=:
372 fi
373 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
374 else
375 # Remove any dirs left behind by ancient mkdir implementations.
376 rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
377 fi
378 trap '' 0;;
357379 esac
358380
359381 if
364386 then :
365387 else
366388
367 # The umask is ridiculous, or mkdir does not conform to POSIX,
389 # mkdir does not conform to POSIX,
368390 # or it failed possibly due to a race condition. Create the
369391 # directory the slow way, step by step, checking for races as we go.
370392
393415 prefixes=
394416 else
395417 if $posix_mkdir; then
396 (umask=$mkdir_umask &&
418 (umask $mkdir_umask &&
397419 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
398420 # Don't fail if two instances are running concurrently.
399421 test -d "$prefix" || exit 1
426448 else
427449
428450 # Make a couple of temp file names in the proper directory.
429 dsttmp=$dstdir/_inst.$$_
430 rmtmp=$dstdir/_rm.$$_
451 dsttmp=${dstdirslash}_inst.$$_
452 rmtmp=${dstdirslash}_rm.$$_
431453
432454 # Trap to clean up those temp files at exit.
433455 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
434456
435457 # Copy the file name to the temp name.
436 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
458 (umask $cp_umask &&
459 { test -z "$stripcmd" || {
460 # Create $dsttmp read-write so that cp doesn't create it read-only,
461 # which would cause strip to fail.
462 if test -z "$doit"; then
463 : >"$dsttmp" # No need to fork-exec 'touch'.
464 else
465 $doit touch "$dsttmp"
466 fi
467 }
468 } &&
469 $doit_exec $cpprog "$src" "$dsttmp") &&
437470
438471 # and set any options; do chmod last to preserve setuid bits.
439472 #
459492 then
460493 rm -f "$dsttmp"
461494 else
495 # If $backupsuffix is set, and the file being installed
496 # already exists, attempt a backup. Don't worry if it fails,
497 # e.g., if mv doesn't support -f.
498 if test -n "$backupsuffix" && test -f "$dst"; then
499 $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
500 fi
501
462502 # Rename the file to the real destination.
463503 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
464504
473513 # file should still install successfully.
474514 {
475515 test ! -f "$dst" ||
476 $doit $rmcmd -f "$dst" 2>/dev/null ||
516 $doit $rmcmd "$dst" 2>/dev/null ||
477517 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
478 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
518 { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
479519 } ||
480520 { echo "$0: cannot unlink or rename $dst" >&2
481521 (exit 1); exit 1
492532 done
493533
494534 # Local variables:
495 # eval: (add-hook 'write-file-hooks 'time-stamp)
535 # eval: (add-hook 'before-save-hook 'time-stamp)
496536 # time-stamp-start: "scriptversion="
497537 # time-stamp-format: "%:y-%02m-%02d.%02H"
498 # time-stamp-time-zone: "UTC"
538 # time-stamp-time-zone: "UTC0"
499539 # time-stamp-end: "; # UTC"
500540 # End:
7777 #define PKGCONF_FOREACH_LIST_ENTRY_REVERSE(tail, value) \
7878 for ((value) = (tail); (value) != NULL; (value) = (value)->prev)
7979
80 #define LIBPKGCONF_VERSION 10700
81 #define LIBPKGCONF_VERSION_STR "1.7.0"
80 #define LIBPKGCONF_VERSION 10801
81 #define LIBPKGCONF_VERSION_STR "1.8.1"
8282
8383 struct pkgconf_fragment_ {
8484 pkgconf_node_t iter;
4343 lineno++;
4444
4545 p = readbuf;
46 while (*p && isspace((unsigned int)*p))
47 p++;
48 if (*p && p != readbuf)
49 {
50 warnfunc(data, "%s:" SIZE_FMT_SPECIFIER ": warning: whitespace encountered while parsing key section\n",
51 filename, lineno);
52 warned_key_whitespace = true;
53 }
54 key = p;
4655 while (*p && (isalpha((unsigned int)*p) || isdigit((unsigned int)*p) || *p == '_' || *p == '.'))
4756 p++;
4857
49 key = readbuf;
5058 if (!isalpha((unsigned int)*key) && !isdigit((unsigned int)*p))
5159 continue;
5260
8896 *p = '\0';
8997 p--;
9098 }
91
9299 if (ops[(unsigned char) op])
93100 ops[(unsigned char) op](data, lineno, key, value);
94101 }
797797 *
798798 * :param char* a: The first version to compare in the pair.
799799 * :param char* b: The second version to compare in the pair.
800 * :return: -1 if the first version is greater, 0 if both versions are equal, 1 if the second version is greater.
800 * :return: -1 if the first version is less than, 0 if both versions are equal, 1 if the second version is less than.
801801 * :rtype: int
802802 */
803803 int
812812
813813 /* optimization: if version matches then it's the same version. */
814814 if (a == NULL)
815 return -1;
816
817 if (b == NULL)
815818 return 1;
816
817 if (b == NULL)
818 return -1;
819819
820820 if (!strcasecmp(a, b))
821821 return 0;
836836 if (*one == '~' || *two == '~')
837837 {
838838 if (*one != '~')
839 return 1;
840 if (*two != '~')
839841 return -1;
840 if (*two != '~')
841 return 1;
842842
843843 one++;
844844 two++;
292292 }
293293 }
294294
295 PKGCONF_TRACE(client, "lookup tuple %s", varname);
296
297 size_t remain = PKGCONF_BUFSIZE - (bptr - buf);
295298 ptr += (pptr - ptr);
296299 kv = pkgconf_tuple_find_global(client, varname);
297300 if (kv != NULL)
298301 {
299 strncpy(bptr, kv, PKGCONF_BUFSIZE - (bptr - buf));
300 bptr += strlen(kv);
302 size_t nlen = pkgconf_strlcpy(bptr, kv, remain);
303 if (nlen > remain)
304 {
305 pkgconf_warn(client, "warning: truncating very long variable to 64KB\n");
306
307 bptr = buf + (PKGCONF_BUFSIZE - 1);
308 break;
309 }
310
311 bptr += nlen;
301312 }
302313 else
303314 {
305316
306317 if (kv != NULL)
307318 {
319 size_t nlen;
320
308321 parsekv = pkgconf_tuple_parse(client, vars, kv);
309
310 strncpy(bptr, parsekv, PKGCONF_BUFSIZE - (bptr - buf));
311 bptr += strlen(parsekv);
312
322 nlen = pkgconf_strlcpy(bptr, parsekv, remain);
313323 free(parsekv);
324
325 if (nlen > remain)
326 {
327 pkgconf_warn(client, "warning: truncating very long variable to 64KB\n");
328
329 bptr = buf + (PKGCONF_BUFSIZE - 1);
330 break;
331 }
332
333 bptr += nlen;
314334 }
315335 }
316336 }
0 #! /bin/sh
0 #! /usr/bin/env sh
11 ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
2 ## by inline-source v2014-01-03.01
3
4 # libtool (GNU libtool) 2.4.6
2 ## by inline-source v2019-02-19.15
3
4 # libtool (GNU libtool) 2.4.7
55 # Provide generalized library-building support services.
66 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
77
8 # Copyright (C) 1996-2015 Free Software Foundation, Inc.
8 # Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc.
99 # This is free software; see the source for copying conditions. There is NO
1010 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1111
3030
3131 PROGRAM=libtool
3232 PACKAGE=libtool
33 VERSION=2.4.6
34 package_revision=2.4.6
33 VERSION=2.4.7
34 package_revision=2.4.7
3535
3636
3737 ## ------ ##
6363 # libraries, which are installed to $pkgauxdir.
6464
6565 # Set a version string for this script.
66 scriptversion=2015-01-20.17; # UTC
66 scriptversion=2019-02-19.15; # UTC
6767
6868 # General shell script boiler plate, and helper functions.
6969 # Written by Gary V. Vaughan, 2004
7070
71 # Copyright (C) 2004-2015 Free Software Foundation, Inc.
72 # This is free software; see the source for copying conditions. There is NO
73 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
74
75 # This program is free software; you can redistribute it and/or modify
76 # it under the terms of the GNU General Public License as published by
77 # the Free Software Foundation; either version 3 of the License, or
78 # (at your option) any later version.
79
80 # As a special exception to the GNU General Public License, if you distribute
81 # this file as part of a program or library that is built using GNU Libtool,
82 # you may include this file under the same distribution terms that you use
83 # for the rest of that program.
84
85 # This program is distributed in the hope that it will be useful,
86 # but WITHOUT ANY WARRANTY; without even the implied warranty of
87 # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
88 # General Public License for more details.
89
90 # You should have received a copy of the GNU General Public License
91 # along with this program. If not, see <http://www.gnu.org/licenses/>.
92
93 # Please report bugs or propose patches to gary@gnu.org.
71 # This is free software. There is NO warranty; not even for
72 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
73 #
74 # Copyright (C) 2004-2019, 2021 Bootstrap Authors
75 #
76 # This file is dual licensed under the terms of the MIT license
77 # <https://opensource.org/license/MIT>, and GPL version 2 or later
78 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
79 # these licenses when using or redistributing this software or any of
80 # the files within it. See the URLs above, or the file `LICENSE`
81 # included in the Bootstrap distribution for the full license texts.
82
83 # Please report bugs or propose patches to:
84 # <https://github.com/gnulib-modules/bootstrap/issues>
9485
9586
9687 ## ------ ##
138129 _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
139130 fi"
140131 done
141
142 # CDPATH.
143 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
132 # These NLS vars are set unconditionally (bootstrap issue #24). Unset those
133 # in case the environment reset is needed later and the $save_* variant is not
134 # defined (see the code above).
135 LC_ALL=C
136 LANGUAGE=C
137 export LANGUAGE LC_ALL
144138
145139 # Make sure IFS has a sensible default
146140 sp=' '
157151 }
158152 fi
159153
154
155 # func_unset VAR
156 # --------------
157 # Portably unset VAR.
158 # In some shells, an 'unset VAR' statement leaves a non-zero return
159 # status if VAR is already unset, which might be problematic if the
160 # statement is used at the end of a function (thus poisoning its return
161 # value) or when 'set -e' is active (causing even a spurious abort of
162 # the script in this case).
163 func_unset ()
164 {
165 { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
166 }
167
168
169 # Make sure CDPATH doesn't cause `cd` commands to output the target dir.
170 func_unset CDPATH
171
172 # Make sure ${,E,F}GREP behave sanely.
173 func_unset GREP_OPTIONS
160174
161175
162176 ## ------------------------- ##
258272 rm -f conftest.in conftest.tmp conftest.nl conftest.out
259273 }
260274
261 func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
275 func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
262276 rm -f conftest.sed
263277 SED=$func_path_progs_result
264278 }
294308 rm -f conftest.in conftest.tmp conftest.nl conftest.out
295309 }
296310
297 func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
311 func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
298312 GREP=$func_path_progs_result
299313 }
300314
358372 s/^$_G_bs2$_G_dollar/$_G_bs&/
359373 s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
360374 s/\n//g"
375
376 # require_check_ifs_backslash
377 # ---------------------------
378 # Check if we can use backslash as IFS='\' separator, and set
379 # $check_ifs_backshlash_broken to ':' or 'false'.
380 require_check_ifs_backslash=func_require_check_ifs_backslash
381 func_require_check_ifs_backslash ()
382 {
383 _G_save_IFS=$IFS
384 IFS='\'
385 _G_check_ifs_backshlash='a\\b'
386 for _G_i in $_G_check_ifs_backshlash
387 do
388 case $_G_i in
389 a)
390 check_ifs_backshlash_broken=false
391 ;;
392 '')
393 break
394 ;;
395 *)
396 check_ifs_backshlash_broken=:
397 break
398 ;;
399 esac
400 done
401 IFS=$_G_save_IFS
402 require_check_ifs_backslash=:
403 }
361404
362405
363406 ## ----------------- ##
579622 {
580623 $debug_cmd
581624
582 func_quote_for_eval "$2"
583 eval "$1+=\\ \$func_quote_for_eval_result"
625 func_quote_arg pretty "$2"
626 eval "$1+=\\ \$func_quote_arg_result"
584627 }'
585628 else
586629 func_append_quoted ()
587630 {
588631 $debug_cmd
589632
590 func_quote_for_eval "$2"
591 eval "$1=\$$1\\ \$func_quote_for_eval_result"
633 func_quote_arg pretty "$2"
634 eval "$1=\$$1\\ \$func_quote_arg_result"
592635 }
593636 fi
594637
10901133 }
10911134
10921135
1093 # func_quote_for_eval ARG...
1094 # --------------------------
1095 # Aesthetically quote ARGs to be evaled later.
1096 # This function returns two values:
1097 # i) func_quote_for_eval_result
1098 # double-quoted, suitable for a subsequent eval
1099 # ii) func_quote_for_eval_unquoted_result
1100 # has all characters that are still active within double
1101 # quotes backslashified.
1102 func_quote_for_eval ()
1136 # func_quote_portable EVAL ARG
1137 # ----------------------------
1138 # Internal function to portably implement func_quote_arg. Note that we still
1139 # keep attention to performance here so we as much as possible try to avoid
1140 # calling sed binary (so far O(N) complexity as long as func_append is O(1)).
1141 func_quote_portable ()
11031142 {
11041143 $debug_cmd
11051144
1106 func_quote_for_eval_unquoted_result=
1107 func_quote_for_eval_result=
1108 while test 0 -lt $#; do
1145 $require_check_ifs_backslash
1146
1147 func_quote_portable_result=$2
1148
1149 # one-time-loop (easy break)
1150 while true
1151 do
1152 if $1; then
1153 func_quote_portable_result=`$ECHO "$2" | $SED \
1154 -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
1155 break
1156 fi
1157
1158 # Quote for eval.
1159 case $func_quote_portable_result in
1160 *[\\\`\"\$]*)
1161 # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string
1162 # contains the shell wildcard characters.
1163 case $check_ifs_backshlash_broken$func_quote_portable_result in
1164 :*|*[\[\*\?]*)
1165 func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
1166 | $SED "$sed_quote_subst"`
1167 break
1168 ;;
1169 esac
1170
1171 func_quote_portable_old_IFS=$IFS
1172 for _G_char in '\' '`' '"' '$'
1173 do
1174 # STATE($1) PREV($2) SEPARATOR($3)
1175 set start "" ""
1176 func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
1177 IFS=$_G_char
1178 for _G_part in $func_quote_portable_result
1179 do
1180 case $1 in
1181 quote)
1182 func_append func_quote_portable_result "$3$2"
1183 set quote "$_G_part" "\\$_G_char"
1184 ;;
1185 start)
1186 set first "" ""
1187 func_quote_portable_result=
1188 ;;
1189 first)
1190 set quote "$_G_part" ""
1191 ;;
1192 esac
1193 done
1194 done
1195 IFS=$func_quote_portable_old_IFS
1196 ;;
1197 *) ;;
1198 esac
1199 break
1200 done
1201
1202 func_quote_portable_unquoted_result=$func_quote_portable_result
1203 case $func_quote_portable_result in
1204 # double-quote args containing shell metacharacters to delay
1205 # word splitting, command substitution and variable expansion
1206 # for a subsequent eval.
1207 # many bourne shells cannot handle close brackets correctly
1208 # in scan sets, so we specify it separately.
1209 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1210 func_quote_portable_result=\"$func_quote_portable_result\"
1211 ;;
1212 esac
1213 }
1214
1215
1216 # func_quotefast_eval ARG
1217 # -----------------------
1218 # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG',
1219 # but optimized for speed. Result is stored in $func_quotefast_eval.
1220 if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
1221 printf -v _GL_test_printf_tilde %q '~'
1222 if test '\~' = "$_GL_test_printf_tilde"; then
1223 func_quotefast_eval ()
1224 {
1225 printf -v func_quotefast_eval_result %q "$1"
1226 }
1227 else
1228 # Broken older Bash implementations. Make those faster too if possible.
1229 func_quotefast_eval ()
1230 {
11091231 case $1 in
1110 *[\\\`\"\$]*)
1111 _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
1112 *)
1113 _G_unquoted_arg=$1 ;;
1114 esac
1115 if test -n "$func_quote_for_eval_unquoted_result"; then
1116 func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
1117 else
1118 func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
1119 fi
1120
1121 case $_G_unquoted_arg in
1122 # Double-quote args containing shell metacharacters to delay
1123 # word splitting, command substitution and variable expansion
1124 # for a subsequent eval.
1125 # Many Bourne shells cannot handle close brackets correctly
1126 # in scan sets, so we specify it separately.
1127 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1128 _G_quoted_arg=\"$_G_unquoted_arg\"
1232 '~'*)
1233 func_quote_portable false "$1"
1234 func_quotefast_eval_result=$func_quote_portable_result
11291235 ;;
11301236 *)
1131 _G_quoted_arg=$_G_unquoted_arg
1132 ;;
1237 printf -v func_quotefast_eval_result %q "$1"
1238 ;;
11331239 esac
1134
1135 if test -n "$func_quote_for_eval_result"; then
1136 func_append func_quote_for_eval_result " $_G_quoted_arg"
1240 }
1241 fi
1242 else
1243 func_quotefast_eval ()
1244 {
1245 func_quote_portable false "$1"
1246 func_quotefast_eval_result=$func_quote_portable_result
1247 }
1248 fi
1249
1250
1251 # func_quote_arg MODEs ARG
1252 # ------------------------
1253 # Quote one ARG to be evaled later. MODEs argument may contain zero or more
1254 # specifiers listed below separated by ',' character. This function returns two
1255 # values:
1256 # i) func_quote_arg_result
1257 # double-quoted (when needed), suitable for a subsequent eval
1258 # ii) func_quote_arg_unquoted_result
1259 # has all characters that are still active within double
1260 # quotes backslashified. Available only if 'unquoted' is specified.
1261 #
1262 # Available modes:
1263 # ----------------
1264 # 'eval' (default)
1265 # - escape shell special characters
1266 # 'expand'
1267 # - the same as 'eval'; but do not quote variable references
1268 # 'pretty'
1269 # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might
1270 # be used later in func_quote to get output like: 'echo "a b"' instead
1271 # of 'echo a\ b'. This is slower than default on some shells.
1272 # 'unquoted'
1273 # - produce also $func_quote_arg_unquoted_result which does not contain
1274 # wrapping double-quotes.
1275 #
1276 # Examples for 'func_quote_arg pretty,unquoted string':
1277 #
1278 # string | *_result | *_unquoted_result
1279 # ------------+-----------------------+-------------------
1280 # " | \" | \"
1281 # a b | "a b" | a b
1282 # "a b" | "\"a b\"" | \"a b\"
1283 # * | "*" | *
1284 # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\"
1285 #
1286 # Examples for 'func_quote_arg pretty,unquoted,expand string':
1287 #
1288 # string | *_result | *_unquoted_result
1289 # --------------+---------------------+--------------------
1290 # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\"
1291 func_quote_arg ()
1292 {
1293 _G_quote_expand=false
1294 case ,$1, in
1295 *,expand,*)
1296 _G_quote_expand=:
1297 ;;
1298 esac
1299
1300 case ,$1, in
1301 *,pretty,*|*,expand,*|*,unquoted,*)
1302 func_quote_portable $_G_quote_expand "$2"
1303 func_quote_arg_result=$func_quote_portable_result
1304 func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
1305 ;;
1306 *)
1307 # Faster quote-for-eval for some shells.
1308 func_quotefast_eval "$2"
1309 func_quote_arg_result=$func_quotefast_eval_result
1310 ;;
1311 esac
1312 }
1313
1314
1315 # func_quote MODEs ARGs...
1316 # ------------------------
1317 # Quote all ARGs to be evaled later and join them into single command. See
1318 # func_quote_arg's description for more info.
1319 func_quote ()
1320 {
1321 $debug_cmd
1322 _G_func_quote_mode=$1 ; shift
1323 func_quote_result=
1324 while test 0 -lt $#; do
1325 func_quote_arg "$_G_func_quote_mode" "$1"
1326 if test -n "$func_quote_result"; then
1327 func_append func_quote_result " $func_quote_arg_result"
11371328 else
1138 func_append func_quote_for_eval_result "$_G_quoted_arg"
1329 func_append func_quote_result "$func_quote_arg_result"
11391330 fi
11401331 shift
11411332 done
1142 }
1143
1144
1145 # func_quote_for_expand ARG
1146 # -------------------------
1147 # Aesthetically quote ARG to be evaled later; same as above,
1148 # but do not quote variable references.
1149 func_quote_for_expand ()
1150 {
1151 $debug_cmd
1152
1153 case $1 in
1154 *[\\\`\"]*)
1155 _G_arg=`$ECHO "$1" | $SED \
1156 -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
1157 *)
1158 _G_arg=$1 ;;
1159 esac
1160
1161 case $_G_arg in
1162 # Double-quote args containing shell metacharacters to delay
1163 # word splitting and command substitution for a subsequent eval.
1164 # Many Bourne shells cannot handle close brackets correctly
1165 # in scan sets, so we specify it separately.
1166 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1167 _G_arg=\"$_G_arg\"
1168 ;;
1169 esac
1170
1171 func_quote_for_expand_result=$_G_arg
11721333 }
11731334
11741335
12141375 _G_cmd=$1
12151376 _G_fail_exp=${2-':'}
12161377
1217 func_quote_for_expand "$_G_cmd"
1218 eval "func_notquiet $func_quote_for_expand_result"
1378 func_quote_arg pretty,expand "$_G_cmd"
1379 eval "func_notquiet $func_quote_arg_result"
12191380
12201381 $opt_dry_run || {
12211382 eval "$_G_cmd"
12401401 _G_fail_exp=${2-':'}
12411402
12421403 $opt_quiet || {
1243 func_quote_for_expand "$_G_cmd"
1244 eval "func_echo $func_quote_for_expand_result"
1404 func_quote_arg expand,pretty "$_G_cmd"
1405 eval "func_echo $func_quote_arg_result"
12451406 }
12461407
12471408 $opt_dry_run || {
13681529 # End:
13691530 #! /bin/sh
13701531
1371 # Set a version string for this script.
1372 scriptversion=2014-01-07.03; # UTC
1373
13741532 # A portable, pluggable option parser for Bourne shell.
13751533 # Written by Gary V. Vaughan, 2010
13761534
1377 # Copyright (C) 2010-2015 Free Software Foundation, Inc.
1378 # This is free software; see the source for copying conditions. There is NO
1379 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1380
1381 # This program is free software: you can redistribute it and/or modify
1382 # it under the terms of the GNU General Public License as published by
1383 # the Free Software Foundation, either version 3 of the License, or
1384 # (at your option) any later version.
1385
1386 # This program is distributed in the hope that it will be useful,
1387 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1388 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1389 # GNU General Public License for more details.
1390
1391 # You should have received a copy of the GNU General Public License
1392 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1393
1394 # Please report bugs or propose patches to gary@gnu.org.
1535 # This is free software. There is NO warranty; not even for
1536 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1537 #
1538 # Copyright (C) 2010-2019, 2021 Bootstrap Authors
1539 #
1540 # This file is dual licensed under the terms of the MIT license
1541 # <https://opensource.org/license/MIT>, and GPL version 2 or later
1542 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
1543 # these licenses when using or redistributing this software or any of
1544 # the files within it. See the URLs above, or the file `LICENSE`
1545 # included in the Bootstrap distribution for the full license texts.
1546
1547 # Please report bugs or propose patches to:
1548 # <https://github.com/gnulib-modules/bootstrap/issues>
1549
1550 # Set a version string for this script.
1551 scriptversion=2019-02-19.15; # UTC
13951552
13961553
13971554 ## ------ ##
14141571 #
14151572 # In order for the '--version' option to work, you will need to have a
14161573 # suitably formatted comment like the one at the top of this file
1417 # starting with '# Written by ' and ending with '# warranty; '.
1574 # starting with '# Written by ' and ending with '# Copyright'.
14181575 #
14191576 # For '-h' and '--help' to work, you will also need a one line
14201577 # description of your script's purpose in a comment directly above the
14261583 # to display verbose messages only when your user has specified
14271584 # '--verbose'.
14281585 #
1429 # After sourcing this file, you can plug processing for additional
1586 # After sourcing this file, you can plug in processing for additional
14301587 # options by amending the variables from the 'Configuration' section
14311588 # below, and following the instructions in the 'Option parsing'
14321589 # section further down.
14751632 ## ------------------------- ##
14761633
14771634 # This section contains functions for adding, removing, and running hooks
1478 # to the main code. A hook is just a named list of of function, that can
1479 # be run in order later on.
1635 # in the main code. A hook is just a list of function names that can be
1636 # run in order later on.
14801637
14811638 # func_hookable FUNC_NAME
14821639 # -----------------------
15091666
15101667 # func_remove_hook FUNC_NAME HOOK_FUNC
15111668 # ------------------------------------
1512 # Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
1669 # Remove HOOK_FUNC from the list of hook functions to be called by
1670 # FUNC_NAME.
15131671 func_remove_hook ()
15141672 {
15151673 $debug_cmd
15161674
15171675 eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
1676 }
1677
1678
1679 # func_propagate_result FUNC_NAME_A FUNC_NAME_B
1680 # ---------------------------------------------
1681 # If the *_result variable of FUNC_NAME_A _is set_, assign its value to
1682 # *_result variable of FUNC_NAME_B.
1683 func_propagate_result ()
1684 {
1685 $debug_cmd
1686
1687 func_propagate_result_result=:
1688 if eval "test \"\${${1}_result+set}\" = set"
1689 then
1690 eval "${2}_result=\$${1}_result"
1691 else
1692 func_propagate_result_result=false
1693 fi
15181694 }
15191695
15201696
15211697 # func_run_hooks FUNC_NAME [ARG]...
15221698 # ---------------------------------
15231699 # Run all hook functions registered to FUNC_NAME.
1524 # It is assumed that the list of hook functions contains nothing more
1700 # It's assumed that the list of hook functions contains nothing more
15251701 # than a whitespace-delimited list of legal shell function names, and
15261702 # no effort is wasted trying to catch shell meta-characters or preserve
15271703 # whitespace.
15311707
15321708 case " $hookable_fns " in
15331709 *" $1 "*) ;;
1534 *) func_fatal_error "'$1' does not support hook funcions.n" ;;
1710 *) func_fatal_error "'$1' does not support hook functions." ;;
15351711 esac
15361712
15371713 eval _G_hook_fns=\$$1_hooks; shift
15381714
15391715 for _G_hook in $_G_hook_fns; do
1540 eval $_G_hook '"$@"'
1541
1542 # store returned options list back into positional
1543 # parameters for next 'cmd' execution.
1544 eval _G_hook_result=\$${_G_hook}_result
1545 eval set dummy "$_G_hook_result"; shift
1716 func_unset "${_G_hook}_result"
1717 eval $_G_hook '${1+"$@"}'
1718 func_propagate_result $_G_hook func_run_hooks
1719 if $func_propagate_result_result; then
1720 eval set dummy "$func_run_hooks_result"; shift
1721 fi
15461722 done
1547
1548 func_quote_for_eval ${1+"$@"}
1549 func_run_hooks_result=$func_quote_for_eval_result
15501723 }
15511724
15521725
15561729 ## --------------- ##
15571730
15581731 # In order to add your own option parsing hooks, you must accept the
1559 # full positional parameter list in your hook function, remove any
1560 # options that you action, and then pass back the remaining unprocessed
1561 # options in '<hooked_function_name>_result', escaped suitably for
1562 # 'eval'. Like this:
1732 # full positional parameter list from your hook function. You may remove
1733 # or edit any options that you action, and then pass back the remaining
1734 # unprocessed options in '<hooked_function_name>_result', escaped
1735 # suitably for 'eval'.
1736 #
1737 # The '<hooked_function_name>_result' variable is automatically unset
1738 # before your hook gets called; for best performance, only set the
1739 # *_result variable when necessary (i.e. don't call the 'func_quote'
1740 # function unnecessarily because it can be an expensive operation on some
1741 # machines).
1742 #
1743 # Like this:
15631744 #
15641745 # my_options_prep ()
15651746 # {
15691750 # usage_message=$usage_message'
15701751 # -s, --silent don'\''t print informational messages
15711752 # '
1572 #
1573 # func_quote_for_eval ${1+"$@"}
1574 # my_options_prep_result=$func_quote_for_eval_result
1753 # # No change in '$@' (ignored completely by this hook). Leave
1754 # # my_options_prep_result variable intact.
15751755 # }
15761756 # func_add_hook func_options_prep my_options_prep
15771757 #
15801760 # {
15811761 # $debug_cmd
15821762 #
1583 # # Note that for efficiency, we parse as many options as we can
1763 # args_changed=false
1764 #
1765 # # Note that, for efficiency, we parse as many options as we can
15841766 # # recognise in a loop before passing the remainder back to the
15851767 # # caller on the first unrecognised argument we encounter.
15861768 # while test $# -gt 0; do
15871769 # opt=$1; shift
15881770 # case $opt in
1589 # --silent|-s) opt_silent=: ;;
1771 # --silent|-s) opt_silent=:
1772 # args_changed=:
1773 # ;;
15901774 # # Separate non-argument short options:
15911775 # -s*) func_split_short_opt "$_G_opt"
15921776 # set dummy "$func_split_short_opt_name" \
15931777 # "-$func_split_short_opt_arg" ${1+"$@"}
15941778 # shift
1779 # args_changed=:
15951780 # ;;
1596 # *) set dummy "$_G_opt" "$*"; shift; break ;;
1781 # *) # Make sure the first unrecognised option "$_G_opt"
1782 # # is added back to "$@" in case we need it later,
1783 # # if $args_changed was set to 'true'.
1784 # set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
15971785 # esac
15981786 # done
15991787 #
1600 # func_quote_for_eval ${1+"$@"}
1601 # my_silent_option_result=$func_quote_for_eval_result
1788 # # Only call 'func_quote' here if we processed at least one argument.
1789 # if $args_changed; then
1790 # func_quote eval ${1+"$@"}
1791 # my_silent_option_result=$func_quote_result
1792 # fi
16021793 # }
16031794 # func_add_hook func_parse_options my_silent_option
16041795 #
16091800 #
16101801 # $opt_silent && $opt_verbose && func_fatal_help "\
16111802 # '--silent' and '--verbose' options are mutually exclusive."
1612 #
1613 # func_quote_for_eval ${1+"$@"}
1614 # my_option_validation_result=$func_quote_for_eval_result
16151803 # }
16161804 # func_add_hook func_validate_options my_option_validation
16171805 #
1618 # You'll alse need to manually amend $usage_message to reflect the extra
1806 # You'll also need to manually amend $usage_message to reflect the extra
16191807 # options you parse. It's preferable to append if you can, so that
16201808 # multiple option parsing hooks can be added safely.
1809
1810
1811 # func_options_finish [ARG]...
1812 # ----------------------------
1813 # Finishing the option parse loop (call 'func_options' hooks ATM).
1814 func_options_finish ()
1815 {
1816 $debug_cmd
1817
1818 func_run_hooks func_options ${1+"$@"}
1819 func_propagate_result func_run_hooks func_options_finish
1820 }
16211821
16221822
16231823 # func_options [ARG]...
16291829 {
16301830 $debug_cmd
16311831
1632 func_options_prep ${1+"$@"}
1633 eval func_parse_options \
1634 ${func_options_prep_result+"$func_options_prep_result"}
1635 eval func_validate_options \
1636 ${func_parse_options_result+"$func_parse_options_result"}
1637
1638 eval func_run_hooks func_options \
1639 ${func_validate_options_result+"$func_validate_options_result"}
1640
1641 # save modified positional parameters for caller
1642 func_options_result=$func_run_hooks_result
1832 _G_options_quoted=false
1833
1834 for my_func in options_prep parse_options validate_options options_finish
1835 do
1836 func_unset func_${my_func}_result
1837 func_unset func_run_hooks_result
1838 eval func_$my_func '${1+"$@"}'
1839 func_propagate_result func_$my_func func_options
1840 if $func_propagate_result_result; then
1841 eval set dummy "$func_options_result"; shift
1842 _G_options_quoted=:
1843 fi
1844 done
1845
1846 $_G_options_quoted || {
1847 # As we (func_options) are top-level options-parser function and
1848 # nobody quoted "$@" for us yet, we need to do it explicitly for
1849 # caller.
1850 func_quote eval ${1+"$@"}
1851 func_options_result=$func_quote_result
1852 }
16431853 }
16441854
16451855
16481858 # All initialisations required before starting the option parse loop.
16491859 # Note that when calling hook functions, we pass through the list of
16501860 # positional parameters. If a hook function modifies that list, and
1651 # needs to propogate that back to rest of this script, then the complete
1652 # modified list must be put in 'func_run_hooks_result' before
1653 # returning.
1861 # needs to propagate that back to rest of this script, then the complete
1862 # modified list must be put in 'func_run_hooks_result' before returning.
16541863 func_hookable func_options_prep
16551864 func_options_prep ()
16561865 {
16611870 opt_warning_types=
16621871
16631872 func_run_hooks func_options_prep ${1+"$@"}
1664
1665 # save modified positional parameters for caller
1666 func_options_prep_result=$func_run_hooks_result
1873 func_propagate_result func_run_hooks func_options_prep
16671874 }
16681875
16691876
16751882 {
16761883 $debug_cmd
16771884
1678 func_parse_options_result=
1679
1885 _G_parse_options_requote=false
16801886 # this just eases exit handling
16811887 while test $# -gt 0; do
16821888 # Defer to hook functions for initial option parsing, so they
16831889 # get priority in the event of reusing an option name.
16841890 func_run_hooks func_parse_options ${1+"$@"}
1685
1686 # Adjust func_parse_options positional parameters to match
1687 eval set dummy "$func_run_hooks_result"; shift
1891 func_propagate_result func_run_hooks func_parse_options
1892 if $func_propagate_result_result; then
1893 eval set dummy "$func_parse_options_result"; shift
1894 # Even though we may have changed "$@", we passed the "$@" array
1895 # down into the hook and it quoted it for us (because we are in
1896 # this if-branch). No need to quote it again.
1897 _G_parse_options_requote=false
1898 fi
16881899
16891900 # Break out of the loop if we already parsed every option.
16901901 test $# -gt 0 || break
16911902
1903 # We expect that one of the options parsed in this function matches
1904 # and thus we remove _G_opt from "$@" and need to re-quote.
1905 _G_match_parse_options=:
16921906 _G_opt=$1
16931907 shift
16941908 case $_G_opt in
16951909 --debug|-x) debug_cmd='set -x'
1696 func_echo "enabling shell trace mode"
1910 func_echo "enabling shell trace mode" >&2
16971911 $debug_cmd
16981912 ;;
16991913
17031917 ;;
17041918
17051919 --warnings|--warning|-W)
1706 test $# = 0 && func_missing_arg $_G_opt && break
1920 if test $# = 0 && func_missing_arg $_G_opt; then
1921 _G_parse_options_requote=:
1922 break
1923 fi
17071924 case " $warning_categories $1" in
17081925 *" $1 "*)
17091926 # trailing space prevents matching last $1 above
17561973 shift
17571974 ;;
17581975
1759 --) break ;;
1976 --) _G_parse_options_requote=: ; break ;;
17601977 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1761 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1978 *) set dummy "$_G_opt" ${1+"$@"}; shift
1979 _G_match_parse_options=false
1980 break
1981 ;;
17621982 esac
1983
1984 if $_G_match_parse_options; then
1985 _G_parse_options_requote=:
1986 fi
17631987 done
17641988
1765 # save modified positional parameters for caller
1766 func_quote_for_eval ${1+"$@"}
1767 func_parse_options_result=$func_quote_for_eval_result
1989 if $_G_parse_options_requote; then
1990 # save modified positional parameters for caller
1991 func_quote eval ${1+"$@"}
1992 func_parse_options_result=$func_quote_result
1993 fi
17681994 }
17691995
17701996
17812007 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
17822008
17832009 func_run_hooks func_validate_options ${1+"$@"}
2010 func_propagate_result func_run_hooks func_validate_options
17842011
17852012 # Bail if the options were screwed!
17862013 $exit_cmd $EXIT_FAILURE
1787
1788 # save modified positional parameters for caller
1789 func_validate_options_result=$func_run_hooks_result
17902014 }
17912015
17922016
18422066
18432067 # func_split_equals STRING
18442068 # ------------------------
1845 # Set func_split_equals_lhs and func_split_equals_rhs shell variables after
1846 # splitting STRING at the '=' sign.
2069 # Set func_split_equals_lhs and func_split_equals_rhs shell variables
2070 # after splitting STRING at the '=' sign.
18472071 test -z "$_G_HAVE_XSI_OPS" \
18482072 && (eval 'x=a/b/c;
18492073 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
18582082
18592083 func_split_equals_lhs=${1%%=*}
18602084 func_split_equals_rhs=${1#*=}
1861 test "x$func_split_equals_lhs" = "x$1" \
1862 && func_split_equals_rhs=
2085 if test "x$func_split_equals_lhs" = "x$1"; then
2086 func_split_equals_rhs=
2087 fi
18632088 }'
18642089 else
18652090 # ...otherwise fall back to using expr, which is often a shell builtin.
18692094
18702095 func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
18712096 func_split_equals_rhs=
1872 test "x$func_split_equals_lhs" = "x$1" \
2097 test "x$func_split_equals_lhs=" = "x$1" \
18732098 || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
18742099 }
18752100 fi #func_split_equals
18952120 {
18962121 $debug_cmd
18972122
1898 func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
2123 func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'`
18992124 func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
19002125 }
19012126 fi #func_split_short_opt
19372162 # func_version
19382163 # ------------
19392164 # Echo version message to standard output and exit.
2165 # The version message is extracted from the calling file's header
2166 # comments, with leading '# ' stripped:
2167 # 1. First display the progname and version
2168 # 2. Followed by the header comment line matching /^# Written by /
2169 # 3. Then a blank line followed by the first following line matching
2170 # /^# Copyright /
2171 # 4. Immediately followed by any lines between the previous matches,
2172 # except lines preceding the intervening completely blank line.
2173 # For example, see the header comments of this file.
19402174 func_version ()
19412175 {
19422176 $debug_cmd
19432177
19442178 printf '%s\n' "$progname $scriptversion"
19452179 $SED -n '
1946 /(C)/!b go
1947 :more
1948 /\./!{
1949 N
1950 s|\n# | |
1951 b more
2180 /^# Written by /!b
2181 s|^# ||; p; n
2182
2183 :fwd2blnk
2184 /./ {
2185 n
2186 b fwd2blnk
19522187 }
1953 :go
1954 /^# Written by /,/# warranty; / {
1955 s|^# ||
1956 s|^# *$||
1957 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
1958 p
2188 p; n
2189
2190 :holdwrnt
2191 s|^# ||
2192 s|^# *$||
2193 /^Copyright /!{
2194 /./H
2195 n
2196 b holdwrnt
19592197 }
1960 /^# Written by / {
1961 s|^# ||
1962 p
1963 }
1964 /^warranty; /q' < "$progpath"
2198
2199 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
2200 G
2201 s|\(\n\)\n*|\1|g
2202 p; q' < "$progpath"
19652203
19662204 exit $?
19672205 }
19712209 # mode: shell-script
19722210 # sh-indentation: 2
19732211 # eval: (add-hook 'before-save-hook 'time-stamp)
1974 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
2212 # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
19752213 # time-stamp-time-zone: "UTC"
19762214 # End:
19772215
19782216 # Set a version string.
1979 scriptversion='(GNU libtool) 2.4.6'
2217 scriptversion='(GNU libtool) 2.4.7'
19802218
19812219
19822220 # func_echo ARG...
20672305 compiler: $LTCC
20682306 compiler flags: $LTCFLAGS
20692307 linker: $LD (gnu? $with_gnu_ld)
2070 version: $progname (GNU libtool) 2.4.6
2308 version: $progname (GNU libtool) 2.4.7
20712309 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
20722310 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
20732311
21232361 # a configuration failure hint, and exit.
21242362 func_fatal_configuration ()
21252363 {
2126 func__fatal_error ${1+"$@"} \
2364 func_fatal_error ${1+"$@"} \
21272365 "See the $PACKAGE documentation for more information." \
21282366 "Fatal configuration error."
21292367 }
22692507 nonopt=
22702508 preserve_args=
22712509
2510 _G_rc_lt_options_prep=:
2511
22722512 # Shorthand for --mode=foo, only valid as the first argument
22732513 case $1 in
22742514 clean|clea|cle|cl)
22922532 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
22932533 shift; set dummy --mode uninstall ${1+"$@"}; shift
22942534 ;;
2535 *)
2536 _G_rc_lt_options_prep=false
2537 ;;
22952538 esac
22962539
2297 # Pass back the list of options.
2298 func_quote_for_eval ${1+"$@"}
2299 libtool_options_prep_result=$func_quote_for_eval_result
2540 if $_G_rc_lt_options_prep; then
2541 # Pass back the list of options.
2542 func_quote eval ${1+"$@"}
2543 libtool_options_prep_result=$func_quote_result
2544 fi
23002545 }
23012546 func_add_hook func_options_prep libtool_options_prep
23022547
23082553 {
23092554 $debug_cmd
23102555
2556 _G_rc_lt_parse_options=false
2557
23112558 # Perform our own loop to consume as many options as possible in
23122559 # each iteration.
23132560 while test $# -gt 0; do
2561 _G_match_lt_parse_options=:
23142562 _G_opt=$1
23152563 shift
23162564 case $_G_opt in
23852633 func_append preserve_args " $_G_opt"
23862634 ;;
23872635
2388 # An option not handled by this hook function:
2389 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
2636 # An option not handled by this hook function:
2637 *) set dummy "$_G_opt" ${1+"$@"} ; shift
2638 _G_match_lt_parse_options=false
2639 break
2640 ;;
23902641 esac
2642 $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
23912643 done
23922644
2393
2394 # save modified positional parameters for caller
2395 func_quote_for_eval ${1+"$@"}
2396 libtool_parse_options_result=$func_quote_for_eval_result
2645 if $_G_rc_lt_parse_options; then
2646 # save modified positional parameters for caller
2647 func_quote eval ${1+"$@"}
2648 libtool_parse_options_result=$func_quote_result
2649 fi
23972650 }
23982651 func_add_hook func_parse_options libtool_parse_options
23992652
24502703 }
24512704
24522705 # Pass back the unparsed argument list
2453 func_quote_for_eval ${1+"$@"}
2454 libtool_validate_options_result=$func_quote_for_eval_result
2706 func_quote eval ${1+"$@"}
2707 libtool_validate_options_result=$func_quote_result
24552708 }
24562709 func_add_hook func_validate_options libtool_validate_options
24572710
34173670 esac
34183671 done
34193672
3420 func_quote_for_eval "$libobj"
3421 test "X$libobj" != "X$func_quote_for_eval_result" \
3673 func_quote_arg pretty "$libobj"
3674 test "X$libobj" != "X$func_quote_arg_result" \
34223675 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
34233676 && func_warning "libobj name '$libobj' may not contain shell special characters."
34243677 func_dirname_and_basename "$obj" "/" ""
34913744
34923745 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
34933746 srcfile=$func_to_tool_file_result
3494 func_quote_for_eval "$srcfile"
3495 qsrcfile=$func_quote_for_eval_result
3747 func_quote_arg pretty "$srcfile"
3748 qsrcfile=$func_quote_arg_result
34963749
34973750 # Only build a PIC object if we are building libtool libraries.
34983751 if test yes = "$build_libtool_libs"; then
36473900 -prefer-non-pic try to build non-PIC objects only
36483901 -shared do not build a '.o' file suitable for static linking
36493902 -static only build a '.o' file suitable for static linking
3650 -Wc,FLAG pass FLAG directly to the compiler
3903 -Wc,FLAG
3904 -Xcompiler FLAG pass FLAG directly to the compiler
36513905
36523906 COMPILE-COMMAND is a command to be used in creating a 'standard' object file
36533907 from the given SOURCEFILE.
37534007 -weak LIBNAME declare that the target provides the LIBNAME interface
37544008 -Wc,FLAG
37554009 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
4010 -Wa,FLAG
4011 -Xassembler FLAG pass linker-specific FLAG directly to the assembler
37564012 -Wl,FLAG
37574013 -Xlinker FLAG pass linker-specific FLAG directly to the linker
37584014 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
40954351 case $nonopt in *shtool*) :;; *) false;; esac
40964352 then
40974353 # Aesthetically quote it.
4098 func_quote_for_eval "$nonopt"
4099 install_prog="$func_quote_for_eval_result "
4354 func_quote_arg pretty "$nonopt"
4355 install_prog="$func_quote_arg_result "
41004356 arg=$1
41014357 shift
41024358 else
41064362
41074363 # The real first argument should be the name of the installation program.
41084364 # Aesthetically quote it.
4109 func_quote_for_eval "$arg"
4110 func_append install_prog "$func_quote_for_eval_result"
4365 func_quote_arg pretty "$arg"
4366 func_append install_prog "$func_quote_arg_result"
41114367 install_shared_prog=$install_prog
41124368 case " $install_prog " in
41134369 *[\\\ /]cp\ *) install_cp=: ;;
41644420 esac
41654421
41664422 # Aesthetically quote the argument.
4167 func_quote_for_eval "$arg"
4168 func_append install_prog " $func_quote_for_eval_result"
4423 func_quote_arg pretty "$arg"
4424 func_append install_prog " $func_quote_arg_result"
41694425 if test -n "$arg2"; then
4170 func_quote_for_eval "$arg2"
4426 func_quote_arg pretty "$arg2"
41714427 fi
4172 func_append install_shared_prog " $func_quote_for_eval_result"
4428 func_append install_shared_prog " $func_quote_arg_result"
41734429 done
41744430
41754431 test -z "$install_prog" && \
41804436
41814437 if test -n "$install_override_mode" && $no_mode; then
41824438 if $install_cp; then :; else
4183 func_quote_for_eval "$install_override_mode"
4184 func_append install_shared_prog " -m $func_quote_for_eval_result"
4439 func_quote_arg pretty "$install_override_mode"
4440 func_append install_shared_prog " -m $func_quote_arg_result"
41854441 fi
41864442 fi
41874443
44774733 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
44784734
44794735 $opt_quiet || {
4480 func_quote_for_expand "$relink_command"
4481 eval "func_echo $func_quote_for_expand_result"
4736 func_quote_arg expand,pretty "$relink_command"
4737 eval "func_echo $func_quote_arg_result"
44824738 }
44834739 if eval "$relink_command"; then :
44844740 else
52575513 if test \"\$libtool_execute_magic\" != \"$magic\"; then
52585514 file=\"\$0\""
52595515
5260 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
5516 func_quote_arg pretty "$ECHO"
5517 qECHO=$func_quote_arg_result
52615518 $ECHO "\
52625519
52635520 # A function that is used when there is no print builtin or printf.
52675524 \$1
52685525 _LTECHO_EOF'
52695526 }
5270 ECHO=\"$qECHO\"
5527 ECHO=$qECHO
52715528 fi
52725529
52735530 # Very basic option parsing. These options are (a) specific to
66106867 while test "$#" -gt 0; do
66116868 arg=$1
66126869 shift
6613 func_quote_for_eval "$arg"
6614 qarg=$func_quote_for_eval_unquoted_result
6615 func_append libtool_args " $func_quote_for_eval_result"
6870 func_quote_arg pretty,unquoted "$arg"
6871 qarg=$func_quote_arg_unquoted_result
6872 func_append libtool_args " $func_quote_arg_result"
66166873
66176874 # If the previous option needs an argument, assign it.
66186875 if test -n "$prev"; then
68487105 prev=
68497106 continue
68507107 ;;
7108 xassembler)
7109 func_append compiler_flags " -Xassembler $qarg"
7110 prev=
7111 func_append compile_command " -Xassembler $qarg"
7112 func_append finalize_command " -Xassembler $qarg"
7113 continue
7114 ;;
68517115 xcclinker)
68527116 func_append linker_flags " $qarg"
68537117 func_append compiler_flags " $qarg"
70187282 # These systems don't actually have a C library (as such)
70197283 test X-lc = "X$arg" && continue
70207284 ;;
7021 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7285 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
70227286 # Do not include libc due to us having libc/libc_r.
70237287 test X-lc = "X$arg" && continue
70247288 ;;
70387302 esac
70397303 elif test X-lc_r = "X$arg"; then
70407304 case $host in
7041 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7305 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
70427306 # Do not include libc_r directly, use -pthread flag.
70437307 continue
70447308 ;;
70687332 prev=xcompiler
70697333 continue
70707334 ;;
7071
7072 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
7335 # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
7336 -pthread)
7337 case $host in
7338 *solaris2*) ;;
7339 *)
7340 case "$new_inherited_linker_flags " in
7341 *" $arg "*) ;;
7342 * ) func_append new_inherited_linker_flags " $arg" ;;
7343 esac
7344 ;;
7345 esac
7346 continue
7347 ;;
7348 -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
70737349 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
70747350 func_append compiler_flags " $arg"
70757351 func_append compile_command " $arg"
72107486 save_ifs=$IFS; IFS=,
72117487 for flag in $args; do
72127488 IFS=$save_ifs
7213 func_quote_for_eval "$flag"
7214 func_append arg " $func_quote_for_eval_result"
7215 func_append compiler_flags " $func_quote_for_eval_result"
7489 func_quote_arg pretty "$flag"
7490 func_append arg " $func_quote_arg_result"
7491 func_append compiler_flags " $func_quote_arg_result"
72167492 done
72177493 IFS=$save_ifs
72187494 func_stripname ' ' '' "$arg"
72267502 save_ifs=$IFS; IFS=,
72277503 for flag in $args; do
72287504 IFS=$save_ifs
7229 func_quote_for_eval "$flag"
7230 func_append arg " $wl$func_quote_for_eval_result"
7231 func_append compiler_flags " $wl$func_quote_for_eval_result"
7232 func_append linker_flags " $func_quote_for_eval_result"
7505 func_quote_arg pretty "$flag"
7506 func_append arg " $wl$func_quote_arg_result"
7507 func_append compiler_flags " $wl$func_quote_arg_result"
7508 func_append linker_flags " $func_quote_arg_result"
72337509 done
72347510 IFS=$save_ifs
72357511 func_stripname ' ' '' "$arg"
72367512 arg=$func_stripname_result
72377513 ;;
72387514
7515 -Xassembler)
7516 prev=xassembler
7517 continue
7518 ;;
7519
72397520 -Xcompiler)
72407521 prev=xcompiler
72417522 continue
72537534
72547535 # -msg_* for osf cc
72557536 -msg_*)
7256 func_quote_for_eval "$arg"
7257 arg=$func_quote_for_eval_result
7537 func_quote_arg pretty "$arg"
7538 arg=$func_quote_arg_result
72587539 ;;
72597540
72607541 # Flags to be passed through unchanged, with rationale:
72717552 # -tp=* Portland pgcc target processor selection
72727553 # --sysroot=* for sysroot support
72737554 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7555 # -specs=* GCC specs files
72747556 # -stdlib=* select c++ std lib with clang
7557 # -fsanitize=* Clang/GCC memory and address sanitizer
7558 # -fuse-ld=* Linker select flags for GCC
7559 # -Wa,* Pass flags directly to the assembler
72757560 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
72767561 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
7277 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
7278 func_quote_for_eval "$arg"
7279 arg=$func_quote_for_eval_result
7562 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
7563 -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
7564 func_quote_arg pretty "$arg"
7565 arg=$func_quote_arg_result
72807566 func_append compile_command " $arg"
72817567 func_append finalize_command " $arg"
72827568 func_append compiler_flags " $arg"
72977583 continue
72987584 else
72997585 # Otherwise treat like 'Some other compiler flag' below
7300 func_quote_for_eval "$arg"
7301 arg=$func_quote_for_eval_result
7586 func_quote_arg pretty "$arg"
7587 arg=$func_quote_arg_result
73027588 fi
73037589 ;;
73047590
73057591 # Some other compiler flag.
73067592 -* | +*)
7307 func_quote_for_eval "$arg"
7308 arg=$func_quote_for_eval_result
7593 func_quote_arg pretty "$arg"
7594 arg=$func_quote_arg_result
73097595 ;;
73107596
73117597 *.$objext)
74257711 *)
74267712 # Unknown arguments in both finalize_command and compile_command need
74277713 # to be aesthetically quoted because they are evaled later.
7428 func_quote_for_eval "$arg"
7429 arg=$func_quote_for_eval_result
7714 func_quote_arg pretty "$arg"
7715 arg=$func_quote_arg_result
74307716 ;;
74317717 esac # arg
74327718
86318917 test CXX = "$tagname" && {
86328918 case $host_os in
86338919 linux*)
8634 case `$CC -V 2>&1 | sed 5q` in
8920 case `$CC -V 2>&1 | $SED 5q` in
86358921 *Sun\ C*) # Sun C++ 5.9
86368922 func_suncc_cstd_abi
86378923
88049090 #
88059091 case $version_type in
88069092 # correct linux to gnu/linux during the next big refactor
8807 darwin|freebsd-elf|linux|osf|windows|none)
9093 darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none)
88089094 func_arith $number_major + $number_minor
88099095 current=$func_arith_result
88109096 age=$number_minor
88959181 versuffix=.$current.$revision
88969182 ;;
88979183
8898 freebsd-elf)
9184 freebsd-elf | midnightbsd-elf)
88999185 func_arith $current - $age
89009186 major=.$func_arith_result
89019187 versuffix=$major.$age.$revision
91219407 *-*-netbsd*)
91229408 # Don't link with libc until the a.out ld.so is fixed.
91239409 ;;
9124 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
9410 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
91259411 # Do not include libc due to us having libc/libc_r.
91269412 ;;
91279413 *-*-sco3.2v5* | *-*-sco5v6*)
993410220 for cmd in $concat_cmds; do
993510221 IFS=$save_ifs
993610222 $opt_quiet || {
9937 func_quote_for_expand "$cmd"
9938 eval "func_echo $func_quote_for_expand_result"
10223 func_quote_arg expand,pretty "$cmd"
10224 eval "func_echo $func_quote_arg_result"
993910225 }
994010226 $opt_dry_run || eval "$cmd" || {
994110227 lt_exit=$?
1002810314 eval cmd=\"$cmd\"
1002910315 IFS=$save_ifs
1003010316 $opt_quiet || {
10031 func_quote_for_expand "$cmd"
10032 eval "func_echo $func_quote_for_expand_result"
10317 func_quote_arg expand,pretty "$cmd"
10318 eval "func_echo $func_quote_arg_result"
1003310319 }
1003410320 $opt_dry_run || eval "$cmd" || {
1003510321 lt_exit=$?
1050710793 elif eval var_value=\$$var; test -z "$var_value"; then
1050810794 relink_command="$var=; export $var; $relink_command"
1050910795 else
10510 func_quote_for_eval "$var_value"
10511 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
10796 func_quote_arg pretty "$var_value"
10797 relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
1051210798 fi
1051310799 done
10514 relink_command="(cd `pwd`; $relink_command)"
10515 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
10800 func_quote eval cd "`pwd`"
10801 func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)"
10802 relink_command=$func_quote_arg_unquoted_result
1051610803 fi
1051710804
1051810805 # Only actually do things if not in dry run mode.
1075211039 elif eval var_value=\$$var; test -z "$var_value"; then
1075311040 relink_command="$var=; export $var; $relink_command"
1075411041 else
10755 func_quote_for_eval "$var_value"
10756 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
11042 func_quote_arg pretty,unquoted "$var_value"
11043 relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
1075711044 fi
1075811045 done
1075911046 # Quote the link command for shipping.
10760 relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
10761 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
11047 func_quote eval cd "`pwd`"
11048 relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
11049 func_quote_arg pretty,unquoted "$relink_command"
11050 relink_command=$func_quote_arg_unquoted_result
1076211051 if test yes = "$hardcode_automatic"; then
1076311052 relink_command=
1076411053 fi
00 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
11 #
2 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
2 # Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
3 # Foundation, Inc.
34 # Written by Gordon Matzigkeit, 1996
45 #
56 # This file is free software; the Free Software Foundation gives
3031 # along with this program. If not, see <http://www.gnu.org/licenses/>.
3132 ])
3233
33 # serial 58 LT_INIT
34 # serial 59 LT_INIT
3435
3536
3637 # LT_PREREQ(VERSION)
180181 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
181182 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
182183 m4_require([_LT_CMD_RELOAD])dnl
184 m4_require([_LT_DECL_FILECMD])dnl
183185 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
184186 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
185187 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
218220 ofile=libtool
219221 can_build_shared=yes
220222
221 # All known linkers require a '.a' archive for static linking (except MSVC,
222 # which needs '.lib').
223 # All known linkers require a '.a' archive for static linking (except MSVC and
224 # ICC, which need '.lib').
223225 libext=a
224226
225227 with_gnu_ld=$lt_cv_prog_gnu_ld
777779 # if finds mixed CR/LF and LF-only lines. Since sed operates in
778780 # text mode, it properly converts lines to CR/LF. This bash problem
779781 # is reportedly fixed, but why not run on old versions too?
780 sed '$q' "$ltmain" >> "$cfgfile" \
782 $SED '$q' "$ltmain" >> "$cfgfile" \
781783 || (rm -f "$cfgfile"; exit 1)
782784
783785 mv -f "$cfgfile" "$ofile" ||
10411043 _LT_EOF
10421044 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
10431045 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1044 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1045 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1046 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1047 $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
10461048 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
10471049 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
10481050 cat > conftest.c << _LT_EOF
10661068 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10671069 darwin1.*)
10681070 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1069 darwin*) # darwin 5.x on
1070 # if running on 10.5 or later, the deployment target defaults
1071 # to the OS version, if on x86, and 10.4, the deployment
1072 # target defaults to 10.4. Don't you love it?
1073 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1074 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1075 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1076 10.[[012]][[,.]]*)
1077 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1078 10.*)
1079 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1071 darwin*)
1072 case $MACOSX_DEPLOYMENT_TARGET,$host in
1073 10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
1074 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1075 *)
1076 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10801077 esac
10811078 ;;
10821079 esac
11251122 output_verbose_link_cmd=func_echo_all
11261123 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
11271124 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1128 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
1129 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
1125 _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
1126 _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
11301127 m4_if([$1], [CXX],
11311128 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
11321129 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
1133 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
1130 _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
11341131 fi
11351132 ],[])
11361133 else
12441241 # _LT_WITH_SYSROOT
12451242 # ----------------
12461243 AC_DEFUN([_LT_WITH_SYSROOT],
1247 [AC_MSG_CHECKING([for sysroot])
1244 [m4_require([_LT_DECL_SED])dnl
1245 AC_MSG_CHECKING([for sysroot])
12481246 AC_ARG_WITH([sysroot],
12491247 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
12501248 [Search for dependent libraries within DIR (or the compiler's sysroot
12611259 fi
12621260 ;; #(
12631261 /*)
1264 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1262 lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
12651263 ;; #(
12661264 no|'')
12671265 ;; #(
12911289 # options accordingly.
12921290 echo 'int i;' > conftest.$ac_ext
12931291 if AC_TRY_EVAL(ac_compile); then
1294 case `/usr/bin/file conftest.$ac_objext` in
1292 case `$FILECMD conftest.$ac_objext` in
12951293 *ELF-32*)
12961294 HPUX_IA64_MODE=32
12971295 ;;
13081306 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13091307 if AC_TRY_EVAL(ac_compile); then
13101308 if test yes = "$lt_cv_prog_gnu_ld"; then
1311 case `/usr/bin/file conftest.$ac_objext` in
1309 case `$FILECMD conftest.$ac_objext` in
13121310 *32-bit*)
13131311 LD="${LD-ld} -melf32bsmip"
13141312 ;;
13201318 ;;
13211319 esac
13221320 else
1323 case `/usr/bin/file conftest.$ac_objext` in
1321 case `$FILECMD conftest.$ac_objext` in
13241322 *32-bit*)
13251323 LD="${LD-ld} -32"
13261324 ;;
13421340 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13431341 if AC_TRY_EVAL(ac_compile); then
13441342 emul=elf
1345 case `/usr/bin/file conftest.$ac_objext` in
1343 case `$FILECMD conftest.$ac_objext` in
13461344 *32-bit*)
13471345 emul="${emul}32"
13481346 ;;
13501348 emul="${emul}64"
13511349 ;;
13521350 esac
1353 case `/usr/bin/file conftest.$ac_objext` in
1351 case `$FILECMD conftest.$ac_objext` in
13541352 *MSB*)
13551353 emul="${emul}btsmip"
13561354 ;;
13581356 emul="${emul}ltsmip"
13591357 ;;
13601358 esac
1361 case `/usr/bin/file conftest.$ac_objext` in
1359 case `$FILECMD conftest.$ac_objext` in
13621360 *N32*)
13631361 emul="${emul}n32"
13641362 ;;
13781376 # not appear in the list.
13791377 echo 'int i;' > conftest.$ac_ext
13801378 if AC_TRY_EVAL(ac_compile); then
1381 case `/usr/bin/file conftest.o` in
1379 case `$FILECMD conftest.o` in
13821380 *32-bit*)
13831381 case $host in
13841382 x86_64-*kfreebsd*-gnu)
13851383 LD="${LD-ld} -m elf_i386_fbsd"
13861384 ;;
13871385 x86_64-*linux*)
1388 case `/usr/bin/file conftest.o` in
1386 case `$FILECMD conftest.o` in
13891387 *x86-64*)
13901388 LD="${LD-ld} -m elf32_x86_64"
13911389 ;;
14531451 # options accordingly.
14541452 echo 'int i;' > conftest.$ac_ext
14551453 if AC_TRY_EVAL(ac_compile); then
1456 case `/usr/bin/file conftest.o` in
1454 case `$FILECMD conftest.o` in
14571455 *64-bit*)
14581456 case $lt_cv_prog_gnu_ld in
14591457 yes*)
14921490 m4_defun([_LT_PROG_AR],
14931491 [AC_CHECK_TOOLS(AR, [ar], false)
14941492 : ${AR=ar}
1495 : ${AR_FLAGS=cru}
14961493 _LT_DECL([], [AR], [1], [The archiver])
1497 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1494
1495 # Use ARFLAGS variable as AR's operation code to sync the variable naming with
1496 # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
1497 # higher priority because thats what people were doing historically (setting
1498 # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
1499 # variable obsoleted/removed.
1500
1501 test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
1502 lt_ar_flags=$AR_FLAGS
1503 _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
1504
1505 # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
1506 # by AR_FLAGS because that was never working and AR_FLAGS is about to die.
1507 _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
1508 [Flags to create an archive])
14981509
14991510 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
15001511 [lt_cv_ar_at_file=no
17131724 lt_cv_sys_max_cmd_len=8192;
17141725 ;;
17151726
1716 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1727 bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
17171728 # This has been around since 386BSD, at least. Likely further.
17181729 if test -x /sbin/sysctl; then
17191730 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
17561767 sysv5* | sco5v6* | sysv4.2uw2*)
17571768 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
17581769 if test -n "$kargmax"; then
1759 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1770 lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'`
17601771 else
17611772 lt_cv_sys_max_cmd_len=32768
17621773 fi
22062217 striplib=
22072218 old_striplib=
22082219 AC_MSG_CHECKING([whether stripping libraries is possible])
2209 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2210 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2211 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2212 AC_MSG_RESULT([yes])
2220 if test -z "$STRIP"; then
2221 AC_MSG_RESULT([no])
22132222 else
2214 # FIXME - insert some real tests, host_os isn't really good enough
2215 case $host_os in
2216 darwin*)
2217 if test -n "$STRIP"; then
2223 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2224 old_striplib="$STRIP --strip-debug"
2225 striplib="$STRIP --strip-unneeded"
2226 AC_MSG_RESULT([yes])
2227 else
2228 case $host_os in
2229 darwin*)
2230 # FIXME - insert some real tests, host_os isn't really good enough
22182231 striplib="$STRIP -x"
22192232 old_striplib="$STRIP -S"
22202233 AC_MSG_RESULT([yes])
2221 else
2234 ;;
2235 freebsd*)
2236 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
2237 old_striplib="$STRIP --strip-debug"
2238 striplib="$STRIP --strip-unneeded"
2239 AC_MSG_RESULT([yes])
2240 else
2241 AC_MSG_RESULT([no])
2242 fi
2243 ;;
2244 *)
22222245 AC_MSG_RESULT([no])
2223 fi
2224 ;;
2225 *)
2226 AC_MSG_RESULT([no])
2227 ;;
2228 esac
2246 ;;
2247 esac
2248 fi
22292249 fi
22302250 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
22312251 _LT_DECL([], [striplib], [1])
25482568 case $host_os in
25492569 cygwin*)
25502570 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2551 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2571 soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25522572 m4_if([$1], [],[
25532573 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
25542574 ;;
25582578 ;;
25592579 pw32*)
25602580 # pw32 DLLs use 'pw' prefix rather than 'lib'
2561 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2581 library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25622582 ;;
25632583 esac
25642584 dynamic_linker='Win32 ld.exe'
25652585 ;;
25662586
2567 *,cl*)
2568 # Native MSVC
2587 *,cl* | *,icl*)
2588 # Native MSVC or ICC
25692589 libname_spec='$name'
25702590 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25712591 library_names_spec='$libname.dll.lib'
25842604 done
25852605 IFS=$lt_save_ifs
25862606 # Convert to MSYS style.
2587 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2607 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
25882608 ;;
25892609 cygwin*)
25902610 # Convert to unix form, then to dos form, then back to unix form
26212641 ;;
26222642
26232643 *)
2624 # Assume MSVC wrapper
2644 # Assume MSVC and ICC wrapper
26252645 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
26262646 dynamic_linker='Win32 ld.exe'
26272647 ;;
26542674 shlibpath_var=LD_LIBRARY_PATH
26552675 ;;
26562676
2657 freebsd* | dragonfly*)
2677 freebsd* | dragonfly* | midnightbsd*)
26582678 # DragonFly does not have aout. When/if they implement a new
26592679 # versioning mechanism, adjust this.
26602680 if test -x /usr/bin/objformat; then
34533473
34543474 bsdi[[45]]*)
34553475 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3456 lt_cv_file_magic_cmd='/usr/bin/file -L'
3476 lt_cv_file_magic_cmd='$FILECMD -L'
34573477 lt_cv_file_magic_test_file=/shlib/libc.so
34583478 ;;
34593479
34873507 lt_cv_deplibs_check_method=pass_all
34883508 ;;
34893509
3490 freebsd* | dragonfly*)
3510 freebsd* | dragonfly* | midnightbsd*)
34913511 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
34923512 case $host_cpu in
34933513 i*86 )
34943514 # Not sure whether the presence of OpenBSD here was a mistake.
34953515 # Let's accept both of them until this is cleared up.
34963516 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3497 lt_cv_file_magic_cmd=/usr/bin/file
3517 lt_cv_file_magic_cmd=$FILECMD
34983518 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
34993519 ;;
35003520 esac
35083528 ;;
35093529
35103530 hpux10.20* | hpux11*)
3511 lt_cv_file_magic_cmd=/usr/bin/file
3531 lt_cv_file_magic_cmd=$FILECMD
35123532 case $host_cpu in
35133533 ia64*)
35143534 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
35553575
35563576 newos6*)
35573577 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3558 lt_cv_file_magic_cmd=/usr/bin/file
3578 lt_cv_file_magic_cmd=$FILECMD
35593579 lt_cv_file_magic_test_file=/usr/lib/libnls.so
35603580 ;;
35613581
36823702 mingw*) lt_bad_file=conftest.nm/nofile ;;
36833703 *) lt_bad_file=/dev/null ;;
36843704 esac
3685 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3705 case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
36863706 *$lt_bad_file* | *'Invalid file or object type'*)
36873707 lt_cv_path_NM="$tmp_nm -B"
36883708 break 2
36893709 ;;
36903710 *)
3691 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3711 case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
36923712 */dev/null*)
36933713 lt_cv_path_NM="$tmp_nm -p"
36943714 break 2
37143734 # Let the user override the test.
37153735 else
37163736 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3717 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3737 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
37183738 *COFF*)
37193739 DUMPBIN="$DUMPBIN -symbols -headers"
37203740 ;;
39543974
39553975 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
39563976 # Gets list of data symbols to import.
3957 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3977 lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
39583978 # Adjust the below global symbol transforms to fixup imported variables.
39593979 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
39603980 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
39723992 # Transform an extracted symbol line into a proper C declaration.
39733993 # Some systems (esp. on ia64) link data and code symbols differently,
39743994 # so use this general approach.
3975 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
3995 lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
39763996 $lt_cdecl_hook\
39773997 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
39783998 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
39793999
39804000 # Transform an extracted symbol line into symbol name and symbol address
3981 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
4001 lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
39824002 $lt_c_name_hook\
39834003 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
39844004 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
39854005
39864006 # Transform an extracted symbol line into symbol name with lib prefix and
39874007 # symbol address.
3988 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4008 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
39894009 $lt_c_name_lib_hook\
39904010 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
39914011 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
40094029 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
40104030 # Fake it for dumpbin and say T for any non-static function,
40114031 # D for any global variable and I for any imported variable.
4012 # Also find C++ and __fastcall symbols from MSVC++,
4032 # Also find C++ and __fastcall symbols from MSVC++ or ICC,
40134033 # which start with @ or ?.
40144034 lt_cv_sys_global_symbol_pipe="$AWK ['"\
40154035 " {last_section=section; section=\$ 3};"\
40274047 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
40284048 " ' prfx=^$ac_symprfx]"
40294049 else
4030 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4050 lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
40314051 fi
4032 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4052 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
40334053
40344054 # Check to see that the pipe works correctly.
40354055 pipe_works=no
43164336 ;;
43174337 esac
43184338 ;;
4319 freebsd* | dragonfly*)
4339 freebsd* | dragonfly* | midnightbsd*)
43204340 # FreeBSD uses GNU C++
43214341 ;;
43224342 hpux9* | hpux10* | hpux11*)
43994419 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
44004420 ;;
44014421 *)
4402 case `$CC -V 2>&1 | sed 5q` in
4422 case `$CC -V 2>&1 | $SED 5q` in
44034423 *Sun\ C*)
44044424 # Sun C++ 5.9
44054425 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47354755 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
47364756 ;;
47374757 *)
4738 case `$CC -V 2>&1 | sed 5q` in
4758 case `$CC -V 2>&1 | $SED 5q` in
47394759 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
47404760 # Sun Fortran 8.3 passes all unrecognized flags to the linker
47414761 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
49184938 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
49194939 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
49204940 else
4921 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
4941 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
49224942 fi
49234943 ;;
49244944 pw32*)
49264946 ;;
49274947 cygwin* | mingw* | cegcc*)
49284948 case $cc_basename in
4929 cl*)
4949 cl* | icl*)
49304950 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
49314951 ;;
49324952 *)
49835003
49845004 case $host_os in
49855005 cygwin* | mingw* | pw32* | cegcc*)
4986 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5006 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
49875007 # When not using gcc, we currently assume that we are using
4988 # Microsoft Visual C++.
5008 # Microsoft Visual C++ or Intel C++ Compiler.
49895009 if test yes != "$GCC"; then
49905010 with_gnu_ld=no
49915011 fi
49925012 ;;
49935013 interix*)
4994 # we just hope/assume this is gcc and not c89 (= MSVC++)
5014 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
49955015 with_gnu_ld=yes
49965016 ;;
49975017 openbsd* | bitrig*)
50435063 _LT_TAGVAR(whole_archive_flag_spec, $1)=
50445064 fi
50455065 supports_anon_versioning=no
5046 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5066 case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
50475067 *GNU\ gold*) supports_anon_versioning=yes ;;
50485068 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
50495069 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
51555175 emximp -o $lib $output_objdir/$libname.def'
51565176 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
51575177 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5178 _LT_TAGVAR(file_list_spec, $1)='@'
51585179 ;;
51595180
51605181 interix[[3-9]]*)
51695190 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
51705191 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
51715192 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5172 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5193 _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
51735194 ;;
51745195
51755196 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
52125233 _LT_TAGVAR(compiler_needs_object, $1)=yes
52135234 ;;
52145235 esac
5215 case `$CC -V 2>&1 | sed 5q` in
5236 case `$CC -V 2>&1 | $SED 5q` in
52165237 *Sun\ C*) # Sun C 5.9
52175238 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
52185239 _LT_TAGVAR(compiler_needs_object, $1)=yes
52245245
52255246 if test yes = "$supports_anon_versioning"; then
52265247 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5227 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5248 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52285249 echo "local: *; };" >> $output_objdir/$libname.ver~
52295250 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
52305251 fi
52405261 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
52415262 if test yes = "$supports_anon_versioning"; then
52425263 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5243 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5264 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52445265 echo "local: *; };" >> $output_objdir/$libname.ver~
52455266 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
52465267 fi
53725393 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
53735394 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
53745395 else
5375 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5396 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
53765397 fi
53775398 aix_use_runtimelinking=no
53785399
55555576
55565577 cygwin* | mingw* | pw32* | cegcc*)
55575578 # When not using gcc, we currently assume that we are using
5558 # Microsoft Visual C++.
5579 # Microsoft Visual C++ or Intel C++ Compiler.
55595580 # hardcode_libdir_flag_spec is actually meaningless, as there is
55605581 # no search path for DLLs.
55615582 case $cc_basename in
5562 cl*)
5563 # Native MSVC
5583 cl* | icl*)
5584 # Native MSVC or ICC
55645585 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
55655586 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
55665587 _LT_TAGVAR(always_export_symbols, $1)=yes
56015622 fi'
56025623 ;;
56035624 *)
5604 # Assume MSVC wrapper
5625 # Assume MSVC and ICC wrapper
56055626 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
56065627 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56075628 # Tell ltmain to make .lib files, not .a files.
56495670 ;;
56505671
56515672 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5652 freebsd* | dragonfly*)
5673 freebsd* | dragonfly* | midnightbsd*)
56535674 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
56545675 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56555676 _LT_TAGVAR(hardcode_direct, $1)=yes
58605881 emximp -o $lib $output_objdir/$libname.def'
58615882 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
58625883 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5884 _LT_TAGVAR(file_list_spec, $1)='@'
58635885 ;;
58645886
58655887 osf3*)
66306652
66316653 cygwin* | mingw* | pw32* | cegcc*)
66326654 case $GXX,$cc_basename in
6633 ,cl* | no,cl*)
6634 # Native MSVC
6655 ,cl* | no,cl* | ,icl* | no,icl*)
6656 # Native MSVC or ICC
66356657 # hardcode_libdir_flag_spec is actually meaningless, as there is
66366658 # no search path for DLLs.
66376659 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
67296751 emximp -o $lib $output_objdir/$libname.def'
67306752 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
67316753 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6754 _LT_TAGVAR(file_list_spec, $1)='@'
67326755 ;;
67336756
67346757 dgux*)
67596782 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
67606783 ;;
67616784
6762 freebsd* | dragonfly*)
6785 freebsd* | dragonfly* | midnightbsd*)
67636786 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
67646787 # conventions
67656788 _LT_TAGVAR(ld_shlibs, $1)=yes
68966919 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
68976920 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
68986921 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6899 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6922 _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
69006923 ;;
69016924 irix5* | irix6*)
69026925 case $cc_basename in
70367059 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
70377060 if test yes = "$supports_anon_versioning"; then
70387061 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7039 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7062 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
70407063 echo "local: *; };" >> $output_objdir/$libname.ver~
70417064 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
70427065 fi
70437066 ;;
70447067 *)
7045 case `$CC -V 2>&1 | sed 5q` in
7068 case `$CC -V 2>&1 | $SED 5q` in
70467069 *Sun\ C*)
70477070 # Sun C++ 5.9
70487071 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
81878210 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
81888211 AC_SUBST([DLLTOOL])
81898212 ])
8213
8214 # _LT_DECL_FILECMD
8215 # ----------------
8216 # Check for a file(cmd) program that can be used to detect file type and magic
8217 m4_defun([_LT_DECL_FILECMD],
8218 [AC_CHECK_TOOL([FILECMD], [file], [:])
8219 _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
8220 ])# _LD_DECL_FILECMD
81908221
81918222 # _LT_DECL_SED
81928223 # ------------
00 # Helper functions for option handling. -*- Autoconf -*-
11 #
2 # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
3 # Foundation, Inc.
2 # Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
3 # Software Foundation, Inc.
44 # Written by Gary V. Vaughan, 2004
55 #
66 # This file is free software; the Free Software Foundation gives
00 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
11 #
2 # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
2 # Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
33 # Foundation, Inc.
44 # Written by Gary V. Vaughan, 2004
55 #
00 # ltversion.m4 -- version numbers -*- Autoconf -*-
11 #
2 # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
2 # Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
3 # Inc.
34 # Written by Scott James Remnant, 2004
45 #
56 # This file is free software; the Free Software Foundation gives
89
910 # @configure_input@
1011
11 # serial 4179 ltversion.m4
12 # serial 4245 ltversion.m4
1213 # This file is part of GNU Libtool
1314
14 m4_define([LT_PACKAGE_VERSION], [2.4.6])
15 m4_define([LT_PACKAGE_REVISION], [2.4.6])
15 m4_define([LT_PACKAGE_VERSION], [2.4.7])
16 m4_define([LT_PACKAGE_REVISION], [2.4.7])
1617
1718 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4.6'
19 macro_revision='2.4.6'
19 [macro_version='2.4.7'
20 macro_revision='2.4.7'
2021 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
2122 _LT_DECL(, macro_revision, 0)
2223 ])
00 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
11 #
2 # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
3 # Foundation, Inc.
2 # Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
3 # Software Foundation, Inc.
44 # Written by Scott James Remnant, 2004.
55 #
66 # This file is free software; the Free Software Foundation gives
3535 by a colon (:) and then the value the property should be set to.
3636 Variable substitution is always performed regardless of property type.
3737 .Pp
38 There are two types of property:
38 There are three types of property:
3939 .\"
4040 .Bl -tag -width indent
4141 .\"
00 project('pkgconf', 'c',
1 version : '1.8.0',
1 version : '1.8.1',
22 license : 'ISC',
33 meson_version : '>=0.47')
44
106106 install_man('man/pkgconf-personality.5')
107107 install_data('pkg.m4', install_dir: 'share/aclocal')
108108 install_data('AUTHORS', install_dir: 'share/doc/pkgconf')
109 install_data('README.md', install_dir: 'share/doc/pkgconf')
109 install_data('README.md', install_dir: 'share/doc/pkgconf')
22
33 scriptversion=2018-03-07.03; # UTC
44
5 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
5 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
66 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
77
88 # This program is free software; you can redistribute it and/or modify
175175 export PKG_CONFIG_PATH="${selfdir}/lib1"
176176 atf_check \
177177 -s exit:1 \
178 pkgconf --exists 'tilde >= 1.0.0'
179 }
180
181 exists_body()
182 {
183 export PKG_CONFIG_PATH="${selfdir}/lib1"
184 atf_check \
185 pkgconf --exists 'tilde = 1.0.0~rc1'
186 }
187
188 exists2_body()
189 {
190 export PKG_CONFIG_PATH="${selfdir}/lib1"
191 atf_check \
178192 pkgconf --exists 'tilde <= 1.0.0'
179 }
180
181 exists_body()
182 {
183 export PKG_CONFIG_PATH="${selfdir}/lib1"
184 atf_check \
185 pkgconf --exists 'tilde = 1.0.0~rc1'
186 }
187
188 exists2_body()
189 {
190 export PKG_CONFIG_PATH="${selfdir}/lib1"
191 atf_check \
192 pkgconf --exists 'tilde >= 1.0.0'
193193 }
194194
195195 exists3_body()
0 v9=lol
1 v8=${v9}${v9}${v9}${v9}${v9}${v9}${v9}${v9}${v9}${v9}
2 v7=${v8}${v8}${v8}${v8}${v8}${v8}${v8}${v8}${v8}${v8}
3 v6=${v7}${v7}${v7}${v7}${v7}${v7}${v7}${v7}${v7}${v7}
4 v5=${v6}${v6}${v6}${v6}${v6}${v6}${v6}${v6}${v6}${v6}
5 v4=${v5}${v5}${v5}${v5}${v5}${v5}${v5}${v5}${v5}${v5}
6 v3=${v4}${v4}${v4}${v4}${v4}${v4}${v4}${v4}${v4}${v4}
7 v2=${v3}${v3}${v3}${v3}${v3}${v3}${v3}${v3}${v3}${v3}
8 v1=${v2}${v2}${v2}${v2}${v2}${v2}${v2}${v2}${v2}${v2}
9 v0=${v1}${v1}${v1}${v1}${v1}${v1}${v1}${v1}${v1}${v1}
10 Name: One Billion Laughs
11 Version: ${v0}
12 Description: Don't install this!
1818 # yuck
1919 foreach test : tests
2020 configure_file(input: test + '.sh', output: test, copy: true)
21 run_command('chmod', '755', join_paths(meson.build_root(), 'tests', test))
2221 endforeach
2727 malformed_1 \
2828 malformed_quoting \
2929 explicit_sysroot \
30 empty_tuple
30 empty_tuple \
31 billion_laughs
3132
3233 # sysroot_munge \
3334
250251 atf_check -o inline:"\n" \
251252 pkgconf --with-path="${selfdir}/lib1" --cflags empty-tuple
252253 }
254
255 billion_laughs_body()
256 {
257 atf_check -o inline:"warning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\n" \
258 pkgconf --with-path="${selfdir}/lib1" --validate billion-laughs
259 }