config.sub 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327
  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-07-06'
  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] | 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)
  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-*)
  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-cbm
  286. ;;
  287. amigaos | amigados)
  288. basic_machine=m68k-cbm
  289. os=-amigaos
  290. ;;
  291. amigaunix | amix)
  292. basic_machine=m68k-cbm
  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. iris | iris4d)
  504. basic_machine=mips-sgi
  505. case $os in
  506. -irix*)
  507. ;;
  508. *)
  509. os=-irix4
  510. ;;
  511. esac
  512. ;;
  513. isi68 | isi)
  514. basic_machine=m68k-isi
  515. os=-sysv
  516. ;;
  517. m88k-omron*)
  518. basic_machine=m88k-omron
  519. ;;
  520. magnum | m3230)
  521. basic_machine=mips-mips
  522. os=-sysv
  523. ;;
  524. merlin)
  525. basic_machine=ns32k-utek
  526. os=-sysv
  527. ;;
  528. miniframe)
  529. basic_machine=m68000-convergent
  530. ;;
  531. *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
  532. basic_machine=m68k-atari
  533. os=-mint
  534. ;;
  535. mipsel*-linux*)
  536. basic_machine=mipsel-unknown
  537. os=-linux-gnu
  538. ;;
  539. mips*-linux*)
  540. basic_machine=mips-unknown
  541. os=-linux-gnu
  542. ;;
  543. mips3*-*)
  544. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  545. ;;
  546. mips3*)
  547. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  548. ;;
  549. mmix*)
  550. basic_machine=mmix-knuth
  551. os=-mmixware
  552. ;;
  553. monitor)
  554. basic_machine=m68k-rom68k
  555. os=-coff
  556. ;;
  557. msdos)
  558. basic_machine=i386-unknown
  559. os=-msdos
  560. ;;
  561. mvs)
  562. basic_machine=i370-ibm
  563. os=-mvs
  564. ;;
  565. ncr3000)
  566. basic_machine=i486-ncr
  567. os=-sysv4
  568. ;;
  569. netbsd386)
  570. basic_machine=i386-unknown
  571. os=-netbsd
  572. ;;
  573. netwinder)
  574. basic_machine=armv4l-rebel
  575. os=-linux
  576. ;;
  577. news | news700 | news800 | news900)
  578. basic_machine=m68k-sony
  579. os=-newsos
  580. ;;
  581. news1000)
  582. basic_machine=m68030-sony
  583. os=-newsos
  584. ;;
  585. news-3600 | risc-news)
  586. basic_machine=mips-sony
  587. os=-newsos
  588. ;;
  589. necv70)
  590. basic_machine=v70-nec
  591. os=-sysv
  592. ;;
  593. next | m*-next )
  594. basic_machine=m68k-next
  595. case $os in
  596. -nextstep* )
  597. ;;
  598. -ns2*)
  599. os=-nextstep2
  600. ;;
  601. *)
  602. os=-nextstep3
  603. ;;
  604. esac
  605. ;;
  606. nh3000)
  607. basic_machine=m68k-harris
  608. os=-cxux
  609. ;;
  610. nh[45]000)
  611. basic_machine=m88k-harris
  612. os=-cxux
  613. ;;
  614. nindy960)
  615. basic_machine=i960-intel
  616. os=-nindy
  617. ;;
  618. mon960)
  619. basic_machine=i960-intel
  620. os=-mon960
  621. ;;
  622. np1)
  623. basic_machine=np1-gould
  624. ;;
  625. nsr-tandem)
  626. basic_machine=nsr-tandem
  627. ;;
  628. op50n-* | op60c-*)
  629. basic_machine=hppa1.1-oki
  630. os=-proelf
  631. ;;
  632. OSE68000 | ose68000)
  633. basic_machine=m68000-ericsson
  634. os=-ose
  635. ;;
  636. os68k)
  637. basic_machine=m68k-none
  638. os=-os68k
  639. ;;
  640. pa-hitachi)
  641. basic_machine=hppa1.1-hitachi
  642. os=-hiuxwe2
  643. ;;
  644. paragon)
  645. basic_machine=i860-intel
  646. os=-osf
  647. ;;
  648. pbd)
  649. basic_machine=sparc-tti
  650. ;;
  651. pbb)
  652. basic_machine=m68k-tti
  653. ;;
  654. pc532 | pc532-*)
  655. basic_machine=ns32k-pc532
  656. ;;
  657. pentium | p5 | k5 | k6 | nexen)
  658. basic_machine=i586-pc
  659. ;;
  660. pentiumpro | p6 | 6x86 | athlon)
  661. basic_machine=i686-pc
  662. ;;
  663. pentiumii | pentium2)
  664. basic_machine=i786-pc
  665. ;;
  666. pentium-* | p5-* | k5-* | k6-* | nexen-*)
  667. basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  668. ;;
  669. pentiumpro-* | p6-* | 6x86-* | athlon-*)
  670. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  671. ;;
  672. pentiumii-* | pentium2-*)
  673. basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  674. ;;
  675. pn)
  676. basic_machine=pn-gould
  677. ;;
  678. power) basic_machine=rs6000-ibm
  679. ;;
  680. ppc) basic_machine=powerpc-unknown
  681. ;;
  682. ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  683. ;;
  684. ppcle | powerpclittle | ppc-le | powerpc-little)
  685. basic_machine=powerpcle-unknown
  686. ;;
  687. ppcle-* | powerpclittle-*)
  688. basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  689. ;;
  690. ps2)
  691. basic_machine=i386-ibm
  692. ;;
  693. rom68k)
  694. basic_machine=m68k-rom68k
  695. os=-coff
  696. ;;
  697. rm[46]00)
  698. basic_machine=mips-siemens
  699. ;;
  700. rtpc | rtpc-*)
  701. basic_machine=romp-ibm
  702. ;;
  703. sa29200)
  704. basic_machine=a29k-amd
  705. os=-udi
  706. ;;
  707. sequent)
  708. basic_machine=i386-sequent
  709. ;;
  710. sh)
  711. basic_machine=sh-hitachi
  712. os=-hms
  713. ;;
  714. sparclite-wrs)
  715. basic_machine=sparclite-wrs
  716. os=-vxworks
  717. ;;
  718. sps7)
  719. basic_machine=m68k-bull
  720. os=-sysv2
  721. ;;
  722. spur)
  723. basic_machine=spur-unknown
  724. ;;
  725. st2000)
  726. basic_machine=m68k-tandem
  727. ;;
  728. stratus)
  729. basic_machine=i860-stratus
  730. os=-sysv4
  731. ;;
  732. sun2)
  733. basic_machine=m68000-sun
  734. ;;
  735. sun2os3)
  736. basic_machine=m68000-sun
  737. os=-sunos3
  738. ;;
  739. sun2os4)
  740. basic_machine=m68000-sun
  741. os=-sunos4
  742. ;;
  743. sun3os3)
  744. basic_machine=m68k-sun
  745. os=-sunos3
  746. ;;
  747. sun3os4)
  748. basic_machine=m68k-sun
  749. os=-sunos4
  750. ;;
  751. sun4os3)
  752. basic_machine=sparc-sun
  753. os=-sunos3
  754. ;;
  755. sun4os4)
  756. basic_machine=sparc-sun
  757. os=-sunos4
  758. ;;
  759. sun4sol2)
  760. basic_machine=sparc-sun
  761. os=-solaris2
  762. ;;
  763. sun3 | sun3-*)
  764. basic_machine=m68k-sun
  765. ;;
  766. sun4)
  767. basic_machine=sparc-sun
  768. ;;
  769. sun386 | sun386i | roadrunner)
  770. basic_machine=i386-sun
  771. ;;
  772. sv1)
  773. basic_machine=sv1-cray
  774. os=-unicos
  775. ;;
  776. symmetry)
  777. basic_machine=i386-sequent
  778. os=-dynix
  779. ;;
  780. t3e)
  781. basic_machine=t3e-cray
  782. os=-unicos
  783. ;;
  784. tic54x | c54x*)
  785. basic_machine=tic54x-unknown
  786. os=-coff
  787. ;;
  788. tx39)
  789. basic_machine=mipstx39-unknown
  790. ;;
  791. tx39el)
  792. basic_machine=mipstx39el-unknown
  793. ;;
  794. tower | tower-32)
  795. basic_machine=m68k-ncr
  796. ;;
  797. udi29k)
  798. basic_machine=a29k-amd
  799. os=-udi
  800. ;;
  801. ultra3)
  802. basic_machine=a29k-nyu
  803. os=-sym1
  804. ;;
  805. v810 | necv810)
  806. basic_machine=v810-nec
  807. os=-none
  808. ;;
  809. vaxv)
  810. basic_machine=vax-dec
  811. os=-sysv
  812. ;;
  813. vms)
  814. basic_machine=vax-dec
  815. os=-vms
  816. ;;
  817. vpp*|vx|vx-*)
  818. basic_machine=f301-fujitsu
  819. ;;
  820. vxworks960)
  821. basic_machine=i960-wrs
  822. os=-vxworks
  823. ;;
  824. vxworks68)
  825. basic_machine=m68k-wrs
  826. os=-vxworks
  827. ;;
  828. vxworks29k)
  829. basic_machine=a29k-wrs
  830. os=-vxworks
  831. ;;
  832. w65*)
  833. basic_machine=w65-wdc
  834. os=-none
  835. ;;
  836. w89k-*)
  837. basic_machine=hppa1.1-winbond
  838. os=-proelf
  839. ;;
  840. xmp)
  841. basic_machine=xmp-cray
  842. os=-unicos
  843. ;;
  844. xps | xps100)
  845. basic_machine=xps100-honeywell
  846. ;;
  847. z8k-*-coff)
  848. basic_machine=z8k-unknown
  849. os=-sim
  850. ;;
  851. none)
  852. basic_machine=none-none
  853. os=-none
  854. ;;
  855. # Here we handle the default manufacturer of certain CPU types. It is in
  856. # some cases the only manufacturer, in others, it is the most popular.
  857. w89k)
  858. basic_machine=hppa1.1-winbond
  859. ;;
  860. op50n)
  861. basic_machine=hppa1.1-oki
  862. ;;
  863. op60c)
  864. basic_machine=hppa1.1-oki
  865. ;;
  866. mips)
  867. if [ x$os = x-linux-gnu ]; then
  868. basic_machine=mips-unknown
  869. else
  870. basic_machine=mips-mips
  871. fi
  872. ;;
  873. romp)
  874. basic_machine=romp-ibm
  875. ;;
  876. rs6000)
  877. basic_machine=rs6000-ibm
  878. ;;
  879. vax)
  880. basic_machine=vax-dec
  881. ;;
  882. pdp11)
  883. basic_machine=pdp11-dec
  884. ;;
  885. we32k)
  886. basic_machine=we32k-att
  887. ;;
  888. sh3 | sh4)
  889. base_machine=sh-unknown
  890. ;;
  891. sparc | sparcv9)
  892. basic_machine=sparc-sun
  893. ;;
  894. cydra)
  895. basic_machine=cydra-cydrome
  896. ;;
  897. orion)
  898. basic_machine=orion-highlevel
  899. ;;
  900. orion105)
  901. basic_machine=clipper-highlevel
  902. ;;
  903. mac | mpw | mac-mpw)
  904. basic_machine=m68k-apple
  905. ;;
  906. pmac | pmac-mpw)
  907. basic_machine=powerpc-apple
  908. ;;
  909. c4x*)
  910. basic_machine=c4x-none
  911. os=-coff
  912. ;;
  913. *)
  914. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  915. exit 1
  916. ;;
  917. esac
  918. # Here we canonicalize certain aliases for manufacturers.
  919. case $basic_machine in
  920. *-digital*)
  921. basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  922. ;;
  923. *-commodore*)
  924. basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  925. ;;
  926. *)
  927. ;;
  928. esac
  929. # Decode manufacturer-specific aliases for certain operating systems.
  930. if [ x"$os" != x"" ]
  931. then
  932. case $os in
  933. # First match some system type aliases
  934. # that might get confused with valid system types.
  935. # -solaris* is a basic system type, with this one exception.
  936. -solaris1 | -solaris1.*)
  937. os=`echo $os | sed -e 's|solaris1|sunos4|'`
  938. ;;
  939. -solaris)
  940. os=-solaris2
  941. ;;
  942. -svr4*)
  943. os=-sysv4
  944. ;;
  945. -unixware*)
  946. os=-sysv4.2uw
  947. ;;
  948. -gnu/linux*)
  949. os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  950. ;;
  951. # First accept the basic system types.
  952. # The portable systems comes first.
  953. # Each alternative MUST END IN A *, to match a version number.
  954. # -sysv* is not here because it comes later, after sysvr4.
  955. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  956. | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
  957. | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  958. | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  959. | -aos* \
  960. | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  961. | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  962. | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
  963. | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  964. | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  965. | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  966. | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  967. | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
  968. | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
  969. | -openstep* | -oskit*)
  970. # Remember, each alternative MUST END IN *, to match a version number.
  971. ;;
  972. -qnx*)
  973. case $basic_machine in
  974. x86-* | i[34567]86-*)
  975. ;;
  976. *)
  977. os=-nto$os
  978. ;;
  979. esac
  980. ;;
  981. -nto*)
  982. os=-nto-qnx
  983. ;;
  984. -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  985. | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
  986. | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
  987. ;;
  988. -mac*)
  989. os=`echo $os | sed -e 's|mac|macos|'`
  990. ;;
  991. -linux*)
  992. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  993. ;;
  994. -sunos5*)
  995. os=`echo $os | sed -e 's|sunos5|solaris2|'`
  996. ;;
  997. -sunos6*)
  998. os=`echo $os | sed -e 's|sunos6|solaris3|'`
  999. ;;
  1000. -opened*)
  1001. os=-openedition
  1002. ;;
  1003. -wince*)
  1004. os=-wince
  1005. ;;
  1006. -osfrose*)
  1007. os=-osfrose
  1008. ;;
  1009. -osf*)
  1010. os=-osf
  1011. ;;
  1012. -utek*)
  1013. os=-bsd
  1014. ;;
  1015. -dynix*)
  1016. os=-bsd
  1017. ;;
  1018. -acis*)
  1019. os=-aos
  1020. ;;
  1021. -386bsd)
  1022. os=-bsd
  1023. ;;
  1024. -ctix* | -uts*)
  1025. os=-sysv
  1026. ;;
  1027. -ns2 )
  1028. os=-nextstep2
  1029. ;;
  1030. -nsk)
  1031. os=-nsk
  1032. ;;
  1033. # Preserve the version number of sinix5.
  1034. -sinix5.*)
  1035. os=`echo $os | sed -e 's|sinix|sysv|'`
  1036. ;;
  1037. -sinix*)
  1038. os=-sysv4
  1039. ;;
  1040. -triton*)
  1041. os=-sysv3
  1042. ;;
  1043. -oss*)
  1044. os=-sysv3
  1045. ;;
  1046. -svr4)
  1047. os=-sysv4
  1048. ;;
  1049. -svr3)
  1050. os=-sysv3
  1051. ;;
  1052. -sysvr4)
  1053. os=-sysv4
  1054. ;;
  1055. # This must come after -sysvr4.
  1056. -sysv*)
  1057. ;;
  1058. -ose*)
  1059. os=-ose
  1060. ;;
  1061. -es1800*)
  1062. os=-ose
  1063. ;;
  1064. -xenix)
  1065. os=-xenix
  1066. ;;
  1067. -*mint | -*MiNT)
  1068. os=-mint
  1069. ;;
  1070. -none)
  1071. ;;
  1072. *)
  1073. # Get rid of the `-' at the beginning of $os.
  1074. os=`echo $os | sed 's/[^-]*-//'`
  1075. echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  1076. exit 1
  1077. ;;
  1078. esac
  1079. else
  1080. # Here we handle the default operating systems that come with various machines.
  1081. # The value should be what the vendor currently ships out the door with their
  1082. # machine or put another way, the most popular os provided with the machine.
  1083. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  1084. # "-sun"), then you have to tell the case statement up towards the top
  1085. # that MANUFACTURER isn't an operating system. Otherwise, code above
  1086. # will signal an error saying that MANUFACTURER isn't an operating
  1087. # system, and we'll never get to this point.
  1088. case $basic_machine in
  1089. *-acorn)
  1090. os=-riscix1.2
  1091. ;;
  1092. arm*-rebel)
  1093. os=-linux
  1094. ;;
  1095. arm*-semi)
  1096. os=-aout
  1097. ;;
  1098. pdp11-*)
  1099. os=-none
  1100. ;;
  1101. *-dec | vax-*)
  1102. os=-ultrix4.2
  1103. ;;
  1104. m68*-apollo)
  1105. os=-domain
  1106. ;;
  1107. i386-sun)
  1108. os=-sunos4.0.2
  1109. ;;
  1110. m68000-sun)
  1111. os=-sunos3
  1112. # This also exists in the configure program, but was not the
  1113. # default.
  1114. # os=-sunos4
  1115. ;;
  1116. m68*-cisco)
  1117. os=-aout
  1118. ;;
  1119. mips*-cisco)
  1120. os=-elf
  1121. ;;
  1122. mips*-*)
  1123. os=-elf
  1124. ;;
  1125. *-tti) # must be before sparc entry or we get the wrong os.
  1126. os=-sysv3
  1127. ;;
  1128. sparc-* | *-sun)
  1129. os=-sunos4.1.1
  1130. ;;
  1131. *-be)
  1132. os=-beos
  1133. ;;
  1134. *-ibm)
  1135. os=-aix
  1136. ;;
  1137. *-wec)
  1138. os=-proelf
  1139. ;;
  1140. *-winbond)
  1141. os=-proelf
  1142. ;;
  1143. *-oki)
  1144. os=-proelf
  1145. ;;
  1146. *-hp)
  1147. os=-hpux
  1148. ;;
  1149. *-hitachi)
  1150. os=-hiux
  1151. ;;
  1152. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  1153. os=-sysv
  1154. ;;
  1155. *-cbm)
  1156. os=-amigaos
  1157. ;;
  1158. *-dg)
  1159. os=-dgux
  1160. ;;
  1161. *-dolphin)
  1162. os=-sysv3
  1163. ;;
  1164. m68k-ccur)
  1165. os=-rtu
  1166. ;;
  1167. m88k-omron*)
  1168. os=-luna
  1169. ;;
  1170. *-next )
  1171. os=-nextstep
  1172. ;;
  1173. *-sequent)
  1174. os=-ptx
  1175. ;;
  1176. *-crds)
  1177. os=-unos
  1178. ;;
  1179. *-ns)
  1180. os=-genix
  1181. ;;
  1182. i370-*)
  1183. os=-mvs
  1184. ;;
  1185. *-next)
  1186. os=-nextstep3
  1187. ;;
  1188. *-gould)
  1189. os=-sysv
  1190. ;;
  1191. *-highlevel)
  1192. os=-bsd
  1193. ;;
  1194. *-encore)
  1195. os=-bsd
  1196. ;;
  1197. *-sgi)
  1198. os=-irix
  1199. ;;
  1200. *-siemens)
  1201. os=-sysv4
  1202. ;;
  1203. *-masscomp)
  1204. os=-rtu
  1205. ;;
  1206. f301-fujitsu)
  1207. os=-uxpv
  1208. ;;
  1209. *-rom68k)
  1210. os=-coff
  1211. ;;
  1212. *-*bug)
  1213. os=-coff
  1214. ;;
  1215. *-apple)
  1216. os=-macos
  1217. ;;
  1218. *-atari*)
  1219. os=-mint
  1220. ;;
  1221. *)
  1222. os=-none
  1223. ;;
  1224. esac
  1225. fi
  1226. # Here we handle the case where we know the os, and the CPU type, but not the
  1227. # manufacturer. We pick the logical manufacturer.
  1228. vendor=unknown
  1229. case $basic_machine in
  1230. *-unknown)
  1231. case $os in
  1232. -riscix*)
  1233. vendor=acorn
  1234. ;;
  1235. -sunos*)
  1236. vendor=sun
  1237. ;;
  1238. -aix*)
  1239. vendor=ibm
  1240. ;;
  1241. -beos*)
  1242. vendor=be
  1243. ;;
  1244. -hpux*)
  1245. vendor=hp
  1246. ;;
  1247. -mpeix*)
  1248. vendor=hp
  1249. ;;
  1250. -hiux*)
  1251. vendor=hitachi
  1252. ;;
  1253. -unos*)
  1254. vendor=crds
  1255. ;;
  1256. -dgux*)
  1257. vendor=dg
  1258. ;;
  1259. -luna*)
  1260. vendor=omron
  1261. ;;
  1262. -genix*)
  1263. vendor=ns
  1264. ;;
  1265. -mvs* | -opened*)
  1266. vendor=ibm
  1267. ;;
  1268. -ptx*)
  1269. vendor=sequent
  1270. ;;
  1271. -vxsim* | -vxworks*)
  1272. vendor=wrs
  1273. ;;
  1274. -aux*)
  1275. vendor=apple
  1276. ;;
  1277. -hms*)
  1278. vendor=hitachi
  1279. ;;
  1280. -mpw* | -macos*)
  1281. vendor=apple
  1282. ;;
  1283. -*mint | -*MiNT)
  1284. vendor=atari
  1285. ;;
  1286. esac
  1287. basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  1288. ;;
  1289. esac
  1290. echo $basic_machine$os
  1291. exit 0
  1292. # Local variables:
  1293. # eval: (add-hook 'write-file-hooks 'time-stamp)
  1294. # time-stamp-start: "version='"
  1295. # time-stamp-format: "%:y-%02m-%02d"
  1296. # time-stamp-end: "'"
  1297. # End: