config.sub 30 KB

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