config.sub 33 KB

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