config.sub 30 KB

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