You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1626 lines
32 KiB

25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
  1. #! /bin/sh
  2. # Configuration validation subroutine script.
  3. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
  4. # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
  5. # Inc.
  6. timestamp='2007-04-29'
  7. # This file is (in principle) common to ALL GNU software.
  8. # The presence of a machine in this file suggests that SOME GNU software
  9. # can handle that machine. It does not imply ALL GNU software can.
  10. #
  11. # This file is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version.
  15. #
  16. # This program is distributed in the hope that it will be useful,
  17. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. # GNU General Public License for more details.
  20. #
  21. # You should have received a copy of the GNU General Public License
  22. # along with this program; if not, write to the Free Software
  23. # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  24. # 02110-1301, USA.
  25. #
  26. # As a special exception to the GNU General Public License, if you
  27. # distribute this file as part of a program that contains a
  28. # configuration script generated by Autoconf, you may include it under
  29. # the same distribution terms that you use for the rest of that program.
  30. # Please send patches to <config-patches@gnu.org>. Submit a context
  31. # diff and a properly formatted ChangeLog entry.
  32. #
  33. # Configuration subroutine to validate and canonicalize a configuration type.
  34. # Supply the specified configuration type as an argument.
  35. # If it is invalid, we print an error message on stderr and exit with code 1.
  36. # Otherwise, we print the canonical config type on stdout and succeed.
  37. # This file is supposed to be the same for all GNU packages
  38. # and recognize all the CPU types, system types and aliases
  39. # that are meaningful with *any* GNU software.
  40. # Each package is responsible for reporting which valid configurations
  41. # it does not support. The user should be able to distinguish
  42. # a failure to support a valid configuration from a meaningless
  43. # configuration.
  44. # The goal of this file is to map all the various variations of a given
  45. # machine specification into a single specification in the form:
  46. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  47. # or in some cases, the newer four-part form:
  48. # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  49. # It is wrong to echo any other type of specification.
  50. me=`echo "$0" | sed -e 's,.*/,,'`
  51. usage="\
  52. Usage: $0 [OPTION] CPU-MFR-OPSYS
  53. $0 [OPTION] ALIAS
  54. Canonicalize a configuration name.
  55. Operation modes:
  56. -h, --help print this help, then exit
  57. -t, --time-stamp print date of last modification, then exit
  58. -v, --version print version number, then exit
  59. Report bugs and patches to <config-patches@gnu.org>."
  60. version="\
  61. GNU config.sub ($timestamp)
  62. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  63. Free Software Foundation, Inc.
  64. This is free software; see the source for copying conditions. There is NO
  65. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  66. help="
  67. Try \`$me --help' for more information."
  68. # Parse command line
  69. while test $# -gt 0 ; do
  70. case $1 in
  71. --time-stamp | --time* | -t )
  72. echo "$timestamp" ; exit ;;
  73. --version | -v )
  74. echo "$version" ; exit ;;
  75. --help | --h* | -h )
  76. echo "$usage"; exit ;;
  77. -- ) # Stop option processing
  78. shift; break ;;
  79. - ) # Use stdin as input.
  80. break ;;
  81. -* )
  82. echo "$me: invalid option $1$help"
  83. exit 1 ;;
  84. *local*)
  85. # First pass through any local machine types.
  86. echo $1
  87. exit ;;
  88. * )
  89. break ;;
  90. esac
  91. done
  92. case $# in
  93. 0) echo "$me: missing argument$help" >&2
  94. exit 1;;
  95. 1) ;;
  96. *) echo "$me: too many arguments$help" >&2
  97. exit 1;;
  98. esac
  99. # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
  100. # Here we must recognize all the valid KERNEL-OS combinations.
  101. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  102. case $maybe_os in
  103. nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
  104. uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
  105. storm-chaos* | os2-emx* | rtmk-nova*)
  106. os=-$maybe_os
  107. basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
  108. ;;
  109. *)
  110. basic_machine=`echo $1 | sed 's/-[^-]*$//'`
  111. if [ $basic_machine != $1 ]
  112. then os=`echo $1 | sed 's/.*-/-/'`
  113. else os=; fi
  114. ;;
  115. esac
  116. ### Let's recognize common machines as not being operating systems so
  117. ### that things like config.sub decstation-3100 work. We also
  118. ### recognize some manufacturers as not being operating systems, so we
  119. ### can provide default operating systems below.
  120. case $os in
  121. -sun*os*)
  122. # Prevent following clause from handling this invalid input.
  123. ;;
  124. -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
  125. -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
  126. -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
  127. -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  128. -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  129. -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  130. -apple | -axis | -knuth | -cray)
  131. os=
  132. basic_machine=$1
  133. ;;
  134. -sim | -cisco | -oki | -wec | -winbond)
  135. os=
  136. basic_machine=$1
  137. ;;
  138. -scout)
  139. ;;
  140. -wrs)
  141. os=-vxworks
  142. basic_machine=$1
  143. ;;
  144. -chorusos*)
  145. os=-chorusos
  146. basic_machine=$1
  147. ;;
  148. -chorusrdb)
  149. os=-chorusrdb
  150. basic_machine=$1
  151. ;;
  152. -hiux*)
  153. os=-hiuxwe2
  154. ;;
  155. -sco6)
  156. os=-sco5v6
  157. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  158. ;;
  159. -sco5)
  160. os=-sco3.2v5
  161. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  162. ;;
  163. -sco4)
  164. os=-sco3.2v4
  165. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  166. ;;
  167. -sco3.2.[4-9]*)
  168. os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  169. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  170. ;;
  171. -sco3.2v[4-9]*)
  172. # Don't forget version if it is 3.2v4 or newer.
  173. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  174. ;;
  175. -sco5v6*)
  176. # Don't forget version if it is 3.2v4 or newer.
  177. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  178. ;;
  179. -sco*)
  180. os=-sco3.2v2
  181. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  182. ;;
  183. -udk*)
  184. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  185. ;;
  186. -isc)
  187. os=-isc2.2
  188. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  189. ;;
  190. -clix*)
  191. basic_machine=clipper-intergraph
  192. ;;
  193. -isc*)
  194. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  195. ;;
  196. -lynx*)
  197. os=-lynxos
  198. ;;
  199. -ptx*)
  200. basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
  201. ;;
  202. -windowsnt*)
  203. os=`echo $os | sed -e 's/windowsnt/winnt/'`
  204. ;;
  205. -psos*)
  206. os=-psos
  207. ;;
  208. -mint | -mint[0-9]*)
  209. basic_machine=m68k-atari
  210. os=-mint
  211. ;;
  212. esac
  213. # Decode aliases for certain CPU-COMPANY combinations.
  214. case $basic_machine in
  215. # Recognize the basic CPU types without company name.
  216. # Some are omitted here because they have special meanings below.
  217. 1750a | 580 \
  218. | a29k \
  219. | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
  220. | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
  221. | am33_2.0 \
  222. | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
  223. | bfin \
  224. | c4x | clipper \
  225. | d10v | d30v | dlx | dsp16xx \
  226. | fido | fr30 | frv \
  227. | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
  228. | i370 | i860 | i960 | ia64 \
  229. | ip2k | iq2000 \
  230. | m32c | m32r | m32rle | m68000 | m68k | m88k \
  231. | maxq | mb | microblaze | mcore | mep \
  232. | mips | mipsbe | mipseb | mipsel | mipsle \
  233. | mips16 \
  234. | mips64 | mips64el \
  235. | mips64vr | mips64vrel \
  236. | mips64orion | mips64orionel \
  237. | mips64vr4100 | mips64vr4100el \
  238. | mips64vr4300 | mips64vr4300el \
  239. | mips64vr5000 | mips64vr5000el \
  240. | mips64vr5900 | mips64vr5900el \
  241. | mipsisa32 | mipsisa32el \
  242. | mipsisa32r2 | mipsisa32r2el \
  243. | mipsisa64 | mipsisa64el \
  244. | mipsisa64r2 | mipsisa64r2el \
  245. | mipsisa64sb1 | mipsisa64sb1el \
  246. | mipsisa64sr71k | mipsisa64sr71kel \
  247. | mipstx39 | mipstx39el \
  248. | mn10200 | mn10300 \
  249. | mt \
  250. | msp430 \
  251. | nios | nios2 \
  252. | ns16k | ns32k \
  253. | or32 \
  254. | pdp10 | pdp11 | pj | pjl \
  255. | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
  256. | pyramid \
  257. | score \
  258. | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
  259. | sh64 | sh64le \
  260. | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
  261. | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
  262. | spu | strongarm \
  263. | tahoe | thumb | tic4x | tic80 | tron \
  264. | v850 | v850e \
  265. | we32k \
  266. | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
  267. | z8k)
  268. basic_machine=$basic_machine-unknown
  269. ;;
  270. m6811 | m68hc11 | m6812 | m68hc12)
  271. # Motorola 68HC11/12.
  272. basic_machine=$basic_machine-unknown
  273. os=-none
  274. ;;
  275. m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
  276. ;;
  277. ms1)
  278. basic_machine=mt-unknown
  279. ;;
  280. # We use `pc' rather than `unknown'
  281. # because (1) that's what they normally are, and
  282. # (2) the word "unknown" tends to confuse beginning users.
  283. i*86 | x86_64)
  284. basic_machine=$basic_machine-pc
  285. ;;
  286. # Object if more than one company name word.
  287. *-*-*)
  288. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  289. exit 1
  290. ;;
  291. # Recognize the basic CPU types with company name.
  292. 580-* \
  293. | a29k-* \
  294. | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
  295. | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
  296. | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
  297. | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
  298. | avr-* | avr32-* \
  299. | bfin-* | bs2000-* \
  300. | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
  301. | clipper-* | craynv-* | cydra-* \
  302. | d10v-* | d30v-* | dlx-* \
  303. | elxsi-* \
  304. | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
  305. | h8300-* | h8500-* \
  306. | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
  307. | i*86-* | i860-* | i960-* | ia64-* \
  308. | ip2k-* | iq2000-* \
  309. | m32c-* | m32r-* | m32rle-* \
  310. | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
  311. | m88110-* | m88k-* | maxq-* | mcore-* \
  312. | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
  313. | mips16-* \
  314. | mips64-* | mips64el-* \
  315. | mips64vr-* | mips64vrel-* \
  316. | mips64orion-* | mips64orionel-* \
  317. | mips64vr4100-* | mips64vr4100el-* \
  318. | mips64vr4300-* | mips64vr4300el-* \
  319. | mips64vr5000-* | mips64vr5000el-* \
  320. | mips64vr5900-* | mips64vr5900el-* \
  321. | mipsisa32-* | mipsisa32el-* \
  322. | mipsisa32r2-* | mipsisa32r2el-* \
  323. | mipsisa64-* | mipsisa64el-* \
  324. | mipsisa64r2-* | mipsisa64r2el-* \
  325. | mipsisa64sb1-* | mipsisa64sb1el-* \
  326. | mipsisa64sr71k-* | mipsisa64sr71kel-* \
  327. | mipstx39-* | mipstx39el-* \
  328. | mmix-* \
  329. | mt-* \
  330. | msp430-* \
  331. | nios-* | nios2-* \
  332. | none-* | np1-* | ns16k-* | ns32k-* \
  333. | orion-* \
  334. | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
  335. | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
  336. | pyramid-* \
  337. | romp-* | rs6000-* \
  338. | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
  339. | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
  340. | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
  341. | sparclite-* \
  342. | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
  343. | tahoe-* | thumb-* \
  344. | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
  345. | tron-* \
  346. | v850-* | v850e-* | vax-* \
  347. | we32k-* \
  348. | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
  349. | xstormy16-* | xtensa-* \
  350. | ymp-* \
  351. | z8k-*)
  352. ;;
  353. # Recognize the various machine names and aliases which stand
  354. # for a CPU type and a company and sometimes even an OS.
  355. 386bsd)
  356. basic_machine=i386-unknown
  357. os=-bsd
  358. ;;
  359. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  360. basic_machine=m68000-att
  361. ;;
  362. 3b*)
  363. basic_machine=we32k-att
  364. ;;
  365. a29khif)
  366. basic_machine=a29k-amd
  367. os=-udi
  368. ;;
  369. abacus)
  370. basic_machine=abacus-unknown
  371. ;;
  372. adobe68k)
  373. basic_machine=m68010-adobe
  374. os=-scout
  375. ;;
  376. alliant | fx80)
  377. basic_machine=fx80-alliant
  378. ;;
  379. altos | altos3068)
  380. basic_machine=m68k-altos
  381. ;;
  382. am29k)
  383. basic_machine=a29k-none
  384. os=-bsd
  385. ;;
  386. amd64)
  387. basic_machine=x86_64-pc
  388. ;;
  389. amd64-*)
  390. basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
  391. ;;
  392. amdahl)
  393. basic_machine=580-amdahl
  394. os=-sysv
  395. ;;
  396. amiga | amiga-*)
  397. basic_machine=m68k-unknown
  398. ;;
  399. amigaos | amigados)
  400. basic_machine=m68k-unknown
  401. os=-amigaos
  402. ;;
  403. amigaunix | amix)
  404. basic_machine=m68k-unknown
  405. os=-sysv4
  406. ;;
  407. apollo68)
  408. basic_machine=m68k-apollo
  409. os=-sysv
  410. ;;
  411. apollo68bsd)
  412. basic_machine=m68k-apollo
  413. os=-bsd
  414. ;;
  415. aux)
  416. basic_machine=m68k-apple
  417. os=-aux
  418. ;;
  419. balance)
  420. basic_machine=ns32k-sequent
  421. os=-dynix
  422. ;;
  423. c90)
  424. basic_machine=c90-cray
  425. os=-unicos
  426. ;;
  427. convex-c1)
  428. basic_machine=c1-convex
  429. os=-bsd
  430. ;;
  431. convex-c2)
  432. basic_machine=c2-convex
  433. os=-bsd
  434. ;;
  435. convex-c32)
  436. basic_machine=c32-convex
  437. os=-bsd
  438. ;;
  439. convex-c34)
  440. basic_machine=c34-convex
  441. os=-bsd
  442. ;;
  443. convex-c38)
  444. basic_machine=c38-convex
  445. os=-bsd
  446. ;;
  447. cray | j90)
  448. basic_machine=j90-cray
  449. os=-unicos
  450. ;;
  451. craynv)
  452. basic_machine=craynv-cray
  453. os=-unicosmp
  454. ;;
  455. cr16c)
  456. basic_machine=cr16c-unknown
  457. os=-elf
  458. ;;
  459. crds | unos)
  460. basic_machine=m68k-crds
  461. ;;
  462. crisv32 | crisv32-* | etraxfs*)
  463. basic_machine=crisv32-axis
  464. ;;
  465. cris | cris-* | etrax*)
  466. basic_machine=cris-axis
  467. ;;
  468. crx)
  469. basic_machine=crx-unknown
  470. os=-elf
  471. ;;
  472. da30 | da30-*)
  473. basic_machine=m68k-da30
  474. ;;
  475. decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  476. basic_machine=mips-dec
  477. ;;
  478. decsystem10* | dec10*)
  479. basic_machine=pdp10-dec
  480. os=-tops10
  481. ;;
  482. decsystem20* | dec20*)
  483. basic_machine=pdp10-dec
  484. os=-tops20
  485. ;;
  486. delta | 3300 | motorola-3300 | motorola-delta \
  487. | 3300-motorola | delta-motorola)
  488. basic_machine=m68k-motorola
  489. ;;
  490. delta88)
  491. basic_machine=m88k-motorola
  492. os=-sysv3
  493. ;;
  494. djgpp)
  495. basic_machine=i586-pc
  496. os=-msdosdjgpp
  497. ;;
  498. dpx20 | dpx20-*)
  499. basic_machine=rs6000-bull
  500. os=-bosx
  501. ;;
  502. dpx2* | dpx2*-bull)
  503. basic_machine=m68k-bull
  504. os=-sysv3
  505. ;;
  506. ebmon29k)
  507. basic_machine=a29k-amd
  508. os=-ebmon
  509. ;;
  510. elxsi)
  511. basic_machine=elxsi-elxsi
  512. os=-bsd
  513. ;;
  514. encore | umax | mmax)
  515. basic_machine=ns32k-encore
  516. ;;
  517. es1800 | OSE68k | ose68k | ose | OSE)
  518. basic_machine=m68k-ericsson
  519. os=-ose
  520. ;;
  521. fx2800)
  522. basic_machine=i860-alliant
  523. ;;
  524. genix)
  525. basic_machine=ns32k-ns
  526. ;;
  527. gmicro)
  528. basic_machine=tron-gmicro
  529. os=-sysv
  530. ;;
  531. go32)
  532. basic_machine=i386-pc
  533. os=-go32
  534. ;;
  535. h3050r* | hiux*)
  536. basic_machine=hppa1.1-hitachi
  537. os=-hiuxwe2
  538. ;;
  539. h8300hms)
  540. basic_machine=h8300-hitachi
  541. os=-hms
  542. ;;
  543. h8300xray)
  544. basic_machine=h8300-hitachi
  545. os=-xray
  546. ;;
  547. h8500hms)
  548. basic_machine=h8500-hitachi
  549. os=-hms
  550. ;;
  551. harris)
  552. basic_machine=m88k-harris
  553. os=-sysv3
  554. ;;
  555. hp300-*)
  556. basic_machine=m68k-hp
  557. ;;
  558. hp300bsd)
  559. basic_machine=m68k-hp
  560. os=-bsd
  561. ;;
  562. hp300hpux)
  563. basic_machine=m68k-hp
  564. os=-hpux
  565. ;;
  566. hp3k9[0-9][0-9] | hp9[0-9][0-9])
  567. basic_machine=hppa1.0-hp
  568. ;;
  569. hp9k2[0-9][0-9] | hp9k31[0-9])
  570. basic_machine=m68000-hp
  571. ;;
  572. hp9k3[2-9][0-9])
  573. basic_machine=m68k-hp
  574. ;;
  575. hp9k6[0-9][0-9] | hp6[0-9][0-9])
  576. basic_machine=hppa1.0-hp
  577. ;;
  578. hp9k7[0-79][0-9] | hp7[0-79][0-9])
  579. basic_machine=hppa1.1-hp
  580. ;;
  581. hp9k78[0-9] | hp78[0-9])
  582. # FIXME: really hppa2.0-hp
  583. basic_machine=hppa1.1-hp
  584. ;;
  585. hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
  586. # FIXME: really hppa2.0-hp
  587. basic_machine=hppa1.1-hp
  588. ;;
  589. hp9k8[0-9][13679] | hp8[0-9][13679])
  590. basic_machine=hppa1.1-hp
  591. ;;
  592. hp9k8[0-9][0-9] | hp8[0-9][0-9])
  593. basic_machine=hppa1.0-hp
  594. ;;
  595. hppa-next)
  596. os=-nextstep3
  597. ;;
  598. hppaosf)
  599. basic_machine=hppa1.1-hp
  600. os=-osf
  601. ;;
  602. hppro)
  603. basic_machine=hppa1.1-hp
  604. os=-proelf
  605. ;;
  606. i370-ibm* | ibm*)
  607. basic_machine=i370-ibm
  608. ;;
  609. # I'm not sure what "Sysv32" means. Should this be sysv3.2?
  610. i*86v32)
  611. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  612. os=-sysv32
  613. ;;
  614. i*86v4*)
  615. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  616. os=-sysv4
  617. ;;
  618. i*86v)
  619. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  620. os=-sysv
  621. ;;
  622. i*86sol2)
  623. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  624. os=-solaris2
  625. ;;
  626. i386mach)
  627. basic_machine=i386-mach
  628. os=-mach
  629. ;;
  630. i386-vsta | vsta)
  631. basic_machine=i386-unknown
  632. os=-vsta
  633. ;;
  634. iris | iris4d)
  635. basic_machine=mips-sgi
  636. case $os in
  637. -irix*)
  638. ;;
  639. *)
  640. os=-irix4
  641. ;;
  642. esac
  643. ;;
  644. isi68 | isi)
  645. basic_machine=m68k-isi
  646. os=-sysv
  647. ;;
  648. m88k-omron*)
  649. basic_machine=m88k-omron
  650. ;;
  651. magnum | m3230)
  652. basic_machine=mips-mips
  653. os=-sysv
  654. ;;
  655. merlin)
  656. basic_machine=ns32k-utek
  657. os=-sysv
  658. ;;
  659. mingw32)
  660. basic_machine=i386-pc
  661. os=-mingw32
  662. ;;
  663. mingw32ce)
  664. basic_machine=arm-unknown
  665. os=-mingw32ce
  666. ;;
  667. miniframe)
  668. basic_machine=m68000-convergent
  669. ;;
  670. *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
  671. basic_machine=m68k-atari
  672. os=-mint
  673. ;;
  674. mips3*-*)
  675. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  676. ;;
  677. mips3*)
  678. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  679. ;;
  680. monitor)
  681. basic_machine=m68k-rom68k
  682. os=-coff
  683. ;;
  684. morphos)
  685. basic_machine=powerpc-unknown
  686. os=-morphos
  687. ;;
  688. msdos)
  689. basic_machine=i386-pc
  690. os=-msdos
  691. ;;
  692. ms1-*)
  693. basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
  694. ;;
  695. mvs)
  696. basic_machine=i370-ibm
  697. os=-mvs
  698. ;;
  699. ncr3000)
  700. basic_machine=i486-ncr
  701. os=-sysv4
  702. ;;
  703. netbsd386)
  704. basic_machine=i386-unknown
  705. os=-netbsd
  706. ;;
  707. netwinder)
  708. basic_machine=armv4l-rebel
  709. os=-linux
  710. ;;
  711. news | news700 | news800 | news900)
  712. basic_machine=m68k-sony
  713. os=-newsos
  714. ;;
  715. news1000)
  716. basic_machine=m68030-sony
  717. os=-newsos
  718. ;;
  719. news-3600 | risc-news)
  720. basic_machine=mips-sony
  721. os=-newsos
  722. ;;
  723. necv70)
  724. basic_machine=v70-nec
  725. os=-sysv
  726. ;;
  727. next | m*-next )
  728. basic_machine=m68k-next
  729. case $os in
  730. -nextstep* )
  731. ;;
  732. -ns2*)
  733. os=-nextstep2
  734. ;;
  735. *)
  736. os=-nextstep3
  737. ;;
  738. esac
  739. ;;
  740. nh3000)
  741. basic_machine=m68k-harris
  742. os=-cxux
  743. ;;
  744. nh[45]000)
  745. basic_machine=m88k-harris
  746. os=-cxux
  747. ;;
  748. nindy960)
  749. basic_machine=i960-intel
  750. os=-nindy
  751. ;;
  752. mon960)
  753. basic_machine=i960-intel
  754. os=-mon960
  755. ;;
  756. nonstopux)
  757. basic_machine=mips-compaq
  758. os=-nonstopux
  759. ;;
  760. np1)
  761. basic_machine=np1-gould
  762. ;;
  763. nsr-tandem)
  764. basic_machine=nsr-tandem
  765. ;;
  766. op50n-* | op60c-*)
  767. basic_machine=hppa1.1-oki
  768. os=-proelf
  769. ;;
  770. openrisc | openrisc-*)
  771. basic_machine=or32-unknown
  772. ;;
  773. os400)
  774. basic_machine=powerpc-ibm
  775. os=-os400
  776. ;;
  777. OSE68000 | ose68000)
  778. basic_machine=m68000-ericsson
  779. os=-ose
  780. ;;
  781. os68k)
  782. basic_machine=m68k-none
  783. os=-os68k
  784. ;;
  785. pa-hitachi)
  786. basic_machine=hppa1.1-hitachi
  787. os=-hiuxwe2
  788. ;;
  789. paragon)
  790. basic_machine=i860-intel
  791. os=-osf
  792. ;;
  793. pbd)
  794. basic_machine=sparc-tti
  795. ;;
  796. pbb)
  797. basic_machine=m68k-tti
  798. ;;
  799. pc532 | pc532-*)
  800. basic_machine=ns32k-pc532
  801. ;;
  802. pc98)
  803. basic_machine=i386-pc
  804. ;;
  805. pc98-*)
  806. basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
  807. ;;
  808. pentium | p5 | k5 | k6 | nexgen | viac3)
  809. basic_machine=i586-pc
  810. ;;
  811. pentiumpro | p6 | 6x86 | athlon | athlon_*)
  812. basic_machine=i686-pc
  813. ;;
  814. pentiumii | pentium2 | pentiumiii | pentium3)
  815. basic_machine=i686-pc
  816. ;;
  817. pentium4)
  818. basic_machine=i786-pc
  819. ;;
  820. pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
  821. basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  822. ;;
  823. pentiumpro-* | p6-* | 6x86-* | athlon-*)
  824. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  825. ;;
  826. pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
  827. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  828. ;;
  829. pentium4-*)
  830. basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  831. ;;
  832. pn)
  833. basic_machine=pn-gould
  834. ;;
  835. power) basic_machine=power-ibm
  836. ;;
  837. ppc) basic_machine=powerpc-unknown
  838. ;;
  839. ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  840. ;;
  841. ppcle | powerpclittle | ppc-le | powerpc-little)
  842. basic_machine=powerpcle-unknown
  843. ;;
  844. ppcle-* | powerpclittle-*)
  845. basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  846. ;;
  847. ppc64) basic_machine=powerpc64-unknown
  848. ;;
  849. ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
  850. ;;
  851. ppc64le | powerpc64little | ppc64-le | powerpc64-little)
  852. basic_machine=powerpc64le-unknown
  853. ;;
  854. ppc64le-* | powerpc64little-*)
  855. basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
  856. ;;
  857. ps2)
  858. basic_machine=i386-ibm
  859. ;;
  860. pw32)
  861. basic_machine=i586-unknown
  862. os=-pw32
  863. ;;
  864. rdos)
  865. basic_machine=i386-pc
  866. os=-rdos
  867. ;;
  868. rom68k)
  869. basic_machine=m68k-rom68k
  870. os=-coff
  871. ;;
  872. rm[46]00)
  873. basic_machine=mips-siemens
  874. ;;
  875. rtpc | rtpc-*)
  876. basic_machine=romp-ibm
  877. ;;
  878. s390 | s390-*)
  879. basic_machine=s390-ibm
  880. ;;
  881. s390x | s390x-*)
  882. basic_machine=s390x-ibm
  883. ;;
  884. sa29200)
  885. basic_machine=a29k-amd
  886. os=-udi
  887. ;;
  888. sb1)
  889. basic_machine=mipsisa64sb1-unknown
  890. ;;
  891. sb1el)
  892. basic_machine=mipsisa64sb1el-unknown
  893. ;;
  894. sde)
  895. basic_machine=mipsisa32-sde
  896. os=-elf
  897. ;;
  898. sei)
  899. basic_machine=mips-sei
  900. os=-seiux
  901. ;;
  902. sequent)
  903. basic_machine=i386-sequent
  904. ;;
  905. sh)
  906. basic_machine=sh-hitachi
  907. os=-hms
  908. ;;
  909. sh5el)
  910. basic_machine=sh5le-unknown
  911. ;;
  912. sh64)
  913. basic_machine=sh64-unknown
  914. ;;
  915. sparclite-wrs | simso-wrs)
  916. basic_machine=sparclite-wrs
  917. os=-vxworks
  918. ;;
  919. sps7)
  920. basic_machine=m68k-bull
  921. os=-sysv2
  922. ;;
  923. spur)
  924. basic_machine=spur-unknown
  925. ;;
  926. st2000)
  927. basic_machine=m68k-tandem
  928. ;;
  929. stratus)
  930. basic_machine=i860-stratus
  931. os=-sysv4
  932. ;;
  933. sun2)
  934. basic_machine=m68000-sun
  935. ;;
  936. sun2os3)
  937. basic_machine=m68000-sun
  938. os=-sunos3
  939. ;;
  940. sun2os4)
  941. basic_machine=m68000-sun
  942. os=-sunos4
  943. ;;
  944. sun3os3)
  945. basic_machine=m68k-sun
  946. os=-sunos3
  947. ;;
  948. sun3os4)
  949. basic_machine=m68k-sun
  950. os=-sunos4
  951. ;;
  952. sun4os3)
  953. basic_machine=sparc-sun
  954. os=-sunos3
  955. ;;
  956. sun4os4)
  957. basic_machine=sparc-sun
  958. os=-sunos4
  959. ;;
  960. sun4sol2)
  961. basic_machine=sparc-sun
  962. os=-solaris2
  963. ;;
  964. sun3 | sun3-*)
  965. basic_machine=m68k-sun
  966. ;;
  967. sun4)
  968. basic_machine=sparc-sun
  969. ;;
  970. sun386 | sun386i | roadrunner)
  971. basic_machine=i386-sun
  972. ;;
  973. sv1)
  974. basic_machine=sv1-cray
  975. os=-unicos
  976. ;;
  977. symmetry)
  978. basic_machine=i386-sequent
  979. os=-dynix
  980. ;;
  981. t3e)
  982. basic_machine=alphaev5-cray
  983. os=-unicos
  984. ;;
  985. t90)
  986. basic_machine=t90-cray
  987. os=-unicos
  988. ;;
  989. tic54x | c54x*)
  990. basic_machine=tic54x-unknown
  991. os=-coff
  992. ;;
  993. tic55x | c55x*)
  994. basic_machine=tic55x-unknown
  995. os=-coff
  996. ;;
  997. tic6x | c6x*)
  998. basic_machine=tic6x-unknown
  999. os=-coff
  1000. ;;
  1001. tx39)
  1002. basic_machine=mipstx39-unknown
  1003. ;;
  1004. tx39el)
  1005. basic_machine=mipstx39el-unknown
  1006. ;;
  1007. toad1)
  1008. basic_machine=pdp10-xkl
  1009. os=-tops20
  1010. ;;
  1011. tower | tower-32)
  1012. basic_machine=m68k-ncr
  1013. ;;
  1014. tpf)
  1015. basic_machine=s390x-ibm
  1016. os=-tpf
  1017. ;;
  1018. udi29k)
  1019. basic_machine=a29k-amd
  1020. os=-udi
  1021. ;;
  1022. ultra3)
  1023. basic_machine=a29k-nyu
  1024. os=-sym1
  1025. ;;
  1026. v810 | necv810)
  1027. basic_machine=v810-nec
  1028. os=-none
  1029. ;;
  1030. vaxv)
  1031. basic_machine=vax-dec
  1032. os=-sysv
  1033. ;;
  1034. vms)
  1035. basic_machine=vax-dec
  1036. os=-vms
  1037. ;;
  1038. vpp*|vx|vx-*)
  1039. basic_machine=f301-fujitsu
  1040. ;;
  1041. vxworks960)
  1042. basic_machine=i960-wrs
  1043. os=-vxworks
  1044. ;;
  1045. vxworks68)
  1046. basic_machine=m68k-wrs
  1047. os=-vxworks
  1048. ;;
  1049. vxworks29k)
  1050. basic_machine=a29k-wrs
  1051. os=-vxworks
  1052. ;;
  1053. w65*)
  1054. basic_machine=w65-wdc
  1055. os=-none
  1056. ;;
  1057. w89k-*)
  1058. basic_machine=hppa1.1-winbond
  1059. os=-proelf
  1060. ;;
  1061. xbox)
  1062. basic_machine=i686-pc
  1063. os=-mingw32
  1064. ;;
  1065. xps | xps100)
  1066. basic_machine=xps100-honeywell
  1067. ;;
  1068. ymp)
  1069. basic_machine=ymp-cray
  1070. os=-unicos
  1071. ;;
  1072. z8k-*-coff)
  1073. basic_machine=z8k-unknown
  1074. os=-sim
  1075. ;;
  1076. none)
  1077. basic_machine=none-none
  1078. os=-none
  1079. ;;
  1080. # Here we handle the default manufacturer of certain CPU types. It is in
  1081. # some cases the only manufacturer, in others, it is the most popular.
  1082. w89k)
  1083. basic_machine=hppa1.1-winbond
  1084. ;;
  1085. op50n)
  1086. basic_machine=hppa1.1-oki
  1087. ;;
  1088. op60c)
  1089. basic_machine=hppa1.1-oki
  1090. ;;
  1091. romp)
  1092. basic_machine=romp-ibm
  1093. ;;
  1094. mmix)
  1095. basic_machine=mmix-knuth
  1096. ;;
  1097. rs6000)
  1098. basic_machine=rs6000-ibm
  1099. ;;
  1100. vax)
  1101. basic_machine=vax-dec
  1102. ;;
  1103. pdp10)
  1104. # there are many clones, so DEC is not a safe bet
  1105. basic_machine=pdp10-unknown
  1106. ;;
  1107. pdp11)
  1108. basic_machine=pdp11-dec
  1109. ;;
  1110. we32k)
  1111. basic_machine=we32k-att
  1112. ;;
  1113. sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
  1114. basic_machine=sh-unknown
  1115. ;;
  1116. sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
  1117. basic_machine=sparc-sun
  1118. ;;
  1119. cydra)
  1120. basic_machine=cydra-cydrome
  1121. ;;
  1122. orion)
  1123. basic_machine=orion-highlevel
  1124. ;;
  1125. orion105)
  1126. basic_machine=clipper-highlevel
  1127. ;;
  1128. mac | mpw | mac-mpw)
  1129. basic_machine=m68k-apple
  1130. ;;
  1131. pmac | pmac-mpw)
  1132. basic_machine=powerpc-apple
  1133. ;;
  1134. *-unknown)
  1135. # Make sure to match an already-canonicalized machine name.
  1136. ;;
  1137. *)
  1138. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  1139. exit 1
  1140. ;;
  1141. esac
  1142. # Here we canonicalize certain aliases for manufacturers.
  1143. case $basic_machine in
  1144. *-digital*)
  1145. basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  1146. ;;
  1147. *-commodore*)
  1148. basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  1149. ;;
  1150. *)
  1151. ;;
  1152. esac
  1153. # Decode manufacturer-specific aliases for certain operating systems.
  1154. if [ x"$os" != x"" ]
  1155. then
  1156. case $os in
  1157. # First match some system type aliases
  1158. # that might get confused with valid system types.
  1159. # -solaris* is a basic system type, with this one exception.
  1160. -solaris1 | -solaris1.*)
  1161. os=`echo $os | sed -e 's|solaris1|sunos4|'`
  1162. ;;
  1163. -solaris)
  1164. os=-solaris2
  1165. ;;
  1166. -svr4*)
  1167. os=-sysv4
  1168. ;;
  1169. -unixware*)
  1170. os=-sysv4.2uw
  1171. ;;
  1172. -gnu/linux*)
  1173. os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  1174. ;;
  1175. # First accept the basic system types.
  1176. # The portable systems comes first.
  1177. # Each alternative MUST END IN A *, to match a version number.
  1178. # -sysv* is not here because it comes later, after sysvr4.
  1179. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  1180. | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
  1181. | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  1182. | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  1183. | -aos* \
  1184. | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  1185. | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  1186. | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
  1187. | -openbsd* | -solidbsd* \
  1188. | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
  1189. | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  1190. | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  1191. | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  1192. | -chorusos* | -chorusrdb* \
  1193. | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  1194. | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
  1195. | -uxpv* | -beos* | -mpeix* | -udk* \
  1196. | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  1197. | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  1198. | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
  1199. | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
  1200. | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
  1201. | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
  1202. | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
  1203. # Remember, each alternative MUST END IN *, to match a version number.
  1204. ;;
  1205. -qnx*)
  1206. case $basic_machine in
  1207. x86-* | i*86-*)
  1208. ;;
  1209. *)
  1210. os=-nto$os
  1211. ;;
  1212. esac
  1213. ;;
  1214. -nto-qnx*)
  1215. ;;
  1216. -nto*)
  1217. os=`echo $os | sed -e 's|nto|nto-qnx|'`
  1218. ;;
  1219. -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  1220. | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
  1221. | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
  1222. ;;
  1223. -mac*)
  1224. os=`echo $os | sed -e 's|mac|macos|'`
  1225. ;;
  1226. -linux-dietlibc)
  1227. os=-linux-dietlibc
  1228. ;;
  1229. -linux*)
  1230. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  1231. ;;
  1232. -sunos5*)
  1233. os=`echo $os | sed -e 's|sunos5|solaris2|'`
  1234. ;;
  1235. -sunos6*)
  1236. os=`echo $os | sed -e 's|sunos6|solaris3|'`
  1237. ;;
  1238. -opened*)
  1239. os=-openedition
  1240. ;;
  1241. -os400*)
  1242. os=-os400
  1243. ;;
  1244. -wince*)
  1245. os=-wince
  1246. ;;
  1247. -osfrose*)
  1248. os=-osfrose
  1249. ;;
  1250. -osf*)
  1251. os=-osf
  1252. ;;
  1253. -utek*)
  1254. os=-bsd
  1255. ;;
  1256. -dynix*)
  1257. os=-bsd
  1258. ;;
  1259. -acis*)
  1260. os=-aos
  1261. ;;
  1262. -atheos*)
  1263. os=-atheos
  1264. ;;
  1265. -syllable*)
  1266. os=-syllable
  1267. ;;
  1268. -386bsd)
  1269. os=-bsd
  1270. ;;
  1271. -ctix* | -uts*)
  1272. os=-sysv
  1273. ;;
  1274. -nova*)
  1275. os=-rtmk-nova
  1276. ;;
  1277. -ns2 )
  1278. os=-nextstep2
  1279. ;;
  1280. -nsk*)
  1281. os=-nsk
  1282. ;;
  1283. # Preserve the version number of sinix5.
  1284. -sinix5.*)
  1285. os=`echo $os | sed -e 's|sinix|sysv|'`
  1286. ;;
  1287. -sinix*)
  1288. os=-sysv4
  1289. ;;
  1290. -tpf*)
  1291. os=-tpf
  1292. ;;
  1293. -triton*)
  1294. os=-sysv3
  1295. ;;
  1296. -oss*)
  1297. os=-sysv3
  1298. ;;
  1299. -svr4)
  1300. os=-sysv4
  1301. ;;
  1302. -svr3)
  1303. os=-sysv3
  1304. ;;
  1305. -sysvr4)
  1306. os=-sysv4
  1307. ;;
  1308. # This must come after -sysvr4.
  1309. -sysv*)
  1310. ;;
  1311. -ose*)
  1312. os=-ose
  1313. ;;
  1314. -es1800*)
  1315. os=-ose
  1316. ;;
  1317. -xenix)
  1318. os=-xenix
  1319. ;;
  1320. -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1321. os=-mint
  1322. ;;
  1323. -aros*)
  1324. os=-aros
  1325. ;;
  1326. -kaos*)
  1327. os=-kaos
  1328. ;;
  1329. -zvmoe)
  1330. os=-zvmoe
  1331. ;;
  1332. -none)
  1333. ;;
  1334. *)
  1335. # Get rid of the `-' at the beginning of $os.
  1336. os=`echo $os | sed 's/[^-]*-//'`
  1337. echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  1338. exit 1
  1339. ;;
  1340. esac
  1341. else
  1342. # Here we handle the default operating systems that come with various machines.
  1343. # The value should be what the vendor currently ships out the door with their
  1344. # machine or put another way, the most popular os provided with the machine.
  1345. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  1346. # "-sun"), then you have to tell the case statement up towards the top
  1347. # that MANUFACTURER isn't an operating system. Otherwise, code above
  1348. # will signal an error saying that MANUFACTURER isn't an operating
  1349. # system, and we'll never get to this point.
  1350. case $basic_machine in
  1351. score-*)
  1352. os=-elf
  1353. ;;
  1354. spu-*)
  1355. os=-elf
  1356. ;;
  1357. *-acorn)
  1358. os=-riscix1.2
  1359. ;;
  1360. arm*-rebel)
  1361. os=-linux
  1362. ;;
  1363. arm*-semi)
  1364. os=-aout
  1365. ;;
  1366. c4x-* | tic4x-*)
  1367. os=-coff
  1368. ;;
  1369. # This must come before the *-dec entry.
  1370. pdp10-*)
  1371. os=-tops20
  1372. ;;
  1373. pdp11-*)
  1374. os=-none
  1375. ;;
  1376. *-dec | vax-*)
  1377. os=-ultrix4.2
  1378. ;;
  1379. m68*-apollo)
  1380. os=-domain
  1381. ;;
  1382. i386-sun)
  1383. os=-sunos4.0.2
  1384. ;;
  1385. m68000-sun)
  1386. os=-sunos3
  1387. # This also exists in the configure program, but was not the
  1388. # default.
  1389. # os=-sunos4
  1390. ;;
  1391. m68*-cisco)
  1392. os=-aout
  1393. ;;
  1394. mep-*)
  1395. os=-elf
  1396. ;;
  1397. mips*-cisco)
  1398. os=-elf
  1399. ;;
  1400. mips*-*)
  1401. os=-elf
  1402. ;;
  1403. or32-*)
  1404. os=-coff
  1405. ;;
  1406. *-tti) # must be before sparc entry or we get the wrong os.
  1407. os=-sysv3
  1408. ;;
  1409. sparc-* | *-sun)
  1410. os=-sunos4.1.1
  1411. ;;
  1412. *-be)
  1413. os=-beos
  1414. ;;
  1415. *-haiku)
  1416. os=-haiku
  1417. ;;
  1418. *-ibm)
  1419. os=-aix
  1420. ;;
  1421. *-knuth)
  1422. os=-mmixware
  1423. ;;
  1424. *-wec)
  1425. os=-proelf
  1426. ;;
  1427. *-winbond)
  1428. os=-proelf
  1429. ;;
  1430. *-oki)
  1431. os=-proelf
  1432. ;;
  1433. *-hp)
  1434. os=-hpux
  1435. ;;
  1436. *-hitachi)
  1437. os=-hiux
  1438. ;;
  1439. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  1440. os=-sysv
  1441. ;;
  1442. *-cbm)
  1443. os=-amigaos
  1444. ;;
  1445. *-dg)
  1446. os=-dgux
  1447. ;;
  1448. *-dolphin)
  1449. os=-sysv3
  1450. ;;
  1451. m68k-ccur)
  1452. os=-rtu
  1453. ;;
  1454. m88k-omron*)
  1455. os=-luna
  1456. ;;
  1457. *-next )
  1458. os=-nextstep
  1459. ;;
  1460. *-sequent)
  1461. os=-ptx
  1462. ;;
  1463. *-crds)
  1464. os=-unos
  1465. ;;
  1466. *-ns)
  1467. os=-genix
  1468. ;;
  1469. i370-*)
  1470. os=-mvs
  1471. ;;
  1472. *-next)
  1473. os=-nextstep3
  1474. ;;
  1475. *-gould)
  1476. os=-sysv
  1477. ;;
  1478. *-highlevel)
  1479. os=-bsd
  1480. ;;
  1481. *-encore)
  1482. os=-bsd
  1483. ;;
  1484. *-sgi)
  1485. os=-irix
  1486. ;;
  1487. *-siemens)
  1488. os=-sysv4
  1489. ;;
  1490. *-masscomp)
  1491. os=-rtu
  1492. ;;
  1493. f30[01]-fujitsu | f700-fujitsu)
  1494. os=-uxpv
  1495. ;;
  1496. *-rom68k)
  1497. os=-coff
  1498. ;;
  1499. *-*bug)
  1500. os=-coff
  1501. ;;
  1502. *-apple)
  1503. os=-macos
  1504. ;;
  1505. *-atari*)
  1506. os=-mint
  1507. ;;
  1508. *)
  1509. os=-none
  1510. ;;
  1511. esac
  1512. fi
  1513. # Here we handle the case where we know the os, and the CPU type, but not the
  1514. # manufacturer. We pick the logical manufacturer.
  1515. vendor=unknown
  1516. case $basic_machine in
  1517. *-unknown)
  1518. case $os in
  1519. -riscix*)
  1520. vendor=acorn
  1521. ;;
  1522. -sunos*)
  1523. vendor=sun
  1524. ;;
  1525. -aix*)
  1526. vendor=ibm
  1527. ;;
  1528. -beos*)
  1529. vendor=be
  1530. ;;
  1531. -hpux*)
  1532. vendor=hp
  1533. ;;
  1534. -mpeix*)
  1535. vendor=hp
  1536. ;;
  1537. -hiux*)
  1538. vendor=hitachi
  1539. ;;
  1540. -unos*)
  1541. vendor=crds
  1542. ;;
  1543. -dgux*)
  1544. vendor=dg
  1545. ;;
  1546. -luna*)
  1547. vendor=omron
  1548. ;;
  1549. -genix*)
  1550. vendor=ns
  1551. ;;
  1552. -mvs* | -opened*)
  1553. vendor=ibm
  1554. ;;
  1555. -os400*)
  1556. vendor=ibm
  1557. ;;
  1558. -ptx*)
  1559. vendor=sequent
  1560. ;;
  1561. -tpf*)
  1562. vendor=ibm
  1563. ;;
  1564. -vxsim* | -vxworks* | -windiss*)
  1565. vendor=wrs
  1566. ;;
  1567. -aux*)
  1568. vendor=apple
  1569. ;;
  1570. -hms*)
  1571. vendor=hitachi
  1572. ;;
  1573. -mpw* | -macos*)
  1574. vendor=apple
  1575. ;;
  1576. -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1577. vendor=atari
  1578. ;;
  1579. -vos*)
  1580. vendor=stratus
  1581. ;;
  1582. esac
  1583. basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  1584. ;;
  1585. esac
  1586. echo $basic_machine$os
  1587. exit
  1588. # Local variables:
  1589. # eval: (add-hook 'write-file-hooks 'time-stamp)
  1590. # time-stamp-start: "timestamp='"
  1591. # time-stamp-format: "%:y-%02m-%02d"
  1592. # time-stamp-end: "'"
  1593. # End: