config.sub 32 KB

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