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
21 | 21 | libpkgconf/win-dirent.h \ |
22 | 22 | tests/lib-relocatable/lib/pkgconfig/foo.pc \ |
23 | 23 | tests/lib1/argv-parse-2.pc \ |
24 | tests/lib1/billion-laughs.pc \ | |
24 | 25 | tests/lib1/dos-lineendings.pc \ |
25 | 26 | tests/lib1/paren-quoting.pc \ |
26 | 27 | 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. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2020 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2021 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
245 | 245 | unique=`for i in $$list; do \ |
246 | 246 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
247 | 247 | done | $(am__uniquify_input)` |
248 | ETAGS = etags | |
249 | CTAGS = ctags | |
250 | CSCOPE = cscope | |
251 | 248 | AM_RECURSIVE_TARGETS = cscope |
252 | 249 | am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Kyuafile.in \ |
253 | 250 | $(srcdir)/Makefile.in $(srcdir)/libpkgconf.pc.in \ |
254 | 251 | $(top_srcdir)/libpkgconf/config.h.in \ |
255 | 252 | $(top_srcdir)/tests/Kyuafile.in \ |
256 | 253 | $(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 | |
259 | 256 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
260 | 257 | distdir = $(PACKAGE)-$(VERSION) |
261 | 258 | top_distdir = $(distdir) |
288 | 285 | CFLAGS = @CFLAGS@ |
289 | 286 | CPP = @CPP@ |
290 | 287 | CPPFLAGS = @CPPFLAGS@ |
288 | CSCOPE = @CSCOPE@ | |
289 | CTAGS = @CTAGS@ | |
291 | 290 | CYGPATH_W = @CYGPATH_W@ |
292 | 291 | DEFS = @DEFS@ |
293 | 292 | DEPDIR = @DEPDIR@ |
298 | 297 | ECHO_N = @ECHO_N@ |
299 | 298 | ECHO_T = @ECHO_T@ |
300 | 299 | EGREP = @EGREP@ |
300 | ETAGS = @ETAGS@ | |
301 | 301 | EXEEXT = @EXEEXT@ |
302 | 302 | FGREP = @FGREP@ |
303 | FILECMD = @FILECMD@ | |
303 | 304 | GREP = @GREP@ |
304 | 305 | INSTALL = @INSTALL@ |
305 | 306 | INSTALL_DATA = @INSTALL_DATA@ |
411 | 412 | libpkgconf/win-dirent.h \ |
412 | 413 | tests/lib-relocatable/lib/pkgconfig/foo.pc \ |
413 | 414 | tests/lib1/argv-parse-2.pc \ |
415 | tests/lib1/billion-laughs.pc \ | |
414 | 416 | tests/lib1/dos-lineendings.pc \ |
415 | 417 | tests/lib1/paren-quoting.pc \ |
416 | 418 | tests/lib1/argv-parse-3.pc \ |
1139 | 1141 | distclean-tags: |
1140 | 1142 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
1141 | 1143 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files |
1142 | ||
1143 | 1144 | distdir: $(BUILT_SOURCES) |
1144 | 1145 | $(MAKE) $(AM_MAKEFLAGS) distdir-am |
1145 | 1146 |
0 | 0 | Changes from previous version of pkgconf |
1 | 1 | ======================================== |
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. | |
2 | 10 | |
3 | 11 | Changes from 1.7.4 to 1.8.0: |
4 | 12 | ---------------------------- |
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. | |
3 | 3 | |
4 | 4 | # This file is free software; the Free Software Foundation |
5 | 5 | # gives unlimited permission to copy and/or distribute it, |
19 | 19 | If you have problems, you may need to regenerate the build system entirely. |
20 | 20 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) |
21 | 21 | |
22 | # Copyright (C) 2002-2020 Free Software Foundation, Inc. | |
22 | # Copyright (C) 2002-2021 Free Software Foundation, Inc. | |
23 | 23 | # |
24 | 24 | # This file is free software; the Free Software Foundation |
25 | 25 | # gives unlimited permission to copy and/or distribute it, |
34 | 34 | [am__api_version='1.16' |
35 | 35 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
36 | 36 | 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], [], | |
38 | 38 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
39 | 39 | ]) |
40 | 40 | |
50 | 50 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
51 | 51 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
52 | 52 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
53 | [AM_AUTOMAKE_VERSION([1.16.3])dnl | |
53 | [AM_AUTOMAKE_VERSION([1.16.5])dnl | |
54 | 54 | m4_ifndef([AC_AUTOCONF_VERSION], |
55 | 55 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
56 | 56 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
57 | 57 | |
58 | 58 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
59 | 59 | |
60 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
60 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
61 | 61 | # |
62 | 62 | # This file is free software; the Free Software Foundation |
63 | 63 | # gives unlimited permission to copy and/or distribute it, |
109 | 109 | |
110 | 110 | # AM_CONDITIONAL -*- Autoconf -*- |
111 | 111 | |
112 | # Copyright (C) 1997-2020 Free Software Foundation, Inc. | |
112 | # Copyright (C) 1997-2021 Free Software Foundation, Inc. | |
113 | 113 | # |
114 | 114 | # This file is free software; the Free Software Foundation |
115 | 115 | # gives unlimited permission to copy and/or distribute it, |
140 | 140 | Usually this means the macro was only invoked conditionally.]]) |
141 | 141 | fi])]) |
142 | 142 | |
143 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
143 | # Copyright (C) 1999-2021 Free Software Foundation, Inc. | |
144 | 144 | # |
145 | 145 | # This file is free software; the Free Software Foundation |
146 | 146 | # gives unlimited permission to copy and/or distribute it, |
331 | 331 | |
332 | 332 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
333 | 333 | |
334 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
334 | # Copyright (C) 1999-2021 Free Software Foundation, Inc. | |
335 | 335 | # |
336 | 336 | # This file is free software; the Free Software Foundation |
337 | 337 | # gives unlimited permission to copy and/or distribute it, |
399 | 399 | |
400 | 400 | # Do all the work for Automake. -*- Autoconf -*- |
401 | 401 | |
402 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
402 | # Copyright (C) 1996-2021 Free Software Foundation, Inc. | |
403 | 403 | # |
404 | 404 | # This file is free software; the Free Software Foundation |
405 | 405 | # gives unlimited permission to copy and/or distribute it, |
427 | 427 | # release and drop the old call support. |
428 | 428 | AC_DEFUN([AM_INIT_AUTOMAKE], |
429 | 429 | [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 | |
430 | 434 | dnl Autoconf wants to disallow AM_ names. We explicitly allow |
431 | 435 | dnl the ones we care about. |
432 | 436 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
463 | 467 | [_AM_SET_OPTIONS([$1])dnl |
464 | 468 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. |
465 | 469 | 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]), | |
467 | 471 | [ok:ok],, |
468 | 472 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl |
469 | 473 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
515 | 519 | [m4_define([AC_PROG_OBJCXX], |
516 | 520 | m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl |
517 | 521 | ]) |
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 | ||
518 | 536 | AC_REQUIRE([AM_SILENT_RULES])dnl |
519 | 537 | dnl The testsuite driver may need to know about EXEEXT, so add the |
520 | 538 | dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This |
596 | 614 | done |
597 | 615 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
598 | 616 | |
599 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
617 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
600 | 618 | # |
601 | 619 | # This file is free software; the Free Software Foundation |
602 | 620 | # gives unlimited permission to copy and/or distribute it, |
617 | 635 | fi |
618 | 636 | AC_SUBST([install_sh])]) |
619 | 637 | |
620 | # Copyright (C) 2003-2020 Free Software Foundation, Inc. | |
638 | # Copyright (C) 2003-2021 Free Software Foundation, Inc. | |
621 | 639 | # |
622 | 640 | # This file is free software; the Free Software Foundation |
623 | 641 | # gives unlimited permission to copy and/or distribute it, |
638 | 656 | |
639 | 657 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
640 | 658 | |
641 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
659 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
642 | 660 | # |
643 | 661 | # This file is free software; the Free Software Foundation |
644 | 662 | # gives unlimited permission to copy and/or distribute it, |
681 | 699 | |
682 | 700 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
683 | 701 | |
684 | # Copyright (C) 1997-2020 Free Software Foundation, Inc. | |
702 | # Copyright (C) 1997-2021 Free Software Foundation, Inc. | |
685 | 703 | # |
686 | 704 | # This file is free software; the Free Software Foundation |
687 | 705 | # gives unlimited permission to copy and/or distribute it, |
715 | 733 | |
716 | 734 | # Helper functions for option handling. -*- Autoconf -*- |
717 | 735 | |
718 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
736 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
719 | 737 | # |
720 | 738 | # This file is free software; the Free Software Foundation |
721 | 739 | # gives unlimited permission to copy and/or distribute it, |
744 | 762 | AC_DEFUN([_AM_IF_OPTION], |
745 | 763 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
746 | 764 | |
747 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
765 | # Copyright (C) 1999-2021 Free Software Foundation, Inc. | |
748 | 766 | # |
749 | 767 | # This file is free software; the Free Software Foundation |
750 | 768 | # gives unlimited permission to copy and/or distribute it, |
791 | 809 | # For backward compatibility. |
792 | 810 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
793 | 811 | |
794 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
812 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
795 | 813 | # |
796 | 814 | # This file is free software; the Free Software Foundation |
797 | 815 | # gives unlimited permission to copy and/or distribute it, |
810 | 828 | |
811 | 829 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
812 | 830 | |
813 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
831 | # Copyright (C) 1996-2021 Free Software Foundation, Inc. | |
814 | 832 | # |
815 | 833 | # This file is free software; the Free Software Foundation |
816 | 834 | # gives unlimited permission to copy and/or distribute it, |
891 | 909 | rm -f conftest.file |
892 | 910 | ]) |
893 | 911 | |
894 | # Copyright (C) 2009-2020 Free Software Foundation, Inc. | |
912 | # Copyright (C) 2009-2021 Free Software Foundation, Inc. | |
895 | 913 | # |
896 | 914 | # This file is free software; the Free Software Foundation |
897 | 915 | # gives unlimited permission to copy and/or distribute it, |
951 | 969 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
952 | 970 | ]) |
953 | 971 | |
954 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
972 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
955 | 973 | # |
956 | 974 | # This file is free software; the Free Software Foundation |
957 | 975 | # gives unlimited permission to copy and/or distribute it, |
979 | 997 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
980 | 998 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
981 | 999 | |
982 | # Copyright (C) 2006-2020 Free Software Foundation, Inc. | |
1000 | # Copyright (C) 2006-2021 Free Software Foundation, Inc. | |
983 | 1001 | # |
984 | 1002 | # This file is free software; the Free Software Foundation |
985 | 1003 | # gives unlimited permission to copy and/or distribute it, |
998 | 1016 | |
999 | 1017 | # Check how to create a tarball. -*- Autoconf -*- |
1000 | 1018 | |
1001 | # Copyright (C) 2004-2020 Free Software Foundation, Inc. | |
1019 | # Copyright (C) 2004-2021 Free Software Foundation, Inc. | |
1002 | 1020 | # |
1003 | 1021 | # This file is free software; the Free Software Foundation |
1004 | 1022 | # gives unlimited permission to copy and/or distribute it, |
2 | 2 | |
3 | 3 | scriptversion=2018-03-07.03; # UTC |
4 | 4 | |
5 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1999-2021 Free Software Foundation, Inc. | |
6 | 6 | # Written by Tom Tromey <tromey@cygnus.com>. |
7 | 7 | # |
8 | 8 | # This program is free software; you can redistribute it and/or modify |
0 | 0 | #! /bin/sh |
1 | 1 | # 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' | |
5 | 7 | |
6 | 8 | # This file is free software; you can redistribute it and/or modify it |
7 | 9 | # 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 | |
9 | 11 | # (at your option) any later version. |
10 | 12 | # |
11 | 13 | # This program is distributed in the hope that it will be useful, but |
14 | 16 | # General Public License for more details. |
15 | 17 | # |
16 | 18 | # 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/>. | |
18 | 20 | # |
19 | 21 | # As a special exception to the GNU General Public License, if you |
20 | 22 | # distribute this file as part of a program that contains a |
26 | 28 | # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. |
27 | 29 | # |
28 | 30 | # 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 | |
30 | 32 | # |
31 | 33 | # Please send patches to <config-patches@gnu.org>. |
32 | 34 | |
33 | 35 | |
36 | # The "shellcheck disable" line above the timestamp inhibits complaints | |
37 | # about features and limitations of the classic Bourne shell that were | |
38 | # superseded or lifted in POSIX. However, this script identifies a wide | |
39 | # variety of pre-POSIX systems that do not have POSIX shells at all, and | |
40 | # even some reasonably current systems (Solaris 10 as case-in-point) still | |
41 | # have a pre-POSIX /bin/sh. | |
42 | ||
43 | ||
34 | 44 | me=`echo "$0" | sed -e 's,.*/,,'` |
35 | 45 | |
36 | 46 | usage="\ |
38 | 48 | |
39 | 49 | Output the configuration name of the system \`$me' is run on. |
40 | 50 | |
41 | Operation modes: | |
51 | Options: | |
42 | 52 | -h, --help print this help, then exit |
43 | 53 | -t, --time-stamp print date of last modification, then exit |
44 | 54 | -v, --version print version number, then exit |
49 | 59 | GNU config.guess ($timestamp) |
50 | 60 | |
51 | 61 | Originally written by Per Bothner. |
52 | Copyright 1992-2015 Free Software Foundation, Inc. | |
62 | Copyright 1992-2022 Free Software Foundation, Inc. | |
53 | 63 | |
54 | 64 | This is free software; see the source for copying conditions. There is NO |
55 | 65 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
83 | 93 | exit 1 |
84 | 94 | fi |
85 | 95 | |
86 | trap 'exit 1' 1 2 15 | |
96 | # Just in case it came from the environment. | |
97 | GUESS= | |
87 | 98 | |
88 | 99 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
89 | 100 | # compiler to aid in system detection is discouraged as it requires |
95 | 106 | |
96 | 107 | # Portable tmp directory creation inspired by the Autoconf team. |
97 | 108 | |
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 | } | |
122 | 139 | |
123 | 140 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
124 | 141 | # (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 | |
126 | 143 | PATH=$PATH:/.attbin ; export PATH |
127 | 144 | fi |
128 | 145 | |
129 | 146 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
130 | 147 | 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 | |
132 | 149 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
133 | 150 | |
134 | case "${UNAME_SYSTEM}" in | |
151 | case $UNAME_SYSTEM in | |
135 | 152 | 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" | |
142 | 157 | #include <features.h> |
143 | 158 | #if defined(__UCLIBC__) |
144 | 159 | LIBC=uclibc |
145 | 160 | #elif defined(__dietlibc__) |
146 | 161 | LIBC=dietlibc |
162 | #elif defined(__GLIBC__) | |
163 | LIBC=gnu | |
147 | 164 | #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 | |
149 | 170 | #endif |
150 | 171 | 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 | |
152 | 187 | ;; |
153 | 188 | esac |
154 | 189 | |
155 | 190 | # Note: order is significant - the case branches are not exclusive. |
156 | 191 | |
157 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |
192 | case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in | |
158 | 193 | *:NetBSD:*:*) |
159 | 194 | # NetBSD (nbsd) targets should (where applicable) match one or |
160 | 195 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
166 | 201 | # |
167 | 202 | # Note: NetBSD doesn't particularly care about the vendor |
168 | 203 | # 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 ;; | |
173 | 210 | armeb) machine=armeb-unknown ;; |
174 | 211 | arm*) machine=arm-unknown ;; |
175 | 212 | sh3el) machine=shl-unknown ;; |
176 | 213 | sh3eb) machine=sh-unknown ;; |
177 | 214 | 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 ;; | |
179 | 221 | esac |
180 | 222 | # 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 | ;; | |
183 | 228 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
184 | eval $set_cc_for_build | |
229 | set_cc_for_build | |
185 | 230 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
186 | 231 | | grep -q __ELF__ |
187 | 232 | then |
196 | 241 | os=netbsd |
197 | 242 | ;; |
198 | 243 | 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 | |
199 | 251 | # The OS release |
200 | 252 | # Debian GNU/NetBSD machines have a different userland, and |
201 | 253 | # thus, need a distinct triplet. However, they do not need |
202 | 254 | # kernel version information, so it can be replaced with a |
203 | 255 | # suitable tag, in the style of linux-gnu. |
204 | case "${UNAME_VERSION}" in | |
256 | case $UNAME_VERSION in | |
205 | 257 | Debian*) |
206 | 258 | release='-gnu' |
207 | 259 | ;; |
208 | 260 | *) |
209 | release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | |
261 | release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` | |
210 | 262 | ;; |
211 | 263 | esac |
212 | 264 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
213 | 265 | # contains redundant information, the shorter form: |
214 | 266 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
215 | echo "${machine}-${os}${release}" | |
216 | exit ;; | |
267 | GUESS=$machine-${os}${release}${abi-} | |
268 | ;; | |
217 | 269 | *:Bitrig:*:*) |
218 | 270 | 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 | ;; | |
221 | 273 | *:OpenBSD:*:*) |
222 | 274 | 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 | ;; | |
225 | 288 | *:ekkoBSD:*:*) |
226 | echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} | |
227 | exit ;; | |
289 | GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE | |
290 | ;; | |
228 | 291 | *: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 | ;; | |
231 | 297 | macppc:MirBSD:*:*) |
232 | echo powerpc-unknown-mirbsd${UNAME_RELEASE} | |
233 | exit ;; | |
298 | GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE | |
299 | ;; | |
234 | 300 | *: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 | ;; | |
237 | 315 | alpha:OSF1:*:*) |
316 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
317 | trap '' 0 | |
238 | 318 | case $UNAME_RELEASE in |
239 | 319 | *4.0) |
240 | 320 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
248 | 328 | # covers most systems running today. This code pipes the CPU |
249 | 329 | # types through head -n 1, so we only detect the type of CPU 0. |
250 | 330 | 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 | |
252 | 332 | "EV4 (21064)") |
253 | UNAME_MACHINE="alpha" ;; | |
333 | UNAME_MACHINE=alpha ;; | |
254 | 334 | "EV4.5 (21064)") |
255 | UNAME_MACHINE="alpha" ;; | |
335 | UNAME_MACHINE=alpha ;; | |
256 | 336 | "LCA4 (21066/21068)") |
257 | UNAME_MACHINE="alpha" ;; | |
337 | UNAME_MACHINE=alpha ;; | |
258 | 338 | "EV5 (21164)") |
259 | UNAME_MACHINE="alphaev5" ;; | |
339 | UNAME_MACHINE=alphaev5 ;; | |
260 | 340 | "EV5.6 (21164A)") |
261 | UNAME_MACHINE="alphaev56" ;; | |
341 | UNAME_MACHINE=alphaev56 ;; | |
262 | 342 | "EV5.6 (21164PC)") |
263 | UNAME_MACHINE="alphapca56" ;; | |
343 | UNAME_MACHINE=alphapca56 ;; | |
264 | 344 | "EV5.7 (21164PC)") |
265 | UNAME_MACHINE="alphapca57" ;; | |
345 | UNAME_MACHINE=alphapca57 ;; | |
266 | 346 | "EV6 (21264)") |
267 | UNAME_MACHINE="alphaev6" ;; | |
347 | UNAME_MACHINE=alphaev6 ;; | |
268 | 348 | "EV6.7 (21264A)") |
269 | UNAME_MACHINE="alphaev67" ;; | |
349 | UNAME_MACHINE=alphaev67 ;; | |
270 | 350 | "EV6.8CB (21264C)") |
271 | UNAME_MACHINE="alphaev68" ;; | |
351 | UNAME_MACHINE=alphaev68 ;; | |
272 | 352 | "EV6.8AL (21264B)") |
273 | UNAME_MACHINE="alphaev68" ;; | |
353 | UNAME_MACHINE=alphaev68 ;; | |
274 | 354 | "EV6.8CX (21264D)") |
275 | UNAME_MACHINE="alphaev68" ;; | |
355 | UNAME_MACHINE=alphaev68 ;; | |
276 | 356 | "EV6.9A (21264/EV69A)") |
277 | UNAME_MACHINE="alphaev69" ;; | |
357 | UNAME_MACHINE=alphaev69 ;; | |
278 | 358 | "EV7 (21364)") |
279 | UNAME_MACHINE="alphaev7" ;; | |
359 | UNAME_MACHINE=alphaev7 ;; | |
280 | 360 | "EV7.9 (21364A)") |
281 | UNAME_MACHINE="alphaev79" ;; | |
361 | UNAME_MACHINE=alphaev79 ;; | |
282 | 362 | esac |
283 | 363 | # A Pn.n version is a patched version. |
284 | 364 | # A Vn.n version is a released version. |
285 | 365 | # A Tn.n version is a released field test version. |
286 | 366 | # A Xn.n version is an unreleased experimental baselevel. |
287 | 367 | # 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 | ;; | |
302 | 371 | Amiga*:UNIX_System_V:4.0:*) |
303 | echo m68k-unknown-sysv4 | |
304 | exit ;; | |
372 | GUESS=m68k-unknown-sysv4 | |
373 | ;; | |
305 | 374 | *:[Aa]miga[Oo][Ss]:*:*) |
306 | echo ${UNAME_MACHINE}-unknown-amigaos | |
307 | exit ;; | |
375 | GUESS=$UNAME_MACHINE-unknown-amigaos | |
376 | ;; | |
308 | 377 | *:[Mm]orph[Oo][Ss]:*:*) |
309 | echo ${UNAME_MACHINE}-unknown-morphos | |
310 | exit ;; | |
378 | GUESS=$UNAME_MACHINE-unknown-morphos | |
379 | ;; | |
311 | 380 | *:OS/390:*:*) |
312 | echo i370-ibm-openedition | |
313 | exit ;; | |
381 | GUESS=i370-ibm-openedition | |
382 | ;; | |
314 | 383 | *:z/VM:*:*) |
315 | echo s390-ibm-zvmoe | |
316 | exit ;; | |
384 | GUESS=s390-ibm-zvmoe | |
385 | ;; | |
317 | 386 | *:OS400:*:*) |
318 | echo powerpc-ibm-os400 | |
319 | exit ;; | |
387 | GUESS=powerpc-ibm-os400 | |
388 | ;; | |
320 | 389 | 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 | ;; | |
323 | 392 | arm*:riscos:*:*|arm*:RISCOS:*:*) |
324 | echo arm-unknown-riscos | |
325 | exit ;; | |
393 | GUESS=arm-unknown-riscos | |
394 | ;; | |
326 | 395 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
327 | echo hppa1.1-hitachi-hiuxmpp | |
328 | exit ;; | |
396 | GUESS=hppa1.1-hitachi-hiuxmpp | |
397 | ;; | |
329 | 398 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
330 | 399 | # 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 | ;; | |
337 | 405 | NILE*:*:*:dcosx) |
338 | echo pyramid-pyramid-svr4 | |
339 | exit ;; | |
406 | GUESS=pyramid-pyramid-svr4 | |
407 | ;; | |
340 | 408 | DRS?6000:unix:4.0:6*) |
341 | echo sparc-icl-nx6 | |
342 | exit ;; | |
409 | GUESS=sparc-icl-nx6 | |
410 | ;; | |
343 | 411 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
344 | 412 | case `/usr/bin/uname -p` in |
345 | sparc) echo sparc-icl-nx7; exit ;; | |
346 | esac ;; | |
413 | sparc) GUESS=sparc-icl-nx7 ;; | |
414 | esac | |
415 | ;; | |
347 | 416 | 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 | ;; | |
350 | 420 | 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 | ;; | |
353 | 424 | 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 | ;; | |
356 | 428 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
357 | echo i386-pc-auroraux${UNAME_RELEASE} | |
358 | exit ;; | |
429 | GUESS=i386-pc-auroraux$UNAME_RELEASE | |
430 | ;; | |
359 | 431 | 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 | |
362 | 434 | # If there is a compiler, see if it is configured for 64-bit objects. |
363 | 435 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
364 | 436 | # 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 | |
366 | 438 | 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) | \ | |
368 | 440 | grep IS_64BIT_ARCH >/dev/null |
369 | 441 | then |
370 | SUN_ARCH="x86_64" | |
442 | SUN_ARCH=x86_64 | |
371 | 443 | fi |
372 | 444 | 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 | ;; | |
375 | 448 | sun4*:SunOS:6*:*) |
376 | 449 | # According to config.sub, this is the proper way to canonicalize |
377 | 450 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
378 | 451 | # 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 | ;; | |
381 | 455 | sun4*:SunOS:*:*) |
382 | case "`/usr/bin/arch -k`" in | |
456 | case `/usr/bin/arch -k` in | |
383 | 457 | Series*|S4*) |
384 | 458 | UNAME_RELEASE=`uname -v` |
385 | 459 | ;; |
386 | 460 | esac |
387 | 461 | # 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 | ;; | |
390 | 465 | sun3*:SunOS:*:*) |
391 | echo m68k-sun-sunos${UNAME_RELEASE} | |
392 | exit ;; | |
466 | GUESS=m68k-sun-sunos$UNAME_RELEASE | |
467 | ;; | |
393 | 468 | sun*:*:4.2BSD:*) |
394 | 469 | 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 | |
397 | 472 | sun3) |
398 | echo m68k-sun-sunos${UNAME_RELEASE} | |
473 | GUESS=m68k-sun-sunos$UNAME_RELEASE | |
399 | 474 | ;; |
400 | 475 | sun4) |
401 | echo sparc-sun-sunos${UNAME_RELEASE} | |
476 | GUESS=sparc-sun-sunos$UNAME_RELEASE | |
402 | 477 | ;; |
403 | 478 | esac |
404 | exit ;; | |
479 | ;; | |
405 | 480 | aushp:SunOS:*:*) |
406 | echo sparc-auspex-sunos${UNAME_RELEASE} | |
407 | exit ;; | |
481 | GUESS=sparc-auspex-sunos$UNAME_RELEASE | |
482 | ;; | |
408 | 483 | # The situation for MiNT is a little confusing. The machine name |
409 | 484 | # can be virtually everything (everything which is not |
410 | 485 | # "atarist" or "atariste" at least should have a processor |
414 | 489 | # MiNT. But MiNT is downward compatible to TOS, so this should |
415 | 490 | # be no problem. |
416 | 491 | 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 | ;; | |
419 | 494 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
420 | echo m68k-atari-mint${UNAME_RELEASE} | |
421 | exit ;; | |
495 | GUESS=m68k-atari-mint$UNAME_RELEASE | |
496 | ;; | |
422 | 497 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
423 | echo m68k-atari-mint${UNAME_RELEASE} | |
424 | exit ;; | |
498 | GUESS=m68k-atari-mint$UNAME_RELEASE | |
499 | ;; | |
425 | 500 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
426 | echo m68k-milan-mint${UNAME_RELEASE} | |
427 | exit ;; | |
501 | GUESS=m68k-milan-mint$UNAME_RELEASE | |
502 | ;; | |
428 | 503 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
429 | echo m68k-hades-mint${UNAME_RELEASE} | |
430 | exit ;; | |
504 | GUESS=m68k-hades-mint$UNAME_RELEASE | |
505 | ;; | |
431 | 506 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
432 | echo m68k-unknown-mint${UNAME_RELEASE} | |
433 | exit ;; | |
507 | GUESS=m68k-unknown-mint$UNAME_RELEASE | |
508 | ;; | |
434 | 509 | m68k:machten:*:*) |
435 | echo m68k-apple-machten${UNAME_RELEASE} | |
436 | exit ;; | |
510 | GUESS=m68k-apple-machten$UNAME_RELEASE | |
511 | ;; | |
437 | 512 | powerpc:machten:*:*) |
438 | echo powerpc-apple-machten${UNAME_RELEASE} | |
439 | exit ;; | |
513 | GUESS=powerpc-apple-machten$UNAME_RELEASE | |
514 | ;; | |
440 | 515 | RISC*:Mach:*:*) |
441 | echo mips-dec-mach_bsd4.3 | |
442 | exit ;; | |
516 | GUESS=mips-dec-mach_bsd4.3 | |
517 | ;; | |
443 | 518 | RISC*:ULTRIX:*:*) |
444 | echo mips-dec-ultrix${UNAME_RELEASE} | |
445 | exit ;; | |
519 | GUESS=mips-dec-ultrix$UNAME_RELEASE | |
520 | ;; | |
446 | 521 | VAX*:ULTRIX*:*:*) |
447 | echo vax-dec-ultrix${UNAME_RELEASE} | |
448 | exit ;; | |
522 | GUESS=vax-dec-ultrix$UNAME_RELEASE | |
523 | ;; | |
449 | 524 | 2020:CLIX:*:* | 2430:CLIX:*:*) |
450 | echo clipper-intergraph-clix${UNAME_RELEASE} | |
451 | exit ;; | |
525 | GUESS=clipper-intergraph-clix$UNAME_RELEASE | |
526 | ;; | |
452 | 527 | 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" | |
455 | 530 | #ifdef __cplusplus |
456 | 531 | #include <stdio.h> /* for printf() prototype */ |
457 | 532 | int main (int argc, char *argv[]) { |
460 | 535 | #endif |
461 | 536 | #if defined (host_mips) && defined (MIPSEB) |
462 | 537 | #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); | |
464 | 539 | #endif |
465 | 540 | #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); | |
467 | 542 | #endif |
468 | 543 | #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); | |
470 | 545 | #endif |
471 | 546 | #endif |
472 | 547 | exit (-1); |
473 | 548 | } |
474 | 549 | 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"` && | |
478 | 553 | { echo "$SYSTEM_NAME"; exit; } |
479 | echo mips-mips-riscos${UNAME_RELEASE} | |
480 | exit ;; | |
554 | GUESS=mips-mips-riscos$UNAME_RELEASE | |
555 | ;; | |
481 | 556 | Motorola:PowerMAX_OS:*:*) |
482 | echo powerpc-motorola-powermax | |
483 | exit ;; | |
557 | GUESS=powerpc-motorola-powermax | |
558 | ;; | |
484 | 559 | Motorola:*:4.3:PL8-*) |
485 | echo powerpc-harris-powermax | |
486 | exit ;; | |
560 | GUESS=powerpc-harris-powermax | |
561 | ;; | |
487 | 562 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
488 | echo powerpc-harris-powermax | |
489 | exit ;; | |
563 | GUESS=powerpc-harris-powermax | |
564 | ;; | |
490 | 565 | Night_Hawk:Power_UNIX:*:*) |
491 | echo powerpc-harris-powerunix | |
492 | exit ;; | |
566 | GUESS=powerpc-harris-powerunix | |
567 | ;; | |
493 | 568 | m88k:CX/UX:7*:*) |
494 | echo m88k-harris-cxux7 | |
495 | exit ;; | |
569 | GUESS=m88k-harris-cxux7 | |
570 | ;; | |
496 | 571 | m88k:*:4*:R4*) |
497 | echo m88k-motorola-sysv4 | |
498 | exit ;; | |
572 | GUESS=m88k-motorola-sysv4 | |
573 | ;; | |
499 | 574 | m88k:*:3*:R3*) |
500 | echo m88k-motorola-sysv3 | |
501 | exit ;; | |
575 | GUESS=m88k-motorola-sysv3 | |
576 | ;; | |
502 | 577 | AViiON:dgux:*:*) |
503 | 578 | # DG/UX returns AViiON for all architectures |
504 | 579 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
505 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] | |
580 | if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 | |
506 | 581 | 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 | |
509 | 584 | then |
510 | echo m88k-dg-dgux${UNAME_RELEASE} | |
585 | GUESS=m88k-dg-dgux$UNAME_RELEASE | |
511 | 586 | else |
512 | echo m88k-dg-dguxbcs${UNAME_RELEASE} | |
587 | GUESS=m88k-dg-dguxbcs$UNAME_RELEASE | |
513 | 588 | fi |
514 | 589 | else |
515 | echo i586-dg-dgux${UNAME_RELEASE} | |
516 | fi | |
517 | exit ;; | |
590 | GUESS=i586-dg-dgux$UNAME_RELEASE | |
591 | fi | |
592 | ;; | |
518 | 593 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
519 | echo m88k-dolphin-sysv3 | |
520 | exit ;; | |
594 | GUESS=m88k-dolphin-sysv3 | |
595 | ;; | |
521 | 596 | M88*:*:R3*:*) |
522 | 597 | # Delta 88k system running SVR3 |
523 | echo m88k-motorola-sysv3 | |
524 | exit ;; | |
598 | GUESS=m88k-motorola-sysv3 | |
599 | ;; | |
525 | 600 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
526 | echo m88k-tektronix-sysv3 | |
527 | exit ;; | |
601 | GUESS=m88k-tektronix-sysv3 | |
602 | ;; | |
528 | 603 | 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 | ;; | |
531 | 606 | *: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 | ;; | |
534 | 610 | ????????: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 ' | |
537 | 613 | i*86:AIX:*:*) |
538 | echo i386-ibm-aix | |
539 | exit ;; | |
614 | GUESS=i386-ibm-aix | |
615 | ;; | |
540 | 616 | ia64:AIX:*:*) |
541 | if [ -x /usr/bin/oslevel ] ; then | |
617 | if test -x /usr/bin/oslevel ; then | |
542 | 618 | IBM_REV=`/usr/bin/oslevel` |
543 | 619 | 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 | ;; | |
548 | 624 | *:AIX:2:3) |
549 | 625 | 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" | |
552 | 628 | #include <sys/systemcfg.h> |
553 | 629 | |
554 | 630 | main() |
559 | 635 | exit(0); |
560 | 636 | } |
561 | 637 | 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"` | |
563 | 639 | then |
564 | echo "$SYSTEM_NAME" | |
640 | GUESS=$SYSTEM_NAME | |
565 | 641 | else |
566 | echo rs6000-ibm-aix3.2.5 | |
642 | GUESS=rs6000-ibm-aix3.2.5 | |
567 | 643 | fi |
568 | 644 | 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 | |
570 | 646 | else |
571 | echo rs6000-ibm-aix3.2 | |
572 | fi | |
573 | exit ;; | |
647 | GUESS=rs6000-ibm-aix3.2 | |
648 | fi | |
649 | ;; | |
574 | 650 | *:AIX:*:[4567]) |
575 | 651 | 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 | |
577 | 653 | IBM_ARCH=rs6000 |
578 | 654 | else |
579 | 655 | IBM_ARCH=powerpc |
580 | 656 | 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 | \ | |
583 | 659 | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
584 | 660 | 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 | ;; | |
589 | 665 | *: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 | ;; | |
595 | 671 | 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 | |
598 | 674 | *:BOSX:*:*) |
599 | echo rs6000-bull-bosx | |
600 | exit ;; | |
675 | GUESS=rs6000-bull-bosx | |
676 | ;; | |
601 | 677 | DPX/2?00:B.O.S.:*:*) |
602 | echo m68k-bull-sysv3 | |
603 | exit ;; | |
678 | GUESS=m68k-bull-sysv3 | |
679 | ;; | |
604 | 680 | 9000/[34]??:4.3bsd:1.*:*) |
605 | echo m68k-hp-bsd | |
606 | exit ;; | |
681 | GUESS=m68k-hp-bsd | |
682 | ;; | |
607 | 683 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
608 | echo m68k-hp-bsd4.4 | |
609 | exit ;; | |
684 | GUESS=m68k-hp-bsd4.4 | |
685 | ;; | |
610 | 686 | 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 ;; | |
615 | 691 | 9000/[678][0-9][0-9]) |
616 | if [ -x /usr/bin/getconf ]; then | |
692 | if test -x /usr/bin/getconf; then | |
617 | 693 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
618 | 694 | 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 | |
622 | 698 | 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 | |
627 | 703 | esac ;; |
628 | 704 | esac |
629 | 705 | 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" | |
633 | 709 | |
634 | 710 | #define _HPUX_SOURCE |
635 | 711 | #include <stdlib.h> |
662 | 738 | exit (0); |
663 | 739 | } |
664 | 740 | 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"` | |
666 | 742 | test -z "$HP_ARCH" && HP_ARCH=hppa |
667 | 743 | fi ;; |
668 | 744 | esac |
669 | if [ ${HP_ARCH} = "hppa2.0w" ] | |
745 | if test "$HP_ARCH" = hppa2.0w | |
670 | 746 | then |
671 | eval $set_cc_for_build | |
747 | set_cc_for_build | |
672 | 748 | |
673 | 749 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
674 | 750 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
679 | 755 | # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess |
680 | 756 | # => hppa64-hp-hpux11.23 |
681 | 757 | |
682 | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | | |
758 | if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | | |
683 | 759 | grep -q __LP64__ |
684 | 760 | then |
685 | HP_ARCH="hppa2.0w" | |
761 | HP_ARCH=hppa2.0w | |
686 | 762 | else |
687 | HP_ARCH="hppa64" | |
763 | HP_ARCH=hppa64 | |
688 | 764 | fi |
689 | 765 | fi |
690 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} | |
691 | exit ;; | |
766 | GUESS=$HP_ARCH-hp-hpux$HPUX_REV | |
767 | ;; | |
692 | 768 | 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 | ;; | |
696 | 772 | 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" | |
699 | 775 | #include <unistd.h> |
700 | 776 | int |
701 | 777 | main () |
720 | 796 | exit (0); |
721 | 797 | } |
722 | 798 | EOF |
723 | $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && | |
799 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && | |
724 | 800 | { 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 | ;; | |
730 | 806 | 9000/8??:4.3bsd:*:*) |
731 | echo hppa1.0-hp-bsd | |
732 | exit ;; | |
807 | GUESS=hppa1.0-hp-bsd | |
808 | ;; | |
733 | 809 | *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 | ;; | |
739 | 815 | hp8??:OSF1:*:*) |
740 | echo hppa1.0-hp-osf | |
741 | exit ;; | |
816 | GUESS=hppa1.0-hp-osf | |
817 | ;; | |
742 | 818 | 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 | |
745 | 821 | else |
746 | echo ${UNAME_MACHINE}-unknown-osf1 | |
747 | fi | |
748 | exit ;; | |
822 | GUESS=$UNAME_MACHINE-unknown-osf1 | |
823 | fi | |
824 | ;; | |
749 | 825 | parisc*:Lites*:*:*) |
750 | echo hppa1.1-hp-lites | |
751 | exit ;; | |
826 | GUESS=hppa1.1-hp-lites | |
827 | ;; | |
752 | 828 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
753 | echo c1-convex-bsd | |
754 | exit ;; | |
829 | GUESS=c1-convex-bsd | |
830 | ;; | |
755 | 831 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
756 | 832 | if getsysinfo -f scalar_acc |
757 | 833 | then echo c32-convex-bsd |
759 | 835 | fi |
760 | 836 | exit ;; |
761 | 837 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
762 | echo c34-convex-bsd | |
763 | exit ;; | |
838 | GUESS=c34-convex-bsd | |
839 | ;; | |
764 | 840 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
765 | echo c38-convex-bsd | |
766 | exit ;; | |
841 | GUESS=c38-convex-bsd | |
842 | ;; | |
767 | 843 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
768 | echo c4-convex-bsd | |
769 | exit ;; | |
844 | GUESS=c4-convex-bsd | |
845 | ;; | |
770 | 846 | 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 | ;; | |
773 | 850 | CRAY*[A-Z]90:*:*:*) |
774 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | |
851 | echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | |
775 | 852 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
776 | 853 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
777 | 854 | -e 's/\.[^.]*$/.X/' |
778 | 855 | exit ;; |
779 | 856 | 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 | ;; | |
782 | 860 | 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 | ;; | |
785 | 864 | 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 | ;; | |
788 | 868 | *: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 | ;; | |
791 | 872 | 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 | ;; | |
797 | 878 | 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 | ;; | |
802 | 883 | 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 | ;; | |
805 | 886 | sparc*:BSD/OS:*:*) |
806 | echo sparc-unknown-bsdi${UNAME_RELEASE} | |
807 | exit ;; | |
887 | GUESS=sparc-unknown-bsdi$UNAME_RELEASE | |
888 | ;; | |
808 | 889 | *: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 | ;; | |
811 | 905 | *:FreeBSD:*:*) |
812 | 906 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
813 | case ${UNAME_PROCESSOR} in | |
907 | case $UNAME_PROCESSOR in | |
814 | 908 | 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 ;; | |
818 | 912 | esac |
819 | exit ;; | |
913 | FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
914 | GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL | |
915 | ;; | |
820 | 916 | i*:CYGWIN*:*) |
821 | echo ${UNAME_MACHINE}-pc-cygwin | |
822 | exit ;; | |
917 | GUESS=$UNAME_MACHINE-pc-cygwin | |
918 | ;; | |
823 | 919 | *:MINGW64*:*) |
824 | echo ${UNAME_MACHINE}-pc-mingw64 | |
825 | exit ;; | |
920 | GUESS=$UNAME_MACHINE-pc-mingw64 | |
921 | ;; | |
826 | 922 | *:MINGW*:*) |
827 | echo ${UNAME_MACHINE}-pc-mingw32 | |
828 | exit ;; | |
923 | GUESS=$UNAME_MACHINE-pc-mingw32 | |
924 | ;; | |
829 | 925 | *: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 | ;; | |
836 | 928 | 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 | ;; | |
839 | 934 | *:Interix*:*) |
840 | case ${UNAME_MACHINE} in | |
935 | case $UNAME_MACHINE in | |
841 | 936 | x86) |
842 | echo i586-pc-interix${UNAME_RELEASE} | |
843 | exit ;; | |
937 | GUESS=i586-pc-interix$UNAME_RELEASE | |
938 | ;; | |
844 | 939 | authenticamd | genuineintel | EM64T) |
845 | echo x86_64-unknown-interix${UNAME_RELEASE} | |
846 | exit ;; | |
940 | GUESS=x86_64-unknown-interix$UNAME_RELEASE | |
941 | ;; | |
847 | 942 | IA64) |
848 | echo ia64-unknown-interix${UNAME_RELEASE} | |
849 | exit ;; | |
943 | GUESS=ia64-unknown-interix$UNAME_RELEASE | |
944 | ;; | |
850 | 945 | 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 ;; | |
863 | 946 | i*:UWIN*:*) |
864 | echo ${UNAME_MACHINE}-pc-uwin | |
865 | exit ;; | |
947 | GUESS=$UNAME_MACHINE-pc-uwin | |
948 | ;; | |
866 | 949 | 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 | ;; | |
872 | 952 | 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 | ;; | |
875 | 956 | *:GNU:*:*) |
876 | 957 | # 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 | ;; | |
879 | 962 | *:GNU/*:*:*) |
880 | 963 | # 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 | ;; | |
886 | 971 | aarch64:Linux:*:*) |
887 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
888 | exit ;; | |
972 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
973 | ;; | |
889 | 974 | aarch64_be:Linux:*:*) |
890 | 975 | UNAME_MACHINE=aarch64_be |
891 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
892 | exit ;; | |
976 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
977 | ;; | |
893 | 978 | 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 | |
895 | 980 | EV5) UNAME_MACHINE=alphaev5 ;; |
896 | 981 | EV56) UNAME_MACHINE=alphaev56 ;; |
897 | 982 | PCA56) UNAME_MACHINE=alphapca56 ;; |
901 | 986 | EV68*) UNAME_MACHINE=alphaev68 ;; |
902 | 987 | esac |
903 | 988 | 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 | ;; | |
910 | 995 | arm*:Linux:*:*) |
911 | eval $set_cc_for_build | |
996 | set_cc_for_build | |
912 | 997 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
913 | 998 | | grep -q __ARM_EABI__ |
914 | 999 | then |
915 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1000 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
916 | 1001 | else |
917 | 1002 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
918 | 1003 | | grep -q __ARM_PCS_VFP |
919 | 1004 | then |
920 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi | |
1005 | GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi | |
921 | 1006 | else |
922 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf | |
1007 | GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf | |
923 | 1008 | fi |
924 | 1009 | fi |
925 | exit ;; | |
1010 | ;; | |
926 | 1011 | avr32*:Linux:*:*) |
927 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
928 | exit ;; | |
1012 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1013 | ;; | |
929 | 1014 | cris:Linux:*:*) |
930 | echo ${UNAME_MACHINE}-axis-linux-${LIBC} | |
931 | exit ;; | |
1015 | GUESS=$UNAME_MACHINE-axis-linux-$LIBC | |
1016 | ;; | |
932 | 1017 | 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 | ;; | |
935 | 1023 | frv:Linux:*:*) |
936 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
937 | exit ;; | |
1024 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1025 | ;; | |
938 | 1026 | hexagon:Linux:*:*) |
939 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
940 | exit ;; | |
1027 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1028 | ;; | |
941 | 1029 | i*86:Linux:*:*) |
942 | echo ${UNAME_MACHINE}-pc-linux-${LIBC} | |
943 | exit ;; | |
1030 | GUESS=$UNAME_MACHINE-pc-linux-$LIBC | |
1031 | ;; | |
944 | 1032 | 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 | ;; | |
947 | 1041 | m32r*:Linux:*:*) |
948 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
949 | exit ;; | |
1042 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1043 | ;; | |
950 | 1044 | m68*:Linux:*:*) |
951 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
952 | exit ;; | |
1045 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1046 | ;; | |
953 | 1047 | 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" | |
956 | 1052 | #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 | ||
959 | 1081 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
960 | CPU=${UNAME_MACHINE}el | |
1082 | MIPS_ENDIAN=el | |
961 | 1083 | #else |
962 | 1084 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
963 | CPU=${UNAME_MACHINE} | |
1085 | MIPS_ENDIAN= | |
964 | 1086 | #else |
965 | CPU= | |
1087 | MIPS_ENDIAN= | |
966 | 1088 | #endif |
967 | 1089 | #endif |
968 | 1090 | 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 | |
971 | 1097 | ;; |
972 | 1098 | openrisc*:Linux:*:*) |
973 | echo or1k-unknown-linux-${LIBC} | |
974 | exit ;; | |
1099 | GUESS=or1k-unknown-linux-$LIBC | |
1100 | ;; | |
975 | 1101 | or32:Linux:*:* | or1k*:Linux:*:*) |
976 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
977 | exit ;; | |
1102 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1103 | ;; | |
978 | 1104 | padre:Linux:*:*) |
979 | echo sparc-unknown-linux-${LIBC} | |
980 | exit ;; | |
1105 | GUESS=sparc-unknown-linux-$LIBC | |
1106 | ;; | |
981 | 1107 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
982 | echo hppa64-unknown-linux-${LIBC} | |
983 | exit ;; | |
1108 | GUESS=hppa64-unknown-linux-$LIBC | |
1109 | ;; | |
984 | 1110 | parisc:Linux:*:* | hppa:Linux:*:*) |
985 | 1111 | # Look for CPU level |
986 | 1112 | 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 ;; | |
990 | 1116 | esac |
991 | exit ;; | |
1117 | ;; | |
992 | 1118 | ppc64:Linux:*:*) |
993 | echo powerpc64-unknown-linux-${LIBC} | |
994 | exit ;; | |
1119 | GUESS=powerpc64-unknown-linux-$LIBC | |
1120 | ;; | |
995 | 1121 | ppc:Linux:*:*) |
996 | echo powerpc-unknown-linux-${LIBC} | |
997 | exit ;; | |
1122 | GUESS=powerpc-unknown-linux-$LIBC | |
1123 | ;; | |
998 | 1124 | ppc64le:Linux:*:*) |
999 | echo powerpc64le-unknown-linux-${LIBC} | |
1000 | exit ;; | |
1125 | GUESS=powerpc64le-unknown-linux-$LIBC | |
1126 | ;; | |
1001 | 1127 | 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 | ;; | |
1004 | 1133 | s390:Linux:*:* | s390x:Linux:*:*) |
1005 | echo ${UNAME_MACHINE}-ibm-linux-${LIBC} | |
1006 | exit ;; | |
1134 | GUESS=$UNAME_MACHINE-ibm-linux-$LIBC | |
1135 | ;; | |
1007 | 1136 | sh64*:Linux:*:*) |
1008 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1009 | exit ;; | |
1137 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1138 | ;; | |
1010 | 1139 | sh*:Linux:*:*) |
1011 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1012 | exit ;; | |
1140 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1141 | ;; | |
1013 | 1142 | sparc:Linux:*:* | sparc64:Linux:*:*) |
1014 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1015 | exit ;; | |
1143 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1144 | ;; | |
1016 | 1145 | tile*:Linux:*:*) |
1017 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1018 | exit ;; | |
1146 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1147 | ;; | |
1019 | 1148 | vax:Linux:*:*) |
1020 | echo ${UNAME_MACHINE}-dec-linux-${LIBC} | |
1021 | exit ;; | |
1149 | GUESS=$UNAME_MACHINE-dec-linux-$LIBC | |
1150 | ;; | |
1022 | 1151 | 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 | ;; | |
1025 | 1164 | xtensa*:Linux:*:*) |
1026 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
1027 | exit ;; | |
1165 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1166 | ;; | |
1028 | 1167 | i*86:DYNIX/ptx:4*:*) |
1029 | 1168 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1030 | 1169 | # earlier versions are messed up and put the nodename in both |
1031 | 1170 | # sysname and nodename. |
1032 | echo i386-sequent-sysv4 | |
1033 | exit ;; | |
1171 | GUESS=i386-sequent-sysv4 | |
1172 | ;; | |
1034 | 1173 | i*86:UNIX_SV:4.2MP:2.*) |
1035 | 1174 | # Unixware is an offshoot of SVR4, but it has its own version |
1036 | 1175 | # number series starting with 2... |
1037 | 1176 | # I am not positive that other SVR4 systems won't match this, |
1038 | 1177 | # I just have to hope. -- rms. |
1039 | 1178 | # 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 | ;; | |
1042 | 1181 | i*86:OS/2:*:*) |
1043 | 1182 | # If we were able to find `uname', then EMX Unix compatibility |
1044 | 1183 | # is probably installed. |
1045 | echo ${UNAME_MACHINE}-pc-os2-emx | |
1046 | exit ;; | |
1184 | GUESS=$UNAME_MACHINE-pc-os2-emx | |
1185 | ;; | |
1047 | 1186 | i*86:XTS-300:*:STOP) |
1048 | echo ${UNAME_MACHINE}-unknown-stop | |
1049 | exit ;; | |
1187 | GUESS=$UNAME_MACHINE-unknown-stop | |
1188 | ;; | |
1050 | 1189 | i*86:atheos:*:*) |
1051 | echo ${UNAME_MACHINE}-unknown-atheos | |
1052 | exit ;; | |
1190 | GUESS=$UNAME_MACHINE-unknown-atheos | |
1191 | ;; | |
1053 | 1192 | i*86:syllable:*:*) |
1054 | echo ${UNAME_MACHINE}-pc-syllable | |
1055 | exit ;; | |
1193 | GUESS=$UNAME_MACHINE-pc-syllable | |
1194 | ;; | |
1056 | 1195 | 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 | ;; | |
1059 | 1198 | 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$//'` | |
1064 | 1203 | 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 | |
1066 | 1205 | else |
1067 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} | |
1068 | fi | |
1069 | exit ;; | |
1206 | GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL | |
1207 | fi | |
1208 | ;; | |
1070 | 1209 | i*86:*:5:[678]*) |
1071 | 1210 | # UnixWare 7.x, OpenUNIX and OpenServer 6. |
1072 | 1211 | case `/bin/uname -X | grep "^Machine"` in |
1074 | 1213 | *Pentium) UNAME_MACHINE=i586 ;; |
1075 | 1214 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1076 | 1215 | 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 | ;; | |
1079 | 1218 | i*86:*:3.2:*) |
1080 | 1219 | if test -f /usr/options/cb.name; then |
1081 | 1220 | 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 | |
1083 | 1222 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
1084 | 1223 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
1085 | 1224 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
1089 | 1228 | && UNAME_MACHINE=i686 |
1090 | 1229 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
1091 | 1230 | && UNAME_MACHINE=i686 |
1092 | echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | |
1231 | GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL | |
1093 | 1232 | else |
1094 | echo ${UNAME_MACHINE}-pc-sysv32 | |
1095 | fi | |
1096 | exit ;; | |
1233 | GUESS=$UNAME_MACHINE-pc-sysv32 | |
1234 | fi | |
1235 | ;; | |
1097 | 1236 | pc:*:*:*) |
1098 | 1237 | # Left here for compatibility: |
1099 | 1238 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
1100 | 1239 | # the processor, so we play safe by assuming i586. |
1101 | 1240 | # 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 | |
1103 | 1242 | # this is a cross-build. |
1104 | echo i586-pc-msdosdjgpp | |
1105 | exit ;; | |
1243 | GUESS=i586-pc-msdosdjgpp | |
1244 | ;; | |
1106 | 1245 | Intel:Mach:3*:*) |
1107 | echo i386-pc-mach3 | |
1108 | exit ;; | |
1246 | GUESS=i386-pc-mach3 | |
1247 | ;; | |
1109 | 1248 | paragon:*:*:*) |
1110 | echo i860-intel-osf1 | |
1111 | exit ;; | |
1249 | GUESS=i860-intel-osf1 | |
1250 | ;; | |
1112 | 1251 | i860:*:4.*:*) # i860-SVR4 |
1113 | 1252 | 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 | |
1115 | 1254 | 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 | ;; | |
1119 | 1258 | mini*:CTIX:SYS*5:*) |
1120 | 1259 | # "miniframe" |
1121 | echo m68010-convergent-sysv | |
1122 | exit ;; | |
1260 | GUESS=m68010-convergent-sysv | |
1261 | ;; | |
1123 | 1262 | mc68k:UNIX:SYSTEM5:3.51m) |
1124 | echo m68k-convergent-sysv | |
1125 | exit ;; | |
1263 | GUESS=m68k-convergent-sysv | |
1264 | ;; | |
1126 | 1265 | M680?0:D-NIX:5.3:*) |
1127 | echo m68k-diab-dnix | |
1128 | exit ;; | |
1266 | GUESS=m68k-diab-dnix | |
1267 | ;; | |
1129 | 1268 | M68*:*:R3V[5678]*:*) |
1130 | 1269 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; |
1131 | 1270 | 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) |
1133 | 1272 | test -r /etc/.relid \ |
1134 | 1273 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1135 | 1274 | /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; } | |
1137 | 1276 | /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; } ;; | |
1139 | 1278 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
1140 | 1279 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1141 | 1280 | && { echo i486-ncr-sysv4; exit; } ;; |
1144 | 1283 | test -r /etc/.relid \ |
1145 | 1284 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1146 | 1285 | /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; } | |
1148 | 1287 | /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; } | |
1150 | 1289 | /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; } ;; | |
1152 | 1291 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
1153 | echo m68k-unknown-lynxos${UNAME_RELEASE} | |
1154 | exit ;; | |
1292 | GUESS=m68k-unknown-lynxos$UNAME_RELEASE | |
1293 | ;; | |
1155 | 1294 | mc68030:UNIX_System_V:4.*:*) |
1156 | echo m68k-atari-sysv4 | |
1157 | exit ;; | |
1295 | GUESS=m68k-atari-sysv4 | |
1296 | ;; | |
1158 | 1297 | TSUNAMI:LynxOS:2.*:*) |
1159 | echo sparc-unknown-lynxos${UNAME_RELEASE} | |
1160 | exit ;; | |
1298 | GUESS=sparc-unknown-lynxos$UNAME_RELEASE | |
1299 | ;; | |
1161 | 1300 | rs6000:LynxOS:2.*:*) |
1162 | echo rs6000-unknown-lynxos${UNAME_RELEASE} | |
1163 | exit ;; | |
1301 | GUESS=rs6000-unknown-lynxos$UNAME_RELEASE | |
1302 | ;; | |
1164 | 1303 | 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 | ;; | |
1167 | 1306 | SM[BE]S:UNIX_SV:*:*) |
1168 | echo mips-dde-sysv${UNAME_RELEASE} | |
1169 | exit ;; | |
1307 | GUESS=mips-dde-sysv$UNAME_RELEASE | |
1308 | ;; | |
1170 | 1309 | RM*:ReliantUNIX-*:*:*) |
1171 | echo mips-sni-sysv4 | |
1172 | exit ;; | |
1310 | GUESS=mips-sni-sysv4 | |
1311 | ;; | |
1173 | 1312 | RM*:SINIX-*:*:*) |
1174 | echo mips-sni-sysv4 | |
1175 | exit ;; | |
1313 | GUESS=mips-sni-sysv4 | |
1314 | ;; | |
1176 | 1315 | *:SINIX-*:*:*) |
1177 | 1316 | if uname -p 2>/dev/null >/dev/null ; then |
1178 | 1317 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1179 | echo ${UNAME_MACHINE}-sni-sysv4 | |
1318 | GUESS=$UNAME_MACHINE-sni-sysv4 | |
1180 | 1319 | else |
1181 | echo ns32k-sni-sysv | |
1182 | fi | |
1183 | exit ;; | |
1320 | GUESS=ns32k-sni-sysv | |
1321 | fi | |
1322 | ;; | |
1184 | 1323 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
1185 | 1324 | # says <Richard.M.Bartel@ccMail.Census.GOV> |
1186 | echo i586-unisys-sysv4 | |
1187 | exit ;; | |
1325 | GUESS=i586-unisys-sysv4 | |
1326 | ;; | |
1188 | 1327 | *:UNIX_System_V:4*:FTX*) |
1189 | 1328 | # From Gerald Hewes <hewes@openmarket.com>. |
1190 | 1329 | # How about differentiating between stratus architectures? -djm |
1191 | echo hppa1.1-stratus-sysv4 | |
1192 | exit ;; | |
1330 | GUESS=hppa1.1-stratus-sysv4 | |
1331 | ;; | |
1193 | 1332 | *:*:*:FTX*) |
1194 | 1333 | # From seanf@swdc.stratus.com. |
1195 | echo i860-stratus-sysv4 | |
1196 | exit ;; | |
1334 | GUESS=i860-stratus-sysv4 | |
1335 | ;; | |
1197 | 1336 | i*86:VOS:*:*) |
1198 | 1337 | # From Paul.Green@stratus.com. |
1199 | echo ${UNAME_MACHINE}-stratus-vos | |
1200 | exit ;; | |
1338 | GUESS=$UNAME_MACHINE-stratus-vos | |
1339 | ;; | |
1201 | 1340 | *:VOS:*:*) |
1202 | 1341 | # From Paul.Green@stratus.com. |
1203 | echo hppa1.1-stratus-vos | |
1204 | exit ;; | |
1342 | GUESS=hppa1.1-stratus-vos | |
1343 | ;; | |
1205 | 1344 | mc68*:A/UX:*:*) |
1206 | echo m68k-apple-aux${UNAME_RELEASE} | |
1207 | exit ;; | |
1345 | GUESS=m68k-apple-aux$UNAME_RELEASE | |
1346 | ;; | |
1208 | 1347 | news*:NEWS-OS:6*:*) |
1209 | echo mips-sony-newsos6 | |
1210 | exit ;; | |
1348 | GUESS=mips-sony-newsos6 | |
1349 | ;; | |
1211 | 1350 | 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 | |
1214 | 1353 | else |
1215 | echo mips-unknown-sysv${UNAME_RELEASE} | |
1216 | fi | |
1217 | exit ;; | |
1354 | GUESS=mips-unknown-sysv$UNAME_RELEASE | |
1355 | fi | |
1356 | ;; | |
1218 | 1357 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1219 | echo powerpc-be-beos | |
1220 | exit ;; | |
1358 | GUESS=powerpc-be-beos | |
1359 | ;; | |
1221 | 1360 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
1222 | echo powerpc-apple-beos | |
1223 | exit ;; | |
1361 | GUESS=powerpc-apple-beos | |
1362 | ;; | |
1224 | 1363 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
1225 | echo i586-pc-beos | |
1226 | exit ;; | |
1364 | GUESS=i586-pc-beos | |
1365 | ;; | |
1227 | 1366 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
1228 | echo i586-pc-haiku | |
1229 | exit ;; | |
1367 | GUESS=i586-pc-haiku | |
1368 | ;; | |
1230 | 1369 | x86_64:Haiku:*:*) |
1231 | echo x86_64-unknown-haiku | |
1232 | exit ;; | |
1370 | GUESS=x86_64-unknown-haiku | |
1371 | ;; | |
1233 | 1372 | SX-4:SUPER-UX:*:*) |
1234 | echo sx4-nec-superux${UNAME_RELEASE} | |
1235 | exit ;; | |
1373 | GUESS=sx4-nec-superux$UNAME_RELEASE | |
1374 | ;; | |
1236 | 1375 | SX-5:SUPER-UX:*:*) |
1237 | echo sx5-nec-superux${UNAME_RELEASE} | |
1238 | exit ;; | |
1376 | GUESS=sx5-nec-superux$UNAME_RELEASE | |
1377 | ;; | |
1239 | 1378 | SX-6:SUPER-UX:*:*) |
1240 | echo sx6-nec-superux${UNAME_RELEASE} | |
1241 | exit ;; | |
1379 | GUESS=sx6-nec-superux$UNAME_RELEASE | |
1380 | ;; | |
1242 | 1381 | SX-7:SUPER-UX:*:*) |
1243 | echo sx7-nec-superux${UNAME_RELEASE} | |
1244 | exit ;; | |
1382 | GUESS=sx7-nec-superux$UNAME_RELEASE | |
1383 | ;; | |
1245 | 1384 | SX-8:SUPER-UX:*:*) |
1246 | echo sx8-nec-superux${UNAME_RELEASE} | |
1247 | exit ;; | |
1385 | GUESS=sx8-nec-superux$UNAME_RELEASE | |
1386 | ;; | |
1248 | 1387 | 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 | ;; | |
1251 | 1393 | Power*:Rhapsody:*:*) |
1252 | echo powerpc-apple-rhapsody${UNAME_RELEASE} | |
1253 | exit ;; | |
1394 | GUESS=powerpc-apple-rhapsody$UNAME_RELEASE | |
1395 | ;; | |
1254 | 1396 | *: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 | ;; | |
1257 | 1402 | *: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 | |
1274 | 1432 | fi |
1275 | 1433 | 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 | ;; | |
1286 | 1439 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1287 | 1440 | UNAME_PROCESSOR=`uname -p` |
1288 | if test "$UNAME_PROCESSOR" = "x86"; then | |
1441 | if test "$UNAME_PROCESSOR" = x86; then | |
1289 | 1442 | UNAME_PROCESSOR=i386 |
1290 | 1443 | UNAME_MACHINE=pc |
1291 | 1444 | fi |
1292 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} | |
1293 | exit ;; | |
1445 | GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE | |
1446 | ;; | |
1294 | 1447 | *: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 | ;; | |
1300 | 1453 | 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 | ;; | |
1306 | 1465 | *:NonStop-UX:*:*) |
1307 | echo mips-compaq-nonstopux | |
1308 | exit ;; | |
1466 | GUESS=mips-compaq-nonstopux | |
1467 | ;; | |
1309 | 1468 | BS2000:POSIX*:*:*) |
1310 | echo bs2000-siemens-sysv | |
1311 | exit ;; | |
1469 | GUESS=bs2000-siemens-sysv | |
1470 | ;; | |
1312 | 1471 | DS/*:UNIX_System_V:*:*) |
1313 | echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | |
1314 | exit ;; | |
1472 | GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE | |
1473 | ;; | |
1315 | 1474 | *:Plan9:*:*) |
1316 | 1475 | # "uname -m" is not consistent, so use $cputype instead. 386 |
1317 | 1476 | # is converted to i386 for consistency with other x86 |
1318 | 1477 | # operating systems. |
1319 | if test "$cputype" = "386"; then | |
1478 | if test "${cputype-}" = 386; then | |
1320 | 1479 | 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 | ;; | |
1326 | 1485 | *:TOPS-10:*:*) |
1327 | echo pdp10-unknown-tops10 | |
1328 | exit ;; | |
1486 | GUESS=pdp10-unknown-tops10 | |
1487 | ;; | |
1329 | 1488 | *:TENEX:*:*) |
1330 | echo pdp10-unknown-tenex | |
1331 | exit ;; | |
1489 | GUESS=pdp10-unknown-tenex | |
1490 | ;; | |
1332 | 1491 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
1333 | echo pdp10-dec-tops20 | |
1334 | exit ;; | |
1492 | GUESS=pdp10-dec-tops20 | |
1493 | ;; | |
1335 | 1494 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
1336 | echo pdp10-xkl-tops20 | |
1337 | exit ;; | |
1495 | GUESS=pdp10-xkl-tops20 | |
1496 | ;; | |
1338 | 1497 | *:TOPS-20:*:*) |
1339 | echo pdp10-unknown-tops20 | |
1340 | exit ;; | |
1498 | GUESS=pdp10-unknown-tops20 | |
1499 | ;; | |
1341 | 1500 | *:ITS:*:*) |
1342 | echo pdp10-unknown-its | |
1343 | exit ;; | |
1501 | GUESS=pdp10-unknown-its | |
1502 | ;; | |
1344 | 1503 | SEI:*:*:SEIUX) |
1345 | echo mips-sei-seiux${UNAME_RELEASE} | |
1346 | exit ;; | |
1504 | GUESS=mips-sei-seiux$UNAME_RELEASE | |
1505 | ;; | |
1347 | 1506 | *: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 | ;; | |
1350 | 1510 | *:*VMS:*:*) |
1351 | 1511 | 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 ;; | |
1356 | 1516 | esac ;; |
1357 | 1517 | *:XENIX:*:SysV) |
1358 | echo i386-pc-xenix | |
1359 | exit ;; | |
1518 | GUESS=i386-pc-xenix | |
1519 | ;; | |
1360 | 1520 | 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 | ;; | |
1363 | 1524 | 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 | ;; | |
1369 | 1533 | 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 | ;; | |
1372 | 1542 | esac |
1373 | 1543 | |
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 | ||
1374 | 1700 | 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 | |
1382 | 1707 | 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. | |
1389 | 1721 | |
1390 | 1722 | config.guess timestamp = $timestamp |
1391 | 1723 | |
1404 | 1736 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` |
1405 | 1737 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` |
1406 | 1738 | |
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" | |
1411 | 1743 | EOF |
1744 | fi | |
1412 | 1745 | |
1413 | 1746 | exit 1 |
1414 | 1747 | |
1415 | 1748 | # Local variables: |
1416 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
1749 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
1417 | 1750 | # time-stamp-start: "timestamp='" |
1418 | 1751 | # time-stamp-format: "%:y-%02m-%02d" |
1419 | 1752 | # time-stamp-end: "'" |
0 | 0 | #! /bin/sh |
1 | 1 | # 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' | |
5 | 7 | |
6 | 8 | # This file is free software; you can redistribute it and/or modify it |
7 | 9 | # 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 | |
9 | 11 | # (at your option) any later version. |
10 | 12 | # |
11 | 13 | # This program is distributed in the hope that it will be useful, but |
14 | 16 | # General Public License for more details. |
15 | 17 | # |
16 | 18 | # 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/>. | |
18 | 20 | # |
19 | 21 | # As a special exception to the GNU General Public License, if you |
20 | 22 | # distribute this file as part of a program that contains a |
32 | 34 | # Otherwise, we print the canonical config type on stdout and succeed. |
33 | 35 | |
34 | 36 | # 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 | |
36 | 38 | |
37 | 39 | # This file is supposed to be the same for all GNU packages |
38 | 40 | # and recognize all the CPU types, system types and aliases |
49 | 51 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
50 | 52 | # It is wrong to echo any other type of specification. |
51 | 53 | |
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 | ||
52 | 61 | me=`echo "$0" | sed -e 's,.*/,,'` |
53 | 62 | |
54 | 63 | usage="\ |
55 | Usage: $0 [OPTION] CPU-MFR-OPSYS | |
56 | $0 [OPTION] ALIAS | |
64 | Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS | |
57 | 65 | |
58 | 66 | Canonicalize a configuration name. |
59 | 67 | |
60 | Operation modes: | |
68 | Options: | |
61 | 69 | -h, --help print this help, then exit |
62 | 70 | -t, --time-stamp print date of last modification, then exit |
63 | 71 | -v, --version print version number, then exit |
67 | 75 | version="\ |
68 | 76 | GNU config.sub ($timestamp) |
69 | 77 | |
70 | Copyright 1992-2015 Free Software Foundation, Inc. | |
78 | Copyright 1992-2021 Free Software Foundation, Inc. | |
71 | 79 | |
72 | 80 | This is free software; see the source for copying conditions. There is NO |
73 | 81 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
89 | 97 | - ) # Use stdin as input. |
90 | 98 | break ;; |
91 | 99 | -* ) |
92 | echo "$me: invalid option $1$help" | |
100 | echo "$me: invalid option $1$help" >&2 | |
93 | 101 | exit 1 ;; |
94 | 102 | |
95 | 103 | *local*) |
96 | 104 | # First pass through any local machine types. |
97 | echo $1 | |
105 | echo "$1" | |
98 | 106 | exit ;; |
99 | 107 | |
100 | 108 | * ) |
110 | 118 | exit 1;; |
111 | 119 | esac |
112 | 120 | |
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 | ;; | |
135 | 655 | esac |
136 | 656 | |
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 | |
245 | 658 | 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 | |
329 | 927 | ;; |
330 | 928 | 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 | ;; | |
358 | 945 | # We use `pc' rather than `unknown' |
359 | 946 | # because (1) that's what they normally are, and |
360 | 947 | # (2) the word "unknown" tends to confuse beginning users. |
361 | 948 | 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 | ;; | |
456 | 1453 | 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 | |
771 | 1506 | ;; |
772 | 1507 | *) |
773 | os=-irix4 | |
1508 | os=elf | |
774 | 1509 | ;; |
775 | 1510 | esac |
776 | 1511 | ;; |
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 | ;; | |
1322 | 1512 | *) |
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. | |
1325 | 1514 | ;; |
1326 | 1515 | esac |
1327 | 1516 | |
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 | |
1536 | 1517 | else |
1537 | 1518 | |
1538 | 1519 | # Here we handle the default operating systems that come with various machines. |
1545 | 1526 | # will signal an error saying that MANUFACTURER isn't an operating |
1546 | 1527 | # system, and we'll never get to this point. |
1547 | 1528 | |
1548 | case $basic_machine in | |
1529 | kernel= | |
1530 | case $cpu-$vendor in | |
1549 | 1531 | score-*) |
1550 | os=-elf | |
1532 | os=elf | |
1551 | 1533 | ;; |
1552 | 1534 | spu-*) |
1553 | os=-elf | |
1535 | os=elf | |
1554 | 1536 | ;; |
1555 | 1537 | *-acorn) |
1556 | os=-riscix1.2 | |
1538 | os=riscix1.2 | |
1557 | 1539 | ;; |
1558 | 1540 | arm*-rebel) |
1559 | os=-linux | |
1541 | kernel=linux | |
1542 | os=gnu | |
1560 | 1543 | ;; |
1561 | 1544 | arm*-semi) |
1562 | os=-aout | |
1545 | os=aout | |
1563 | 1546 | ;; |
1564 | 1547 | c4x-* | tic4x-*) |
1565 | os=-coff | |
1548 | os=coff | |
1566 | 1549 | ;; |
1567 | 1550 | c8051-*) |
1568 | os=-elf | |
1551 | os=elf | |
1552 | ;; | |
1553 | clipper-intergraph) | |
1554 | os=clix | |
1569 | 1555 | ;; |
1570 | 1556 | hexagon-*) |
1571 | os=-elf | |
1557 | os=elf | |
1572 | 1558 | ;; |
1573 | 1559 | tic54x-*) |
1574 | os=-coff | |
1560 | os=coff | |
1575 | 1561 | ;; |
1576 | 1562 | tic55x-*) |
1577 | os=-coff | |
1563 | os=coff | |
1578 | 1564 | ;; |
1579 | 1565 | tic6x-*) |
1580 | os=-coff | |
1566 | os=coff | |
1581 | 1567 | ;; |
1582 | 1568 | # This must come before the *-dec entry. |
1583 | 1569 | pdp10-*) |
1584 | os=-tops20 | |
1570 | os=tops20 | |
1585 | 1571 | ;; |
1586 | 1572 | pdp11-*) |
1587 | os=-none | |
1573 | os=none | |
1588 | 1574 | ;; |
1589 | 1575 | *-dec | vax-*) |
1590 | os=-ultrix4.2 | |
1576 | os=ultrix4.2 | |
1591 | 1577 | ;; |
1592 | 1578 | m68*-apollo) |
1593 | os=-domain | |
1579 | os=domain | |
1594 | 1580 | ;; |
1595 | 1581 | i386-sun) |
1596 | os=-sunos4.0.2 | |
1582 | os=sunos4.0.2 | |
1597 | 1583 | ;; |
1598 | 1584 | m68000-sun) |
1599 | os=-sunos3 | |
1585 | os=sunos3 | |
1600 | 1586 | ;; |
1601 | 1587 | m68*-cisco) |
1602 | os=-aout | |
1588 | os=aout | |
1603 | 1589 | ;; |
1604 | 1590 | mep-*) |
1605 | os=-elf | |
1591 | os=elf | |
1606 | 1592 | ;; |
1607 | 1593 | mips*-cisco) |
1608 | os=-elf | |
1594 | os=elf | |
1609 | 1595 | ;; |
1610 | 1596 | mips*-*) |
1611 | os=-elf | |
1597 | os=elf | |
1612 | 1598 | ;; |
1613 | 1599 | or32-*) |
1614 | os=-coff | |
1600 | os=coff | |
1615 | 1601 | ;; |
1616 | 1602 | *-tti) # must be before sparc entry or we get the wrong os. |
1617 | os=-sysv3 | |
1603 | os=sysv3 | |
1618 | 1604 | ;; |
1619 | 1605 | sparc-* | *-sun) |
1620 | os=-sunos4.1.1 | |
1606 | os=sunos4.1.1 | |
1607 | ;; | |
1608 | pru-*) | |
1609 | os=elf | |
1621 | 1610 | ;; |
1622 | 1611 | *-be) |
1623 | os=-beos | |
1624 | ;; | |
1625 | *-haiku) | |
1626 | os=-haiku | |
1612 | os=beos | |
1627 | 1613 | ;; |
1628 | 1614 | *-ibm) |
1629 | os=-aix | |
1615 | os=aix | |
1630 | 1616 | ;; |
1631 | 1617 | *-knuth) |
1632 | os=-mmixware | |
1618 | os=mmixware | |
1633 | 1619 | ;; |
1634 | 1620 | *-wec) |
1635 | os=-proelf | |
1621 | os=proelf | |
1636 | 1622 | ;; |
1637 | 1623 | *-winbond) |
1638 | os=-proelf | |
1624 | os=proelf | |
1639 | 1625 | ;; |
1640 | 1626 | *-oki) |
1641 | os=-proelf | |
1627 | os=proelf | |
1642 | 1628 | ;; |
1643 | 1629 | *-hp) |
1644 | os=-hpux | |
1630 | os=hpux | |
1645 | 1631 | ;; |
1646 | 1632 | *-hitachi) |
1647 | os=-hiux | |
1633 | os=hiux | |
1648 | 1634 | ;; |
1649 | 1635 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
1650 | os=-sysv | |
1636 | os=sysv | |
1651 | 1637 | ;; |
1652 | 1638 | *-cbm) |
1653 | os=-amigaos | |
1639 | os=amigaos | |
1654 | 1640 | ;; |
1655 | 1641 | *-dg) |
1656 | os=-dgux | |
1642 | os=dgux | |
1657 | 1643 | ;; |
1658 | 1644 | *-dolphin) |
1659 | os=-sysv3 | |
1645 | os=sysv3 | |
1660 | 1646 | ;; |
1661 | 1647 | m68k-ccur) |
1662 | os=-rtu | |
1648 | os=rtu | |
1663 | 1649 | ;; |
1664 | 1650 | m88k-omron*) |
1665 | os=-luna | |
1666 | ;; | |
1667 | *-next ) | |
1668 | os=-nextstep | |
1651 | os=luna | |
1652 | ;; | |
1653 | *-next) | |
1654 | os=nextstep | |
1669 | 1655 | ;; |
1670 | 1656 | *-sequent) |
1671 | os=-ptx | |
1657 | os=ptx | |
1672 | 1658 | ;; |
1673 | 1659 | *-crds) |
1674 | os=-unos | |
1660 | os=unos | |
1675 | 1661 | ;; |
1676 | 1662 | *-ns) |
1677 | os=-genix | |
1663 | os=genix | |
1678 | 1664 | ;; |
1679 | 1665 | i370-*) |
1680 | os=-mvs | |
1681 | ;; | |
1682 | *-next) | |
1683 | os=-nextstep3 | |
1666 | os=mvs | |
1684 | 1667 | ;; |
1685 | 1668 | *-gould) |
1686 | os=-sysv | |
1669 | os=sysv | |
1687 | 1670 | ;; |
1688 | 1671 | *-highlevel) |
1689 | os=-bsd | |
1672 | os=bsd | |
1690 | 1673 | ;; |
1691 | 1674 | *-encore) |
1692 | os=-bsd | |
1675 | os=bsd | |
1693 | 1676 | ;; |
1694 | 1677 | *-sgi) |
1695 | os=-irix | |
1678 | os=irix | |
1696 | 1679 | ;; |
1697 | 1680 | *-siemens) |
1698 | os=-sysv4 | |
1681 | os=sysv4 | |
1699 | 1682 | ;; |
1700 | 1683 | *-masscomp) |
1701 | os=-rtu | |
1684 | os=rtu | |
1702 | 1685 | ;; |
1703 | 1686 | f30[01]-fujitsu | f700-fujitsu) |
1704 | os=-uxpv | |
1687 | os=uxpv | |
1705 | 1688 | ;; |
1706 | 1689 | *-rom68k) |
1707 | os=-coff | |
1690 | os=coff | |
1708 | 1691 | ;; |
1709 | 1692 | *-*bug) |
1710 | os=-coff | |
1693 | os=coff | |
1711 | 1694 | ;; |
1712 | 1695 | *-apple) |
1713 | os=-macos | |
1696 | os=macos | |
1714 | 1697 | ;; |
1715 | 1698 | *-atari*) |
1716 | os=-mint | |
1699 | os=mint | |
1700 | ;; | |
1701 | *-wrs) | |
1702 | os=vxworks | |
1717 | 1703 | ;; |
1718 | 1704 | *) |
1719 | os=-none | |
1705 | os=none | |
1720 | 1706 | ;; |
1721 | 1707 | esac |
1708 | ||
1722 | 1709 | 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 | |
1723 | 1802 | |
1724 | 1803 | # Here we handle the case where we know the os, and the CPU type, but not the |
1725 | 1804 | # 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*) | |
1731 | 1809 | vendor=acorn |
1732 | 1810 | ;; |
1733 | -sunos*) | |
1811 | *-sunos*) | |
1734 | 1812 | vendor=sun |
1735 | 1813 | ;; |
1736 | -cnk*|-aix*) | |
1814 | *-cnk* | *-aix*) | |
1737 | 1815 | vendor=ibm |
1738 | 1816 | ;; |
1739 | -beos*) | |
1817 | *-beos*) | |
1740 | 1818 | vendor=be |
1741 | 1819 | ;; |
1742 | -hpux*) | |
1820 | *-hpux*) | |
1743 | 1821 | vendor=hp |
1744 | 1822 | ;; |
1745 | -mpeix*) | |
1823 | *-mpeix*) | |
1746 | 1824 | vendor=hp |
1747 | 1825 | ;; |
1748 | -hiux*) | |
1826 | *-hiux*) | |
1749 | 1827 | vendor=hitachi |
1750 | 1828 | ;; |
1751 | -unos*) | |
1829 | *-unos*) | |
1752 | 1830 | vendor=crds |
1753 | 1831 | ;; |
1754 | -dgux*) | |
1832 | *-dgux*) | |
1755 | 1833 | vendor=dg |
1756 | 1834 | ;; |
1757 | -luna*) | |
1835 | *-luna*) | |
1758 | 1836 | vendor=omron |
1759 | 1837 | ;; |
1760 | -genix*) | |
1838 | *-genix*) | |
1761 | 1839 | vendor=ns |
1762 | 1840 | ;; |
1763 | -mvs* | -opened*) | |
1841 | *-clix*) | |
1842 | vendor=intergraph | |
1843 | ;; | |
1844 | *-mvs* | *-opened*) | |
1764 | 1845 | vendor=ibm |
1765 | 1846 | ;; |
1766 | -os400*) | |
1847 | *-os400*) | |
1767 | 1848 | vendor=ibm |
1768 | 1849 | ;; |
1769 | -ptx*) | |
1850 | s390-* | s390x-*) | |
1851 | vendor=ibm | |
1852 | ;; | |
1853 | *-ptx*) | |
1770 | 1854 | vendor=sequent |
1771 | 1855 | ;; |
1772 | -tpf*) | |
1856 | *-tpf*) | |
1773 | 1857 | vendor=ibm |
1774 | 1858 | ;; |
1775 | -vxsim* | -vxworks* | -windiss*) | |
1859 | *-vxsim* | *-vxworks* | *-windiss*) | |
1776 | 1860 | vendor=wrs |
1777 | 1861 | ;; |
1778 | -aux*) | |
1862 | *-aux*) | |
1779 | 1863 | vendor=apple |
1780 | 1864 | ;; |
1781 | -hms*) | |
1865 | *-hms*) | |
1782 | 1866 | vendor=hitachi |
1783 | 1867 | ;; |
1784 | -mpw* | -macos*) | |
1868 | *-mpw* | *-macos*) | |
1785 | 1869 | vendor=apple |
1786 | 1870 | ;; |
1787 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
1871 | *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) | |
1788 | 1872 | vendor=atari |
1789 | 1873 | ;; |
1790 | -vos*) | |
1874 | *-vos*) | |
1791 | 1875 | vendor=stratus |
1792 | 1876 | ;; |
1793 | 1877 | esac |
1794 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
1795 | 1878 | ;; |
1796 | 1879 | esac |
1797 | 1880 | |
1798 | echo $basic_machine$os | |
1881 | echo "$cpu-$vendor-${kernel:+$kernel-}$os" | |
1799 | 1882 | exit |
1800 | 1883 | |
1801 | 1884 | # Local variables: |
1802 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
1885 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
1803 | 1886 | # time-stamp-start: "timestamp='" |
1804 | 1887 | # time-stamp-format: "%:y-%02m-%02d" |
1805 | 1888 | # time-stamp-end: "'" |
0 | 0 | #! /bin/sh |
1 | 1 | # 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. | |
3 | 3 | # |
4 | 4 | # Report bugs to <https://github.com/pkgconf/pkgconf/issues/new>. |
5 | 5 | # |
620 | 620 | # Identity of this package. |
621 | 621 | PACKAGE_NAME='pkgconf' |
622 | 622 | 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' | |
625 | 625 | PACKAGE_BUGREPORT='https://github.com/pkgconf/pkgconf/issues/new' |
626 | 626 | PACKAGE_URL='' |
627 | 627 | |
679 | 679 | AR |
680 | 680 | DLLTOOL |
681 | 681 | OBJDUMP |
682 | FILECMD | |
682 | 683 | LN_S |
683 | 684 | NM |
684 | 685 | ac_ct_DUMPBIN |
701 | 702 | AM_DEFAULT_VERBOSITY |
702 | 703 | AM_DEFAULT_V |
703 | 704 | AM_V |
705 | CSCOPE | |
706 | ETAGS | |
707 | CTAGS | |
704 | 708 | am__fastdepCC_FALSE |
705 | 709 | am__fastdepCC_TRUE |
706 | 710 | CCDEPMODE |
1357 | 1361 | # Omit some internal or obsolete options to make the list less imposing. |
1358 | 1362 | # This message is too long to be a string in the A/UX 3.1 sh. |
1359 | 1363 | 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. | |
1361 | 1365 | |
1362 | 1366 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1363 | 1367 | |
1428 | 1432 | |
1429 | 1433 | if test -n "$ac_init_help"; then |
1430 | 1434 | 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:";; | |
1432 | 1436 | esac |
1433 | 1437 | cat <<\_ACEOF |
1434 | 1438 | |
1548 | 1552 | test -n "$ac_init_help" && exit $ac_status |
1549 | 1553 | if $ac_init_version; then |
1550 | 1554 | cat <<\_ACEOF |
1551 | pkgconf configure 1.8.0 | |
1555 | pkgconf configure 1.8.1 | |
1552 | 1556 | generated by GNU Autoconf 2.71 |
1553 | 1557 | |
1554 | 1558 | Copyright (C) 2021 Free Software Foundation, Inc. |
1804 | 1808 | This file contains any messages produced by compilers while |
1805 | 1809 | running configure, to aid debugging if configure makes a mistake. |
1806 | 1810 | |
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 | |
1808 | 1812 | generated by GNU Autoconf 2.71. Invocation command line was |
1809 | 1813 | |
1810 | 1814 | $ $0$ac_configure_args_raw |
4444 | 4448 | |
4445 | 4449 | # Define the identity of the package. |
4446 | 4450 | PACKAGE='pkgconf' |
4447 | VERSION='1.8.0' | |
4451 | VERSION='1.8.1' | |
4448 | 4452 | |
4449 | 4453 | |
4450 | 4454 | printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h |
4619 | 4623 | fi |
4620 | 4624 | |
4621 | 4625 | |
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 | ||
4622 | 4640 | |
4623 | 4641 | # POSIX will say in a future version that running "rm -f" with no argument |
4624 | 4642 | # is OK; and we want to be able to make that assumption in our Makefile |
4711 | 4729 | |
4712 | 4730 | |
4713 | 4731 | |
4714 | macro_version='2.4.6' | |
4715 | macro_revision='2.4.6' | |
4732 | macro_version='2.4.7' | |
4733 | macro_revision='2.4.7' | |
4716 | 4734 | |
4717 | 4735 | |
4718 | 4736 | |
5340 | 5358 | mingw*) lt_bad_file=conftest.nm/nofile ;; |
5341 | 5359 | *) lt_bad_file=/dev/null ;; |
5342 | 5360 | 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 | |
5344 | 5362 | *$lt_bad_file* | *'Invalid file or object type'*) |
5345 | 5363 | lt_cv_path_NM="$tmp_nm -B" |
5346 | 5364 | break 2 |
5347 | 5365 | ;; |
5348 | 5366 | *) |
5349 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | |
5367 | case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in | |
5350 | 5368 | */dev/null*) |
5351 | 5369 | lt_cv_path_NM="$tmp_nm -p" |
5352 | 5370 | break 2 |
5484 | 5502 | fi |
5485 | 5503 | fi |
5486 | 5504 | |
5487 | case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in | |
5505 | case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in | |
5488 | 5506 | *COFF*) |
5489 | 5507 | DUMPBIN="$DUMPBIN -symbols -headers" |
5490 | 5508 | ;; |
5588 | 5606 | lt_cv_sys_max_cmd_len=8192; |
5589 | 5607 | ;; |
5590 | 5608 | |
5591 | bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) | |
5609 | bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) | |
5592 | 5610 | # This has been around since 386BSD, at least. Likely further. |
5593 | 5611 | if test -x /sbin/sysctl; then |
5594 | 5612 | lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` |
5631 | 5649 | sysv5* | sco5v6* | sysv4.2uw2*) |
5632 | 5650 | kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` |
5633 | 5651 | 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/.*[ ]//'` | |
5635 | 5653 | else |
5636 | 5654 | lt_cv_sys_max_cmd_len=32768 |
5637 | 5655 | fi |
5837 | 5855 | |
5838 | 5856 | |
5839 | 5857 | 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 | |
5840 | 5966 | # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. |
5841 | 5967 | set dummy ${ac_tool_prefix}objdump; ac_word=$2 |
5842 | 5968 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5979 | 6105 | |
5980 | 6106 | bsdi[45]*) |
5981 | 6107 | 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' | |
5983 | 6109 | lt_cv_file_magic_test_file=/shlib/libc.so |
5984 | 6110 | ;; |
5985 | 6111 | |
6013 | 6139 | lt_cv_deplibs_check_method=pass_all |
6014 | 6140 | ;; |
6015 | 6141 | |
6016 | freebsd* | dragonfly*) | |
6142 | freebsd* | dragonfly* | midnightbsd*) | |
6017 | 6143 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then |
6018 | 6144 | case $host_cpu in |
6019 | 6145 | i*86 ) |
6020 | 6146 | # Not sure whether the presence of OpenBSD here was a mistake. |
6021 | 6147 | # Let's accept both of them until this is cleared up. |
6022 | 6148 | 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 | |
6024 | 6150 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
6025 | 6151 | ;; |
6026 | 6152 | esac |
6034 | 6160 | ;; |
6035 | 6161 | |
6036 | 6162 | hpux10.20* | hpux11*) |
6037 | lt_cv_file_magic_cmd=/usr/bin/file | |
6163 | lt_cv_file_magic_cmd=$FILECMD | |
6038 | 6164 | case $host_cpu in |
6039 | 6165 | ia64*) |
6040 | 6166 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' |
6081 | 6207 | |
6082 | 6208 | newos6*) |
6083 | 6209 | 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 | |
6085 | 6211 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
6086 | 6212 | ;; |
6087 | 6213 | |
6454 | 6580 | fi |
6455 | 6581 | |
6456 | 6582 | : ${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. | |
6463 | 6605 | |
6464 | 6606 | |
6465 | 6607 | |
6877 | 7019 | |
6878 | 7020 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
6879 | 7021 | # 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'" | |
6881 | 7023 | # Adjust the below global symbol transforms to fixup imported variables. |
6882 | 7024 | lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" |
6883 | 7025 | lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" |
6895 | 7037 | # Transform an extracted symbol line into a proper C declaration. |
6896 | 7038 | # Some systems (esp. on ia64) link data and code symbols differently, |
6897 | 7039 | # 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"\ | |
6899 | 7041 | $lt_cdecl_hook\ |
6900 | 7042 | " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ |
6901 | 7043 | " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" |
6902 | 7044 | |
6903 | 7045 | # 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"\ | |
6905 | 7047 | $lt_c_name_hook\ |
6906 | 7048 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ |
6907 | 7049 | " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" |
6908 | 7050 | |
6909 | 7051 | # Transform an extracted symbol line into symbol name with lib prefix and |
6910 | 7052 | # 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"\ | |
6912 | 7054 | $lt_c_name_lib_hook\ |
6913 | 7055 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ |
6914 | 7056 | " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ |
6932 | 7074 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
6933 | 7075 | # Fake it for dumpbin and say T for any non-static function, |
6934 | 7076 | # 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, | |
6936 | 7078 | # which start with @ or ?. |
6937 | 7079 | lt_cv_sys_global_symbol_pipe="$AWK '"\ |
6938 | 7080 | " {last_section=section; section=\$ 3};"\ |
6950 | 7092 | " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ |
6951 | 7093 | " ' prfx=^$ac_symprfx" |
6952 | 7094 | 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'" | |
6954 | 7096 | 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'" | |
6956 | 7098 | |
6957 | 7099 | # Check to see that the pipe works correctly. |
6958 | 7100 | pipe_works=no |
7155 | 7297 | fi |
7156 | 7298 | ;; #( |
7157 | 7299 | /*) |
7158 | lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` | |
7300 | lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` | |
7159 | 7301 | ;; #( |
7160 | 7302 | no|'') |
7161 | 7303 | ;; #( |
7280 | 7422 | ac_status=$? |
7281 | 7423 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
7282 | 7424 | test $ac_status = 0; }; then |
7283 | case `/usr/bin/file conftest.$ac_objext` in | |
7425 | case `$FILECMD conftest.$ac_objext` in | |
7284 | 7426 | *ELF-32*) |
7285 | 7427 | HPUX_IA64_MODE=32 |
7286 | 7428 | ;; |
7301 | 7443 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
7302 | 7444 | test $ac_status = 0; }; then |
7303 | 7445 | 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 | |
7305 | 7447 | *32-bit*) |
7306 | 7448 | LD="${LD-ld} -melf32bsmip" |
7307 | 7449 | ;; |
7313 | 7455 | ;; |
7314 | 7456 | esac |
7315 | 7457 | else |
7316 | case `/usr/bin/file conftest.$ac_objext` in | |
7458 | case `$FILECMD conftest.$ac_objext` in | |
7317 | 7459 | *32-bit*) |
7318 | 7460 | LD="${LD-ld} -32" |
7319 | 7461 | ;; |
7339 | 7481 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
7340 | 7482 | test $ac_status = 0; }; then |
7341 | 7483 | emul=elf |
7342 | case `/usr/bin/file conftest.$ac_objext` in | |
7484 | case `$FILECMD conftest.$ac_objext` in | |
7343 | 7485 | *32-bit*) |
7344 | 7486 | emul="${emul}32" |
7345 | 7487 | ;; |
7347 | 7489 | emul="${emul}64" |
7348 | 7490 | ;; |
7349 | 7491 | esac |
7350 | case `/usr/bin/file conftest.$ac_objext` in | |
7492 | case `$FILECMD conftest.$ac_objext` in | |
7351 | 7493 | *MSB*) |
7352 | 7494 | emul="${emul}btsmip" |
7353 | 7495 | ;; |
7355 | 7497 | emul="${emul}ltsmip" |
7356 | 7498 | ;; |
7357 | 7499 | esac |
7358 | case `/usr/bin/file conftest.$ac_objext` in | |
7500 | case `$FILECMD conftest.$ac_objext` in | |
7359 | 7501 | *N32*) |
7360 | 7502 | emul="${emul}n32" |
7361 | 7503 | ;; |
7379 | 7521 | ac_status=$? |
7380 | 7522 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
7381 | 7523 | test $ac_status = 0; }; then |
7382 | case `/usr/bin/file conftest.o` in | |
7524 | case `$FILECMD conftest.o` in | |
7383 | 7525 | *32-bit*) |
7384 | 7526 | case $host in |
7385 | 7527 | x86_64-*kfreebsd*-gnu) |
7386 | 7528 | LD="${LD-ld} -m elf_i386_fbsd" |
7387 | 7529 | ;; |
7388 | 7530 | x86_64-*linux*) |
7389 | case `/usr/bin/file conftest.o` in | |
7531 | case `$FILECMD conftest.o` in | |
7390 | 7532 | *x86-64*) |
7391 | 7533 | LD="${LD-ld} -m elf32_x86_64" |
7392 | 7534 | ;; |
7494 | 7636 | ac_status=$? |
7495 | 7637 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
7496 | 7638 | test $ac_status = 0; }; then |
7497 | case `/usr/bin/file conftest.o` in | |
7639 | case `$FILECMD conftest.o` in | |
7498 | 7640 | *64-bit*) |
7499 | 7641 | case $lt_cv_prog_gnu_ld in |
7500 | 7642 | yes*) |
8277 | 8419 | _LT_EOF |
8278 | 8420 | echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 |
8279 | 8421 | $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 | |
8282 | 8424 | echo "$RANLIB libconftest.a" >&5 |
8283 | 8425 | $RANLIB libconftest.a 2>&5 |
8284 | 8426 | cat > conftest.c << _LT_EOF |
8305 | 8447 | _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; |
8306 | 8448 | darwin1.*) |
8307 | 8449 | _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' ;; | |
8319 | 8456 | esac |
8320 | 8457 | ;; |
8321 | 8458 | esac |
8674 | 8811 | ofile=libtool |
8675 | 8812 | can_build_shared=yes |
8676 | 8813 | |
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'). | |
8679 | 8816 | libext=a |
8680 | 8817 | |
8681 | 8818 | with_gnu_ld=$lt_cv_prog_gnu_ld |
9187 | 9324 | lt_prog_compiler_static='-qstaticlink' |
9188 | 9325 | ;; |
9189 | 9326 | *) |
9190 | case `$CC -V 2>&1 | sed 5q` in | |
9327 | case `$CC -V 2>&1 | $SED 5q` in | |
9191 | 9328 | *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) |
9192 | 9329 | # Sun Fortran 8.3 passes all unrecognized flags to the linker |
9193 | 9330 | lt_prog_compiler_pic='-KPIC' |
9610 | 9747 | |
9611 | 9748 | case $host_os in |
9612 | 9749 | 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 | |
9614 | 9751 | # When not using gcc, we currently assume that we are using |
9615 | # Microsoft Visual C++. | |
9752 | # Microsoft Visual C++ or Intel C++ Compiler. | |
9616 | 9753 | if test yes != "$GCC"; then |
9617 | 9754 | with_gnu_ld=no |
9618 | 9755 | fi |
9619 | 9756 | ;; |
9620 | 9757 | 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) | |
9622 | 9759 | with_gnu_ld=yes |
9623 | 9760 | ;; |
9624 | 9761 | openbsd* | bitrig*) |
9670 | 9807 | whole_archive_flag_spec= |
9671 | 9808 | fi |
9672 | 9809 | 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 | |
9674 | 9811 | *GNU\ gold*) supports_anon_versioning=yes ;; |
9675 | 9812 | *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 |
9676 | 9813 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... |
9782 | 9919 | emximp -o $lib $output_objdir/$libname.def' |
9783 | 9920 | old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
9784 | 9921 | enable_shared_with_static_runtimes=yes |
9922 | file_list_spec='@' | |
9785 | 9923 | ;; |
9786 | 9924 | |
9787 | 9925 | interix[3-9]*) |
9796 | 9934 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
9797 | 9935 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. |
9798 | 9936 | 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' | |
9800 | 9938 | ;; |
9801 | 9939 | |
9802 | 9940 | gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) |
9839 | 9977 | compiler_needs_object=yes |
9840 | 9978 | ;; |
9841 | 9979 | esac |
9842 | case `$CC -V 2>&1 | sed 5q` in | |
9980 | case `$CC -V 2>&1 | $SED 5q` in | |
9843 | 9981 | *Sun\ C*) # Sun C 5.9 |
9844 | 9982 | 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' |
9845 | 9983 | compiler_needs_object=yes |
9851 | 9989 | |
9852 | 9990 | if test yes = "$supports_anon_versioning"; then |
9853 | 9991 | 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~ | |
9855 | 9993 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
9856 | 9994 | $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' |
9857 | 9995 | fi |
9867 | 10005 | archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' |
9868 | 10006 | if test yes = "$supports_anon_versioning"; then |
9869 | 10007 | 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~ | |
9871 | 10009 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
9872 | 10010 | $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' |
9873 | 10011 | fi |
9999 | 10137 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
10000 | 10138 | 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' |
10001 | 10139 | 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' | |
10003 | 10141 | fi |
10004 | 10142 | aix_use_runtimelinking=no |
10005 | 10143 | |
10270 | 10408 | |
10271 | 10409 | cygwin* | mingw* | pw32* | cegcc*) |
10272 | 10410 | # When not using gcc, we currently assume that we are using |
10273 | # Microsoft Visual C++. | |
10411 | # Microsoft Visual C++ or Intel C++ Compiler. | |
10274 | 10412 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
10275 | 10413 | # no search path for DLLs. |
10276 | 10414 | case $cc_basename in |
10277 | cl*) | |
10278 | # Native MSVC | |
10415 | cl* | icl*) | |
10416 | # Native MSVC or ICC | |
10279 | 10417 | hardcode_libdir_flag_spec=' ' |
10280 | 10418 | allow_undefined_flag=unsupported |
10281 | 10419 | always_export_symbols=yes |
10316 | 10454 | fi' |
10317 | 10455 | ;; |
10318 | 10456 | *) |
10319 | # Assume MSVC wrapper | |
10457 | # Assume MSVC and ICC wrapper | |
10320 | 10458 | hardcode_libdir_flag_spec=' ' |
10321 | 10459 | allow_undefined_flag=unsupported |
10322 | 10460 | # Tell ltmain to make .lib files, not .a files. |
10357 | 10495 | output_verbose_link_cmd=func_echo_all |
10358 | 10496 | archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" |
10359 | 10497 | 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" | |
10362 | 10500 | |
10363 | 10501 | else |
10364 | 10502 | ld_shlibs=no |
10392 | 10530 | ;; |
10393 | 10531 | |
10394 | 10532 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
10395 | freebsd* | dragonfly*) | |
10533 | freebsd* | dragonfly* | midnightbsd*) | |
10396 | 10534 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
10397 | 10535 | hardcode_libdir_flag_spec='-R$libdir' |
10398 | 10536 | hardcode_direct=yes |
10643 | 10781 | emximp -o $lib $output_objdir/$libname.def' |
10644 | 10782 | old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
10645 | 10783 | enable_shared_with_static_runtimes=yes |
10784 | file_list_spec='@' | |
10646 | 10785 | ;; |
10647 | 10786 | |
10648 | 10787 | osf3*) |
11335 | 11474 | case $host_os in |
11336 | 11475 | cygwin*) |
11337 | 11476 | # 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' | |
11339 | 11478 | |
11340 | 11479 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" |
11341 | 11480 | ;; |
11345 | 11484 | ;; |
11346 | 11485 | pw32*) |
11347 | 11486 | # 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' | |
11349 | 11488 | ;; |
11350 | 11489 | esac |
11351 | 11490 | dynamic_linker='Win32 ld.exe' |
11352 | 11491 | ;; |
11353 | 11492 | |
11354 | *,cl*) | |
11355 | # Native MSVC | |
11493 | *,cl* | *,icl*) | |
11494 | # Native MSVC or ICC | |
11356 | 11495 | libname_spec='$name' |
11357 | 11496 | soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' |
11358 | 11497 | library_names_spec='$libname.dll.lib' |
11371 | 11510 | done |
11372 | 11511 | IFS=$lt_save_ifs |
11373 | 11512 | # 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|^ ||'` | |
11375 | 11514 | ;; |
11376 | 11515 | cygwin*) |
11377 | 11516 | # Convert to unix form, then to dos form, then back to unix form |
11408 | 11547 | ;; |
11409 | 11548 | |
11410 | 11549 | *) |
11411 | # Assume MSVC wrapper | |
11550 | # Assume MSVC and ICC wrapper | |
11412 | 11551 | library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' |
11413 | 11552 | dynamic_linker='Win32 ld.exe' |
11414 | 11553 | ;; |
11441 | 11580 | shlibpath_var=LD_LIBRARY_PATH |
11442 | 11581 | ;; |
11443 | 11582 | |
11444 | freebsd* | dragonfly*) | |
11583 | freebsd* | dragonfly* | midnightbsd*) | |
11445 | 11584 | # DragonFly does not have aout. When/if they implement a new |
11446 | 11585 | # versioning mechanism, adjust this. |
11447 | 11586 | if test -x /usr/bin/objformat; then |
12594 | 12733 | old_striplib= |
12595 | 12734 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 |
12596 | 12735 | 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 | |
12601 | 12744 | 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 | |
12607 | 12749 | striplib="$STRIP -x" |
12608 | 12750 | old_striplib="$STRIP -S" |
12609 | 12751 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
12610 | 12752 | 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 | *) | |
12612 | 12766 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12613 | 12767 | 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 | |
12621 | 12771 | fi |
12622 | 12772 | |
12623 | 12773 | |
14422 | 14572 | # report actual input values of CONFIG_FILES etc. instead of their |
14423 | 14573 | # values after options handling. |
14424 | 14574 | 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 | |
14426 | 14576 | generated by GNU Autoconf 2.71. Invocation command line was |
14427 | 14577 | |
14428 | 14578 | CONFIG_FILES = $CONFIG_FILES |
14490 | 14640 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
14491 | 14641 | ac_cs_config='$ac_cs_config_escaped' |
14492 | 14642 | ac_cs_version="\\ |
14493 | pkgconf config.status 1.8.0 | |
14643 | pkgconf config.status 1.8.1 | |
14494 | 14644 | configured by $0, generated by GNU Autoconf 2.71, |
14495 | 14645 | with options \\"\$ac_cs_config\\" |
14496 | 14646 | |
14653 | 14803 | lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' |
14654 | 14804 | reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' |
14655 | 14805 | reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' |
14806 | FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' | |
14656 | 14807 | OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' |
14657 | 14808 | deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' |
14658 | 14809 | file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' |
14661 | 14812 | DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' |
14662 | 14813 | sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' |
14663 | 14814 | AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' |
14815 | lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' | |
14664 | 14816 | AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' |
14665 | 14817 | archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' |
14666 | 14818 | STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' |
14781 | 14933 | lt_SP2NL \ |
14782 | 14934 | lt_NL2SP \ |
14783 | 14935 | reload_flag \ |
14936 | FILECMD \ | |
14784 | 14937 | OBJDUMP \ |
14785 | 14938 | deplibs_check_method \ |
14786 | 14939 | file_magic_cmd \ |
14789 | 14942 | DLLTOOL \ |
14790 | 14943 | sharedlib_from_linklib_cmd \ |
14791 | 14944 | AR \ |
14792 | AR_FLAGS \ | |
14793 | 14945 | archiver_list_spec \ |
14794 | 14946 | STRIP \ |
14795 | 14947 | RANLIB \ |
15736 | 15888 | # convert \$build files to toolchain format. |
15737 | 15889 | to_tool_file_cmd=$lt_cv_to_tool_file_cmd |
15738 | 15890 | |
15891 | # A file(cmd) program that detects file types. | |
15892 | FILECMD=$lt_FILECMD | |
15893 | ||
15739 | 15894 | # An object symbol dumper. |
15740 | 15895 | OBJDUMP=$lt_OBJDUMP |
15741 | 15896 | |
15760 | 15915 | # The archiver. |
15761 | 15916 | AR=$lt_AR |
15762 | 15917 | |
15918 | # Flags to create an archive (by configure). | |
15919 | lt_ar_flags=$lt_ar_flags | |
15920 | ||
15763 | 15921 | # Flags to create an archive. |
15764 | AR_FLAGS=$lt_AR_FLAGS | |
15922 | AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} | |
15765 | 15923 | |
15766 | 15924 | # How to feed a file listing to the archiver. |
15767 | 15925 | archiver_list_spec=$lt_archiver_list_spec |
16137 | 16295 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
16138 | 16296 | # text mode, it properly converts lines to CR/LF. This bash problem |
16139 | 16297 | # is reportedly fixed, but why not run on old versions too? |
16140 | sed '$q' "$ltmain" >> "$cfgfile" \ | |
16298 | $SED '$q' "$ltmain" >> "$cfgfile" \ | |
16141 | 16299 | || (rm -f "$cfgfile"; exit 1) |
16142 | 16300 | |
16143 | 16301 | mv -f "$cfgfile" "$ofile" || |
11 | 11 | dnl from the use of this software. |
12 | 12 | |
13 | 13 | 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]) | |
15 | 15 | AC_CONFIG_SRCDIR([cli/main.c]) |
16 | 16 | AC_CONFIG_MACRO_DIR([m4]) |
17 | 17 | AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"]) |
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 | 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 |
30 | 30 | 1 file changed, 5 insertions(+), 5 deletions(-) |
31 | 31 | |
32 | 32 | diff --git a/pkg.m4 b/pkg.m4 |
33 | index dd58c0b..64828eb 100644 | |
33 | index d3f228e..c88ef6f 100644 | |
34 | 34 | --- a/pkg.m4 |
35 | 35 | +++ b/pkg.m4 |
36 | 36 | @@ -1,5 +1,5 @@ |
0 | ignore-whitespace-indentation.patch | |
1 | 0 | sysroot_dir-logic.patch |
2 | 1 | pkg.m4/0001-pkg.m4-Unified-indentation-in-PKG_CHECK_MODULES.patch |
3 | # pkg.m4/0002-pkg.m4-PKG_CHECK_MODULES-provides-modversion.patch | |
4 | 2 | pkg.m4/0003-trivial-sync-of-pkg.m4-from-freedesktop.patch |
6 | 6 | 1 file changed, 3 insertions(+), 6 deletions(-) |
7 | 7 | |
8 | 8 | diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c |
9 | index f71f508..913e6f3 100644 | |
9 | index 0150852..3b21cbd 100644 | |
10 | 10 | --- a/libpkgconf/pkg.c |
11 | 11 | +++ b/libpkgconf/pkg.c |
12 | 12 | @@ -406,15 +406,12 @@ pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE * |
2 | 2 | |
3 | 3 | scriptversion=2018-03-07.03; # UTC |
4 | 4 | |
5 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1999-2021 Free Software Foundation, Inc. | |
6 | 6 | |
7 | 7 | # This program is free software; you can redistribute it and/or modify |
8 | 8 | # it under the terms of the GNU General Public License as published by |
75 | 75 | |
76 | 76 | :param char* a: The first version to compare in the pair. |
77 | 77 | :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. | |
79 | 79 | :rtype: int |
80 | 80 | |
81 | 81 | .. c:function:: pkgconf_pkg_t *pkgconf_builtin_pkg_get(const char *name) |
0 | 0 | #!/bin/sh |
1 | 1 | # install - install a program, script, or datafile |
2 | 2 | |
3 | scriptversion=2013-12-25.23; # UTC | |
3 | scriptversion=2020-11-14.01; # UTC | |
4 | 4 | |
5 | 5 | # This originates from X11R5 (mit/util/scripts/install.sh), which was |
6 | 6 | # later released in X11R6 (xc/config/util/install.sh) with the |
68 | 68 | # Desired mode of installed file. |
69 | 69 | mode=0755 |
70 | 70 | |
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= | |
71 | 76 | chgrpcmd= |
72 | 77 | chmodcmd=$chmodprog |
73 | 78 | chowncmd= |
98 | 103 | --version display version info and exit. |
99 | 104 | |
100 | 105 | -c (ignored) |
101 | -C install only if different (preserve the last data modification time) | |
106 | -C install only if different (preserve data modification time) | |
102 | 107 | -d create directories instead of installing files. |
103 | 108 | -g GROUP $chgrpprog installed files to GROUP. |
104 | 109 | -m MODE $chmodprog installed files to MODE. |
105 | 110 | -o USER $chownprog installed files to USER. |
111 | -p pass -p to $cpprog. | |
106 | 112 | -s $stripprog installed files. |
113 | -S SUFFIX attempt to back up existing files, with suffix SUFFIX. | |
107 | 114 | -t DIRECTORY install into DIRECTORY. |
108 | 115 | -T report an error if DSTFILE is a directory. |
109 | 116 | |
110 | 117 | Environment variables override the default commands: |
111 | 118 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG |
112 | 119 | 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/ | |
113 | 128 | " |
114 | 129 | |
115 | 130 | while test $# -ne 0; do |
136 | 151 | -o) chowncmd="$chownprog $2" |
137 | 152 | shift;; |
138 | 153 | |
154 | -p) cpprog="$cpprog -p";; | |
155 | ||
139 | 156 | -s) stripcmd=$stripprog;; |
157 | ||
158 | -S) backupsuffix="$2" | |
159 | shift;; | |
140 | 160 | |
141 | 161 | -t) |
142 | 162 | is_target_a_directory=always |
254 | 274 | dstdir=$dst |
255 | 275 | test -d "$dstdir" |
256 | 276 | dstdir_status=$? |
277 | # Don't chown directories that already exist. | |
278 | if test $dstdir_status = 0; then | |
279 | chowncmd="" | |
280 | fi | |
257 | 281 | else |
258 | 282 | |
259 | 283 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command |
270 | 294 | fi |
271 | 295 | dst=$dst_arg |
272 | 296 | |
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. | |
275 | 298 | if test -d "$dst"; then |
276 | 299 | if test "$is_target_a_directory" = never; then |
277 | 300 | echo "$0: $dst_arg: Is a directory" >&2 |
278 | 301 | exit 1 |
279 | 302 | fi |
280 | 303 | 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 | |
282 | 309 | dstdir_status=0 |
283 | 310 | else |
284 | 311 | dstdir=`dirname "$dst"` |
287 | 314 | fi |
288 | 315 | fi |
289 | 316 | |
317 | case $dstdir in | |
318 | */) dstdirslash=$dstdir;; | |
319 | *) dstdirslash=$dstdir/;; | |
320 | esac | |
321 | ||
290 | 322 | obsolete_mkdir_used=false |
291 | 323 | |
292 | 324 | if test $dstdir_status != 0; then |
293 | 325 | case $posix_mkdir in |
294 | 326 | '') |
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 | ||
311 | 327 | # With -d, create the new directory with the user-specified mode. |
312 | 328 | # Otherwise, rely on $mkdir_umask. |
313 | 329 | if test -n "$dir_arg"; then |
317 | 333 | fi |
318 | 334 | |
319 | 335 | 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;; | |
357 | 379 | esac |
358 | 380 | |
359 | 381 | if |
364 | 386 | then : |
365 | 387 | else |
366 | 388 | |
367 | # The umask is ridiculous, or mkdir does not conform to POSIX, | |
389 | # mkdir does not conform to POSIX, | |
368 | 390 | # or it failed possibly due to a race condition. Create the |
369 | 391 | # directory the slow way, step by step, checking for races as we go. |
370 | 392 | |
393 | 415 | prefixes= |
394 | 416 | else |
395 | 417 | if $posix_mkdir; then |
396 | (umask=$mkdir_umask && | |
418 | (umask $mkdir_umask && | |
397 | 419 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break |
398 | 420 | # Don't fail if two instances are running concurrently. |
399 | 421 | test -d "$prefix" || exit 1 |
426 | 448 | else |
427 | 449 | |
428 | 450 | # 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.$$_ | |
431 | 453 | |
432 | 454 | # Trap to clean up those temp files at exit. |
433 | 455 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 |
434 | 456 | |
435 | 457 | # 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") && | |
437 | 470 | |
438 | 471 | # and set any options; do chmod last to preserve setuid bits. |
439 | 472 | # |
459 | 492 | then |
460 | 493 | rm -f "$dsttmp" |
461 | 494 | 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 | ||
462 | 502 | # Rename the file to the real destination. |
463 | 503 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || |
464 | 504 | |
473 | 513 | # file should still install successfully. |
474 | 514 | { |
475 | 515 | test ! -f "$dst" || |
476 | $doit $rmcmd -f "$dst" 2>/dev/null || | |
516 | $doit $rmcmd "$dst" 2>/dev/null || | |
477 | 517 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && |
478 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } | |
518 | { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } | |
479 | 519 | } || |
480 | 520 | { echo "$0: cannot unlink or rename $dst" >&2 |
481 | 521 | (exit 1); exit 1 |
492 | 532 | done |
493 | 533 | |
494 | 534 | # Local variables: |
495 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
535 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
496 | 536 | # time-stamp-start: "scriptversion=" |
497 | 537 | # time-stamp-format: "%:y-%02m-%02d.%02H" |
498 | # time-stamp-time-zone: "UTC" | |
538 | # time-stamp-time-zone: "UTC0" | |
499 | 539 | # time-stamp-end: "; # UTC" |
500 | 540 | # End: |
77 | 77 | #define PKGCONF_FOREACH_LIST_ENTRY_REVERSE(tail, value) \ |
78 | 78 | for ((value) = (tail); (value) != NULL; (value) = (value)->prev) |
79 | 79 | |
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" | |
82 | 82 | |
83 | 83 | struct pkgconf_fragment_ { |
84 | 84 | pkgconf_node_t iter; |
43 | 43 | lineno++; |
44 | 44 | |
45 | 45 | 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; | |
46 | 55 | while (*p && (isalpha((unsigned int)*p) || isdigit((unsigned int)*p) || *p == '_' || *p == '.')) |
47 | 56 | p++; |
48 | 57 | |
49 | key = readbuf; | |
50 | 58 | if (!isalpha((unsigned int)*key) && !isdigit((unsigned int)*p)) |
51 | 59 | continue; |
52 | 60 | |
88 | 96 | *p = '\0'; |
89 | 97 | p--; |
90 | 98 | } |
91 | ||
92 | 99 | if (ops[(unsigned char) op]) |
93 | 100 | ops[(unsigned char) op](data, lineno, key, value); |
94 | 101 | } |
797 | 797 | * |
798 | 798 | * :param char* a: The first version to compare in the pair. |
799 | 799 | * :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. | |
801 | 801 | * :rtype: int |
802 | 802 | */ |
803 | 803 | int |
812 | 812 | |
813 | 813 | /* optimization: if version matches then it's the same version. */ |
814 | 814 | if (a == NULL) |
815 | return -1; | |
816 | ||
817 | if (b == NULL) | |
815 | 818 | return 1; |
816 | ||
817 | if (b == NULL) | |
818 | return -1; | |
819 | 819 | |
820 | 820 | if (!strcasecmp(a, b)) |
821 | 821 | return 0; |
836 | 836 | if (*one == '~' || *two == '~') |
837 | 837 | { |
838 | 838 | if (*one != '~') |
839 | return 1; | |
840 | if (*two != '~') | |
839 | 841 | return -1; |
840 | if (*two != '~') | |
841 | return 1; | |
842 | 842 | |
843 | 843 | one++; |
844 | 844 | two++; |
292 | 292 | } |
293 | 293 | } |
294 | 294 | |
295 | PKGCONF_TRACE(client, "lookup tuple %s", varname); | |
296 | ||
297 | size_t remain = PKGCONF_BUFSIZE - (bptr - buf); | |
295 | 298 | ptr += (pptr - ptr); |
296 | 299 | kv = pkgconf_tuple_find_global(client, varname); |
297 | 300 | if (kv != NULL) |
298 | 301 | { |
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; | |
301 | 312 | } |
302 | 313 | else |
303 | 314 | { |
305 | 316 | |
306 | 317 | if (kv != NULL) |
307 | 318 | { |
319 | size_t nlen; | |
320 | ||
308 | 321 | 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); | |
313 | 323 | 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; | |
314 | 334 | } |
315 | 335 | } |
316 | 336 | } |
0 | #! /bin/sh | |
0 | #! /usr/bin/env sh | |
1 | 1 | ## 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 | |
5 | 5 | # Provide generalized library-building support services. |
6 | 6 | # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
7 | 7 | |
8 | # Copyright (C) 1996-2015 Free Software Foundation, Inc. | |
8 | # Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. | |
9 | 9 | # This is free software; see the source for copying conditions. There is NO |
10 | 10 | # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
11 | 11 | |
30 | 30 | |
31 | 31 | PROGRAM=libtool |
32 | 32 | PACKAGE=libtool |
33 | VERSION=2.4.6 | |
34 | package_revision=2.4.6 | |
33 | VERSION=2.4.7 | |
34 | package_revision=2.4.7 | |
35 | 35 | |
36 | 36 | |
37 | 37 | ## ------ ## |
63 | 63 | # libraries, which are installed to $pkgauxdir. |
64 | 64 | |
65 | 65 | # Set a version string for this script. |
66 | scriptversion=2015-01-20.17; # UTC | |
66 | scriptversion=2019-02-19.15; # UTC | |
67 | 67 | |
68 | 68 | # General shell script boiler plate, and helper functions. |
69 | 69 | # Written by Gary V. Vaughan, 2004 |
70 | 70 | |
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> | |
94 | 85 | |
95 | 86 | |
96 | 87 | ## ------ ## |
138 | 129 | _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" |
139 | 130 | fi" |
140 | 131 | 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 | |
144 | 138 | |
145 | 139 | # Make sure IFS has a sensible default |
146 | 140 | sp=' ' |
157 | 151 | } |
158 | 152 | fi |
159 | 153 | |
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 | |
160 | 174 | |
161 | 175 | |
162 | 176 | ## ------------------------- ## |
258 | 272 | rm -f conftest.in conftest.tmp conftest.nl conftest.out |
259 | 273 | } |
260 | 274 | |
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" | |
262 | 276 | rm -f conftest.sed |
263 | 277 | SED=$func_path_progs_result |
264 | 278 | } |
294 | 308 | rm -f conftest.in conftest.tmp conftest.nl conftest.out |
295 | 309 | } |
296 | 310 | |
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" | |
298 | 312 | GREP=$func_path_progs_result |
299 | 313 | } |
300 | 314 | |
358 | 372 | s/^$_G_bs2$_G_dollar/$_G_bs&/ |
359 | 373 | s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g |
360 | 374 | 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 | } | |
361 | 404 | |
362 | 405 | |
363 | 406 | ## ----------------- ## |
579 | 622 | { |
580 | 623 | $debug_cmd |
581 | 624 | |
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" | |
584 | 627 | }' |
585 | 628 | else |
586 | 629 | func_append_quoted () |
587 | 630 | { |
588 | 631 | $debug_cmd |
589 | 632 | |
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" | |
592 | 635 | } |
593 | 636 | fi |
594 | 637 | |
1090 | 1133 | } |
1091 | 1134 | |
1092 | 1135 | |
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 () | |
1103 | 1142 | { |
1104 | 1143 | $debug_cmd |
1105 | 1144 | |
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 | { | |
1109 | 1231 | 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 | |
1129 | 1235 | ;; |
1130 | 1236 | *) |
1131 | _G_quoted_arg=$_G_unquoted_arg | |
1132 | ;; | |
1237 | printf -v func_quotefast_eval_result %q "$1" | |
1238 | ;; | |
1133 | 1239 | 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" | |
1137 | 1328 | else |
1138 | func_append func_quote_for_eval_result "$_G_quoted_arg" | |
1329 | func_append func_quote_result "$func_quote_arg_result" | |
1139 | 1330 | fi |
1140 | 1331 | shift |
1141 | 1332 | 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 | |
1172 | 1333 | } |
1173 | 1334 | |
1174 | 1335 | |
1214 | 1375 | _G_cmd=$1 |
1215 | 1376 | _G_fail_exp=${2-':'} |
1216 | 1377 | |
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" | |
1219 | 1380 | |
1220 | 1381 | $opt_dry_run || { |
1221 | 1382 | eval "$_G_cmd" |
1240 | 1401 | _G_fail_exp=${2-':'} |
1241 | 1402 | |
1242 | 1403 | $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" | |
1245 | 1406 | } |
1246 | 1407 | |
1247 | 1408 | $opt_dry_run || { |
1368 | 1529 | # End: |
1369 | 1530 | #! /bin/sh |
1370 | 1531 | |
1371 | # Set a version string for this script. | |
1372 | scriptversion=2014-01-07.03; # UTC | |
1373 | ||
1374 | 1532 | # A portable, pluggable option parser for Bourne shell. |
1375 | 1533 | # Written by Gary V. Vaughan, 2010 |
1376 | 1534 | |
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 | |
1395 | 1552 | |
1396 | 1553 | |
1397 | 1554 | ## ------ ## |
1414 | 1571 | # |
1415 | 1572 | # In order for the '--version' option to work, you will need to have a |
1416 | 1573 | # 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'. | |
1418 | 1575 | # |
1419 | 1576 | # For '-h' and '--help' to work, you will also need a one line |
1420 | 1577 | # description of your script's purpose in a comment directly above the |
1426 | 1583 | # to display verbose messages only when your user has specified |
1427 | 1584 | # '--verbose'. |
1428 | 1585 | # |
1429 | # After sourcing this file, you can plug processing for additional | |
1586 | # After sourcing this file, you can plug in processing for additional | |
1430 | 1587 | # options by amending the variables from the 'Configuration' section |
1431 | 1588 | # below, and following the instructions in the 'Option parsing' |
1432 | 1589 | # section further down. |
1475 | 1632 | ## ------------------------- ## |
1476 | 1633 | |
1477 | 1634 | # 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. | |
1480 | 1637 | |
1481 | 1638 | # func_hookable FUNC_NAME |
1482 | 1639 | # ----------------------- |
1509 | 1666 | |
1510 | 1667 | # func_remove_hook FUNC_NAME HOOK_FUNC |
1511 | 1668 | # ------------------------------------ |
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. | |
1513 | 1671 | func_remove_hook () |
1514 | 1672 | { |
1515 | 1673 | $debug_cmd |
1516 | 1674 | |
1517 | 1675 | 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 | |
1518 | 1694 | } |
1519 | 1695 | |
1520 | 1696 | |
1521 | 1697 | # func_run_hooks FUNC_NAME [ARG]... |
1522 | 1698 | # --------------------------------- |
1523 | 1699 | # 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 | |
1525 | 1701 | # than a whitespace-delimited list of legal shell function names, and |
1526 | 1702 | # no effort is wasted trying to catch shell meta-characters or preserve |
1527 | 1703 | # whitespace. |
1531 | 1707 | |
1532 | 1708 | case " $hookable_fns " in |
1533 | 1709 | *" $1 "*) ;; |
1534 | *) func_fatal_error "'$1' does not support hook funcions.n" ;; | |
1710 | *) func_fatal_error "'$1' does not support hook functions." ;; | |
1535 | 1711 | esac |
1536 | 1712 | |
1537 | 1713 | eval _G_hook_fns=\$$1_hooks; shift |
1538 | 1714 | |
1539 | 1715 | 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 | |
1546 | 1722 | done |
1547 | ||
1548 | func_quote_for_eval ${1+"$@"} | |
1549 | func_run_hooks_result=$func_quote_for_eval_result | |
1550 | 1723 | } |
1551 | 1724 | |
1552 | 1725 | |
1556 | 1729 | ## --------------- ## |
1557 | 1730 | |
1558 | 1731 | # 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: | |
1563 | 1744 | # |
1564 | 1745 | # my_options_prep () |
1565 | 1746 | # { |
1569 | 1750 | # usage_message=$usage_message' |
1570 | 1751 | # -s, --silent don'\''t print informational messages |
1571 | 1752 | # ' |
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. | |
1575 | 1755 | # } |
1576 | 1756 | # func_add_hook func_options_prep my_options_prep |
1577 | 1757 | # |
1580 | 1760 | # { |
1581 | 1761 | # $debug_cmd |
1582 | 1762 | # |
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 | |
1584 | 1766 | # # recognise in a loop before passing the remainder back to the |
1585 | 1767 | # # caller on the first unrecognised argument we encounter. |
1586 | 1768 | # while test $# -gt 0; do |
1587 | 1769 | # opt=$1; shift |
1588 | 1770 | # case $opt in |
1589 | # --silent|-s) opt_silent=: ;; | |
1771 | # --silent|-s) opt_silent=: | |
1772 | # args_changed=: | |
1773 | # ;; | |
1590 | 1774 | # # Separate non-argument short options: |
1591 | 1775 | # -s*) func_split_short_opt "$_G_opt" |
1592 | 1776 | # set dummy "$func_split_short_opt_name" \ |
1593 | 1777 | # "-$func_split_short_opt_arg" ${1+"$@"} |
1594 | 1778 | # shift |
1779 | # args_changed=: | |
1595 | 1780 | # ;; |
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 ;; | |
1597 | 1785 | # esac |
1598 | 1786 | # done |
1599 | 1787 | # |
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 | |
1602 | 1793 | # } |
1603 | 1794 | # func_add_hook func_parse_options my_silent_option |
1604 | 1795 | # |
1609 | 1800 | # |
1610 | 1801 | # $opt_silent && $opt_verbose && func_fatal_help "\ |
1611 | 1802 | # '--silent' and '--verbose' options are mutually exclusive." |
1612 | # | |
1613 | # func_quote_for_eval ${1+"$@"} | |
1614 | # my_option_validation_result=$func_quote_for_eval_result | |
1615 | 1803 | # } |
1616 | 1804 | # func_add_hook func_validate_options my_option_validation |
1617 | 1805 | # |
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 | |
1619 | 1807 | # options you parse. It's preferable to append if you can, so that |
1620 | 1808 | # 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 | } | |
1621 | 1821 | |
1622 | 1822 | |
1623 | 1823 | # func_options [ARG]... |
1629 | 1829 | { |
1630 | 1830 | $debug_cmd |
1631 | 1831 | |
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 | } | |
1643 | 1853 | } |
1644 | 1854 | |
1645 | 1855 | |
1648 | 1858 | # All initialisations required before starting the option parse loop. |
1649 | 1859 | # Note that when calling hook functions, we pass through the list of |
1650 | 1860 | # 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. | |
1654 | 1863 | func_hookable func_options_prep |
1655 | 1864 | func_options_prep () |
1656 | 1865 | { |
1661 | 1870 | opt_warning_types= |
1662 | 1871 | |
1663 | 1872 | 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 | |
1667 | 1874 | } |
1668 | 1875 | |
1669 | 1876 | |
1675 | 1882 | { |
1676 | 1883 | $debug_cmd |
1677 | 1884 | |
1678 | func_parse_options_result= | |
1679 | ||
1885 | _G_parse_options_requote=false | |
1680 | 1886 | # this just eases exit handling |
1681 | 1887 | while test $# -gt 0; do |
1682 | 1888 | # Defer to hook functions for initial option parsing, so they |
1683 | 1889 | # get priority in the event of reusing an option name. |
1684 | 1890 | 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 | |
1688 | 1899 | |
1689 | 1900 | # Break out of the loop if we already parsed every option. |
1690 | 1901 | test $# -gt 0 || break |
1691 | 1902 | |
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=: | |
1692 | 1906 | _G_opt=$1 |
1693 | 1907 | shift |
1694 | 1908 | case $_G_opt in |
1695 | 1909 | --debug|-x) debug_cmd='set -x' |
1696 | func_echo "enabling shell trace mode" | |
1910 | func_echo "enabling shell trace mode" >&2 | |
1697 | 1911 | $debug_cmd |
1698 | 1912 | ;; |
1699 | 1913 | |
1703 | 1917 | ;; |
1704 | 1918 | |
1705 | 1919 | --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 | |
1707 | 1924 | case " $warning_categories $1" in |
1708 | 1925 | *" $1 "*) |
1709 | 1926 | # trailing space prevents matching last $1 above |
1756 | 1973 | shift |
1757 | 1974 | ;; |
1758 | 1975 | |
1759 | --) break ;; | |
1976 | --) _G_parse_options_requote=: ; break ;; | |
1760 | 1977 | -*) 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 | ;; | |
1762 | 1982 | esac |
1983 | ||
1984 | if $_G_match_parse_options; then | |
1985 | _G_parse_options_requote=: | |
1986 | fi | |
1763 | 1987 | done |
1764 | 1988 | |
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 | |
1768 | 1994 | } |
1769 | 1995 | |
1770 | 1996 | |
1781 | 2007 | test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" |
1782 | 2008 | |
1783 | 2009 | func_run_hooks func_validate_options ${1+"$@"} |
2010 | func_propagate_result func_run_hooks func_validate_options | |
1784 | 2011 | |
1785 | 2012 | # Bail if the options were screwed! |
1786 | 2013 | $exit_cmd $EXIT_FAILURE |
1787 | ||
1788 | # save modified positional parameters for caller | |
1789 | func_validate_options_result=$func_run_hooks_result | |
1790 | 2014 | } |
1791 | 2015 | |
1792 | 2016 | |
1842 | 2066 | |
1843 | 2067 | # func_split_equals STRING |
1844 | 2068 | # ------------------------ |
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. | |
1847 | 2071 | test -z "$_G_HAVE_XSI_OPS" \ |
1848 | 2072 | && (eval 'x=a/b/c; |
1849 | 2073 | test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ |
1858 | 2082 | |
1859 | 2083 | func_split_equals_lhs=${1%%=*} |
1860 | 2084 | 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 | |
1863 | 2088 | }' |
1864 | 2089 | else |
1865 | 2090 | # ...otherwise fall back to using expr, which is often a shell builtin. |
1869 | 2094 | |
1870 | 2095 | func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` |
1871 | 2096 | func_split_equals_rhs= |
1872 | test "x$func_split_equals_lhs" = "x$1" \ | |
2097 | test "x$func_split_equals_lhs=" = "x$1" \ | |
1873 | 2098 | || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` |
1874 | 2099 | } |
1875 | 2100 | fi #func_split_equals |
1895 | 2120 | { |
1896 | 2121 | $debug_cmd |
1897 | 2122 | |
1898 | func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` | |
2123 | func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` | |
1899 | 2124 | func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` |
1900 | 2125 | } |
1901 | 2126 | fi #func_split_short_opt |
1937 | 2162 | # func_version |
1938 | 2163 | # ------------ |
1939 | 2164 | # 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. | |
1940 | 2174 | func_version () |
1941 | 2175 | { |
1942 | 2176 | $debug_cmd |
1943 | 2177 | |
1944 | 2178 | printf '%s\n' "$progname $scriptversion" |
1945 | 2179 | $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 | |
1952 | 2187 | } |
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 | |
1959 | 2197 | } |
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" | |
1965 | 2203 | |
1966 | 2204 | exit $? |
1967 | 2205 | } |
1971 | 2209 | # mode: shell-script |
1972 | 2210 | # sh-indentation: 2 |
1973 | 2211 | # 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" | |
1975 | 2213 | # time-stamp-time-zone: "UTC" |
1976 | 2214 | # End: |
1977 | 2215 | |
1978 | 2216 | # Set a version string. |
1979 | scriptversion='(GNU libtool) 2.4.6' | |
2217 | scriptversion='(GNU libtool) 2.4.7' | |
1980 | 2218 | |
1981 | 2219 | |
1982 | 2220 | # func_echo ARG... |
2067 | 2305 | compiler: $LTCC |
2068 | 2306 | compiler flags: $LTCFLAGS |
2069 | 2307 | linker: $LD (gnu? $with_gnu_ld) |
2070 | version: $progname (GNU libtool) 2.4.6 | |
2308 | version: $progname (GNU libtool) 2.4.7 | |
2071 | 2309 | automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` |
2072 | 2310 | autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` |
2073 | 2311 | |
2123 | 2361 | # a configuration failure hint, and exit. |
2124 | 2362 | func_fatal_configuration () |
2125 | 2363 | { |
2126 | func__fatal_error ${1+"$@"} \ | |
2364 | func_fatal_error ${1+"$@"} \ | |
2127 | 2365 | "See the $PACKAGE documentation for more information." \ |
2128 | 2366 | "Fatal configuration error." |
2129 | 2367 | } |
2269 | 2507 | nonopt= |
2270 | 2508 | preserve_args= |
2271 | 2509 | |
2510 | _G_rc_lt_options_prep=: | |
2511 | ||
2272 | 2512 | # Shorthand for --mode=foo, only valid as the first argument |
2273 | 2513 | case $1 in |
2274 | 2514 | clean|clea|cle|cl) |
2292 | 2532 | uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) |
2293 | 2533 | shift; set dummy --mode uninstall ${1+"$@"}; shift |
2294 | 2534 | ;; |
2535 | *) | |
2536 | _G_rc_lt_options_prep=false | |
2537 | ;; | |
2295 | 2538 | esac |
2296 | 2539 | |
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 | |
2300 | 2545 | } |
2301 | 2546 | func_add_hook func_options_prep libtool_options_prep |
2302 | 2547 | |
2308 | 2553 | { |
2309 | 2554 | $debug_cmd |
2310 | 2555 | |
2556 | _G_rc_lt_parse_options=false | |
2557 | ||
2311 | 2558 | # Perform our own loop to consume as many options as possible in |
2312 | 2559 | # each iteration. |
2313 | 2560 | while test $# -gt 0; do |
2561 | _G_match_lt_parse_options=: | |
2314 | 2562 | _G_opt=$1 |
2315 | 2563 | shift |
2316 | 2564 | case $_G_opt in |
2385 | 2633 | func_append preserve_args " $_G_opt" |
2386 | 2634 | ;; |
2387 | 2635 | |
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 | ;; | |
2390 | 2641 | esac |
2642 | $_G_match_lt_parse_options && _G_rc_lt_parse_options=: | |
2391 | 2643 | done |
2392 | 2644 | |
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 | |
2397 | 2650 | } |
2398 | 2651 | func_add_hook func_parse_options libtool_parse_options |
2399 | 2652 | |
2450 | 2703 | } |
2451 | 2704 | |
2452 | 2705 | # 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 | |
2455 | 2708 | } |
2456 | 2709 | func_add_hook func_validate_options libtool_validate_options |
2457 | 2710 | |
3417 | 3670 | esac |
3418 | 3671 | done |
3419 | 3672 | |
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" \ | |
3422 | 3675 | && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ |
3423 | 3676 | && func_warning "libobj name '$libobj' may not contain shell special characters." |
3424 | 3677 | func_dirname_and_basename "$obj" "/" "" |
3491 | 3744 | |
3492 | 3745 | func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 |
3493 | 3746 | 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 | |
3496 | 3749 | |
3497 | 3750 | # Only build a PIC object if we are building libtool libraries. |
3498 | 3751 | if test yes = "$build_libtool_libs"; then |
3647 | 3900 | -prefer-non-pic try to build non-PIC objects only |
3648 | 3901 | -shared do not build a '.o' file suitable for static linking |
3649 | 3902 | -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 | |
3651 | 3905 | |
3652 | 3906 | COMPILE-COMMAND is a command to be used in creating a 'standard' object file |
3653 | 3907 | from the given SOURCEFILE. |
3753 | 4007 | -weak LIBNAME declare that the target provides the LIBNAME interface |
3754 | 4008 | -Wc,FLAG |
3755 | 4009 | -Xcompiler FLAG pass linker-specific FLAG directly to the compiler |
4010 | -Wa,FLAG | |
4011 | -Xassembler FLAG pass linker-specific FLAG directly to the assembler | |
3756 | 4012 | -Wl,FLAG |
3757 | 4013 | -Xlinker FLAG pass linker-specific FLAG directly to the linker |
3758 | 4014 | -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) |
4095 | 4351 | case $nonopt in *shtool*) :;; *) false;; esac |
4096 | 4352 | then |
4097 | 4353 | # 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 " | |
4100 | 4356 | arg=$1 |
4101 | 4357 | shift |
4102 | 4358 | else |
4106 | 4362 | |
4107 | 4363 | # The real first argument should be the name of the installation program. |
4108 | 4364 | # 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" | |
4111 | 4367 | install_shared_prog=$install_prog |
4112 | 4368 | case " $install_prog " in |
4113 | 4369 | *[\\\ /]cp\ *) install_cp=: ;; |
4164 | 4420 | esac |
4165 | 4421 | |
4166 | 4422 | # 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" | |
4169 | 4425 | if test -n "$arg2"; then |
4170 | func_quote_for_eval "$arg2" | |
4426 | func_quote_arg pretty "$arg2" | |
4171 | 4427 | fi |
4172 | func_append install_shared_prog " $func_quote_for_eval_result" | |
4428 | func_append install_shared_prog " $func_quote_arg_result" | |
4173 | 4429 | done |
4174 | 4430 | |
4175 | 4431 | test -z "$install_prog" && \ |
4180 | 4436 | |
4181 | 4437 | if test -n "$install_override_mode" && $no_mode; then |
4182 | 4438 | 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" | |
4185 | 4441 | fi |
4186 | 4442 | fi |
4187 | 4443 | |
4477 | 4733 | relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` |
4478 | 4734 | |
4479 | 4735 | $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" | |
4482 | 4738 | } |
4483 | 4739 | if eval "$relink_command"; then : |
4484 | 4740 | else |
5257 | 5513 | if test \"\$libtool_execute_magic\" != \"$magic\"; then |
5258 | 5514 | file=\"\$0\"" |
5259 | 5515 | |
5260 | qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` | |
5516 | func_quote_arg pretty "$ECHO" | |
5517 | qECHO=$func_quote_arg_result | |
5261 | 5518 | $ECHO "\ |
5262 | 5519 | |
5263 | 5520 | # A function that is used when there is no print builtin or printf. |
5267 | 5524 | \$1 |
5268 | 5525 | _LTECHO_EOF' |
5269 | 5526 | } |
5270 | ECHO=\"$qECHO\" | |
5527 | ECHO=$qECHO | |
5271 | 5528 | fi |
5272 | 5529 | |
5273 | 5530 | # Very basic option parsing. These options are (a) specific to |
6610 | 6867 | while test "$#" -gt 0; do |
6611 | 6868 | arg=$1 |
6612 | 6869 | 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" | |
6616 | 6873 | |
6617 | 6874 | # If the previous option needs an argument, assign it. |
6618 | 6875 | if test -n "$prev"; then |
6848 | 7105 | prev= |
6849 | 7106 | continue |
6850 | 7107 | ;; |
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 | ;; | |
6851 | 7115 | xcclinker) |
6852 | 7116 | func_append linker_flags " $qarg" |
6853 | 7117 | func_append compiler_flags " $qarg" |
7018 | 7282 | # These systems don't actually have a C library (as such) |
7019 | 7283 | test X-lc = "X$arg" && continue |
7020 | 7284 | ;; |
7021 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) | |
7285 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) | |
7022 | 7286 | # Do not include libc due to us having libc/libc_r. |
7023 | 7287 | test X-lc = "X$arg" && continue |
7024 | 7288 | ;; |
7038 | 7302 | esac |
7039 | 7303 | elif test X-lc_r = "X$arg"; then |
7040 | 7304 | case $host in |
7041 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) | |
7305 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) | |
7042 | 7306 | # Do not include libc_r directly, use -pthread flag. |
7043 | 7307 | continue |
7044 | 7308 | ;; |
7068 | 7332 | prev=xcompiler |
7069 | 7333 | continue |
7070 | 7334 | ;; |
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 \ | |
7073 | 7349 | |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) |
7074 | 7350 | func_append compiler_flags " $arg" |
7075 | 7351 | func_append compile_command " $arg" |
7210 | 7486 | save_ifs=$IFS; IFS=, |
7211 | 7487 | for flag in $args; do |
7212 | 7488 | 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" | |
7216 | 7492 | done |
7217 | 7493 | IFS=$save_ifs |
7218 | 7494 | func_stripname ' ' '' "$arg" |
7226 | 7502 | save_ifs=$IFS; IFS=, |
7227 | 7503 | for flag in $args; do |
7228 | 7504 | 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" | |
7233 | 7509 | done |
7234 | 7510 | IFS=$save_ifs |
7235 | 7511 | func_stripname ' ' '' "$arg" |
7236 | 7512 | arg=$func_stripname_result |
7237 | 7513 | ;; |
7238 | 7514 | |
7515 | -Xassembler) | |
7516 | prev=xassembler | |
7517 | continue | |
7518 | ;; | |
7519 | ||
7239 | 7520 | -Xcompiler) |
7240 | 7521 | prev=xcompiler |
7241 | 7522 | continue |
7253 | 7534 | |
7254 | 7535 | # -msg_* for osf cc |
7255 | 7536 | -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 | |
7258 | 7539 | ;; |
7259 | 7540 | |
7260 | 7541 | # Flags to be passed through unchanged, with rationale: |
7271 | 7552 | # -tp=* Portland pgcc target processor selection |
7272 | 7553 | # --sysroot=* for sysroot support |
7273 | 7554 | # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization |
7555 | # -specs=* GCC specs files | |
7274 | 7556 | # -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 | |
7275 | 7560 | -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ |
7276 | 7561 | -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 | |
7280 | 7566 | func_append compile_command " $arg" |
7281 | 7567 | func_append finalize_command " $arg" |
7282 | 7568 | func_append compiler_flags " $arg" |
7297 | 7583 | continue |
7298 | 7584 | else |
7299 | 7585 | # 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 | |
7302 | 7588 | fi |
7303 | 7589 | ;; |
7304 | 7590 | |
7305 | 7591 | # Some other compiler flag. |
7306 | 7592 | -* | +*) |
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 | |
7309 | 7595 | ;; |
7310 | 7596 | |
7311 | 7597 | *.$objext) |
7425 | 7711 | *) |
7426 | 7712 | # Unknown arguments in both finalize_command and compile_command need |
7427 | 7713 | # 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 | |
7430 | 7716 | ;; |
7431 | 7717 | esac # arg |
7432 | 7718 | |
8631 | 8917 | test CXX = "$tagname" && { |
8632 | 8918 | case $host_os in |
8633 | 8919 | linux*) |
8634 | case `$CC -V 2>&1 | sed 5q` in | |
8920 | case `$CC -V 2>&1 | $SED 5q` in | |
8635 | 8921 | *Sun\ C*) # Sun C++ 5.9 |
8636 | 8922 | func_suncc_cstd_abi |
8637 | 8923 | |
8804 | 9090 | # |
8805 | 9091 | case $version_type in |
8806 | 9092 | # 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) | |
8808 | 9094 | func_arith $number_major + $number_minor |
8809 | 9095 | current=$func_arith_result |
8810 | 9096 | age=$number_minor |
8895 | 9181 | versuffix=.$current.$revision |
8896 | 9182 | ;; |
8897 | 9183 | |
8898 | freebsd-elf) | |
9184 | freebsd-elf | midnightbsd-elf) | |
8899 | 9185 | func_arith $current - $age |
8900 | 9186 | major=.$func_arith_result |
8901 | 9187 | versuffix=$major.$age.$revision |
9121 | 9407 | *-*-netbsd*) |
9122 | 9408 | # Don't link with libc until the a.out ld.so is fixed. |
9123 | 9409 | ;; |
9124 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) | |
9410 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) | |
9125 | 9411 | # Do not include libc due to us having libc/libc_r. |
9126 | 9412 | ;; |
9127 | 9413 | *-*-sco3.2v5* | *-*-sco5v6*) |
9934 | 10220 | for cmd in $concat_cmds; do |
9935 | 10221 | IFS=$save_ifs |
9936 | 10222 | $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" | |
9939 | 10225 | } |
9940 | 10226 | $opt_dry_run || eval "$cmd" || { |
9941 | 10227 | lt_exit=$? |
10028 | 10314 | eval cmd=\"$cmd\" |
10029 | 10315 | IFS=$save_ifs |
10030 | 10316 | $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" | |
10033 | 10319 | } |
10034 | 10320 | $opt_dry_run || eval "$cmd" || { |
10035 | 10321 | lt_exit=$? |
10507 | 10793 | elif eval var_value=\$$var; test -z "$var_value"; then |
10508 | 10794 | relink_command="$var=; export $var; $relink_command" |
10509 | 10795 | 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" | |
10512 | 10798 | fi |
10513 | 10799 | 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 | |
10516 | 10803 | fi |
10517 | 10804 | |
10518 | 10805 | # Only actually do things if not in dry run mode. |
10752 | 11039 | elif eval var_value=\$$var; test -z "$var_value"; then |
10753 | 11040 | relink_command="$var=; export $var; $relink_command" |
10754 | 11041 | 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" | |
10757 | 11044 | fi |
10758 | 11045 | done |
10759 | 11046 | # 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 | |
10762 | 11051 | if test yes = "$hardcode_automatic"; then |
10763 | 11052 | relink_command= |
10764 | 11053 | fi |
0 | 0 | # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- |
1 | 1 | # |
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. | |
3 | 4 | # Written by Gordon Matzigkeit, 1996 |
4 | 5 | # |
5 | 6 | # This file is free software; the Free Software Foundation gives |
30 | 31 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
31 | 32 | ]) |
32 | 33 | |
33 | # serial 58 LT_INIT | |
34 | # serial 59 LT_INIT | |
34 | 35 | |
35 | 36 | |
36 | 37 | # LT_PREREQ(VERSION) |
180 | 181 | m4_require([_LT_CHECK_SHELL_FEATURES])dnl |
181 | 182 | m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl |
182 | 183 | m4_require([_LT_CMD_RELOAD])dnl |
184 | m4_require([_LT_DECL_FILECMD])dnl | |
183 | 185 | m4_require([_LT_CHECK_MAGIC_METHOD])dnl |
184 | 186 | m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl |
185 | 187 | m4_require([_LT_CMD_OLD_ARCHIVE])dnl |
218 | 220 | ofile=libtool |
219 | 221 | can_build_shared=yes |
220 | 222 | |
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'). | |
223 | 225 | libext=a |
224 | 226 | |
225 | 227 | with_gnu_ld=$lt_cv_prog_gnu_ld |
777 | 779 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
778 | 780 | # text mode, it properly converts lines to CR/LF. This bash problem |
779 | 781 | # is reportedly fixed, but why not run on old versions too? |
780 | sed '$q' "$ltmain" >> "$cfgfile" \ | |
782 | $SED '$q' "$ltmain" >> "$cfgfile" \ | |
781 | 783 | || (rm -f "$cfgfile"; exit 1) |
782 | 784 | |
783 | 785 | mv -f "$cfgfile" "$ofile" || |
1041 | 1043 | _LT_EOF |
1042 | 1044 | echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD |
1043 | 1045 | $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 | |
1046 | 1048 | echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD |
1047 | 1049 | $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD |
1048 | 1050 | cat > conftest.c << _LT_EOF |
1066 | 1068 | _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; |
1067 | 1069 | darwin1.*) |
1068 | 1070 | _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' ;; | |
1080 | 1077 | esac |
1081 | 1078 | ;; |
1082 | 1079 | esac |
1125 | 1122 | output_verbose_link_cmd=func_echo_all |
1126 | 1123 | _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" |
1127 | 1124 | _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" | |
1130 | 1127 | m4_if([$1], [CXX], |
1131 | 1128 | [ if test yes != "$lt_cv_apple_cc_single_mod"; then |
1132 | 1129 | _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" | |
1134 | 1131 | fi |
1135 | 1132 | ],[]) |
1136 | 1133 | else |
1244 | 1241 | # _LT_WITH_SYSROOT |
1245 | 1242 | # ---------------- |
1246 | 1243 | AC_DEFUN([_LT_WITH_SYSROOT], |
1247 | [AC_MSG_CHECKING([for sysroot]) | |
1244 | [m4_require([_LT_DECL_SED])dnl | |
1245 | AC_MSG_CHECKING([for sysroot]) | |
1248 | 1246 | AC_ARG_WITH([sysroot], |
1249 | 1247 | [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], |
1250 | 1248 | [Search for dependent libraries within DIR (or the compiler's sysroot |
1261 | 1259 | fi |
1262 | 1260 | ;; #( |
1263 | 1261 | /*) |
1264 | lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` | |
1262 | lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` | |
1265 | 1263 | ;; #( |
1266 | 1264 | no|'') |
1267 | 1265 | ;; #( |
1291 | 1289 | # options accordingly. |
1292 | 1290 | echo 'int i;' > conftest.$ac_ext |
1293 | 1291 | if AC_TRY_EVAL(ac_compile); then |
1294 | case `/usr/bin/file conftest.$ac_objext` in | |
1292 | case `$FILECMD conftest.$ac_objext` in | |
1295 | 1293 | *ELF-32*) |
1296 | 1294 | HPUX_IA64_MODE=32 |
1297 | 1295 | ;; |
1308 | 1306 | echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext |
1309 | 1307 | if AC_TRY_EVAL(ac_compile); then |
1310 | 1308 | 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 | |
1312 | 1310 | *32-bit*) |
1313 | 1311 | LD="${LD-ld} -melf32bsmip" |
1314 | 1312 | ;; |
1320 | 1318 | ;; |
1321 | 1319 | esac |
1322 | 1320 | else |
1323 | case `/usr/bin/file conftest.$ac_objext` in | |
1321 | case `$FILECMD conftest.$ac_objext` in | |
1324 | 1322 | *32-bit*) |
1325 | 1323 | LD="${LD-ld} -32" |
1326 | 1324 | ;; |
1342 | 1340 | echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext |
1343 | 1341 | if AC_TRY_EVAL(ac_compile); then |
1344 | 1342 | emul=elf |
1345 | case `/usr/bin/file conftest.$ac_objext` in | |
1343 | case `$FILECMD conftest.$ac_objext` in | |
1346 | 1344 | *32-bit*) |
1347 | 1345 | emul="${emul}32" |
1348 | 1346 | ;; |
1350 | 1348 | emul="${emul}64" |
1351 | 1349 | ;; |
1352 | 1350 | esac |
1353 | case `/usr/bin/file conftest.$ac_objext` in | |
1351 | case `$FILECMD conftest.$ac_objext` in | |
1354 | 1352 | *MSB*) |
1355 | 1353 | emul="${emul}btsmip" |
1356 | 1354 | ;; |
1358 | 1356 | emul="${emul}ltsmip" |
1359 | 1357 | ;; |
1360 | 1358 | esac |
1361 | case `/usr/bin/file conftest.$ac_objext` in | |
1359 | case `$FILECMD conftest.$ac_objext` in | |
1362 | 1360 | *N32*) |
1363 | 1361 | emul="${emul}n32" |
1364 | 1362 | ;; |
1378 | 1376 | # not appear in the list. |
1379 | 1377 | echo 'int i;' > conftest.$ac_ext |
1380 | 1378 | if AC_TRY_EVAL(ac_compile); then |
1381 | case `/usr/bin/file conftest.o` in | |
1379 | case `$FILECMD conftest.o` in | |
1382 | 1380 | *32-bit*) |
1383 | 1381 | case $host in |
1384 | 1382 | x86_64-*kfreebsd*-gnu) |
1385 | 1383 | LD="${LD-ld} -m elf_i386_fbsd" |
1386 | 1384 | ;; |
1387 | 1385 | x86_64-*linux*) |
1388 | case `/usr/bin/file conftest.o` in | |
1386 | case `$FILECMD conftest.o` in | |
1389 | 1387 | *x86-64*) |
1390 | 1388 | LD="${LD-ld} -m elf32_x86_64" |
1391 | 1389 | ;; |
1453 | 1451 | # options accordingly. |
1454 | 1452 | echo 'int i;' > conftest.$ac_ext |
1455 | 1453 | if AC_TRY_EVAL(ac_compile); then |
1456 | case `/usr/bin/file conftest.o` in | |
1454 | case `$FILECMD conftest.o` in | |
1457 | 1455 | *64-bit*) |
1458 | 1456 | case $lt_cv_prog_gnu_ld in |
1459 | 1457 | yes*) |
1492 | 1490 | m4_defun([_LT_PROG_AR], |
1493 | 1491 | [AC_CHECK_TOOLS(AR, [ar], false) |
1494 | 1492 | : ${AR=ar} |
1495 | : ${AR_FLAGS=cru} | |
1496 | 1493 | _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]) | |
1498 | 1509 | |
1499 | 1510 | AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], |
1500 | 1511 | [lt_cv_ar_at_file=no |
1713 | 1724 | lt_cv_sys_max_cmd_len=8192; |
1714 | 1725 | ;; |
1715 | 1726 | |
1716 | bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) | |
1727 | bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) | |
1717 | 1728 | # This has been around since 386BSD, at least. Likely further. |
1718 | 1729 | if test -x /sbin/sysctl; then |
1719 | 1730 | lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` |
1756 | 1767 | sysv5* | sco5v6* | sysv4.2uw2*) |
1757 | 1768 | kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` |
1758 | 1769 | 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/.*[[ ]]//'` | |
1760 | 1771 | else |
1761 | 1772 | lt_cv_sys_max_cmd_len=32768 |
1762 | 1773 | fi |
2206 | 2217 | striplib= |
2207 | 2218 | old_striplib= |
2208 | 2219 | 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]) | |
2213 | 2222 | 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 | |
2218 | 2231 | striplib="$STRIP -x" |
2219 | 2232 | old_striplib="$STRIP -S" |
2220 | 2233 | 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 | *) | |
2222 | 2245 | AC_MSG_RESULT([no]) |
2223 | fi | |
2224 | ;; | |
2225 | *) | |
2226 | AC_MSG_RESULT([no]) | |
2227 | ;; | |
2228 | esac | |
2246 | ;; | |
2247 | esac | |
2248 | fi | |
2229 | 2249 | fi |
2230 | 2250 | _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) |
2231 | 2251 | _LT_DECL([], [striplib], [1]) |
2548 | 2568 | case $host_os in |
2549 | 2569 | cygwin*) |
2550 | 2570 | # 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' | |
2552 | 2572 | m4_if([$1], [],[ |
2553 | 2573 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) |
2554 | 2574 | ;; |
2558 | 2578 | ;; |
2559 | 2579 | pw32*) |
2560 | 2580 | # 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' | |
2562 | 2582 | ;; |
2563 | 2583 | esac |
2564 | 2584 | dynamic_linker='Win32 ld.exe' |
2565 | 2585 | ;; |
2566 | 2586 | |
2567 | *,cl*) | |
2568 | # Native MSVC | |
2587 | *,cl* | *,icl*) | |
2588 | # Native MSVC or ICC | |
2569 | 2589 | libname_spec='$name' |
2570 | 2590 | soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' |
2571 | 2591 | library_names_spec='$libname.dll.lib' |
2584 | 2604 | done |
2585 | 2605 | IFS=$lt_save_ifs |
2586 | 2606 | # 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|^ ||'` | |
2588 | 2608 | ;; |
2589 | 2609 | cygwin*) |
2590 | 2610 | # Convert to unix form, then to dos form, then back to unix form |
2621 | 2641 | ;; |
2622 | 2642 | |
2623 | 2643 | *) |
2624 | # Assume MSVC wrapper | |
2644 | # Assume MSVC and ICC wrapper | |
2625 | 2645 | library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' |
2626 | 2646 | dynamic_linker='Win32 ld.exe' |
2627 | 2647 | ;; |
2654 | 2674 | shlibpath_var=LD_LIBRARY_PATH |
2655 | 2675 | ;; |
2656 | 2676 | |
2657 | freebsd* | dragonfly*) | |
2677 | freebsd* | dragonfly* | midnightbsd*) | |
2658 | 2678 | # DragonFly does not have aout. When/if they implement a new |
2659 | 2679 | # versioning mechanism, adjust this. |
2660 | 2680 | if test -x /usr/bin/objformat; then |
3453 | 3473 | |
3454 | 3474 | bsdi[[45]]*) |
3455 | 3475 | 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' | |
3457 | 3477 | lt_cv_file_magic_test_file=/shlib/libc.so |
3458 | 3478 | ;; |
3459 | 3479 | |
3487 | 3507 | lt_cv_deplibs_check_method=pass_all |
3488 | 3508 | ;; |
3489 | 3509 | |
3490 | freebsd* | dragonfly*) | |
3510 | freebsd* | dragonfly* | midnightbsd*) | |
3491 | 3511 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then |
3492 | 3512 | case $host_cpu in |
3493 | 3513 | i*86 ) |
3494 | 3514 | # Not sure whether the presence of OpenBSD here was a mistake. |
3495 | 3515 | # Let's accept both of them until this is cleared up. |
3496 | 3516 | 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 | |
3498 | 3518 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
3499 | 3519 | ;; |
3500 | 3520 | esac |
3508 | 3528 | ;; |
3509 | 3529 | |
3510 | 3530 | hpux10.20* | hpux11*) |
3511 | lt_cv_file_magic_cmd=/usr/bin/file | |
3531 | lt_cv_file_magic_cmd=$FILECMD | |
3512 | 3532 | case $host_cpu in |
3513 | 3533 | ia64*) |
3514 | 3534 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' |
3555 | 3575 | |
3556 | 3576 | newos6*) |
3557 | 3577 | 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 | |
3559 | 3579 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
3560 | 3580 | ;; |
3561 | 3581 | |
3682 | 3702 | mingw*) lt_bad_file=conftest.nm/nofile ;; |
3683 | 3703 | *) lt_bad_file=/dev/null ;; |
3684 | 3704 | 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 | |
3686 | 3706 | *$lt_bad_file* | *'Invalid file or object type'*) |
3687 | 3707 | lt_cv_path_NM="$tmp_nm -B" |
3688 | 3708 | break 2 |
3689 | 3709 | ;; |
3690 | 3710 | *) |
3691 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | |
3711 | case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in | |
3692 | 3712 | */dev/null*) |
3693 | 3713 | lt_cv_path_NM="$tmp_nm -p" |
3694 | 3714 | break 2 |
3714 | 3734 | # Let the user override the test. |
3715 | 3735 | else |
3716 | 3736 | 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 | |
3718 | 3738 | *COFF*) |
3719 | 3739 | DUMPBIN="$DUMPBIN -symbols -headers" |
3720 | 3740 | ;; |
3954 | 3974 | |
3955 | 3975 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
3956 | 3976 | # 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'" | |
3958 | 3978 | # Adjust the below global symbol transforms to fixup imported variables. |
3959 | 3979 | lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" |
3960 | 3980 | lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" |
3972 | 3992 | # Transform an extracted symbol line into a proper C declaration. |
3973 | 3993 | # Some systems (esp. on ia64) link data and code symbols differently, |
3974 | 3994 | # 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"\ | |
3976 | 3996 | $lt_cdecl_hook\ |
3977 | 3997 | " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ |
3978 | 3998 | " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" |
3979 | 3999 | |
3980 | 4000 | # 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"\ | |
3982 | 4002 | $lt_c_name_hook\ |
3983 | 4003 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ |
3984 | 4004 | " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" |
3985 | 4005 | |
3986 | 4006 | # Transform an extracted symbol line into symbol name with lib prefix and |
3987 | 4007 | # 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"\ | |
3989 | 4009 | $lt_c_name_lib_hook\ |
3990 | 4010 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ |
3991 | 4011 | " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ |
4009 | 4029 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
4010 | 4030 | # Fake it for dumpbin and say T for any non-static function, |
4011 | 4031 | # 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, | |
4013 | 4033 | # which start with @ or ?. |
4014 | 4034 | lt_cv_sys_global_symbol_pipe="$AWK ['"\ |
4015 | 4035 | " {last_section=section; section=\$ 3};"\ |
4027 | 4047 | " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ |
4028 | 4048 | " ' prfx=^$ac_symprfx]" |
4029 | 4049 | 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'" | |
4031 | 4051 | 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'" | |
4033 | 4053 | |
4034 | 4054 | # Check to see that the pipe works correctly. |
4035 | 4055 | pipe_works=no |
4316 | 4336 | ;; |
4317 | 4337 | esac |
4318 | 4338 | ;; |
4319 | freebsd* | dragonfly*) | |
4339 | freebsd* | dragonfly* | midnightbsd*) | |
4320 | 4340 | # FreeBSD uses GNU C++ |
4321 | 4341 | ;; |
4322 | 4342 | hpux9* | hpux10* | hpux11*) |
4399 | 4419 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' |
4400 | 4420 | ;; |
4401 | 4421 | *) |
4402 | case `$CC -V 2>&1 | sed 5q` in | |
4422 | case `$CC -V 2>&1 | $SED 5q` in | |
4403 | 4423 | *Sun\ C*) |
4404 | 4424 | # Sun C++ 5.9 |
4405 | 4425 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4735 | 4755 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' |
4736 | 4756 | ;; |
4737 | 4757 | *) |
4738 | case `$CC -V 2>&1 | sed 5q` in | |
4758 | case `$CC -V 2>&1 | $SED 5q` in | |
4739 | 4759 | *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) |
4740 | 4760 | # Sun Fortran 8.3 passes all unrecognized flags to the linker |
4741 | 4761 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4918 | 4938 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
4919 | 4939 | _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' |
4920 | 4940 | 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' | |
4922 | 4942 | fi |
4923 | 4943 | ;; |
4924 | 4944 | pw32*) |
4926 | 4946 | ;; |
4927 | 4947 | cygwin* | mingw* | cegcc*) |
4928 | 4948 | case $cc_basename in |
4929 | cl*) | |
4949 | cl* | icl*) | |
4930 | 4950 | _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' |
4931 | 4951 | ;; |
4932 | 4952 | *) |
4983 | 5003 | |
4984 | 5004 | case $host_os in |
4985 | 5005 | 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 | |
4987 | 5007 | # When not using gcc, we currently assume that we are using |
4988 | # Microsoft Visual C++. | |
5008 | # Microsoft Visual C++ or Intel C++ Compiler. | |
4989 | 5009 | if test yes != "$GCC"; then |
4990 | 5010 | with_gnu_ld=no |
4991 | 5011 | fi |
4992 | 5012 | ;; |
4993 | 5013 | 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) | |
4995 | 5015 | with_gnu_ld=yes |
4996 | 5016 | ;; |
4997 | 5017 | openbsd* | bitrig*) |
5043 | 5063 | _LT_TAGVAR(whole_archive_flag_spec, $1)= |
5044 | 5064 | fi |
5045 | 5065 | 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 | |
5047 | 5067 | *GNU\ gold*) supports_anon_versioning=yes ;; |
5048 | 5068 | *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 |
5049 | 5069 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... |
5155 | 5175 | emximp -o $lib $output_objdir/$libname.def' |
5156 | 5176 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
5157 | 5177 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
5178 | _LT_TAGVAR(file_list_spec, $1)='@' | |
5158 | 5179 | ;; |
5159 | 5180 | |
5160 | 5181 | interix[[3-9]]*) |
5169 | 5190 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
5170 | 5191 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. |
5171 | 5192 | _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' | |
5173 | 5194 | ;; |
5174 | 5195 | |
5175 | 5196 | gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) |
5212 | 5233 | _LT_TAGVAR(compiler_needs_object, $1)=yes |
5213 | 5234 | ;; |
5214 | 5235 | esac |
5215 | case `$CC -V 2>&1 | sed 5q` in | |
5236 | case `$CC -V 2>&1 | $SED 5q` in | |
5216 | 5237 | *Sun\ C*) # Sun C 5.9 |
5217 | 5238 | _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' |
5218 | 5239 | _LT_TAGVAR(compiler_needs_object, $1)=yes |
5224 | 5245 | |
5225 | 5246 | if test yes = "$supports_anon_versioning"; then |
5226 | 5247 | _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~ | |
5228 | 5249 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
5229 | 5250 | $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' |
5230 | 5251 | fi |
5240 | 5261 | _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' |
5241 | 5262 | if test yes = "$supports_anon_versioning"; then |
5242 | 5263 | _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~ | |
5244 | 5265 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
5245 | 5266 | $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' |
5246 | 5267 | fi |
5372 | 5393 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
5373 | 5394 | _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' |
5374 | 5395 | 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' | |
5376 | 5397 | fi |
5377 | 5398 | aix_use_runtimelinking=no |
5378 | 5399 | |
5555 | 5576 | |
5556 | 5577 | cygwin* | mingw* | pw32* | cegcc*) |
5557 | 5578 | # When not using gcc, we currently assume that we are using |
5558 | # Microsoft Visual C++. | |
5579 | # Microsoft Visual C++ or Intel C++ Compiler. | |
5559 | 5580 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
5560 | 5581 | # no search path for DLLs. |
5561 | 5582 | case $cc_basename in |
5562 | cl*) | |
5563 | # Native MSVC | |
5583 | cl* | icl*) | |
5584 | # Native MSVC or ICC | |
5564 | 5585 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
5565 | 5586 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
5566 | 5587 | _LT_TAGVAR(always_export_symbols, $1)=yes |
5601 | 5622 | fi' |
5602 | 5623 | ;; |
5603 | 5624 | *) |
5604 | # Assume MSVC wrapper | |
5625 | # Assume MSVC and ICC wrapper | |
5605 | 5626 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
5606 | 5627 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
5607 | 5628 | # Tell ltmain to make .lib files, not .a files. |
5649 | 5670 | ;; |
5650 | 5671 | |
5651 | 5672 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
5652 | freebsd* | dragonfly*) | |
5673 | freebsd* | dragonfly* | midnightbsd*) | |
5653 | 5674 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
5654 | 5675 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
5655 | 5676 | _LT_TAGVAR(hardcode_direct, $1)=yes |
5860 | 5881 | emximp -o $lib $output_objdir/$libname.def' |
5861 | 5882 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
5862 | 5883 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
5884 | _LT_TAGVAR(file_list_spec, $1)='@' | |
5863 | 5885 | ;; |
5864 | 5886 | |
5865 | 5887 | osf3*) |
6630 | 6652 | |
6631 | 6653 | cygwin* | mingw* | pw32* | cegcc*) |
6632 | 6654 | case $GXX,$cc_basename in |
6633 | ,cl* | no,cl*) | |
6634 | # Native MSVC | |
6655 | ,cl* | no,cl* | ,icl* | no,icl*) | |
6656 | # Native MSVC or ICC | |
6635 | 6657 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
6636 | 6658 | # no search path for DLLs. |
6637 | 6659 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
6729 | 6751 | emximp -o $lib $output_objdir/$libname.def' |
6730 | 6752 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
6731 | 6753 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
6754 | _LT_TAGVAR(file_list_spec, $1)='@' | |
6732 | 6755 | ;; |
6733 | 6756 | |
6734 | 6757 | dgux*) |
6759 | 6782 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
6760 | 6783 | ;; |
6761 | 6784 | |
6762 | freebsd* | dragonfly*) | |
6785 | freebsd* | dragonfly* | midnightbsd*) | |
6763 | 6786 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF |
6764 | 6787 | # conventions |
6765 | 6788 | _LT_TAGVAR(ld_shlibs, $1)=yes |
6896 | 6919 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
6897 | 6920 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. |
6898 | 6921 | _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' | |
6900 | 6923 | ;; |
6901 | 6924 | irix5* | irix6*) |
6902 | 6925 | case $cc_basename in |
7036 | 7059 | _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
7037 | 7060 | if test yes = "$supports_anon_versioning"; then |
7038 | 7061 | _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~ | |
7040 | 7063 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
7041 | 7064 | $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' |
7042 | 7065 | fi |
7043 | 7066 | ;; |
7044 | 7067 | *) |
7045 | case `$CC -V 2>&1 | sed 5q` in | |
7068 | case `$CC -V 2>&1 | $SED 5q` in | |
7046 | 7069 | *Sun\ C*) |
7047 | 7070 | # Sun C++ 5.9 |
7048 | 7071 | _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' |
8187 | 8210 | _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) |
8188 | 8211 | AC_SUBST([DLLTOOL]) |
8189 | 8212 | ]) |
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 | |
8190 | 8221 | |
8191 | 8222 | # _LT_DECL_SED |
8192 | 8223 | # ------------ |
0 | 0 | # Helper functions for option handling. -*- Autoconf -*- |
1 | 1 | # |
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. | |
4 | 4 | # Written by Gary V. Vaughan, 2004 |
5 | 5 | # |
6 | 6 | # This file is free software; the Free Software Foundation gives |
0 | 0 | # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- |
1 | 1 | # |
2 | # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software | |
2 | # Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software | |
3 | 3 | # Foundation, Inc. |
4 | 4 | # Written by Gary V. Vaughan, 2004 |
5 | 5 | # |
0 | 0 | # ltversion.m4 -- version numbers -*- Autoconf -*- |
1 | 1 | # |
2 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. | |
2 | # Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, | |
3 | # Inc. | |
3 | 4 | # Written by Scott James Remnant, 2004 |
4 | 5 | # |
5 | 6 | # This file is free software; the Free Software Foundation gives |
8 | 9 | |
9 | 10 | # @configure_input@ |
10 | 11 | |
11 | # serial 4179 ltversion.m4 | |
12 | # serial 4245 ltversion.m4 | |
12 | 13 | # This file is part of GNU Libtool |
13 | 14 | |
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]) | |
16 | 17 | |
17 | 18 | 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' | |
20 | 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) |
21 | 22 | _LT_DECL(, macro_revision, 0) |
22 | 23 | ]) |
0 | 0 | # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- |
1 | 1 | # |
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. | |
4 | 4 | # Written by Scott James Remnant, 2004. |
5 | 5 | # |
6 | 6 | # This file is free software; the Free Software Foundation gives |
35 | 35 | by a colon (:) and then the value the property should be set to. |
36 | 36 | Variable substitution is always performed regardless of property type. |
37 | 37 | .Pp |
38 | There are two types of property: | |
38 | There are three types of property: | |
39 | 39 | .\" |
40 | 40 | .Bl -tag -width indent |
41 | 41 | .\" |
0 | 0 | project('pkgconf', 'c', |
1 | version : '1.8.0', | |
1 | version : '1.8.1', | |
2 | 2 | license : 'ISC', |
3 | 3 | meson_version : '>=0.47') |
4 | 4 | |
106 | 106 | install_man('man/pkgconf-personality.5') |
107 | 107 | install_data('pkg.m4', install_dir: 'share/aclocal') |
108 | 108 | 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') |
2 | 2 | |
3 | 3 | scriptversion=2018-03-07.03; # UTC |
4 | 4 | |
5 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1996-2021 Free Software Foundation, Inc. | |
6 | 6 | # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. |
7 | 7 | |
8 | 8 | # This program is free software; you can redistribute it and/or modify |
175 | 175 | export PKG_CONFIG_PATH="${selfdir}/lib1" |
176 | 176 | atf_check \ |
177 | 177 | -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 \ | |
178 | 192 | 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' | |
193 | 193 | } |
194 | 194 | |
195 | 195 | 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! |
18 | 18 | # yuck |
19 | 19 | foreach test : tests |
20 | 20 | configure_file(input: test + '.sh', output: test, copy: true) |
21 | run_command('chmod', '755', join_paths(meson.build_root(), 'tests', test)) | |
22 | 21 | endforeach |
27 | 27 | malformed_1 \ |
28 | 28 | malformed_quoting \ |
29 | 29 | explicit_sysroot \ |
30 | empty_tuple | |
30 | empty_tuple \ | |
31 | billion_laughs | |
31 | 32 | |
32 | 33 | # sysroot_munge \ |
33 | 34 | |
250 | 251 | atf_check -o inline:"\n" \ |
251 | 252 | pkgconf --with-path="${selfdir}/lib1" --cflags empty-tuple |
252 | 253 | } |
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 | } |