config.sub 34 KB

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