config.sub 24 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217
  1. #! /bin/sh
  2. # Configuration validation subroutine script, version 1.1.
  3. # Copyright (C) 1991, 92-97, 1998, 1999 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. -sim | -cisco | -oki | -wec | -winbond)
  94. os=
  95. basic_machine=$1
  96. ;;
  97. -scout)
  98. ;;
  99. -wrs)
  100. os=vxworks
  101. basic_machine=$1
  102. ;;
  103. -hiux*)
  104. os=-hiuxwe2
  105. ;;
  106. -sco5)
  107. os=-sco3.2v5
  108. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  109. ;;
  110. -sco4)
  111. os=-sco3.2v4
  112. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  113. ;;
  114. -sco3.2.[4-9]*)
  115. os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  116. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  117. ;;
  118. -sco3.2v[4-9]*)
  119. # Don't forget version if it is 3.2v4 or newer.
  120. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  121. ;;
  122. -sco*)
  123. os=-sco3.2v2
  124. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  125. ;;
  126. -udk*)
  127. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  128. ;;
  129. -isc)
  130. os=-isc2.2
  131. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  132. ;;
  133. -clix*)
  134. basic_machine=clipper-intergraph
  135. ;;
  136. -isc*)
  137. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  138. ;;
  139. -lynx*)
  140. os=-lynxos
  141. ;;
  142. -ptx*)
  143. basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
  144. ;;
  145. -windowsnt*)
  146. os=`echo $os | sed -e 's/windowsnt/winnt/'`
  147. ;;
  148. -psos*)
  149. os=-psos
  150. ;;
  151. esac
  152. # Decode aliases for certain CPU-COMPANY combinations.
  153. case $basic_machine in
  154. # Recognize the basic CPU types without company name.
  155. # Some are omitted here because they have special meanings below.
  156. tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
  157. | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
  158. | 580 | i960 | h8300 \
  159. | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
  160. | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
  161. | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
  162. | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
  163. | mips64orion | mips64orionel | mipstx39 | mipstx39el \
  164. | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
  165. | mips64vr5000 | miprs64vr5000el | mcore \
  166. | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
  167. | thumb | d10v)
  168. basic_machine=$basic_machine-unknown
  169. ;;
  170. m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
  171. ;;
  172. # We use `pc' rather than `unknown'
  173. # because (1) that's what they normally are, and
  174. # (2) the word "unknown" tends to confuse beginning users.
  175. i[34567]86)
  176. basic_machine=$basic_machine-pc
  177. ;;
  178. # Object if more than one company name word.
  179. *-*-*)
  180. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  181. exit 1
  182. ;;
  183. # Recognize the basic CPU types with company name.
  184. # FIXME: clean up the formatting here.
  185. vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
  186. | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
  187. | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
  188. | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
  189. | xmp-* | ymp-* \
  190. | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
  191. | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
  192. | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
  193. | clipper-* | orion-* \
  194. | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
  195. | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
  196. | mips64el-* | mips64orion-* | mips64orionel-* \
  197. | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
  198. | mipstx39-* | mipstx39el-* | mcore-* \
  199. | f301-* | armv*-* | t3e-* \
  200. | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
  201. | thumb-* | v850-* | d30v-* | tic30-* | c30-* )
  202. ;;
  203. # Recognize the various machine names and aliases which stand
  204. # for a CPU type and a company and sometimes even an OS.
  205. 386bsd)
  206. basic_machine=i386-unknown
  207. os=-bsd
  208. ;;
  209. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  210. basic_machine=m68000-att
  211. ;;
  212. 3b*)
  213. basic_machine=we32k-att
  214. ;;
  215. a29khif)
  216. basic_machine=a29k-amd
  217. os=-udi
  218. ;;
  219. adobe68k)
  220. basic_machine=m68010-adobe
  221. os=-scout
  222. ;;
  223. alliant | fx80)
  224. basic_machine=fx80-alliant
  225. ;;
  226. altos | altos3068)
  227. basic_machine=m68k-altos
  228. ;;
  229. am29k)
  230. basic_machine=a29k-none
  231. os=-bsd
  232. ;;
  233. amdahl)
  234. basic_machine=580-amdahl
  235. os=-sysv
  236. ;;
  237. amiga | amiga-*)
  238. basic_machine=m68k-cbm
  239. ;;
  240. amigaos | amigados)
  241. basic_machine=m68k-cbm
  242. os=-amigaos
  243. ;;
  244. amigaunix | amix)
  245. basic_machine=m68k-cbm
  246. os=-sysv4
  247. ;;
  248. apollo68)
  249. basic_machine=m68k-apollo
  250. os=-sysv
  251. ;;
  252. apollo68bsd)
  253. basic_machine=m68k-apollo
  254. os=-bsd
  255. ;;
  256. aux)
  257. basic_machine=m68k-apple
  258. os=-aux
  259. ;;
  260. balance)
  261. basic_machine=ns32k-sequent
  262. os=-dynix
  263. ;;
  264. convex-c1)
  265. basic_machine=c1-convex
  266. os=-bsd
  267. ;;
  268. convex-c2)
  269. basic_machine=c2-convex
  270. os=-bsd
  271. ;;
  272. convex-c32)
  273. basic_machine=c32-convex
  274. os=-bsd
  275. ;;
  276. convex-c34)
  277. basic_machine=c34-convex
  278. os=-bsd
  279. ;;
  280. convex-c38)
  281. basic_machine=c38-convex
  282. os=-bsd
  283. ;;
  284. cray | ymp)
  285. basic_machine=ymp-cray
  286. os=-unicos
  287. ;;
  288. cray2)
  289. basic_machine=cray2-cray
  290. os=-unicos
  291. ;;
  292. [ctj]90-cray)
  293. basic_machine=c90-cray
  294. os=-unicos
  295. ;;
  296. crds | unos)
  297. basic_machine=m68k-crds
  298. ;;
  299. da30 | da30-*)
  300. basic_machine=m68k-da30
  301. ;;
  302. decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  303. basic_machine=mips-dec
  304. ;;
  305. delta | 3300 | motorola-3300 | motorola-delta \
  306. | 3300-motorola | delta-motorola)
  307. basic_machine=m68k-motorola
  308. ;;
  309. delta88)
  310. basic_machine=m88k-motorola
  311. os=-sysv3
  312. ;;
  313. dpx20 | dpx20-*)
  314. basic_machine=rs6000-bull
  315. os=-bosx
  316. ;;
  317. dpx2* | dpx2*-bull)
  318. basic_machine=m68k-bull
  319. os=-sysv3
  320. ;;
  321. ebmon29k)
  322. basic_machine=a29k-amd
  323. os=-ebmon
  324. ;;
  325. elxsi)
  326. basic_machine=elxsi-elxsi
  327. os=-bsd
  328. ;;
  329. encore | umax | mmax)
  330. basic_machine=ns32k-encore
  331. ;;
  332. es1800 | OSE68k | ose68k | ose | OSE)
  333. basic_machine=m68k-ericsson
  334. os=-ose
  335. ;;
  336. fx2800)
  337. basic_machine=i860-alliant
  338. ;;
  339. genix)
  340. basic_machine=ns32k-ns
  341. ;;
  342. gmicro)
  343. basic_machine=tron-gmicro
  344. os=-sysv
  345. ;;
  346. h3050r* | hiux*)
  347. basic_machine=hppa1.1-hitachi
  348. os=-hiuxwe2
  349. ;;
  350. h8300hms)
  351. basic_machine=h8300-hitachi
  352. os=-hms
  353. ;;
  354. h8300xray)
  355. basic_machine=h8300-hitachi
  356. os=-xray
  357. ;;
  358. h8500hms)
  359. basic_machine=h8500-hitachi
  360. os=-hms
  361. ;;
  362. harris)
  363. basic_machine=m88k-harris
  364. os=-sysv3
  365. ;;
  366. hp300-*)
  367. basic_machine=m68k-hp
  368. ;;
  369. hp300bsd)
  370. basic_machine=m68k-hp
  371. os=-bsd
  372. ;;
  373. hp300hpux)
  374. basic_machine=m68k-hp
  375. os=-hpux
  376. ;;
  377. hp3k9[0-9][0-9] | hp9[0-9][0-9])
  378. basic_machine=hppa1.0-hp
  379. ;;
  380. hp9k2[0-9][0-9] | hp9k31[0-9])
  381. basic_machine=m68000-hp
  382. ;;
  383. hp9k3[2-9][0-9])
  384. basic_machine=m68k-hp
  385. ;;
  386. hp9k6[0-9][0-9] | hp6[0-9][0-9])
  387. basic_machine=hppa1.0-hp
  388. ;;
  389. hp9k7[0-79][0-9] | hp7[0-79][0-9])
  390. basic_machine=hppa1.1-hp
  391. ;;
  392. hp9k78[0-9] | hp78[0-9])
  393. # FIXME: really hppa2.0-hp
  394. basic_machine=hppa1.1-hp
  395. ;;
  396. hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
  397. # FIXME: really hppa2.0-hp
  398. basic_machine=hppa1.1-hp
  399. ;;
  400. hp9k8[0-9][13679] | hp8[0-9][13679])
  401. basic_machine=hppa1.1-hp
  402. ;;
  403. hp9k8[0-9][0-9] | hp8[0-9][0-9])
  404. basic_machine=hppa1.0-hp
  405. ;;
  406. hppa-next)
  407. os=-nextstep3
  408. ;;
  409. hppaosf)
  410. basic_machine=hppa1.1-hp
  411. os=-osf
  412. ;;
  413. hppro)
  414. basic_machine=hppa1.1-hp
  415. os=-proelf
  416. ;;
  417. i370-ibm* | ibm*)
  418. basic_machine=i370-ibm
  419. os=-mvs
  420. ;;
  421. # I'm not sure what "Sysv32" means. Should this be sysv3.2?
  422. i[34567]86v32)
  423. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  424. os=-sysv32
  425. ;;
  426. i[34567]86v4*)
  427. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  428. os=-sysv4
  429. ;;
  430. i[34567]86v)
  431. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  432. os=-sysv
  433. ;;
  434. i[34567]86sol2)
  435. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  436. os=-solaris2
  437. ;;
  438. i386mach)
  439. basic_machine=i386-mach
  440. os=-mach
  441. ;;
  442. i386-vsta | vsta)
  443. basic_machine=i386-unknown
  444. os=-vsta
  445. ;;
  446. i386-go32 | go32)
  447. basic_machine=i386-unknown
  448. os=-go32
  449. ;;
  450. i386-mingw32 | mingw32)
  451. basic_machine=i386-unknown
  452. os=-mingw32
  453. ;;
  454. iris | iris4d)
  455. basic_machine=mips-sgi
  456. case $os in
  457. -irix*)
  458. ;;
  459. *)
  460. os=-irix4
  461. ;;
  462. esac
  463. ;;
  464. isi68 | isi)
  465. basic_machine=m68k-isi
  466. os=-sysv
  467. ;;
  468. m88k-omron*)
  469. basic_machine=m88k-omron
  470. ;;
  471. magnum | m3230)
  472. basic_machine=mips-mips
  473. os=-sysv
  474. ;;
  475. merlin)
  476. basic_machine=ns32k-utek
  477. os=-sysv
  478. ;;
  479. miniframe)
  480. basic_machine=m68000-convergent
  481. ;;
  482. *mint | *MiNT)
  483. basic_machine=m68k-atari
  484. os=-mint
  485. ;;
  486. mipsel*-linux*)
  487. basic_machine=mipsel-unknown
  488. os=-linux-gnu
  489. ;;
  490. mips*-linux*)
  491. basic_machine=mips-unknown
  492. os=-linux-gnu
  493. ;;
  494. mips3*-*)
  495. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  496. ;;
  497. mips3*)
  498. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  499. ;;
  500. monitor)
  501. basic_machine=m68k-rom68k
  502. os=-coff
  503. ;;
  504. msdos)
  505. basic_machine=i386-unknown
  506. os=-msdos
  507. ;;
  508. ncr3000)
  509. basic_machine=i486-ncr
  510. os=-sysv4
  511. ;;
  512. netbsd386)
  513. basic_machine=i386-unknown
  514. os=-netbsd
  515. ;;
  516. netwinder)
  517. basic_machine=armv4l-corel
  518. os=-linux
  519. ;;
  520. news | news700 | news800 | news900)
  521. basic_machine=m68k-sony
  522. os=-newsos
  523. ;;
  524. news1000)
  525. basic_machine=m68030-sony
  526. os=-newsos
  527. ;;
  528. news-3600 | risc-news)
  529. basic_machine=mips-sony
  530. os=-newsos
  531. ;;
  532. necv70)
  533. basic_machine=v70-nec
  534. os=-sysv
  535. ;;
  536. next | m*-next )
  537. basic_machine=m68k-next
  538. case $os in
  539. -nextstep* )
  540. ;;
  541. -ns2*)
  542. os=-nextstep2
  543. ;;
  544. *)
  545. os=-nextstep3
  546. ;;
  547. esac
  548. ;;
  549. nh3000)
  550. basic_machine=m68k-harris
  551. os=-cxux
  552. ;;
  553. nh[45]000)
  554. basic_machine=m88k-harris
  555. os=-cxux
  556. ;;
  557. nindy960)
  558. basic_machine=i960-intel
  559. os=-nindy
  560. ;;
  561. mon960)
  562. basic_machine=i960-intel
  563. os=-mon960
  564. ;;
  565. np1)
  566. basic_machine=np1-gould
  567. ;;
  568. op50n-* | op60c-*)
  569. basic_machine=hppa1.1-oki
  570. os=-proelf
  571. ;;
  572. OSE68000 | ose68000)
  573. basic_machine=m68000-ericsson
  574. os=-ose
  575. ;;
  576. os68k)
  577. basic_machine=m68k-none
  578. os=-os68k
  579. ;;
  580. pa-hitachi)
  581. basic_machine=hppa1.1-hitachi
  582. os=-hiuxwe2
  583. ;;
  584. paragon)
  585. basic_machine=i860-intel
  586. os=-osf
  587. ;;
  588. pbd)
  589. basic_machine=sparc-tti
  590. ;;
  591. pbb)
  592. basic_machine=m68k-tti
  593. ;;
  594. pc532 | pc532-*)
  595. basic_machine=ns32k-pc532
  596. ;;
  597. pentium | p5 | k5 | k6 | nexen)
  598. basic_machine=i586-pc
  599. ;;
  600. pentiumpro | p6 | 6x86)
  601. basic_machine=i686-pc
  602. ;;
  603. pentiumii | pentium2)
  604. basic_machine=i786-pc
  605. ;;
  606. pentium-* | p5-* | k5-* | k6-* | nexen-*)
  607. basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  608. ;;
  609. pentiumpro-* | p6-* | 6x86-*)
  610. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  611. ;;
  612. pentiumii-* | pentium2-*)
  613. basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  614. ;;
  615. pn)
  616. basic_machine=pn-gould
  617. ;;
  618. power) basic_machine=rs6000-ibm
  619. ;;
  620. ppc) basic_machine=powerpc-unknown
  621. ;;
  622. ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  623. ;;
  624. ppcle | powerpclittle | ppc-le | powerpc-little)
  625. basic_machine=powerpcle-unknown
  626. ;;
  627. ppcle-* | powerpclittle-*)
  628. basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  629. ;;
  630. ps2)
  631. basic_machine=i386-ibm
  632. ;;
  633. rom68k)
  634. basic_machine=m68k-rom68k
  635. os=-coff
  636. ;;
  637. rm[46]00)
  638. basic_machine=mips-siemens
  639. ;;
  640. rtpc | rtpc-*)
  641. basic_machine=romp-ibm
  642. ;;
  643. sa29200)
  644. basic_machine=a29k-amd
  645. os=-udi
  646. ;;
  647. sequent)
  648. basic_machine=i386-sequent
  649. ;;
  650. sh)
  651. basic_machine=sh-hitachi
  652. os=-hms
  653. ;;
  654. sparclite-wrs)
  655. basic_machine=sparclite-wrs
  656. os=-vxworks
  657. ;;
  658. sps7)
  659. basic_machine=m68k-bull
  660. os=-sysv2
  661. ;;
  662. spur)
  663. basic_machine=spur-unknown
  664. ;;
  665. st2000)
  666. basic_machine=m68k-tandem
  667. ;;
  668. stratus)
  669. basic_machine=i860-stratus
  670. os=-sysv4
  671. ;;
  672. sun2)
  673. basic_machine=m68000-sun
  674. ;;
  675. sun2os3)
  676. basic_machine=m68000-sun
  677. os=-sunos3
  678. ;;
  679. sun2os4)
  680. basic_machine=m68000-sun
  681. os=-sunos4
  682. ;;
  683. sun3os3)
  684. basic_machine=m68k-sun
  685. os=-sunos3
  686. ;;
  687. sun3os4)
  688. basic_machine=m68k-sun
  689. os=-sunos4
  690. ;;
  691. sun4os3)
  692. basic_machine=sparc-sun
  693. os=-sunos3
  694. ;;
  695. sun4os4)
  696. basic_machine=sparc-sun
  697. os=-sunos4
  698. ;;
  699. sun4sol2)
  700. basic_machine=sparc-sun
  701. os=-solaris2
  702. ;;
  703. sun3 | sun3-*)
  704. basic_machine=m68k-sun
  705. ;;
  706. sun4)
  707. basic_machine=sparc-sun
  708. ;;
  709. sun386 | sun386i | roadrunner)
  710. basic_machine=i386-sun
  711. ;;
  712. symmetry)
  713. basic_machine=i386-sequent
  714. os=-dynix
  715. ;;
  716. t3e)
  717. basic_machine=t3e-cray
  718. os=-unicos
  719. ;;
  720. tx39)
  721. basic_machine=mipstx39-unknown
  722. ;;
  723. tx39el)
  724. basic_machine=mipstx39el-unknown
  725. ;;
  726. tower | tower-32)
  727. basic_machine=m68k-ncr
  728. ;;
  729. udi29k)
  730. basic_machine=a29k-amd
  731. os=-udi
  732. ;;
  733. ultra3)
  734. basic_machine=a29k-nyu
  735. os=-sym1
  736. ;;
  737. v810 | necv810)
  738. basic_machine=v810-nec
  739. os=-none
  740. ;;
  741. vaxv)
  742. basic_machine=vax-dec
  743. os=-sysv
  744. ;;
  745. vms)
  746. basic_machine=vax-dec
  747. os=-vms
  748. ;;
  749. vpp*|vx|vx-*)
  750. basic_machine=f301-fujitsu
  751. ;;
  752. vxworks960)
  753. basic_machine=i960-wrs
  754. os=-vxworks
  755. ;;
  756. vxworks68)
  757. basic_machine=m68k-wrs
  758. os=-vxworks
  759. ;;
  760. vxworks29k)
  761. basic_machine=a29k-wrs
  762. os=-vxworks
  763. ;;
  764. w65*)
  765. basic_machine=w65-wdc
  766. os=-none
  767. ;;
  768. w89k-*)
  769. basic_machine=hppa1.1-winbond
  770. os=-proelf
  771. ;;
  772. xmp)
  773. basic_machine=xmp-cray
  774. os=-unicos
  775. ;;
  776. xps | xps100)
  777. basic_machine=xps100-honeywell
  778. ;;
  779. z8k-*-coff)
  780. basic_machine=z8k-unknown
  781. os=-sim
  782. ;;
  783. none)
  784. basic_machine=none-none
  785. os=-none
  786. ;;
  787. # Here we handle the default manufacturer of certain CPU types. It is in
  788. # some cases the only manufacturer, in others, it is the most popular.
  789. w89k)
  790. basic_machine=hppa1.1-winbond
  791. ;;
  792. op50n)
  793. basic_machine=hppa1.1-oki
  794. ;;
  795. op60c)
  796. basic_machine=hppa1.1-oki
  797. ;;
  798. mips)
  799. if [ x$os = x-linux-gnu ]; then
  800. basic_machine=mips-unknown
  801. else
  802. basic_machine=mips-mips
  803. fi
  804. ;;
  805. romp)
  806. basic_machine=romp-ibm
  807. ;;
  808. rs6000)
  809. basic_machine=rs6000-ibm
  810. ;;
  811. vax)
  812. basic_machine=vax-dec
  813. ;;
  814. pdp11)
  815. basic_machine=pdp11-dec
  816. ;;
  817. we32k)
  818. basic_machine=we32k-att
  819. ;;
  820. sparc | sparcv9)
  821. basic_machine=sparc-sun
  822. ;;
  823. cydra)
  824. basic_machine=cydra-cydrome
  825. ;;
  826. orion)
  827. basic_machine=orion-highlevel
  828. ;;
  829. orion105)
  830. basic_machine=clipper-highlevel
  831. ;;
  832. mac | mpw | mac-mpw)
  833. basic_machine=m68k-apple
  834. ;;
  835. pmac | pmac-mpw)
  836. basic_machine=powerpc-apple
  837. ;;
  838. c4x*)
  839. basic_machine=c4x-none
  840. os=-coff
  841. ;;
  842. *)
  843. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  844. exit 1
  845. ;;
  846. esac
  847. # Here we canonicalize certain aliases for manufacturers.
  848. case $basic_machine in
  849. *-digital*)
  850. basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  851. ;;
  852. *-commodore*)
  853. basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  854. ;;
  855. *)
  856. ;;
  857. esac
  858. # Decode manufacturer-specific aliases for certain operating systems.
  859. if [ x"$os" != x"" ]
  860. then
  861. case $os in
  862. # First match some system type aliases
  863. # that might get confused with valid system types.
  864. # -solaris* is a basic system type, with this one exception.
  865. -solaris1 | -solaris1.*)
  866. os=`echo $os | sed -e 's|solaris1|sunos4|'`
  867. ;;
  868. -solaris)
  869. os=-solaris2
  870. ;;
  871. -svr4*)
  872. os=-sysv4
  873. ;;
  874. -unixware*)
  875. os=-sysv4.2uw
  876. ;;
  877. -gnu/linux*)
  878. os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  879. ;;
  880. # First accept the basic system types.
  881. # The portable systems comes first.
  882. # Each alternative MUST END IN A *, to match a version number.
  883. # -sysv* is not here because it comes later, after sysvr4.
  884. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  885. | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
  886. | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  887. | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  888. | -aos* \
  889. | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  890. | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  891. | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
  892. | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  893. | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  894. | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  895. | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  896. | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
  897. | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
  898. # Remember, each alternative MUST END IN *, to match a version number.
  899. ;;
  900. -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  901. | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
  902. | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
  903. ;;
  904. -mac*)
  905. os=`echo $os | sed -e 's|mac|macos|'`
  906. ;;
  907. -linux*)
  908. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  909. ;;
  910. -sunos5*)
  911. os=`echo $os | sed -e 's|sunos5|solaris2|'`
  912. ;;
  913. -sunos6*)
  914. os=`echo $os | sed -e 's|sunos6|solaris3|'`
  915. ;;
  916. -osfrose*)
  917. os=-osfrose
  918. ;;
  919. -osf*)
  920. os=-osf
  921. ;;
  922. -utek*)
  923. os=-bsd
  924. ;;
  925. -dynix*)
  926. os=-bsd
  927. ;;
  928. -acis*)
  929. os=-aos
  930. ;;
  931. -386bsd)
  932. os=-bsd
  933. ;;
  934. -ctix* | -uts*)
  935. os=-sysv
  936. ;;
  937. -ns2 )
  938. os=-nextstep2
  939. ;;
  940. # Preserve the version number of sinix5.
  941. -sinix5.*)
  942. os=`echo $os | sed -e 's|sinix|sysv|'`
  943. ;;
  944. -sinix*)
  945. os=-sysv4
  946. ;;
  947. -triton*)
  948. os=-sysv3
  949. ;;
  950. -oss*)
  951. os=-sysv3
  952. ;;
  953. -svr4)
  954. os=-sysv4
  955. ;;
  956. -svr3)
  957. os=-sysv3
  958. ;;
  959. -sysvr4)
  960. os=-sysv4
  961. ;;
  962. # This must come after -sysvr4.
  963. -sysv*)
  964. ;;
  965. -ose*)
  966. os=-ose
  967. ;;
  968. -es1800*)
  969. os=-ose
  970. ;;
  971. -xenix)
  972. os=-xenix
  973. ;;
  974. -*mint | -*MiNT)
  975. os=-mint
  976. ;;
  977. -none)
  978. ;;
  979. *)
  980. # Get rid of the `-' at the beginning of $os.
  981. os=`echo $os | sed 's/[^-]*-//'`
  982. echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  983. exit 1
  984. ;;
  985. esac
  986. else
  987. # Here we handle the default operating systems that come with various machines.
  988. # The value should be what the vendor currently ships out the door with their
  989. # machine or put another way, the most popular os provided with the machine.
  990. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  991. # "-sun"), then you have to tell the case statement up towards the top
  992. # that MANUFACTURER isn't an operating system. Otherwise, code above
  993. # will signal an error saying that MANUFACTURER isn't an operating
  994. # system, and we'll never get to this point.
  995. case $basic_machine in
  996. *-acorn)
  997. os=-riscix1.2
  998. ;;
  999. arm*-corel)
  1000. os=-linux
  1001. ;;
  1002. arm*-semi)
  1003. os=-aout
  1004. ;;
  1005. pdp11-*)
  1006. os=-none
  1007. ;;
  1008. *-dec | vax-*)
  1009. os=-ultrix4.2
  1010. ;;
  1011. m68*-apollo)
  1012. os=-domain
  1013. ;;
  1014. i386-sun)
  1015. os=-sunos4.0.2
  1016. ;;
  1017. m68000-sun)
  1018. os=-sunos3
  1019. # This also exists in the configure program, but was not the
  1020. # default.
  1021. # os=-sunos4
  1022. ;;
  1023. m68*-cisco)
  1024. os=-aout
  1025. ;;
  1026. mips*-cisco)
  1027. os=-elf
  1028. ;;
  1029. mips*-*)
  1030. os=-elf
  1031. ;;
  1032. *-tti) # must be before sparc entry or we get the wrong os.
  1033. os=-sysv3
  1034. ;;
  1035. sparc-* | *-sun)
  1036. os=-sunos4.1.1
  1037. ;;
  1038. *-be)
  1039. os=-beos
  1040. ;;
  1041. *-ibm)
  1042. os=-aix
  1043. ;;
  1044. *-wec)
  1045. os=-proelf
  1046. ;;
  1047. *-winbond)
  1048. os=-proelf
  1049. ;;
  1050. *-oki)
  1051. os=-proelf
  1052. ;;
  1053. *-hp)
  1054. os=-hpux
  1055. ;;
  1056. *-hitachi)
  1057. os=-hiux
  1058. ;;
  1059. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  1060. os=-sysv
  1061. ;;
  1062. *-cbm)
  1063. os=-amigaos
  1064. ;;
  1065. *-dg)
  1066. os=-dgux
  1067. ;;
  1068. *-dolphin)
  1069. os=-sysv3
  1070. ;;
  1071. m68k-ccur)
  1072. os=-rtu
  1073. ;;
  1074. m88k-omron*)
  1075. os=-luna
  1076. ;;
  1077. *-next )
  1078. os=-nextstep
  1079. ;;
  1080. *-sequent)
  1081. os=-ptx
  1082. ;;
  1083. *-crds)
  1084. os=-unos
  1085. ;;
  1086. *-ns)
  1087. os=-genix
  1088. ;;
  1089. i370-*)
  1090. os=-mvs
  1091. ;;
  1092. *-next)
  1093. os=-nextstep3
  1094. ;;
  1095. *-gould)
  1096. os=-sysv
  1097. ;;
  1098. *-highlevel)
  1099. os=-bsd
  1100. ;;
  1101. *-encore)
  1102. os=-bsd
  1103. ;;
  1104. *-sgi)
  1105. os=-irix
  1106. ;;
  1107. *-siemens)
  1108. os=-sysv4
  1109. ;;
  1110. *-masscomp)
  1111. os=-rtu
  1112. ;;
  1113. f301-fujitsu)
  1114. os=-uxpv
  1115. ;;
  1116. *-rom68k)
  1117. os=-coff
  1118. ;;
  1119. *-*bug)
  1120. os=-coff
  1121. ;;
  1122. *-apple)
  1123. os=-macos
  1124. ;;
  1125. *-atari*)
  1126. os=-mint
  1127. ;;
  1128. *)
  1129. os=-none
  1130. ;;
  1131. esac
  1132. fi
  1133. # Here we handle the case where we know the os, and the CPU type, but not the
  1134. # manufacturer. We pick the logical manufacturer.
  1135. vendor=unknown
  1136. case $basic_machine in
  1137. *-unknown)
  1138. case $os in
  1139. -riscix*)
  1140. vendor=acorn
  1141. ;;
  1142. -sunos*)
  1143. vendor=sun
  1144. ;;
  1145. -aix*)
  1146. vendor=ibm
  1147. ;;
  1148. -beos*)
  1149. vendor=be
  1150. ;;
  1151. -hpux*)
  1152. vendor=hp
  1153. ;;
  1154. -mpeix*)
  1155. vendor=hp
  1156. ;;
  1157. -hiux*)
  1158. vendor=hitachi
  1159. ;;
  1160. -unos*)
  1161. vendor=crds
  1162. ;;
  1163. -dgux*)
  1164. vendor=dg
  1165. ;;
  1166. -luna*)
  1167. vendor=omron
  1168. ;;
  1169. -genix*)
  1170. vendor=ns
  1171. ;;
  1172. -mvs*)
  1173. vendor=ibm
  1174. ;;
  1175. -ptx*)
  1176. vendor=sequent
  1177. ;;
  1178. -vxsim* | -vxworks*)
  1179. vendor=wrs
  1180. ;;
  1181. -aux*)
  1182. vendor=apple
  1183. ;;
  1184. -hms*)
  1185. vendor=hitachi
  1186. ;;
  1187. -mpw* | -macos*)
  1188. vendor=apple
  1189. ;;
  1190. -*mint | -*MiNT)
  1191. vendor=atari
  1192. ;;
  1193. esac
  1194. basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  1195. ;;
  1196. esac
  1197. echo $basic_machine$os