config.sub 29 KB

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