1
0

config.sub 31 KB

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