config.sub 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954
  1. #! /bin/sh
  2. # Configuration validation subroutine script, version 1.1.
  3. # Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
  4. # This file is (in principle) common to ALL GNU software.
  5. # The presence of a machine in this file suggests that SOME GNU software
  6. # can handle that machine. It does not imply ALL GNU software can.
  7. #
  8. # This file is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 59 Temple Place - Suite 330,
  21. # Boston, MA 02111-1307, USA.
  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 program.
  26. # Configuration subroutine to validate and canonicalize a configuration type.
  27. # Supply the specified configuration type as an argument.
  28. # If it is invalid, we print an error message on stderr and exit with code 1.
  29. # Otherwise, we print the canonical config type on stdout and succeed.
  30. # This file is supposed to be the same for all GNU packages
  31. # and recognize all the CPU types, system types and aliases
  32. # that are meaningful with *any* GNU software.
  33. # Each package is responsible for reporting which valid configurations
  34. # it does not support. The user should be able to distinguish
  35. # a failure to support a valid configuration from a meaningless
  36. # configuration.
  37. # The goal of this file is to map all the various variations of a given
  38. # machine specification into a single specification in the form:
  39. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  40. # or in some cases, the newer four-part form:
  41. # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  42. # It is wrong to echo any other type of specification.
  43. if [ x$1 = x ]
  44. then
  45. echo Configuration name missing. 1>&2
  46. echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
  47. echo "or $0 ALIAS" 1>&2
  48. echo where ALIAS is a recognized configuration type. 1>&2
  49. exit 1
  50. fi
  51. # First pass through any local machine types.
  52. case $1 in
  53. *local*)
  54. echo $1
  55. exit 0
  56. ;;
  57. *)
  58. ;;
  59. esac
  60. # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
  61. # Here we must recognize all the valid KERNEL-OS combinations.
  62. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  63. case $maybe_os in
  64. linux-gnu*)
  65. os=-$maybe_os
  66. basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
  67. ;;
  68. *)
  69. basic_machine=`echo $1 | sed 's/-[^-]*$//'`
  70. if [ $basic_machine != $1 ]
  71. then os=`echo $1 | sed 's/.*-/-/'`
  72. else os=; fi
  73. ;;
  74. esac
  75. ### Let's recognize common machines as not being operating systems so
  76. ### that things like config.sub decstation-3100 work. We also
  77. ### recognize some manufacturers as not being operating systems, so we
  78. ### can provide default operating systems below.
  79. case $os in
  80. -sun*os*)
  81. # Prevent following clause from handling this invalid input.
  82. ;;
  83. -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
  84. -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
  85. -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
  86. -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  87. -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  88. -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  89. -apple)
  90. os=
  91. basic_machine=$1
  92. ;;
  93. -hiux*)
  94. os=-hiuxwe2
  95. ;;
  96. -sco5)
  97. os=sco3.2v5
  98. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  99. ;;
  100. -sco4)
  101. os=-sco3.2v4
  102. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  103. ;;
  104. -sco3.2.[4-9]*)
  105. os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  106. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  107. ;;
  108. -sco3.2v[4-9]*)
  109. # Don't forget version if it is 3.2v4 or newer.
  110. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  111. ;;
  112. -sco*)
  113. os=-sco3.2v2
  114. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  115. ;;
  116. -isc)
  117. os=-isc2.2
  118. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  119. ;;
  120. -clix*)
  121. basic_machine=clipper-intergraph
  122. ;;
  123. -isc*)
  124. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  125. ;;
  126. -lynx*)
  127. os=-lynxos
  128. ;;
  129. -ptx*)
  130. basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
  131. ;;
  132. -windowsnt*)
  133. os=`echo $os | sed -e 's/windowsnt/winnt/'`
  134. ;;
  135. -psos*)
  136. os=-psos
  137. ;;
  138. esac
  139. # Decode aliases for certain CPU-COMPANY combinations.
  140. case $basic_machine in
  141. # Recognize the basic CPU types without company name.
  142. # Some are omitted here because they have special meanings below.
  143. tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
  144. | arme[lb] | pyramid | mn10200 | mn10300 \
  145. | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
  146. | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
  147. | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
  148. | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
  149. | mipstx39 | mipstx39el \
  150. | sparc | sparclet | sparclite | sparc64 | v850)
  151. basic_machine=$basic_machine-unknown
  152. ;;
  153. # We use `pc' rather than `unknown'
  154. # because (1) that's what they normally are, and
  155. # (2) the word "unknown" tends to confuse beginning users.
  156. i[3456]86)
  157. basic_machine=$basic_machine-pc
  158. ;;
  159. # Object if more than one company name word.
  160. *-*-*)
  161. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  162. exit 1
  163. ;;
  164. # Recognize the basic CPU types with company name.
  165. vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
  166. | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
  167. | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
  168. | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
  169. | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
  170. | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
  171. | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
  172. | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
  173. | sparc64-* | mips64-* | mipsel-* \
  174. | mips64el-* | mips64orion-* | mips64orionel-* \
  175. | mipstx39-* | mipstx39el-* \
  176. | f301-*)
  177. ;;
  178. # Recognize the various machine names and aliases which stand
  179. # for a CPU type and a company and sometimes even an OS.
  180. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  181. basic_machine=m68000-att
  182. ;;
  183. 3b*)
  184. basic_machine=we32k-att
  185. ;;
  186. alliant | fx80)
  187. basic_machine=fx80-alliant
  188. ;;
  189. altos | altos3068)
  190. basic_machine=m68k-altos
  191. ;;
  192. am29k)
  193. basic_machine=a29k-none
  194. os=-bsd
  195. ;;
  196. amdahl)
  197. basic_machine=580-amdahl
  198. os=-sysv
  199. ;;
  200. amiga | amiga-*)
  201. basic_machine=m68k-cbm
  202. ;;
  203. amigaos | amigados)
  204. basic_machine=m68k-cbm
  205. os=-amigaos
  206. ;;
  207. amigaunix | amix)
  208. basic_machine=m68k-cbm
  209. os=-sysv4
  210. ;;
  211. apollo68)
  212. basic_machine=m68k-apollo
  213. os=-sysv
  214. ;;
  215. aux)
  216. basic_machine=m68k-apple
  217. os=-aux
  218. ;;
  219. balance)
  220. basic_machine=ns32k-sequent
  221. os=-dynix
  222. ;;
  223. convex-c1)
  224. basic_machine=c1-convex
  225. os=-bsd
  226. ;;
  227. convex-c2)
  228. basic_machine=c2-convex
  229. os=-bsd
  230. ;;
  231. convex-c32)
  232. basic_machine=c32-convex
  233. os=-bsd
  234. ;;
  235. convex-c34)
  236. basic_machine=c34-convex
  237. os=-bsd
  238. ;;
  239. convex-c38)
  240. basic_machine=c38-convex
  241. os=-bsd
  242. ;;
  243. cray | ymp)
  244. basic_machine=ymp-cray
  245. os=-unicos
  246. ;;
  247. cray2)
  248. basic_machine=cray2-cray
  249. os=-unicos
  250. ;;
  251. [ctj]90-cray)
  252. basic_machine=c90-cray
  253. os=-unicos
  254. ;;
  255. crds | unos)
  256. basic_machine=m68k-crds
  257. ;;
  258. da30 | da30-*)
  259. basic_machine=m68k-da30
  260. ;;
  261. decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  262. basic_machine=mips-dec
  263. ;;
  264. delta | 3300 | motorola-3300 | motorola-delta \
  265. | 3300-motorola | delta-motorola)
  266. basic_machine=m68k-motorola
  267. ;;
  268. delta88)
  269. basic_machine=m88k-motorola
  270. os=-sysv3
  271. ;;
  272. dpx20 | dpx20-*)
  273. basic_machine=rs6000-bull
  274. os=-bosx
  275. ;;
  276. dpx2* | dpx2*-bull)
  277. basic_machine=m68k-bull
  278. os=-sysv3
  279. ;;
  280. ebmon29k)
  281. basic_machine=a29k-amd
  282. os=-ebmon
  283. ;;
  284. elxsi)
  285. basic_machine=elxsi-elxsi
  286. os=-bsd
  287. ;;
  288. encore | umax | mmax)
  289. basic_machine=ns32k-encore
  290. ;;
  291. fx2800)
  292. basic_machine=i860-alliant
  293. ;;
  294. genix)
  295. basic_machine=ns32k-ns
  296. ;;
  297. gmicro)
  298. basic_machine=tron-gmicro
  299. os=-sysv
  300. ;;
  301. h3050r* | hiux*)
  302. basic_machine=hppa1.1-hitachi
  303. os=-hiuxwe2
  304. ;;
  305. h8300hms)
  306. basic_machine=h8300-hitachi
  307. os=-hms
  308. ;;
  309. harris)
  310. basic_machine=m88k-harris
  311. os=-sysv3
  312. ;;
  313. hp300-*)
  314. basic_machine=m68k-hp
  315. ;;
  316. hp300bsd)
  317. basic_machine=m68k-hp
  318. os=-bsd
  319. ;;
  320. hp300hpux)
  321. basic_machine=m68k-hp
  322. os=-hpux
  323. ;;
  324. hp9k2[0-9][0-9] | hp9k31[0-9])
  325. basic_machine=m68000-hp
  326. ;;
  327. hp9k3[2-9][0-9])
  328. basic_machine=m68k-hp
  329. ;;
  330. hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
  331. basic_machine=hppa1.1-hp
  332. ;;
  333. hp9k8[0-9][0-9] | hp8[0-9][0-9])
  334. basic_machine=hppa1.0-hp
  335. ;;
  336. hppa-next)
  337. os=-nextstep3
  338. ;;
  339. i370-ibm* | ibm*)
  340. basic_machine=i370-ibm
  341. os=-mvs
  342. ;;
  343. # I'm not sure what "Sysv32" means. Should this be sysv3.2?
  344. i[3456]86v32)
  345. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  346. os=-sysv32
  347. ;;
  348. i[3456]86v4*)
  349. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  350. os=-sysv4
  351. ;;
  352. i[3456]86v)
  353. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  354. os=-sysv
  355. ;;
  356. i[3456]86sol2)
  357. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  358. os=-solaris2
  359. ;;
  360. iris | iris4d)
  361. basic_machine=mips-sgi
  362. case $os in
  363. -irix*)
  364. ;;
  365. *)
  366. os=-irix4
  367. ;;
  368. esac
  369. ;;
  370. isi68 | isi)
  371. basic_machine=m68k-isi
  372. os=-sysv
  373. ;;
  374. m88k-omron*)
  375. basic_machine=m88k-omron
  376. ;;
  377. magnum | m3230)
  378. basic_machine=mips-mips
  379. os=-sysv
  380. ;;
  381. merlin)
  382. basic_machine=ns32k-utek
  383. os=-sysv
  384. ;;
  385. miniframe)
  386. basic_machine=m68000-convergent
  387. ;;
  388. mipsel*-linux*)
  389. basic_machine=mipsel-unknown
  390. os=-linux-gnu
  391. ;;
  392. mips*-linux*)
  393. basic_machine=mips-unknown
  394. os=-linux-gnu
  395. ;;
  396. mips3*-*)
  397. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  398. ;;
  399. mips3*)
  400. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  401. ;;
  402. ncr3000)
  403. basic_machine=i486-ncr
  404. os=-sysv4
  405. ;;
  406. news | news700 | news800 | news900)
  407. basic_machine=m68k-sony
  408. os=-newsos
  409. ;;
  410. news1000)
  411. basic_machine=m68030-sony
  412. os=-newsos
  413. ;;
  414. news-3600 | risc-news)
  415. basic_machine=mips-sony
  416. os=-newsos
  417. ;;
  418. next | m*-next )
  419. basic_machine=m68k-next
  420. case $os in
  421. -nextstep* )
  422. ;;
  423. -ns2*)
  424. os=-nextstep2
  425. ;;
  426. *)
  427. os=-nextstep3
  428. ;;
  429. esac
  430. ;;
  431. nh3000)
  432. basic_machine=m68k-harris
  433. os=-cxux
  434. ;;
  435. nh[45]000)
  436. basic_machine=m88k-harris
  437. os=-cxux
  438. ;;
  439. nindy960)
  440. basic_machine=i960-intel
  441. os=-nindy
  442. ;;
  443. np1)
  444. basic_machine=np1-gould
  445. ;;
  446. pa-hitachi)
  447. basic_machine=hppa1.1-hitachi
  448. os=-hiuxwe2
  449. ;;
  450. paragon)
  451. basic_machine=i860-intel
  452. os=-osf
  453. ;;
  454. pbd)
  455. basic_machine=sparc-tti
  456. ;;
  457. pbb)
  458. basic_machine=m68k-tti
  459. ;;
  460. pc532 | pc532-*)
  461. basic_machine=ns32k-pc532
  462. ;;
  463. pentium | p5)
  464. basic_machine=i586-intel
  465. ;;
  466. pentiumpro | p6)
  467. basic_machine=i686-intel
  468. ;;
  469. pentium-* | p5-*)
  470. basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  471. ;;
  472. pentiumpro-* | p6-*)
  473. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  474. ;;
  475. k5)
  476. # We don't have specific support for AMD's K5 yet, so just call it a Pentium
  477. basic_machine=i586-amd
  478. ;;
  479. nexen)
  480. # We don't have specific support for Nexgen yet, so just call it a Pentium
  481. basic_machine=i586-nexgen
  482. ;;
  483. pn)
  484. basic_machine=pn-gould
  485. ;;
  486. power) basic_machine=rs6000-ibm
  487. ;;
  488. ppc) basic_machine=powerpc-unknown
  489. ;;
  490. ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  491. ;;
  492. ppcle | powerpclittle | ppc-le | powerpc-little)
  493. basic_machine=powerpcle-unknown
  494. ;;
  495. ppcle-* | powerpclittle-*)
  496. basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  497. ;;
  498. ps2)
  499. basic_machine=i386-ibm
  500. ;;
  501. rm[46]00)
  502. basic_machine=mips-siemens
  503. ;;
  504. rtpc | rtpc-*)
  505. basic_machine=romp-ibm
  506. ;;
  507. sequent)
  508. basic_machine=i386-sequent
  509. ;;
  510. sh)
  511. basic_machine=sh-hitachi
  512. os=-hms
  513. ;;
  514. sps7)
  515. basic_machine=m68k-bull
  516. os=-sysv2
  517. ;;
  518. spur)
  519. basic_machine=spur-unknown
  520. ;;
  521. sun2)
  522. basic_machine=m68000-sun
  523. ;;
  524. sun2os3)
  525. basic_machine=m68000-sun
  526. os=-sunos3
  527. ;;
  528. sun2os4)
  529. basic_machine=m68000-sun
  530. os=-sunos4
  531. ;;
  532. sun3os3)
  533. basic_machine=m68k-sun
  534. os=-sunos3
  535. ;;
  536. sun3os4)
  537. basic_machine=m68k-sun
  538. os=-sunos4
  539. ;;
  540. sun4os3)
  541. basic_machine=sparc-sun
  542. os=-sunos3
  543. ;;
  544. sun4os4)
  545. basic_machine=sparc-sun
  546. os=-sunos4
  547. ;;
  548. sun4sol2)
  549. basic_machine=sparc-sun
  550. os=-solaris2
  551. ;;
  552. sun3 | sun3-*)
  553. basic_machine=m68k-sun
  554. ;;
  555. sun4)
  556. basic_machine=sparc-sun
  557. ;;
  558. sun386 | sun386i | roadrunner)
  559. basic_machine=i386-sun
  560. ;;
  561. symmetry)
  562. basic_machine=i386-sequent
  563. os=-dynix
  564. ;;
  565. tx39)
  566. basic_machine=mipstx39-unknown
  567. ;;
  568. tx39el)
  569. basic_machine=mipstx39el-unknown
  570. ;;
  571. tower | tower-32)
  572. basic_machine=m68k-ncr
  573. ;;
  574. udi29k)
  575. basic_machine=a29k-amd
  576. os=-udi
  577. ;;
  578. ultra3)
  579. basic_machine=a29k-nyu
  580. os=-sym1
  581. ;;
  582. vaxv)
  583. basic_machine=vax-dec
  584. os=-sysv
  585. ;;
  586. vms)
  587. basic_machine=vax-dec
  588. os=-vms
  589. ;;
  590. vpp*|vx|vx-*)
  591. basic_machine=f301-fujitsu
  592. ;;
  593. vxworks960)
  594. basic_machine=i960-wrs
  595. os=-vxworks
  596. ;;
  597. vxworks68)
  598. basic_machine=m68k-wrs
  599. os=-vxworks
  600. ;;
  601. vxworks29k)
  602. basic_machine=a29k-wrs
  603. os=-vxworks
  604. ;;
  605. xmp)
  606. basic_machine=xmp-cray
  607. os=-unicos
  608. ;;
  609. xps | xps100)
  610. basic_machine=xps100-honeywell
  611. ;;
  612. none)
  613. basic_machine=none-none
  614. os=-none
  615. ;;
  616. # Here we handle the default manufacturer of certain CPU types. It is in
  617. # some cases the only manufacturer, in others, it is the most popular.
  618. mips)
  619. if [ x$os = x-linux-gnu ]; then
  620. basic_machine=mips-unknown
  621. else
  622. basic_machine=mips-mips
  623. fi
  624. ;;
  625. romp)
  626. basic_machine=romp-ibm
  627. ;;
  628. rs6000)
  629. basic_machine=rs6000-ibm
  630. ;;
  631. vax)
  632. basic_machine=vax-dec
  633. ;;
  634. pdp11)
  635. basic_machine=pdp11-dec
  636. ;;
  637. we32k)
  638. basic_machine=we32k-att
  639. ;;
  640. sparc)
  641. basic_machine=sparc-sun
  642. ;;
  643. cydra)
  644. basic_machine=cydra-cydrome
  645. ;;
  646. orion)
  647. basic_machine=orion-highlevel
  648. ;;
  649. orion105)
  650. basic_machine=clipper-highlevel
  651. ;;
  652. *)
  653. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  654. exit 1
  655. ;;
  656. esac
  657. # Here we canonicalize certain aliases for manufacturers.
  658. case $basic_machine in
  659. *-digital*)
  660. basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  661. ;;
  662. *-commodore*)
  663. basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  664. ;;
  665. *)
  666. ;;
  667. esac
  668. # Decode manufacturer-specific aliases for certain operating systems.
  669. if [ x"$os" != x"" ]
  670. then
  671. case $os in
  672. # First match some system type aliases
  673. # that might get confused with valid system types.
  674. # -solaris* is a basic system type, with this one exception.
  675. -solaris1 | -solaris1.*)
  676. os=`echo $os | sed -e 's|solaris1|sunos4|'`
  677. ;;
  678. -solaris)
  679. os=-solaris2
  680. ;;
  681. -svr4*)
  682. os=-sysv4
  683. ;;
  684. -unixware*)
  685. os=-sysv4.2uw
  686. ;;
  687. -gnu/linux*)
  688. os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  689. ;;
  690. # First accept the basic system types.
  691. # The portable systems comes first.
  692. # Each alternative MUST END IN A *, to match a version number.
  693. # -sysv* is not here because it comes later, after sysvr4.
  694. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  695. | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
  696. | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  697. | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  698. | -aos* \
  699. | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  700. | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  701. | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
  702. | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
  703. | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  704. | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  705. | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  706. | -mingw32* | -linux-gnu* | -uxpv*)
  707. # Remember, each alternative MUST END IN *, to match a version number.
  708. ;;
  709. -linux*)
  710. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  711. ;;
  712. -sunos5*)
  713. os=`echo $os | sed -e 's|sunos5|solaris2|'`
  714. ;;
  715. -sunos6*)
  716. os=`echo $os | sed -e 's|sunos6|solaris3|'`
  717. ;;
  718. -osfrose*)
  719. os=-osfrose
  720. ;;
  721. -osf*)
  722. os=-osf
  723. ;;
  724. -utek*)
  725. os=-bsd
  726. ;;
  727. -dynix*)
  728. os=-bsd
  729. ;;
  730. -acis*)
  731. os=-aos
  732. ;;
  733. -ctix* | -uts*)
  734. os=-sysv
  735. ;;
  736. -ns2 )
  737. os=-nextstep2
  738. ;;
  739. # Preserve the version number of sinix5.
  740. -sinix5.*)
  741. os=`echo $os | sed -e 's|sinix|sysv|'`
  742. ;;
  743. -sinix*)
  744. os=-sysv4
  745. ;;
  746. -triton*)
  747. os=-sysv3
  748. ;;
  749. -oss*)
  750. os=-sysv3
  751. ;;
  752. -svr4)
  753. os=-sysv4
  754. ;;
  755. -svr3)
  756. os=-sysv3
  757. ;;
  758. -sysvr4)
  759. os=-sysv4
  760. ;;
  761. # This must come after -sysvr4.
  762. -sysv*)
  763. ;;
  764. -xenix)
  765. os=-xenix
  766. ;;
  767. -none)
  768. ;;
  769. *)
  770. # Get rid of the `-' at the beginning of $os.
  771. os=`echo $os | sed 's/[^-]*-//'`
  772. echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  773. exit 1
  774. ;;
  775. esac
  776. else
  777. # Here we handle the default operating systems that come with various machines.
  778. # The value should be what the vendor currently ships out the door with their
  779. # machine or put another way, the most popular os provided with the machine.
  780. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  781. # "-sun"), then you have to tell the case statement up towards the top
  782. # that MANUFACTURER isn't an operating system. Otherwise, code above
  783. # will signal an error saying that MANUFACTURER isn't an operating
  784. # system, and we'll never get to this point.
  785. case $basic_machine in
  786. *-acorn)
  787. os=-riscix1.2
  788. ;;
  789. arm*-semi)
  790. os=-aout
  791. ;;
  792. pdp11-*)
  793. os=-none
  794. ;;
  795. *-dec | vax-*)
  796. os=-ultrix4.2
  797. ;;
  798. m68*-apollo)
  799. os=-domain
  800. ;;
  801. i386-sun)
  802. os=-sunos4.0.2
  803. ;;
  804. m68000-sun)
  805. os=-sunos3
  806. # This also exists in the configure program, but was not the
  807. # default.
  808. # os=-sunos4
  809. ;;
  810. *-tti) # must be before sparc entry or we get the wrong os.
  811. os=-sysv3
  812. ;;
  813. sparc-* | *-sun)
  814. os=-sunos4.1.1
  815. ;;
  816. *-ibm)
  817. os=-aix
  818. ;;
  819. *-hp)
  820. os=-hpux
  821. ;;
  822. *-hitachi)
  823. os=-hiux
  824. ;;
  825. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  826. os=-sysv
  827. ;;
  828. *-cbm)
  829. os=-amigaos
  830. ;;
  831. *-dg)
  832. os=-dgux
  833. ;;
  834. *-dolphin)
  835. os=-sysv3
  836. ;;
  837. m68k-ccur)
  838. os=-rtu
  839. ;;
  840. m88k-omron*)
  841. os=-luna
  842. ;;
  843. *-next )
  844. os=-nextstep
  845. ;;
  846. *-sequent)
  847. os=-ptx
  848. ;;
  849. *-crds)
  850. os=-unos
  851. ;;
  852. *-ns)
  853. os=-genix
  854. ;;
  855. i370-*)
  856. os=-mvs
  857. ;;
  858. *-next)
  859. os=-nextstep3
  860. ;;
  861. *-gould)
  862. os=-sysv
  863. ;;
  864. *-highlevel)
  865. os=-bsd
  866. ;;
  867. *-encore)
  868. os=-bsd
  869. ;;
  870. *-sgi)
  871. os=-irix
  872. ;;
  873. *-siemens)
  874. os=-sysv4
  875. ;;
  876. *-masscomp)
  877. os=-rtu
  878. ;;
  879. f301-fujitsu)
  880. os=-uxpv
  881. ;;
  882. *)
  883. os=-none
  884. ;;
  885. esac
  886. fi
  887. # Here we handle the case where we know the os, and the CPU type, but not the
  888. # manufacturer. We pick the logical manufacturer.
  889. vendor=unknown
  890. case $basic_machine in
  891. *-unknown)
  892. case $os in
  893. -riscix*)
  894. vendor=acorn
  895. ;;
  896. -sunos*)
  897. vendor=sun
  898. ;;
  899. -aix*)
  900. vendor=ibm
  901. ;;
  902. -hpux*)
  903. vendor=hp
  904. ;;
  905. -hiux*)
  906. vendor=hitachi
  907. ;;
  908. -unos*)
  909. vendor=crds
  910. ;;
  911. -dgux*)
  912. vendor=dg
  913. ;;
  914. -luna*)
  915. vendor=omron
  916. ;;
  917. -genix*)
  918. vendor=ns
  919. ;;
  920. -mvs*)
  921. vendor=ibm
  922. ;;
  923. -ptx*)
  924. vendor=sequent
  925. ;;
  926. -vxsim* | -vxworks*)
  927. vendor=wrs
  928. ;;
  929. -aux*)
  930. vendor=apple
  931. ;;
  932. esac
  933. basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  934. ;;
  935. esac
  936. echo $basic_machine$os