config.sub 34 KB

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