config.sub 33 KB

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