config.sub 33 KB

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