config.sub 31 KB

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