config.sub 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331
  1. #! /bin/sh
  2. # Configuration validation subroutine script, version 1.1.
  3. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
  4. # Free Software Foundation, Inc.
  5. version='2000-09-05'
  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>.
  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. -V, --version print version number, then exit"
  55. help="
  56. Try \`$me --help' for more information."
  57. # Parse command line
  58. while test $# -gt 0 ; do
  59. case "$1" in
  60. --version | --vers* | -V )
  61. echo "$version" ; exit 0 ;;
  62. --help | --h* | -h )
  63. echo "$usage"; exit 0 ;;
  64. -- ) # Stop option processing
  65. shift; break ;;
  66. - ) # Use stdin as input.
  67. break ;;
  68. -* )
  69. exec >&2
  70. echo "$me: invalid option $1"
  71. echo "$help"
  72. exit 1 ;;
  73. *local*)
  74. # First pass through any local machine types.
  75. echo $1
  76. exit 0;;
  77. * )
  78. break ;;
  79. esac
  80. done
  81. case $# in
  82. 0) echo "$me: missing argument$help" >&2
  83. exit 1;;
  84. 1) ;;
  85. *) echo "$me: too many arguments$help" >&2
  86. exit 1;;
  87. esac
  88. # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
  89. # Here we must recognize all the valid KERNEL-OS combinations.
  90. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  91. case $maybe_os in
  92. nto-qnx* | linux-gnu*)
  93. os=-$maybe_os
  94. basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
  95. ;;
  96. *)
  97. basic_machine=`echo $1 | sed 's/-[^-]*$//'`
  98. if [ $basic_machine != $1 ]
  99. then os=`echo $1 | sed 's/.*-/-/'`
  100. else os=; fi
  101. ;;
  102. esac
  103. ### Let's recognize common machines as not being operating systems so
  104. ### that things like config.sub decstation-3100 work. We also
  105. ### recognize some manufacturers as not being operating systems, so we
  106. ### can provide default operating systems below.
  107. case $os in
  108. -sun*os*)
  109. # Prevent following clause from handling this invalid input.
  110. ;;
  111. -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
  112. -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
  113. -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
  114. -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  115. -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  116. -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  117. -apple | -axis)
  118. os=
  119. basic_machine=$1
  120. ;;
  121. -sim | -cisco | -oki | -wec | -winbond)
  122. os=
  123. basic_machine=$1
  124. ;;
  125. -scout)
  126. ;;
  127. -wrs)
  128. os=-vxworks
  129. basic_machine=$1
  130. ;;
  131. -hiux*)
  132. os=-hiuxwe2
  133. ;;
  134. -sco5)
  135. os=-sco3.2v5
  136. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  137. ;;
  138. -sco4)
  139. os=-sco3.2v4
  140. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  141. ;;
  142. -sco3.2.[4-9]*)
  143. os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  144. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  145. ;;
  146. -sco3.2v[4-9]*)
  147. # Don't forget version if it is 3.2v4 or newer.
  148. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  149. ;;
  150. -sco*)
  151. os=-sco3.2v2
  152. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  153. ;;
  154. -udk*)
  155. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  156. ;;
  157. -isc)
  158. os=-isc2.2
  159. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  160. ;;
  161. -clix*)
  162. basic_machine=clipper-intergraph
  163. ;;
  164. -isc*)
  165. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  166. ;;
  167. -lynx*)
  168. os=-lynxos
  169. ;;
  170. -ptx*)
  171. basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
  172. ;;
  173. -windowsnt*)
  174. os=`echo $os | sed -e 's/windowsnt/winnt/'`
  175. ;;
  176. -psos*)
  177. os=-psos
  178. ;;
  179. -mint | -mint[0-9]*)
  180. basic_machine=m68k-atari
  181. os=-mint
  182. ;;
  183. esac
  184. # Decode aliases for certain CPU-COMPANY combinations.
  185. case $basic_machine in
  186. # Recognize the basic CPU types without company name.
  187. # Some are omitted here because they have special meanings below.
  188. tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
  189. | arme[lb] | armv* | pyramid | mn10200 | mn10300 | tron | a29k \
  190. | 580 | i960 | h8300 \
  191. | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
  192. | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
  193. | hppa64 \
  194. | parisc | parisc1.1 | parisc2.0 | parisc64 \
  195. | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
  196. | alphaev6[78] \
  197. | we32k | ns16k | clipper | i370 | sh | sh[34] \
  198. | powerpc | powerpcle \
  199. | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
  200. | mips64orion | mips64orionel | mipstx39 | mipstx39el \
  201. | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
  202. | mips64vr5000 | miprs64vr5000el | mcore \
  203. | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
  204. | thumb | d10v | d30v | fr30 | avr)
  205. basic_machine=$basic_machine-unknown
  206. ;;
  207. m6811 | m68hc11 | m6812 | m68hc12)
  208. # Motorola 68HC11/12.
  209. basic_machine=$basic_machine-unknown
  210. os=-none
  211. ;;
  212. m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
  213. ;;
  214. # We use `pc' rather than `unknown'
  215. # because (1) that's what they normally are, and
  216. # (2) the word "unknown" tends to confuse beginning users.
  217. i[234567]86 | x86_64)
  218. basic_machine=$basic_machine-pc
  219. ;;
  220. # Object if more than one company name word.
  221. *-*-*)
  222. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  223. exit 1
  224. ;;
  225. # Recognize the basic CPU types with company name.
  226. # FIXME: clean up the formatting here.
  227. vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
  228. | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
  229. | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
  230. | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
  231. | xmp-* | ymp-* \
  232. | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
  233. | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
  234. | hppa2.0n-* | hppa64-* \
  235. | parisc-* | parisc1.1-* | parisc2.0-* | parisc64-* \
  236. | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
  237. | alphaev6[78]-* \
  238. | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
  239. | clipper-* | orion-* \
  240. | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
  241. | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
  242. | mips64el-* | mips64orion-* | mips64orionel-* \
  243. | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
  244. | mipstx39-* | mipstx39el-* | mcore-* \
  245. | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
  246. | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
  247. | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
  248. | bs2000-* | tic54x-* | c54x-* | x86_64-*)
  249. ;;
  250. # Recognize the various machine names and aliases which stand
  251. # for a CPU type and a company and sometimes even an OS.
  252. 386bsd)
  253. basic_machine=i386-unknown
  254. os=-bsd
  255. ;;
  256. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  257. basic_machine=m68000-att
  258. ;;
  259. 3b*)
  260. basic_machine=we32k-att
  261. ;;
  262. a29khif)
  263. basic_machine=a29k-amd
  264. os=-udi
  265. ;;
  266. adobe68k)
  267. basic_machine=m68010-adobe
  268. os=-scout
  269. ;;
  270. alliant | fx80)
  271. basic_machine=fx80-alliant
  272. ;;
  273. altos | altos3068)
  274. basic_machine=m68k-altos
  275. ;;
  276. am29k)
  277. basic_machine=a29k-none
  278. os=-bsd
  279. ;;
  280. amdahl)
  281. basic_machine=580-amdahl
  282. os=-sysv
  283. ;;
  284. amiga | amiga-*)
  285. basic_machine=m68k-unknown
  286. ;;
  287. amigaos | amigados)
  288. basic_machine=m68k-unknown
  289. os=-amigaos
  290. ;;
  291. amigaunix | amix)
  292. basic_machine=m68k-unknown
  293. os=-sysv4
  294. ;;
  295. apollo68)
  296. basic_machine=m68k-apollo
  297. os=-sysv
  298. ;;
  299. apollo68bsd)
  300. basic_machine=m68k-apollo
  301. os=-bsd
  302. ;;
  303. aux)
  304. basic_machine=m68k-apple
  305. os=-aux
  306. ;;
  307. balance)
  308. basic_machine=ns32k-sequent
  309. os=-dynix
  310. ;;
  311. convex-c1)
  312. basic_machine=c1-convex
  313. os=-bsd
  314. ;;
  315. convex-c2)
  316. basic_machine=c2-convex
  317. os=-bsd
  318. ;;
  319. convex-c32)
  320. basic_machine=c32-convex
  321. os=-bsd
  322. ;;
  323. convex-c34)
  324. basic_machine=c34-convex
  325. os=-bsd
  326. ;;
  327. convex-c38)
  328. basic_machine=c38-convex
  329. os=-bsd
  330. ;;
  331. cray | ymp)
  332. basic_machine=ymp-cray
  333. os=-unicos
  334. ;;
  335. cray2)
  336. basic_machine=cray2-cray
  337. os=-unicos
  338. ;;
  339. [ctj]90-cray)
  340. basic_machine=c90-cray
  341. os=-unicos
  342. ;;
  343. crds | unos)
  344. basic_machine=m68k-crds
  345. ;;
  346. cris | cris-* | etrax*)
  347. basic_machine=cris-axis
  348. ;;
  349. da30 | da30-*)
  350. basic_machine=m68k-da30
  351. ;;
  352. decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  353. basic_machine=mips-dec
  354. ;;
  355. delta | 3300 | motorola-3300 | motorola-delta \
  356. | 3300-motorola | delta-motorola)
  357. basic_machine=m68k-motorola
  358. ;;
  359. delta88)
  360. basic_machine=m88k-motorola
  361. os=-sysv3
  362. ;;
  363. dpx20 | dpx20-*)
  364. basic_machine=rs6000-bull
  365. os=-bosx
  366. ;;
  367. dpx2* | dpx2*-bull)
  368. basic_machine=m68k-bull
  369. os=-sysv3
  370. ;;
  371. ebmon29k)
  372. basic_machine=a29k-amd
  373. os=-ebmon
  374. ;;
  375. elxsi)
  376. basic_machine=elxsi-elxsi
  377. os=-bsd
  378. ;;
  379. encore | umax | mmax)
  380. basic_machine=ns32k-encore
  381. ;;
  382. es1800 | OSE68k | ose68k | ose | OSE)
  383. basic_machine=m68k-ericsson
  384. os=-ose
  385. ;;
  386. fx2800)
  387. basic_machine=i860-alliant
  388. ;;
  389. genix)
  390. basic_machine=ns32k-ns
  391. ;;
  392. gmicro)
  393. basic_machine=tron-gmicro
  394. os=-sysv
  395. ;;
  396. h3050r* | hiux*)
  397. basic_machine=hppa1.1-hitachi
  398. os=-hiuxwe2
  399. ;;
  400. h8300hms)
  401. basic_machine=h8300-hitachi
  402. os=-hms
  403. ;;
  404. h8300xray)
  405. basic_machine=h8300-hitachi
  406. os=-xray
  407. ;;
  408. h8500hms)
  409. basic_machine=h8500-hitachi
  410. os=-hms
  411. ;;
  412. harris)
  413. basic_machine=m88k-harris
  414. os=-sysv3
  415. ;;
  416. hp300-*)
  417. basic_machine=m68k-hp
  418. ;;
  419. hp300bsd)
  420. basic_machine=m68k-hp
  421. os=-bsd
  422. ;;
  423. hp300hpux)
  424. basic_machine=m68k-hp
  425. os=-hpux
  426. ;;
  427. hp3k9[0-9][0-9] | hp9[0-9][0-9])
  428. basic_machine=hppa1.0-hp
  429. ;;
  430. hp9k2[0-9][0-9] | hp9k31[0-9])
  431. basic_machine=m68000-hp
  432. ;;
  433. hp9k3[2-9][0-9])
  434. basic_machine=m68k-hp
  435. ;;
  436. hp9k6[0-9][0-9] | hp6[0-9][0-9])
  437. basic_machine=hppa1.0-hp
  438. ;;
  439. hp9k7[0-79][0-9] | hp7[0-79][0-9])
  440. basic_machine=hppa1.1-hp
  441. ;;
  442. hp9k78[0-9] | hp78[0-9])
  443. # FIXME: really hppa2.0-hp
  444. basic_machine=hppa1.1-hp
  445. ;;
  446. hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
  447. # FIXME: really hppa2.0-hp
  448. basic_machine=hppa1.1-hp
  449. ;;
  450. hp9k8[0-9][13679] | hp8[0-9][13679])
  451. basic_machine=hppa1.1-hp
  452. ;;
  453. hp9k8[0-9][0-9] | hp8[0-9][0-9])
  454. basic_machine=hppa1.0-hp
  455. ;;
  456. hppa-next)
  457. os=-nextstep3
  458. ;;
  459. hppaosf)
  460. basic_machine=hppa1.1-hp
  461. os=-osf
  462. ;;
  463. hppro)
  464. basic_machine=hppa1.1-hp
  465. os=-proelf
  466. ;;
  467. i370-ibm* | ibm*)
  468. basic_machine=i370-ibm
  469. ;;
  470. # I'm not sure what "Sysv32" means. Should this be sysv3.2?
  471. i[34567]86v32)
  472. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  473. os=-sysv32
  474. ;;
  475. i[34567]86v4*)
  476. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  477. os=-sysv4
  478. ;;
  479. i[34567]86v)
  480. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  481. os=-sysv
  482. ;;
  483. i[34567]86sol2)
  484. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  485. os=-solaris2
  486. ;;
  487. i386mach)
  488. basic_machine=i386-mach
  489. os=-mach
  490. ;;
  491. i386-vsta | vsta)
  492. basic_machine=i386-unknown
  493. os=-vsta
  494. ;;
  495. i386-go32 | go32)
  496. basic_machine=i386-unknown
  497. os=-go32
  498. ;;
  499. i386-mingw32 | mingw32)
  500. basic_machine=i386-unknown
  501. os=-mingw32
  502. ;;
  503. i[34567]86-pw32 | pw32)
  504. basic_machine=i586-unknown
  505. os=-pw32
  506. ;;
  507. iris | iris4d)
  508. basic_machine=mips-sgi
  509. case $os in
  510. -irix*)
  511. ;;
  512. *)
  513. os=-irix4
  514. ;;
  515. esac
  516. ;;
  517. isi68 | isi)
  518. basic_machine=m68k-isi
  519. os=-sysv
  520. ;;
  521. m88k-omron*)
  522. basic_machine=m88k-omron
  523. ;;
  524. magnum | m3230)
  525. basic_machine=mips-mips
  526. os=-sysv
  527. ;;
  528. merlin)
  529. basic_machine=ns32k-utek
  530. os=-sysv
  531. ;;
  532. miniframe)
  533. basic_machine=m68000-convergent
  534. ;;
  535. *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
  536. basic_machine=m68k-atari
  537. os=-mint
  538. ;;
  539. mipsel*-linux*)
  540. basic_machine=mipsel-unknown
  541. os=-linux-gnu
  542. ;;
  543. mips*-linux*)
  544. basic_machine=mips-unknown
  545. os=-linux-gnu
  546. ;;
  547. mips3*-*)
  548. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  549. ;;
  550. mips3*)
  551. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  552. ;;
  553. mmix*)
  554. basic_machine=mmix-knuth
  555. os=-mmixware
  556. ;;
  557. monitor)
  558. basic_machine=m68k-rom68k
  559. os=-coff
  560. ;;
  561. msdos)
  562. basic_machine=i386-unknown
  563. os=-msdos
  564. ;;
  565. mvs)
  566. basic_machine=i370-ibm
  567. os=-mvs
  568. ;;
  569. ncr3000)
  570. basic_machine=i486-ncr
  571. os=-sysv4
  572. ;;
  573. netbsd386)
  574. basic_machine=i386-unknown
  575. os=-netbsd
  576. ;;
  577. netwinder)
  578. basic_machine=armv4l-rebel
  579. os=-linux
  580. ;;
  581. news | news700 | news800 | news900)
  582. basic_machine=m68k-sony
  583. os=-newsos
  584. ;;
  585. news1000)
  586. basic_machine=m68030-sony
  587. os=-newsos
  588. ;;
  589. news-3600 | risc-news)
  590. basic_machine=mips-sony
  591. os=-newsos
  592. ;;
  593. necv70)
  594. basic_machine=v70-nec
  595. os=-sysv
  596. ;;
  597. next | m*-next )
  598. basic_machine=m68k-next
  599. case $os in
  600. -nextstep* )
  601. ;;
  602. -ns2*)
  603. os=-nextstep2
  604. ;;
  605. *)
  606. os=-nextstep3
  607. ;;
  608. esac
  609. ;;
  610. nh3000)
  611. basic_machine=m68k-harris
  612. os=-cxux
  613. ;;
  614. nh[45]000)
  615. basic_machine=m88k-harris
  616. os=-cxux
  617. ;;
  618. nindy960)
  619. basic_machine=i960-intel
  620. os=-nindy
  621. ;;
  622. mon960)
  623. basic_machine=i960-intel
  624. os=-mon960
  625. ;;
  626. np1)
  627. basic_machine=np1-gould
  628. ;;
  629. nsr-tandem)
  630. basic_machine=nsr-tandem
  631. ;;
  632. op50n-* | op60c-*)
  633. basic_machine=hppa1.1-oki
  634. os=-proelf
  635. ;;
  636. OSE68000 | ose68000)
  637. basic_machine=m68000-ericsson
  638. os=-ose
  639. ;;
  640. os68k)
  641. basic_machine=m68k-none
  642. os=-os68k
  643. ;;
  644. pa-hitachi)
  645. basic_machine=hppa1.1-hitachi
  646. os=-hiuxwe2
  647. ;;
  648. paragon)
  649. basic_machine=i860-intel
  650. os=-osf
  651. ;;
  652. pbd)
  653. basic_machine=sparc-tti
  654. ;;
  655. pbb)
  656. basic_machine=m68k-tti
  657. ;;
  658. pc532 | pc532-*)
  659. basic_machine=ns32k-pc532
  660. ;;
  661. pentium | p5 | k5 | k6 | nexen)
  662. basic_machine=i586-pc
  663. ;;
  664. pentiumpro | p6 | 6x86 | athlon)
  665. basic_machine=i686-pc
  666. ;;
  667. pentiumii | pentium2)
  668. basic_machine=i786-pc
  669. ;;
  670. pentium-* | p5-* | k5-* | k6-* | nexen-*)
  671. basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  672. ;;
  673. pentiumpro-* | p6-* | 6x86-* | athlon-*)
  674. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  675. ;;
  676. pentiumii-* | pentium2-*)
  677. basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  678. ;;
  679. pn)
  680. basic_machine=pn-gould
  681. ;;
  682. power) basic_machine=rs6000-ibm
  683. ;;
  684. ppc) basic_machine=powerpc-unknown
  685. ;;
  686. ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  687. ;;
  688. ppcle | powerpclittle | ppc-le | powerpc-little)
  689. basic_machine=powerpcle-unknown
  690. ;;
  691. ppcle-* | powerpclittle-*)
  692. basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  693. ;;
  694. ps2)
  695. basic_machine=i386-ibm
  696. ;;
  697. rom68k)
  698. basic_machine=m68k-rom68k
  699. os=-coff
  700. ;;
  701. rm[46]00)
  702. basic_machine=mips-siemens
  703. ;;
  704. rtpc | rtpc-*)
  705. basic_machine=romp-ibm
  706. ;;
  707. sa29200)
  708. basic_machine=a29k-amd
  709. os=-udi
  710. ;;
  711. sequent)
  712. basic_machine=i386-sequent
  713. ;;
  714. sh)
  715. basic_machine=sh-hitachi
  716. os=-hms
  717. ;;
  718. sparclite-wrs)
  719. basic_machine=sparclite-wrs
  720. os=-vxworks
  721. ;;
  722. sps7)
  723. basic_machine=m68k-bull
  724. os=-sysv2
  725. ;;
  726. spur)
  727. basic_machine=spur-unknown
  728. ;;
  729. st2000)
  730. basic_machine=m68k-tandem
  731. ;;
  732. stratus)
  733. basic_machine=i860-stratus
  734. os=-sysv4
  735. ;;
  736. sun2)
  737. basic_machine=m68000-sun
  738. ;;
  739. sun2os3)
  740. basic_machine=m68000-sun
  741. os=-sunos3
  742. ;;
  743. sun2os4)
  744. basic_machine=m68000-sun
  745. os=-sunos4
  746. ;;
  747. sun3os3)
  748. basic_machine=m68k-sun
  749. os=-sunos3
  750. ;;
  751. sun3os4)
  752. basic_machine=m68k-sun
  753. os=-sunos4
  754. ;;
  755. sun4os3)
  756. basic_machine=sparc-sun
  757. os=-sunos3
  758. ;;
  759. sun4os4)
  760. basic_machine=sparc-sun
  761. os=-sunos4
  762. ;;
  763. sun4sol2)
  764. basic_machine=sparc-sun
  765. os=-solaris2
  766. ;;
  767. sun3 | sun3-*)
  768. basic_machine=m68k-sun
  769. ;;
  770. sun4)
  771. basic_machine=sparc-sun
  772. ;;
  773. sun386 | sun386i | roadrunner)
  774. basic_machine=i386-sun
  775. ;;
  776. sv1)
  777. basic_machine=sv1-cray
  778. os=-unicos
  779. ;;
  780. symmetry)
  781. basic_machine=i386-sequent
  782. os=-dynix
  783. ;;
  784. t3e)
  785. basic_machine=t3e-cray
  786. os=-unicos
  787. ;;
  788. tic54x | c54x*)
  789. basic_machine=tic54x-unknown
  790. os=-coff
  791. ;;
  792. tx39)
  793. basic_machine=mipstx39-unknown
  794. ;;
  795. tx39el)
  796. basic_machine=mipstx39el-unknown
  797. ;;
  798. tower | tower-32)
  799. basic_machine=m68k-ncr
  800. ;;
  801. udi29k)
  802. basic_machine=a29k-amd
  803. os=-udi
  804. ;;
  805. ultra3)
  806. basic_machine=a29k-nyu
  807. os=-sym1
  808. ;;
  809. v810 | necv810)
  810. basic_machine=v810-nec
  811. os=-none
  812. ;;
  813. vaxv)
  814. basic_machine=vax-dec
  815. os=-sysv
  816. ;;
  817. vms)
  818. basic_machine=vax-dec
  819. os=-vms
  820. ;;
  821. vpp*|vx|vx-*)
  822. basic_machine=f301-fujitsu
  823. ;;
  824. vxworks960)
  825. basic_machine=i960-wrs
  826. os=-vxworks
  827. ;;
  828. vxworks68)
  829. basic_machine=m68k-wrs
  830. os=-vxworks
  831. ;;
  832. vxworks29k)
  833. basic_machine=a29k-wrs
  834. os=-vxworks
  835. ;;
  836. w65*)
  837. basic_machine=w65-wdc
  838. os=-none
  839. ;;
  840. w89k-*)
  841. basic_machine=hppa1.1-winbond
  842. os=-proelf
  843. ;;
  844. xmp)
  845. basic_machine=xmp-cray
  846. os=-unicos
  847. ;;
  848. xps | xps100)
  849. basic_machine=xps100-honeywell
  850. ;;
  851. z8k-*-coff)
  852. basic_machine=z8k-unknown
  853. os=-sim
  854. ;;
  855. none)
  856. basic_machine=none-none
  857. os=-none
  858. ;;
  859. # Here we handle the default manufacturer of certain CPU types. It is in
  860. # some cases the only manufacturer, in others, it is the most popular.
  861. w89k)
  862. basic_machine=hppa1.1-winbond
  863. ;;
  864. op50n)
  865. basic_machine=hppa1.1-oki
  866. ;;
  867. op60c)
  868. basic_machine=hppa1.1-oki
  869. ;;
  870. mips)
  871. if [ x$os = x-linux-gnu ]; then
  872. basic_machine=mips-unknown
  873. else
  874. basic_machine=mips-mips
  875. fi
  876. ;;
  877. romp)
  878. basic_machine=romp-ibm
  879. ;;
  880. rs6000)
  881. basic_machine=rs6000-ibm
  882. ;;
  883. vax)
  884. basic_machine=vax-dec
  885. ;;
  886. pdp11)
  887. basic_machine=pdp11-dec
  888. ;;
  889. we32k)
  890. basic_machine=we32k-att
  891. ;;
  892. sh3 | sh4)
  893. base_machine=sh-unknown
  894. ;;
  895. sparc | sparcv9)
  896. basic_machine=sparc-sun
  897. ;;
  898. cydra)
  899. basic_machine=cydra-cydrome
  900. ;;
  901. orion)
  902. basic_machine=orion-highlevel
  903. ;;
  904. orion105)
  905. basic_machine=clipper-highlevel
  906. ;;
  907. mac | mpw | mac-mpw)
  908. basic_machine=m68k-apple
  909. ;;
  910. pmac | pmac-mpw)
  911. basic_machine=powerpc-apple
  912. ;;
  913. c4x*)
  914. basic_machine=c4x-none
  915. os=-coff
  916. ;;
  917. *)
  918. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  919. exit 1
  920. ;;
  921. esac
  922. # Here we canonicalize certain aliases for manufacturers.
  923. case $basic_machine in
  924. *-digital*)
  925. basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  926. ;;
  927. *-commodore*)
  928. basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  929. ;;
  930. *)
  931. ;;
  932. esac
  933. # Decode manufacturer-specific aliases for certain operating systems.
  934. if [ x"$os" != x"" ]
  935. then
  936. case $os in
  937. # First match some system type aliases
  938. # that might get confused with valid system types.
  939. # -solaris* is a basic system type, with this one exception.
  940. -solaris1 | -solaris1.*)
  941. os=`echo $os | sed -e 's|solaris1|sunos4|'`
  942. ;;
  943. -solaris)
  944. os=-solaris2
  945. ;;
  946. -svr4*)
  947. os=-sysv4
  948. ;;
  949. -unixware*)
  950. os=-sysv4.2uw
  951. ;;
  952. -gnu/linux*)
  953. os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  954. ;;
  955. # First accept the basic system types.
  956. # The portable systems comes first.
  957. # Each alternative MUST END IN A *, to match a version number.
  958. # -sysv* is not here because it comes later, after sysvr4.
  959. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  960. | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
  961. | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  962. | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  963. | -aos* \
  964. | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  965. | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  966. | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
  967. | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  968. | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  969. | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  970. | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  971. | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
  972. | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
  973. | -openstep* | -oskit* | -conix* | -pw32*)
  974. # Remember, each alternative MUST END IN *, to match a version number.
  975. ;;
  976. -qnx*)
  977. case $basic_machine in
  978. x86-* | i[34567]86-*)
  979. ;;
  980. *)
  981. os=-nto$os
  982. ;;
  983. esac
  984. ;;
  985. -nto*)
  986. os=-nto-qnx
  987. ;;
  988. -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  989. | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
  990. | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
  991. ;;
  992. -mac*)
  993. os=`echo $os | sed -e 's|mac|macos|'`
  994. ;;
  995. -linux*)
  996. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  997. ;;
  998. -sunos5*)
  999. os=`echo $os | sed -e 's|sunos5|solaris2|'`
  1000. ;;
  1001. -sunos6*)
  1002. os=`echo $os | sed -e 's|sunos6|solaris3|'`
  1003. ;;
  1004. -opened*)
  1005. os=-openedition
  1006. ;;
  1007. -wince*)
  1008. os=-wince
  1009. ;;
  1010. -osfrose*)
  1011. os=-osfrose
  1012. ;;
  1013. -osf*)
  1014. os=-osf
  1015. ;;
  1016. -utek*)
  1017. os=-bsd
  1018. ;;
  1019. -dynix*)
  1020. os=-bsd
  1021. ;;
  1022. -acis*)
  1023. os=-aos
  1024. ;;
  1025. -386bsd)
  1026. os=-bsd
  1027. ;;
  1028. -ctix* | -uts*)
  1029. os=-sysv
  1030. ;;
  1031. -ns2 )
  1032. os=-nextstep2
  1033. ;;
  1034. -nsk)
  1035. os=-nsk
  1036. ;;
  1037. # Preserve the version number of sinix5.
  1038. -sinix5.*)
  1039. os=`echo $os | sed -e 's|sinix|sysv|'`
  1040. ;;
  1041. -sinix*)
  1042. os=-sysv4
  1043. ;;
  1044. -triton*)
  1045. os=-sysv3
  1046. ;;
  1047. -oss*)
  1048. os=-sysv3
  1049. ;;
  1050. -svr4)
  1051. os=-sysv4
  1052. ;;
  1053. -svr3)
  1054. os=-sysv3
  1055. ;;
  1056. -sysvr4)
  1057. os=-sysv4
  1058. ;;
  1059. # This must come after -sysvr4.
  1060. -sysv*)
  1061. ;;
  1062. -ose*)
  1063. os=-ose
  1064. ;;
  1065. -es1800*)
  1066. os=-ose
  1067. ;;
  1068. -xenix)
  1069. os=-xenix
  1070. ;;
  1071. -*mint | -*MiNT)
  1072. os=-mint
  1073. ;;
  1074. -none)
  1075. ;;
  1076. *)
  1077. # Get rid of the `-' at the beginning of $os.
  1078. os=`echo $os | sed 's/[^-]*-//'`
  1079. echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  1080. exit 1
  1081. ;;
  1082. esac
  1083. else
  1084. # Here we handle the default operating systems that come with various machines.
  1085. # The value should be what the vendor currently ships out the door with their
  1086. # machine or put another way, the most popular os provided with the machine.
  1087. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  1088. # "-sun"), then you have to tell the case statement up towards the top
  1089. # that MANUFACTURER isn't an operating system. Otherwise, code above
  1090. # will signal an error saying that MANUFACTURER isn't an operating
  1091. # system, and we'll never get to this point.
  1092. case $basic_machine in
  1093. *-acorn)
  1094. os=-riscix1.2
  1095. ;;
  1096. arm*-rebel)
  1097. os=-linux
  1098. ;;
  1099. arm*-semi)
  1100. os=-aout
  1101. ;;
  1102. pdp11-*)
  1103. os=-none
  1104. ;;
  1105. *-dec | vax-*)
  1106. os=-ultrix4.2
  1107. ;;
  1108. m68*-apollo)
  1109. os=-domain
  1110. ;;
  1111. i386-sun)
  1112. os=-sunos4.0.2
  1113. ;;
  1114. m68000-sun)
  1115. os=-sunos3
  1116. # This also exists in the configure program, but was not the
  1117. # default.
  1118. # os=-sunos4
  1119. ;;
  1120. m68*-cisco)
  1121. os=-aout
  1122. ;;
  1123. mips*-cisco)
  1124. os=-elf
  1125. ;;
  1126. mips*-*)
  1127. os=-elf
  1128. ;;
  1129. *-tti) # must be before sparc entry or we get the wrong os.
  1130. os=-sysv3
  1131. ;;
  1132. sparc-* | *-sun)
  1133. os=-sunos4.1.1
  1134. ;;
  1135. *-be)
  1136. os=-beos
  1137. ;;
  1138. *-ibm)
  1139. os=-aix
  1140. ;;
  1141. *-wec)
  1142. os=-proelf
  1143. ;;
  1144. *-winbond)
  1145. os=-proelf
  1146. ;;
  1147. *-oki)
  1148. os=-proelf
  1149. ;;
  1150. *-hp)
  1151. os=-hpux
  1152. ;;
  1153. *-hitachi)
  1154. os=-hiux
  1155. ;;
  1156. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  1157. os=-sysv
  1158. ;;
  1159. *-cbm)
  1160. os=-amigaos
  1161. ;;
  1162. *-dg)
  1163. os=-dgux
  1164. ;;
  1165. *-dolphin)
  1166. os=-sysv3
  1167. ;;
  1168. m68k-ccur)
  1169. os=-rtu
  1170. ;;
  1171. m88k-omron*)
  1172. os=-luna
  1173. ;;
  1174. *-next )
  1175. os=-nextstep
  1176. ;;
  1177. *-sequent)
  1178. os=-ptx
  1179. ;;
  1180. *-crds)
  1181. os=-unos
  1182. ;;
  1183. *-ns)
  1184. os=-genix
  1185. ;;
  1186. i370-*)
  1187. os=-mvs
  1188. ;;
  1189. *-next)
  1190. os=-nextstep3
  1191. ;;
  1192. *-gould)
  1193. os=-sysv
  1194. ;;
  1195. *-highlevel)
  1196. os=-bsd
  1197. ;;
  1198. *-encore)
  1199. os=-bsd
  1200. ;;
  1201. *-sgi)
  1202. os=-irix
  1203. ;;
  1204. *-siemens)
  1205. os=-sysv4
  1206. ;;
  1207. *-masscomp)
  1208. os=-rtu
  1209. ;;
  1210. f301-fujitsu)
  1211. os=-uxpv
  1212. ;;
  1213. *-rom68k)
  1214. os=-coff
  1215. ;;
  1216. *-*bug)
  1217. os=-coff
  1218. ;;
  1219. *-apple)
  1220. os=-macos
  1221. ;;
  1222. *-atari*)
  1223. os=-mint
  1224. ;;
  1225. *)
  1226. os=-none
  1227. ;;
  1228. esac
  1229. fi
  1230. # Here we handle the case where we know the os, and the CPU type, but not the
  1231. # manufacturer. We pick the logical manufacturer.
  1232. vendor=unknown
  1233. case $basic_machine in
  1234. *-unknown)
  1235. case $os in
  1236. -riscix*)
  1237. vendor=acorn
  1238. ;;
  1239. -sunos*)
  1240. vendor=sun
  1241. ;;
  1242. -aix*)
  1243. vendor=ibm
  1244. ;;
  1245. -beos*)
  1246. vendor=be
  1247. ;;
  1248. -hpux*)
  1249. vendor=hp
  1250. ;;
  1251. -mpeix*)
  1252. vendor=hp
  1253. ;;
  1254. -hiux*)
  1255. vendor=hitachi
  1256. ;;
  1257. -unos*)
  1258. vendor=crds
  1259. ;;
  1260. -dgux*)
  1261. vendor=dg
  1262. ;;
  1263. -luna*)
  1264. vendor=omron
  1265. ;;
  1266. -genix*)
  1267. vendor=ns
  1268. ;;
  1269. -mvs* | -opened*)
  1270. vendor=ibm
  1271. ;;
  1272. -ptx*)
  1273. vendor=sequent
  1274. ;;
  1275. -vxsim* | -vxworks*)
  1276. vendor=wrs
  1277. ;;
  1278. -aux*)
  1279. vendor=apple
  1280. ;;
  1281. -hms*)
  1282. vendor=hitachi
  1283. ;;
  1284. -mpw* | -macos*)
  1285. vendor=apple
  1286. ;;
  1287. -*mint | -*MiNT)
  1288. vendor=atari
  1289. ;;
  1290. esac
  1291. basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  1292. ;;
  1293. esac
  1294. echo $basic_machine$os
  1295. exit 0
  1296. # Local variables:
  1297. # eval: (add-hook 'write-file-hooks 'time-stamp)
  1298. # time-stamp-start: "version='"
  1299. # time-stamp-format: "%:y-%02m-%02d"
  1300. # time-stamp-end: "'"
  1301. # End: