config.sub 32 KB

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