Mercurial > hg > early-roguelike
comparison 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 |
comparison
equal
deleted
inserted
replaced
316:c03d0b87211c | 317:aab761616489 |
---|---|
1 #!/usr/bin/sh | |
2 # Configuration validation subroutine script. | |
3 # Copyright 1992-2022 Free Software Foundation, Inc. | |
4 | |
5 # shellcheck disable=SC2006,SC2268 # see below for rationale | |
6 | |
7 timestamp='2022-01-03' | |
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 | |
30 # Please send patches to <config-patches@gnu.org>. | |
31 # | |
32 # Configuration subroutine to validate and canonicalize a configuration type. | |
33 # Supply the specified configuration type as an argument. | |
34 # If it is invalid, we print an error message on stderr and exit with code 1. | |
35 # Otherwise, we print the canonical config type on stdout and succeed. | |
36 | |
37 # You can get the latest version of this script from: | |
38 # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub | |
39 | |
40 # This file is supposed to be the same for all GNU packages | |
41 # and recognize all the CPU types, system types and aliases | |
42 # that are meaningful with *any* GNU software. | |
43 # Each package is responsible for reporting which valid configurations | |
44 # it does not support. The user should be able to distinguish | |
45 # a failure to support a valid configuration from a meaningless | |
46 # configuration. | |
47 | |
48 # The goal of this file is to map all the various variations of a given | |
49 # machine specification into a single specification in the form: | |
50 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | |
51 # or in some cases, the newer four-part form: | |
52 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM | |
53 # It is wrong to echo any other type of specification. | |
54 | |
55 # The "shellcheck disable" line above the timestamp inhibits complaints | |
56 # about features and limitations of the classic Bourne shell that were | |
57 # superseded or lifted in POSIX. However, this script identifies a wide | |
58 # variety of pre-POSIX systems that do not have POSIX shells at all, and | |
59 # even some reasonably current systems (Solaris 10 as case-in-point) still | |
60 # have a pre-POSIX /bin/sh. | |
61 | |
62 me=`echo "$0" | sed -e 's,.*/,,'` | |
63 | |
64 usage="\ | |
65 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS | |
66 | |
67 Canonicalize a configuration name. | |
68 | |
69 Options: | |
70 -h, --help print this help, then exit | |
71 -t, --time-stamp print date of last modification, then exit | |
72 -v, --version print version number, then exit | |
73 | |
74 Report bugs and patches to <config-patches@gnu.org>." | |
75 | |
76 version="\ | |
77 GNU config.sub ($timestamp) | |
78 | |
79 Copyright 1992-2022 Free Software Foundation, Inc. | |
80 | |
81 This is free software; see the source for copying conditions. There is NO | |
82 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
83 | |
84 help=" | |
85 Try \`$me --help' for more information." | |
86 | |
87 # Parse command line | |
88 while test $# -gt 0 ; do | |
89 case $1 in | |
90 --time-stamp | --time* | -t ) | |
91 echo "$timestamp" ; exit ;; | |
92 --version | -v ) | |
93 echo "$version" ; exit ;; | |
94 --help | --h* | -h ) | |
95 echo "$usage"; exit ;; | |
96 -- ) # Stop option processing | |
97 shift; break ;; | |
98 - ) # Use stdin as input. | |
99 break ;; | |
100 -* ) | |
101 echo "$me: invalid option $1$help" >&2 | |
102 exit 1 ;; | |
103 | |
104 *local*) | |
105 # First pass through any local machine types. | |
106 echo "$1" | |
107 exit ;; | |
108 | |
109 * ) | |
110 break ;; | |
111 esac | |
112 done | |
113 | |
114 case $# in | |
115 0) echo "$me: missing argument$help" >&2 | |
116 exit 1;; | |
117 1) ;; | |
118 *) echo "$me: too many arguments$help" >&2 | |
119 exit 1;; | |
120 esac | |
121 | |
122 # Split fields of configuration type | |
123 # shellcheck disable=SC2162 | |
124 saved_IFS=$IFS | |
125 IFS="-" read field1 field2 field3 field4 <<EOF | |
126 $1 | |
127 EOF | |
128 IFS=$saved_IFS | |
129 | |
130 # Separate into logical components for further validation | |
131 case $1 in | |
132 *-*-*-*-*) | |
133 echo Invalid configuration \`"$1"\': more than four components >&2 | |
134 exit 1 | |
135 ;; | |
136 *-*-*-*) | |
137 basic_machine=$field1-$field2 | |
138 basic_os=$field3-$field4 | |
139 ;; | |
140 *-*-*) | |
141 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two | |
142 # parts | |
143 maybe_os=$field2-$field3 | |
144 case $maybe_os in | |
145 nto-qnx* | linux-* | uclinux-uclibc* \ | |
146 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | |
147 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | |
148 | storm-chaos* | os2-emx* | rtmk-nova*) | |
149 basic_machine=$field1 | |
150 basic_os=$maybe_os | |
151 ;; | |
152 android-linux) | |
153 basic_machine=$field1-unknown | |
154 basic_os=linux-android | |
155 ;; | |
156 *) | |
157 basic_machine=$field1-$field2 | |
158 basic_os=$field3 | |
159 ;; | |
160 esac | |
161 ;; | |
162 *-*) | |
163 # A lone config we happen to match not fitting any pattern | |
164 case $field1-$field2 in | |
165 decstation-3100) | |
166 basic_machine=mips-dec | |
167 basic_os= | |
168 ;; | |
169 *-*) | |
170 # Second component is usually, but not always the OS | |
171 case $field2 in | |
172 # Prevent following clause from handling this valid os | |
173 sun*os*) | |
174 basic_machine=$field1 | |
175 basic_os=$field2 | |
176 ;; | |
177 zephyr*) | |
178 basic_machine=$field1-unknown | |
179 basic_os=$field2 | |
180 ;; | |
181 # Manufacturers | |
182 dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | |
183 | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | |
184 | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | |
185 | convergent* | ncr* | news | 32* | 3600* | 3100* \ | |
186 | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | |
187 | ultra | tti* | harris | dolphin | highlevel | gould \ | |
188 | cbm | ns | masscomp | apple | axis | knuth | cray \ | |
189 | microblaze* | sim | cisco \ | |
190 | oki | wec | wrs | winbond) | |
191 basic_machine=$field1-$field2 | |
192 basic_os= | |
193 ;; | |
194 *) | |
195 basic_machine=$field1 | |
196 basic_os=$field2 | |
197 ;; | |
198 esac | |
199 ;; | |
200 esac | |
201 ;; | |
202 *) | |
203 # Convert single-component short-hands not valid as part of | |
204 # multi-component configurations. | |
205 case $field1 in | |
206 386bsd) | |
207 basic_machine=i386-pc | |
208 basic_os=bsd | |
209 ;; | |
210 a29khif) | |
211 basic_machine=a29k-amd | |
212 basic_os=udi | |
213 ;; | |
214 adobe68k) | |
215 basic_machine=m68010-adobe | |
216 basic_os=scout | |
217 ;; | |
218 alliant) | |
219 basic_machine=fx80-alliant | |
220 basic_os= | |
221 ;; | |
222 altos | altos3068) | |
223 basic_machine=m68k-altos | |
224 basic_os= | |
225 ;; | |
226 am29k) | |
227 basic_machine=a29k-none | |
228 basic_os=bsd | |
229 ;; | |
230 amdahl) | |
231 basic_machine=580-amdahl | |
232 basic_os=sysv | |
233 ;; | |
234 amiga) | |
235 basic_machine=m68k-unknown | |
236 basic_os= | |
237 ;; | |
238 amigaos | amigados) | |
239 basic_machine=m68k-unknown | |
240 basic_os=amigaos | |
241 ;; | |
242 amigaunix | amix) | |
243 basic_machine=m68k-unknown | |
244 basic_os=sysv4 | |
245 ;; | |
246 apollo68) | |
247 basic_machine=m68k-apollo | |
248 basic_os=sysv | |
249 ;; | |
250 apollo68bsd) | |
251 basic_machine=m68k-apollo | |
252 basic_os=bsd | |
253 ;; | |
254 aros) | |
255 basic_machine=i386-pc | |
256 basic_os=aros | |
257 ;; | |
258 aux) | |
259 basic_machine=m68k-apple | |
260 basic_os=aux | |
261 ;; | |
262 balance) | |
263 basic_machine=ns32k-sequent | |
264 basic_os=dynix | |
265 ;; | |
266 blackfin) | |
267 basic_machine=bfin-unknown | |
268 basic_os=linux | |
269 ;; | |
270 cegcc) | |
271 basic_machine=arm-unknown | |
272 basic_os=cegcc | |
273 ;; | |
274 convex-c1) | |
275 basic_machine=c1-convex | |
276 basic_os=bsd | |
277 ;; | |
278 convex-c2) | |
279 basic_machine=c2-convex | |
280 basic_os=bsd | |
281 ;; | |
282 convex-c32) | |
283 basic_machine=c32-convex | |
284 basic_os=bsd | |
285 ;; | |
286 convex-c34) | |
287 basic_machine=c34-convex | |
288 basic_os=bsd | |
289 ;; | |
290 convex-c38) | |
291 basic_machine=c38-convex | |
292 basic_os=bsd | |
293 ;; | |
294 cray) | |
295 basic_machine=j90-cray | |
296 basic_os=unicos | |
297 ;; | |
298 crds | unos) | |
299 basic_machine=m68k-crds | |
300 basic_os= | |
301 ;; | |
302 da30) | |
303 basic_machine=m68k-da30 | |
304 basic_os= | |
305 ;; | |
306 decstation | pmax | pmin | dec3100 | decstatn) | |
307 basic_machine=mips-dec | |
308 basic_os= | |
309 ;; | |
310 delta88) | |
311 basic_machine=m88k-motorola | |
312 basic_os=sysv3 | |
313 ;; | |
314 dicos) | |
315 basic_machine=i686-pc | |
316 basic_os=dicos | |
317 ;; | |
318 djgpp) | |
319 basic_machine=i586-pc | |
320 basic_os=msdosdjgpp | |
321 ;; | |
322 ebmon29k) | |
323 basic_machine=a29k-amd | |
324 basic_os=ebmon | |
325 ;; | |
326 es1800 | OSE68k | ose68k | ose | OSE) | |
327 basic_machine=m68k-ericsson | |
328 basic_os=ose | |
329 ;; | |
330 gmicro) | |
331 basic_machine=tron-gmicro | |
332 basic_os=sysv | |
333 ;; | |
334 go32) | |
335 basic_machine=i386-pc | |
336 basic_os=go32 | |
337 ;; | |
338 h8300hms) | |
339 basic_machine=h8300-hitachi | |
340 basic_os=hms | |
341 ;; | |
342 h8300xray) | |
343 basic_machine=h8300-hitachi | |
344 basic_os=xray | |
345 ;; | |
346 h8500hms) | |
347 basic_machine=h8500-hitachi | |
348 basic_os=hms | |
349 ;; | |
350 harris) | |
351 basic_machine=m88k-harris | |
352 basic_os=sysv3 | |
353 ;; | |
354 hp300 | hp300hpux) | |
355 basic_machine=m68k-hp | |
356 basic_os=hpux | |
357 ;; | |
358 hp300bsd) | |
359 basic_machine=m68k-hp | |
360 basic_os=bsd | |
361 ;; | |
362 hppaosf) | |
363 basic_machine=hppa1.1-hp | |
364 basic_os=osf | |
365 ;; | |
366 hppro) | |
367 basic_machine=hppa1.1-hp | |
368 basic_os=proelf | |
369 ;; | |
370 i386mach) | |
371 basic_machine=i386-mach | |
372 basic_os=mach | |
373 ;; | |
374 isi68 | isi) | |
375 basic_machine=m68k-isi | |
376 basic_os=sysv | |
377 ;; | |
378 m68knommu) | |