config.sub 33 KB

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