config.sub 27 KB

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