config.sub 32 KB

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