config.sub 30 KB

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