317
|
1 #!/usr/bin/sh
|
|
2 # Attempt to guess a canonical system name.
|
|
3 # Copyright 1992-2022 Free Software Foundation, Inc.
|
|
4
|
|
5 # shellcheck disable=SC2006,SC2268 # see below for rationale
|
|
6
|
|
7 timestamp='2022-05-25'
|
|
8
|
|
9 # This file is free software; you can redistribute it and/or modify it
|
|
10 # under the terms of the GNU General Public License as published by
|
|
11 # the Free Software Foundation, either version 3 of the License, or
|
|
12 # (at your option) any later version.
|
|
13 #
|
|
14 # This program is distributed in the hope that it will be useful, but
|
|
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
17 # General Public License for more details.
|
|
18 #
|
|
19 # You should have received a copy of the GNU General Public License
|
|
20 # along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
21 #
|
|
22 # As a special exception to the GNU General Public License, if you
|
|
23 # distribute this file as part of a program that contains a
|
|
24 # configuration script generated by Autoconf, you may include it under
|
|
25 # the same distribution terms that you use for the rest of that
|
|
26 # program. This Exception is an additional permission under section 7
|
|
27 # of the GNU General Public License, version 3 ("GPLv3").
|
|
28 #
|
|
29 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
|
|
30 #
|
|
31 # You can get the latest version of this script from:
|
|
32 # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
|
|
33 #
|
|
34 # Please send patches to <config-patches@gnu.org>.
|
|
35
|
|
36
|
|
37 # The "shellcheck disable" line above the timestamp inhibits complaints
|
|
38 # about features and limitations of the classic Bourne shell that were
|
|
39 # superseded or lifted in POSIX. However, this script identifies a wide
|
|
40 # variety of pre-POSIX systems that do not have POSIX shells at all, and
|
|
41 # even some reasonably current systems (Solaris 10 as case-in-point) still
|
|
42 # have a pre-POSIX /bin/sh.
|
|
43
|
|
44
|
|
45 me=`echo "$0" | sed -e 's,.*/,,'`
|
|
46
|
|
47 usage="\
|
|
48 Usage: $0 [OPTION]
|
|
49
|
|
50 Output the configuration name of the system \`$me' is run on.
|
|
51
|
|
52 Options:
|
|
53 -h, --help print this help, then exit
|
|
54 -t, --time-stamp print date of last modification, then exit
|
|
55 -v, --version print version number, then exit
|
|
56
|
|
57 Report bugs and patches to <config-patches@gnu.org>."
|
|
58
|
|
59 version="\
|
|
60 GNU config.guess ($timestamp)
|
|
61
|
|
62 Originally written by Per Bothner.
|
|
63 Copyright 1992-2022 Free Software Foundation, Inc.
|
|
64
|
|
65 This is free software; see the source for copying conditions. There is NO
|
|
66 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
|
67
|
|
68 help="
|
|
69 Try \`$me --help' for more information."
|
|
70
|
|
71 # Parse command line
|
|
72 while test $# -gt 0 ; do
|
|
73 case $1 in
|
|
74 --time-stamp | --time* | -t )
|
|
75 echo "$timestamp" ; exit ;;
|
|
76 --version | -v )
|
|
77 echo "$version" ; exit ;;
|
|
78 --help | --h* | -h )
|
|
79 echo "$usage"; exit ;;
|
|
80 -- ) # Stop option processing
|
|
81 shift; break ;;
|
|
82 - ) # Use stdin as input.
|
|
83 break ;;
|
|
84 -* )
|
|
85 echo "$me: invalid option $1$help" >&2
|
|
86 exit 1 ;;
|
|
87 * )
|
|
88 break ;;
|
|
89 esac
|
|
90 done
|
|
91
|
|
92 if test $# != 0; then
|
John "Elwin" Edwards
parents:
|