config.sub 32 KB

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