annotate build-aux/config.sub @ 317:aab761616489 default tip

Rearrange some Autoconf files. Autoconf was failing to detect install-sh at the top level and needed some explicit directions. It also wants config.guess and config.sub to be provided too. A few other macros have also been updated.
author John "Elwin" Edwards
date Tue, 05 Sep 2023 20:05:24 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
317
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
1 #!/usr/bin/sh
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
2 # Configuration validation subroutine script.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
3 # Copyright 1992-2022 Free Software Foundation, Inc.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
4
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
5 # shellcheck disable=SC2006,SC2268 # see below for rationale
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
6
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
7 timestamp='2022-01-03'
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
8
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
9 # This file is free software; you can redistribute it and/or modify it
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
10 # under the terms of the GNU General Public License as published by
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
11 # the Free Software Foundation, either version 3 of the License, or
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
12 # (at your option) any later version.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
13 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
14 # This program is distributed in the hope that it will be useful, but
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
17 # General Public License for more details.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
18 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
19 # You should have received a copy of the GNU General Public License
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
20 # along with this program; if not, see <https://www.gnu.org/licenses/>.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
21 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
22 # As a special exception to the GNU General Public License, if you
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
23 # distribute this file as part of a program that contains a
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
24 # configuration script generated by Autoconf, you may include it under
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
25 # the same distribution terms that you use for the rest of that
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
26 # program. This Exception is an additional permission under section 7
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
27 # of the GNU General Public License, version 3 ("GPLv3").
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
28
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
29
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
30 # Please send patches to <config-patches@gnu.org>.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
31 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
32 # Configuration subroutine to validate and canonicalize a configuration type.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
33 # Supply the specified configuration type as an argument.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
34 # If it is invalid, we print an error message on stderr and exit with code 1.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
35 # Otherwise, we print the canonical config type on stdout and succeed.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
36
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
37 # You can get the latest version of this script from:
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
38 # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
39
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
40 # This file is supposed to be the same for all GNU packages
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
41 # and recognize all the CPU types, system types and aliases
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
42 # that are meaningful with *any* GNU software.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
43 # Each package is responsible for reporting which valid configurations
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
44 # it does not support. The user should be able to distinguish
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
45 # a failure to support a valid configuration from a meaningless
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
46 # configuration.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
47
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
48 # The goal of this file is to map all the various variations of a given
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
49 # machine specification into a single specification in the form:
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
50 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
51 # or in some cases, the newer four-part form:
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
52 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
53 # It is wrong to echo any other type of specification.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
54
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
55 # The "shellcheck disable" line above the timestamp inhibits complaints
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
56 # about features and limitations of the classic Bourne shell that were
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
57 # superseded or lifted in POSIX. However, this script identifies a wide
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
58 # variety of pre-POSIX systems that do not have POSIX shells at all, and
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
59 # even some reasonably current systems (Solaris 10 as case-in-point) still
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
60 # have a pre-POSIX /bin/sh.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
61
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
62 me=`echo "$0" | sed -e 's,.*/,,'`
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
63
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
64 usage="\
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
65 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
66
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
67 Canonicalize a configuration name.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
68
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
69 Options:
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
70 -h, --help print this help, then exit
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
71 -t, --time-stamp print date of last modification, then exit
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
72 -v, --version print version number, then exit
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
73
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
74 Report bugs and patches to <config-patches@gnu.org>."
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
75
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
76 version="\
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
77 GNU config.sub ($timestamp)
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
78
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
79 Copyright 1992-2022 Free Software Foundation, Inc.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
80
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
81 This is free software; see the source for copying conditions. There is NO
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
82 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
83
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
84 help="
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
85 Try \`$me --help' for more information."
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
86
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
87 # Parse command line
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
88 while test $# -gt 0 ; do
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
89 case $1 in
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
90 --time-stamp | --time* | -t )
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
91 echo "$timestamp" ; exit ;;
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
92 --version | -v )
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents: