1
0

config.sub 31 KB

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