config.sub 27 KB

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